agenta icon indicating copy to clipboard operation
agenta copied to clipboard

[AGE-3086] Observability drawer annotations collapsible only shows numerical metrics, hiding string notes and other annotation types

Open mmabrouk opened this issue 4 months ago • 1 comments

Bug Description

In the observability drawer's annotations collapsible section, only numerical metrics with averages are displayed as chips. String notes, boolean annotations, arrays, and complex objects are being filtered out, creating an inconsistent user experience.

Current Behavior

  • Annotations Tab (detailed view): Shows ALL annotation types ✅
  • Collapsible Chips View (quick access): Only shows numerical metrics ❌

Root Cause

In web/oss/src/components/pages/observability/drawer/TraceSidePanel/TraceAnnotations/index.tsx lines 29-31:

const filteredMetrics = Object.entries(metricsArr).filter(
    ([, metric]) => metric.average !== undefined,
)

This filter excludes annotations that don't have an average property, which includes:

  • String-based notes (evaluator feedback, comments)
  • Boolean flags without aggregation
  • Array values (multi-select categorical data)
  • Complex objects

Expected Behavior

The collapsible chips view should display all annotation types, similar to how the annotations tab works. Users should be able to see:

  • Numerical metrics (with averages) - currently working
  • String notes - currently missing
  • Boolean values - currently missing
  • Array/categorical selections - currently missing

Impact

Users are missing important annotation data in the quick-access chip view, requiring them to expand the full annotations table to see complete evaluation results.

Technical Notes

The groupAnnotationsByReferenceId helper only creates average properties for numerical/boolean metrics, while the annotations tab uses groupOutputValues which properly categorizes all types into metrics/notes/extra.

Files Affected

  • web/oss/src/components/pages/observability/drawer/TraceSidePanel/TraceAnnotations/index.tsx (primary fix needed)
  • Related: web/oss/src/lib/hooks/useAnnotations/assets/helpers.ts (grouping logic)

From SyncLinear.com | AGE-3086

mmabrouk avatar Aug 27 '25 21:08 mmabrouk

The chips view only shows numerical metrics because it filters for annotations with an average property, which are produced by the groupAnnotationsByReferenceId helper. This function only aggregates numbers and booleans, skipping strings, arrays, and complex objects entirely. In contrast, the annotations tab uses groupOutputValues, which categorizes all annotation types—numbers/booleans as metrics, strings as notes, and arrays/objects as extra—allowing it to display everything. There’s no logic in the chips view to handle or render non-numerical types, which is why those annotations are missing from quick access. To align the chips view with the annotations tab, you’d need to generalize the grouping and rendering logic to include all annotation types, not just those with averages.
See grouping logic details
See chips view filtering code

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Aug 27 '25 21:08 dosubot[bot]