You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(frontend): evaluations list selection, bulk delete, CSV export and column menu in /m - #8212
On the evaluations list in /m (a developer view, beta developer mode only):
Each run row has a checkbox, and the header has a select-all checkbox. While runs are selected, the header row shows "N selected" with a Delete button. Delete asks once ("The selected 2 evaluations will be permanently deleted." with the list of names), deletes the runs in one request, and reloads the list. Delete needs the same edit_evaluation_runs permission as the row menu.
Export CSV in the toolbar saves the selected runs, or every run on screen when none is selected, as the old list does. The file has the columns on screen: status, name, kind (All tab), test set, query, application, one column per evaluator metric ("Exact Match • Success"), the invocation metrics ("Invocation • Cost"), created on and created by (the member name). Metric cells use the same formatter as the old export. Export needs the API key permissions, as in the old list.
A Columns menu in the toolbar (wide screens) hides and shows the test set, query, application, metric and invocation columns. The choice is kept per browser. Status, name, kind and the creation columns always show, as in the old list. A hidden column also leaves the export.
Closes the parity findings evaluations-list-05 (column menu), evaluations-list-06 (selection and bulk delete) and evaluations-list-07 (CSV export).
How it works
The export code (exportRuns.ts) loads on the first click. It asks for the run-level metrics of all exported runs in one request (and the query revisions, when the Query column shows), so runs that never scrolled into view export their numbers too. Names come from what the list already loaded.
The header line and each run's line are pure functions in @agenta/entities/evaluationRun (runListExportHeaders, runListExportRow), next to the existing CSV helpers, with tests against captured runs. visibleRunListColumns drops the hidden columns from the column plan, so the table and the export use the same plan.
The column work moved from EvaluationRunsTable into useRunsTableLayout, so the screen can share the plan with the toolbar. The app overview keeps its table without a column menu.
useRunRowActions gains removeRuns: one confirm and one request for several runs. A run being deleted is busy, so a second press or a row action on it does nothing.
What the tests cover
Risks, most costly first:
Wrong runs deleted. A test selects two of three runs and asserts the exact DELETE request (run_ids: ["a", "b"]), that it is sent only after the confirm, and that the list reloads without them.
A second Delete press while the delete runs. One request only.
A failed delete. The confirm stays open with the error; the runs and the selection stay.
A selected run that leaves the list (another tab, a filter, a delete elsewhere) does not count and is not deleted or exported.
Permissions. Without edit_evaluation_runs there is no Delete; without the API key permissions there is no Export CSV; with neither there are no checkboxes.
Wrong export content. The full CSV text is asserted for all runs and for a selection, the metrics come in one request for exactly the exported runs, a hidden column leaves the table and the file, a name that starts like a formula is saved as text, and a failed export shows an error and saves nothing.
The header and row builders against captured runs, including a run without an evaluator ("—") and metrics not loaded.
Tests run through the real screen with only HTTP, the router and the browser download mocked. Mutation check, each one caught by at least one test: delete sends only the first id, no list reload after delete, export ignores the selection, selection not limited to the runs on screen, Delete shown without the edit right, a hidden column still exported. One mutant survived: removing the per-run busy guard in useRunRowActions. The confirm dialog already disables its Delete button while the request runs, so the double press stays covered; the guard is a second layer for a row menu action on a run that a bulk delete holds.
Selection bar on wide tables (shared ListTable change)
On a table wider than the screen, the bulk actions used to sit at the right end of the header row, so the reader had to scroll sideways to reach Delete. ListTableSelectionBar now puts the actions next to the count and Clear, and the group sticks to the left edge of the scroller. This changes every list that uses selection (evaluators, test sets, registry, variants, deployment history, archived apps): their bulk buttons now sit after Clear instead of at the far right.
Checked in a browser at 1440 px on the Auto tab with eight metric columns: Delete is inside the viewport before and after a sideways scroll, and it opens the confirm. A unit test checks that a wide list's bar still shows its action and runs it with the selection. The 31 /m test files that cover the other lists' selection pass. Types pass for @agenta/ui, @agenta/mobile, @agenta/entities, @agenta/annotation-ui and @agenta/oss.
Speed
next build + speed:check after merging release/v0.128.10: /evaluations 1084.5 KB (limit 1093.9 KB), run page 1060.5 KB (limit 1068.9 KB), app shell 887.3 KB (limit 908.7 KB). Before that merge, this PR added 1.6 KB to /evaluations (1081.0 KB against 1079.4 KB on its base).
New budget entry: apps/[app_id]/evaluations = 1110522 bytes. That is the route's measured first-load gzip size on this build (1084.5 KB), counted the same way speed:check --write counts every other entry. The check adds the shared margin (3 % or 5 KB, whichever is larger), so its limit is 1117.0 KB. I edited only that line by hand and did not run --write.
Stacking
This branch also merges release/v0.128.10. Base: feat/m-parity-evaluations-list-filters (#8195, on #8185 and #8164). This branch also merges feat/m-parity-list-export (#8175, on feat/m-parity-list-selection) for the shared ListTable selection, column menu and CSV download. Until those merge, the diff here also shows #8175 and its base.
Ticks on each row to connect several evaluators, the selected summary
line, coloured type tags (colour tokens scoped to the picker popover
with .ag-playground-colors) and a chevron on the Evaluator button.
Entire-Checkpoint: 01M6RZE1A6BGP2YHBF6ZXJVC3G
Keep the evaluator create flow mounted when the list fills, hand a new
evaluator back once, open older human revisions read-only, load every
revision page before the registry delete guard decides, hide Deploy and
Delete on an archived app overview, classify archived ids with their own
agent flag request, clamp month ranges, stop test set auto-load after a
failed page, and keep row menu clicks from opening the test case drawer.
…mn menu on the evaluations list
Evaluations list in /m: a checkbox per run with select all, a bulk Delete
behind edit_evaluation_runs with one confirm and one request, Export CSV of
the selected runs (or every run on screen) with the columns on screen, and
a Columns menu that hides reference and metric columns per browser.
The export header and lines are pure functions in
@agenta/entities/evaluationRun (runListExportHeaders, runListExportRow,
visibleRunListColumns). The export code loads on the first click.
Entire-Checkpoint: 01M6S51RQFBT5JMXK8CWV5RMN2
Auto reviews are disabled on base/target branches other than the default branch.
🗂️ Base branches to auto review: 1
release/.*
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
Added reusable list-table controls for column visibility, CSV export, and loading more rows.
CSV exports include selected evaluation details and safely format special characters and formula-like values.
Bug Fixes
Improved handling of bulk deletion failures, busy runs, and empty export lists.
Added consistent date-and-time formatting, with a placeholder for missing or invalid dates.
The change adds reusable list-table visibility, CSV, load-more, and date-formatting utilities; evaluation-run column planning and CSV generation; and screen-level column controls, run selection, bulk deletion, and CSV export.
Adds column visibility persistence and a columns menu, CSV serialization and download controls, a load-more button, and date-time formatting. Tests cover CSV escaping, visibility behavior, load-more behavior, and date formatting.
Run-list columns and export model web/packages/agenta-entities/src/evaluationRun/*, web/packages/agenta-entities/tests/unit/evaluation-run-list-export.test.ts
Adds filtering of hidden run-list columns and functions that build CSV headers and rows from the selected column plan. Tests cover column visibility and exported values.
Moves responsive column planning into useRunsTableLayout and adds RunsTable, which renders from a supplied layout and can accept row selection.
Run selection and bulk deletion web/mobile/src/features/evaluations/list/EvaluationsScreen.tsx, web/mobile/src/features/evaluations/list/useRunRowActions.tsx, web/mobile/tests/unit/evaluationRunsBulkActions.render.test.tsx
Adds permission-dependent selection and bulk-delete controls. The action hook confirms once for the selected runs, prevents overlapping work on busy runs, and refreshes the list after successful deletion.
Run CSV export flow web/mobile/src/features/evaluations/list/EvaluationsScreen.tsx, web/mobile/src/features/evaluations/list/RunsExportButton.tsx, web/mobile/src/features/evaluations/list/exportRuns.ts, web/mobile/tests/unit/evaluationRunsBulkActions.render.test.tsx
Adds permission-gated export for selected runs or all listed runs. Export fetches metrics and query revisions only when required by the selected columns, then downloads evaluations.csv.
sequenceDiagram
participant EvaluationsScreen
participant RunsExportButton
participant exportRuns
participant runListExportHeaders
participant runListExportRow
participant downloadCsv
EvaluationsScreen->>RunsExportButton: Pass runs, column plan, and evaluator names
RunsExportButton->>exportRuns: Call with project, runs, plan, and store
exportRuns->>runListExportHeaders: Build headers for the selected columns
exportRuns->>runListExportRow: Build rows with resolved names and statistics
exportRuns->>downloadCsv: Download evaluations.csv
Loading
Possibly related PRs
Agenta-AI/agenta#8040: Adds the evaluations list and single-run deletion, which this change extends with selection and bulk deletion.
Agenta-AI/agenta#8185: Adds the run-list column plan and metric columns used by this change for column visibility and CSV export.
Agenta-AI/agenta#8042: Adds the run-level metrics API called by this change during CSV export.
Merge Risk: Low · previous review e2d39
CSV exports can show negative metrics as text with a leading apostrophe, and test set IDs can appear where names were expected. Bulk delete and the other new list controls are not affected. These are worth fixing soon but do not block merge.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title identifies the main changes to the evaluations list.
Docstring Coverage
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description covers the evaluation list selection, bulk deletion, CSV export, and column visibility changes.
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 3 functions across 25 files.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
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.
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.
…bles, and budget the app evaluations route
The bulk actions now sit next to the count and stick to the scroller's left
edge, so a table wider than the screen does not push Delete out of view.
Adds the speed budget entry for apps/[app_id]/evaluations at its measured
size.
Entire-Checkpoint: 01M6S5SSF78G57A5KNABQQ0QZB
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
nl -ba web/packages/agenta-entities/src/evaluationRun/core/runExport.ts | sed -n '75,185p'
nl -ba web/packages/agenta-entities/src/evaluationRun/core/runListColumns.ts | sed -n '1,50p;210,315p'
Repository: Agenta-AI/agenta
Length of output: 11171
Load test set names before building the CSV.
On narrow screens, test set cells do not mount, but the export plan can include the Test set column. If a test set is not cached, the synchronous read can export its ID instead of its name.
Load and await test set names for exported runs before building rows. Keep the ID fallback for names that cannot be resolved.
Preserve negative numeric metrics as numbers in CSV.
A mean of -0.5 is formatted as a string, so csvCell writes '-0.5 instead of -0.5. CSV consumers cannot parse it as a number. Keep numeric metrics numeric while retaining formula protection for categorical text.
Preview use finished or expired. 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.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes for the user
On the evaluations list in /m (a developer view, beta developer mode only):
edit_evaluation_runspermission as the row menu.Closes the parity findings evaluations-list-05 (column menu), evaluations-list-06 (selection and bulk delete) and evaluations-list-07 (CSV export).
How it works
exportRuns.ts) loads on the first click. It asks for the run-level metrics of all exported runs in one request (and the query revisions, when the Query column shows), so runs that never scrolled into view export their numbers too. Names come from what the list already loaded.@agenta/entities/evaluationRun(runListExportHeaders,runListExportRow), next to the existing CSV helpers, with tests against captured runs.visibleRunListColumnsdrops the hidden columns from the column plan, so the table and the export use the same plan.EvaluationRunsTableintouseRunsTableLayout, so the screen can share the plan with the toolbar. The app overview keeps its table without a column menu.useRunRowActionsgainsremoveRuns: one confirm and one request for several runs. A run being deleted is busy, so a second press or a row action on it does nothing.What the tests cover
Risks, most costly first:
run_ids: ["a", "b"]), that it is sent only after the confirm, and that the list reloads without them.edit_evaluation_runsthere is no Delete; without the API key permissions there is no Export CSV; with neither there are no checkboxes.Tests run through the real screen with only HTTP, the router and the browser download mocked. Mutation check, each one caught by at least one test: delete sends only the first id, no list reload after delete, export ignores the selection, selection not limited to the runs on screen, Delete shown without the edit right, a hidden column still exported. One mutant survived: removing the per-run busy guard in
useRunRowActions. The confirm dialog already disables its Delete button while the request runs, so the double press stays covered; the guard is a second layer for a row menu action on a run that a bulk delete holds.Selection bar on wide tables (shared ListTable change)
On a table wider than the screen, the bulk actions used to sit at the right end of the header row, so the reader had to scroll sideways to reach Delete.
ListTableSelectionBarnow puts the actions next to the count and Clear, and the group sticks to the left edge of the scroller. This changes every list that uses selection (evaluators, test sets, registry, variants, deployment history, archived apps): their bulk buttons now sit after Clear instead of at the far right.Checked in a browser at 1440 px on the Auto tab with eight metric columns: Delete is inside the viewport before and after a sideways scroll, and it opens the confirm. A unit test checks that a wide list's bar still shows its action and runs it with the selection. The 31 /m test files that cover the other lists' selection pass. Types pass for @agenta/ui, @agenta/mobile, @agenta/entities, @agenta/annotation-ui and @agenta/oss.
Speed
next build+speed:checkafter mergingrelease/v0.128.10: /evaluations 1084.5 KB (limit 1093.9 KB), run page 1060.5 KB (limit 1068.9 KB), app shell 887.3 KB (limit 908.7 KB). Before that merge, this PR added 1.6 KB to /evaluations (1081.0 KB against 1079.4 KB on its base).New budget entry:
apps/[app_id]/evaluations= 1110522 bytes. That is the route's measured first-load gzip size on this build (1084.5 KB), counted the same wayspeed:check --writecounts every other entry. The check adds the shared margin (3 % or 5 KB, whichever is larger), so its limit is 1117.0 KB. I edited only that line by hand and did not run--write.Stacking
This branch also merges
release/v0.128.10. Base:feat/m-parity-evaluations-list-filters(#8195, on #8185 and #8164). This branch also mergesfeat/m-parity-list-export(#8175, onfeat/m-parity-list-selection) for the shared ListTable selection, column menu and CSV download. Until those merge, the diff here also shows #8175 and its base.