Skip to content

feat(frontend): metric, cost and per-tab columns in the /m evaluations list - #8185

Merged
mmabrouk merged 5 commits into
release/v0.128.10from
feat/m-parity-evaluations-list-columns
Nov 6, 2026
Merged

mmabrouk merged 5 commits into
release/v0.128.10from
feat/m-parity-evaluations-list-columns

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Nov 6, 2026

Copy link
Copy Markdown
Member

Stacks on #8164 (shared evaluation logic). Base: feat/m-parity-evaluation-logic.

Context

The /m Evaluations list showed the same seven columns on every tab: Status, Name, Kind, Application, Test set, Created on, Created by. It had no scores, no cost and no duration, so a user had to open each run to see if it passed. On Live Evals, Application and Test set were empty and nothing said which traces a run watches. The test set and app cells also had no version, so "default v3" and "verbose v5" looked the same.

The old app (/w) shows one column per evaluator metric, the invocation metrics, and columns that follow the tab.

Changes

The list now picks its columns the way /w does, from the tab and the runs on screen:

  • One column per evaluator metric, labelled with the evaluator and the metric (for example Exact Match · Success). Boolean metrics show the true/false bar with the share of true ("100.0%"), as in /w. Other metrics show the /w cell text from formatMetricValue. Metrics the evaluator's output schema types as text (a comment) get no column, as in /w.
  • Cost, Duration, Tokens and Errors for every tab.
  • Reference columns follow the runs: Test set and Application on Auto, Human and SDK; Query on Live; all that apply on All. The Kind column shows on All only.
  • Test set cells show the revision ("Capitals v3"). Application cells show the variant and revision under the app ("Capital finder", then "verbose v5").
  • The Query cell prints the live run's trace filter, one condition per line ("Trace Type is invocation"), with the same labels as the /w preview.

Speed: the metric and query cells load once a row is near the screen. The rows that ask in the same frame share one request (runLevelMetricsQueryAtomFamily and a new batched query revision atom), so a page of 30 runs makes one metrics request, not one per cell. Phones (under 640 px) keep the current layout (status, name, kind and date, menu) and load no metrics.

Shared logic added to @agenta/entities/evaluationRun, with tests:

  • runListColumns(runs, tab): the column plan (reference columns, evaluator groups and their metrics per run step, invocation columns), copied from /w useEvaluationRunsColumns and referenceSchema.
  • runMetricCellView: the /w rule for a bar, a top category or text.
  • isTextOutputMetric: the /w rule that hides text metrics.
  • buildRunStatsMap(run, metrics, "latest"): a live run's list cell reads the newest window, as /w does. The run page keeps the static row (the default).
  • flattenQueryConditions, queryLiveQueryRevisions and liveQueryRevisionQueryAtomFamily for the Query column.

The app overview runs table passes no tab, so it keeps its basic columns without metrics.

Tests

  • New evaluation-run-list-columns.test.ts (entities): column plans for the Auto, Live, All and empty tabs on runs captured from a test stack, metric labels, cell views, the latest row and the text metric rule.
  • New evaluationRunsColumns.render.test.tsx (mobile): headers per tab, cell text (0.85, 70.0%, $0.0012, 522ms), one metrics request for three rows, test set and variant versions, the Live query line, text metrics hidden, and phones load no metrics.
  • Type checks for @agenta/mobile, @agenta/entities and @agenta/oss; eslint and prettier on changed files.
  • Checked in the browser against the parity stack on the Auto, Human, Live and All tabs and at 390 px.

Note: a run that has not finished (a live run, or a human run waiting for annotations) refreshes its metrics every 5 seconds while its row is on screen. This is the existing behavior of runLevelMetricsQueryAtomFamily; the refreshes of the rows on screen are batched.

What to QA

  • Evaluations, Auto Evals tab on a wide screen: one column per evaluator metric with the /w values, then Cost, Duration, Tokens and Errors. The table scrolls sideways.
  • Test set shows "Capitals v3"; Application shows the app and, under it, "verbose v5".
  • Live Evals tab: a Query column with "Trace Type is invocation", no Test set or Application column, and the live evaluator metrics.
  • All Evals tab: the Kind column comes back, with the reference columns of every run on the page.
  • Human Evals tab: no column for a text metric such as a comment.
  • Regression: at 390 px the list looks as before (status, name with kind and date, menu).

…evaluations list

The runs list now picks its columns like the old list: one column per
evaluator metric, cost, duration, tokens and errors, reference columns
that follow the tab (Query on Live, Kind on All), and test set and
variant revisions in the cells. Metrics and queries load for rows near
the screen in one batched request.

Shared column plan, cell rule and query revision fetch live in
@agenta/entities/evaluationRun with tests.

Entire-Checkpoint: 01M6RC8BT7P134CEN7ZCZTVXG8
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Summary

Summary by CodeRabbit

  • New Features
    • Evaluation run tables now show columns tailored to the selected tab and available run data, including application, test set, query, evaluator, and invocation details.
    • View application and test set revisions, query filters and sampling rates, and readable evaluator metrics in the run list.
    • Live evaluation metrics use the latest available results.
  • Bug Fixes
    • Text-based evaluator outputs no longer appear as metric columns.
    • Narrow-screen run lists remain focused on essential details and avoid loading metrics.

The evaluation runs table now derives wide-screen columns from run data and the selected tab. It displays configured references and evaluator or invocation metrics, and loads query revisions and metrics as rows approach the viewport.

Changes: Evaluation run list

Layer / File(s) Summary
Column planning and metric selection
web/packages/agenta-entities/src/evaluationRun/core/runListColumns.ts, web/packages/agenta-entities/src/evaluationRun/core/runStatsMap.ts, web/packages/agenta-entities/src/evaluationRun/core/index.ts, web/packages/agenta-entities/src/evaluationRun/index.ts, web/packages/agenta-entities/tests/unit/evaluation-run-list-columns.test.ts
Run-list helpers derive reference and metric columns from run data, identify text-output metrics, and select metric cell views. Run-level statistics can prefer the latest timestamped row or the static row. Unit tests cover column selection, metric display, and row selection.
Query revision loading and condition formatting
web/packages/agenta-entities/src/evaluationRun/core/liveQuery.ts, web/packages/agenta-entities/src/evaluationRun/api/queryRevisions.ts, web/packages/agenta-entities/src/evaluationRun/api/index.ts, web/packages/agenta-entities/src/evaluationRun/state/liveQueryRevision.ts, web/packages/agenta-entities/src/evaluationRun/state/index.ts, web/packages/agenta-entities/src/evaluationRun/index.ts, web/mobile/src/features/evaluations/list/queryConditionLines.ts
The query revision API validates revision responses and skips requests when no IDs are supplied. The state atom batches revision IDs by project. Helpers flatten stored query conditions and format them for display.
Tab-specific column planning and table wiring
web/mobile/src/features/evaluations/list/useRunListColumns.ts, web/mobile/src/features/evaluations/list/useEvaluatorColumns.ts, web/mobile/src/features/evaluations/list/EvaluationRunsTable.tsx, web/mobile/src/features/evaluations/list/EvaluationsScreen.tsx
The selected evaluation kind is passed to the table. The table builds wide columns and minimum width from the column plan, and evaluator metadata filters text-output metrics.
Configured run references and metrics
web/mobile/src/features/evaluations/list/RunRowCells.tsx, web/mobile/src/features/evaluations/list/RunApplicationCell.tsx, web/mobile/src/features/evaluations/list/RunTestsetCell.tsx, web/mobile/src/features/evaluations/list/RunVersionChip.tsx, web/mobile/src/features/evaluations/list/RunQueryCell.tsx, web/mobile/src/features/evaluations/list/RunMetricCells.tsx, web/mobile/src/features/evaluations/list/RunMetricValue.tsx, web/mobile/src/features/evaluations/list/runReferences.ts, web/mobile/tests/unit/evaluationRunsColumns.render.test.tsx
Rows render references and metrics selected by the column plan. Query and metric cells use row visibility to control loading. Render tests cover tab columns, displayed values, batched metric requests, and the phone layout.

Estimated code review effort: 4 (Complex) | ~40 minutes

Sequence Diagram(s)

sequenceDiagram
  participant EvaluationsScreen
  participant EvaluationRunsTable
  participant useRunListColumns
  participant runListColumns
  participant RunRowCells
  participant RunMetricCells
  EvaluationsScreen->>EvaluationRunsTable: Pass selected evaluation kind and runs
  EvaluationRunsTable->>useRunListColumns: Build the selected tab column plan
  useRunListColumns->>runListColumns: Derive columns from runs and tab
  runListColumns-->>useRunListColumns: Return references and metric columns
  useRunListColumns-->>EvaluationRunsTable: Provide column plan
  EvaluationRunsTable->>RunRowCells: Render each run with the plan
  RunRowCells->>RunMetricCells: Render configured metric cells
Loading

Possibly related PRs

  • Agenta-AI/agenta#8040: Adds the evaluation runs table that this change extends with tab-specific reference and metric columns.
  • Agenta-AI/agenta#8042: Adds run-level metrics queries and statistics helpers used by the metric cells.
Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title identifies the main change: metric and tab-specific columns in the /m Evaluations list.
Description check Passed The description matches the changes to columns, metrics, references, query data, and tests.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 24 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Website preview

Preview URL: https://pr-8185-agenta-website-preview.mahmoud-637.workers.dev

Built from e809313c9dda26571f6747bc8f7fcdedd81ecd68. This comment updates in place on every push.

…into feat/m-parity-evaluations-list-columns
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Item Value
Status stopped
Commit ec9911697143dea0ded038ae4ead796eb3264d5c
Manual expiry (UTC) Not granted
CI deadline (UTC) Not granted
Workflow https://github.com/Agenta-AI/agenta/actions/runs/42253218264

Dependent tests finished. Post /preview for manual review. Environment absence verified; retained storage requires separate provider accounting.

Post /preview as a new comment to request a one-hour preview. Repeating it while active does not extend the hour.
Preview data is disposable. Expiry is enforced by the next successful cleanup sweep, not an exact timer.
Environment deletion stops its compute. Provider-retained storage and permanent services may still be billed.

@mmabrouk

mmabrouk commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: @coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

@mmabrouk I’ll review the changes.

Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 394fc2d and 06f616f.

Files selected for processing: 24

  • web/mobile/src/features/evaluations/list/EvaluationRunsTable.tsx
  • web/mobile/src/features/evaluations/list/EvaluationsScreen.tsx
  • web/mobile/src/features/evaluations/list/RunApplicationCell.tsx
  • web/mobile/src/features/evaluations/list/RunMetricCells.tsx
  • web/mobile/src/features/evaluations/list/RunMetricValue.tsx
  • web/mobile/src/features/evaluations/list/RunQueryCell.tsx
  • web/mobile/src/features/evaluations/list/RunRowCells.tsx
  • web/mobile/src/features/evaluations/list/RunTestsetCell.tsx
  • web/mobile/src/features/evaluations/list/RunVersionChip.tsx
  • web/mobile/src/features/evaluations/list/queryConditionLines.ts
  • web/mobile/src/features/evaluations/list/runReferences.ts
  • web/mobile/src/features/evaluations/list/useEvaluatorColumns.ts
  • web/mobile/src/features/evaluations/list/useRunListColumns.ts
  • web/mobile/tests/unit/evaluationRunsColumns.render.test.tsx
  • web/packages/agenta-entities/src/evaluationRun/api/index.ts
  • web/packages/agenta-entities/src/evaluationRun/api/queryRevisions.ts
  • web/packages/agenta-entities/src/evaluationRun/core/index.ts
  • web/packages/agenta-entities/src/evaluationRun/core/liveQuery.ts
  • web/packages/agenta-entities/src/evaluationRun/core/runListColumns.ts
  • web/packages/agenta-entities/src/evaluationRun/core/runStatsMap.ts
  • web/packages/agenta-entities/src/evaluationRun/index.ts
  • web/packages/agenta-entities/src/evaluationRun/state/index.ts
  • web/packages/agenta-entities/src/evaluationRun/state/liveQueryRevision.ts
  • web/packages/agenta-entities/tests/unit/evaluation-run-list-columns.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.

Agenta Product Agent added 2 commits November 6, 2026 17:09
…heir own chunk

The metric bar, the run stats and the trace filter labels moved the /m
evaluations page from 1063 KB to 1078.5 KB. They now load with React.lazy
the first time a wide row draws them; phones never load them. The page is
1066.1 KB.

Entire-Checkpoint: 01M6RT95WR2E2G05H4X5YBJNXT
Entire-Checkpoint: 01M6RV20X7CZT73WS9QBX9KTMZ
mmabrouk pushed a commit that referenced this pull request Nov 6, 2026
…olumns' into feat/m-parity-evaluations-list-filters

Takes the #8185 speed fix and Fern query revisions. queryLiveQueries moves
to the Fern client too, since the axios import is gone from that file.

Entire-Checkpoint: 01M6RWAR1W6M4H6RA55XKXG8BY
@mmabrouk
mmabrouk changed the base branch from feat/m-parity-evaluation-logic to release/v0.128.10 November 6, 2026 18:29
@mmabrouk
mmabrouk merged commit 7ce18f6 into release/v0.128.10 Nov 6, 2026
29 of 30 checks passed
@mmabrouk mmabrouk added the lgtm This PR has been approved by a maintainer label Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant