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): drop a file to create a test set from the /m playground load dialog, and keep the evaluator playground state in its address - #8210
Based on main, with release/v0.128.10 merged in (batch 2: #8182, #8199). The diff shrinks once that release merges.
What the user sees
In /m developer mode, the playground's "Load test set" dialog has the "Create a new test set" drop zone back, as /w has (parity finding playground-testset-load-01; decided: keep the /m preview, add the drop zone). Drop a CSV or JSON file on it, or click it to pick one: the create dialog opens with that file already in it and the test set name filled from the file name. "Create test set" uploads it, and the playground loads the new test set, as the old "Create a new test set" button did.
Before, the dialog had only a "Create a new test set" button, and the file had to be picked again inside the create dialog.
/m without developer mode does not change: the playground is a developer view. The test sets page's own create dialog is unchanged (it opens with no file, as before).
How
LoadTestsetDialog (@agenta/playground-ui, only /m renders it) takes a create slot instead of onCreate. The /m host puts PlaygroundTestsetDrop there, which reuses the test sets page's TestsetFileDrop.
CreateTestsetDialog and UploadTestsetStep take an optional initialFile. The step reads it once, as if the user had dropped it there: the same checks, the preview and the name prefill.
What the tests cover
Risks: the dropped file is not the one uploaded, or the upload goes to the test sets page instead of loading into the playground (saved data sent wrong); the create dialog code loads with the playground (speed).
playgroundCreateTestset.render.test.tsx (real playground and loadable controllers, only HTTP mocked): dropping a file in the load dialog opens the create dialog with the file and its name, upload only; the create code loads only on the drop; Create sends exactly file, file_type and the trimmed name, and the playground connects to the new revision; draft rows are kept; a failed load connects nothing; closing returns to the load dialog.
uploadTestset.test.tsx: a step opened with a file shows it, prefills the name, and the upload hands the new test set to the host without opening the test set page.
playgroundEvaluator.render.test.tsx: a reload from the written address brings back the app (by name) and the test case; a link with test cases and no app opens on "Run on a test case"; an edited LLM judge reloads on the same revision, still dirty, with the same nested configuration the form reads. The last test fails without the adapter fix (the configuration comes back flat and the edit is gone).
Checks: /m, @agenta/entities and /w type checks pass. The @agenta/entities (all but mcp-policy-ladder, which fails only on the remote copy), @agenta/playground and /m playground tests pass on the remote machine. ESLint and Prettier pass on the changed files.
Live check of the address: Answer correctness (LLM judge) with Capital finder v3 and "Peru"; after a reload the app, the test case, the Draft tag and the prompt form are back, and Commit is still Commit.
Live check: /m from this branch behind a proxy to the QA stack. Capital finder, Test set, Connect test set: the drop zone shows above the test set list. Picking capitals-6.6.csv opens "Create new test set" with the file and the name "capitals-6.6".
The evaluator playground address (evaluators-pg-08)
The evaluator playground now writes the #pgSnapshot hash like the app playground: the connected app, the test cases and the evaluator's unsaved edits. A reload or a shared link opens the same state. ?revisions= keeps naming the evaluator. A link with test cases and no app opens on "Run on a test case". The restored app shows its name ("Capital finder v3"), not its id.
The evaluator's edits come back in place, on the same revision, so Commit stays Commit, as in /w (decision).
Before this, a restored evaluator showed a raw schema form ("Prompt Template: Array with 2 items") and lost the edit. The cause was not a placeholder: buildDraftPatch in @agenta/entities/workflow/snapshotAdapter.ts diffed the entity's display data against the server data. For an evaluator the display data is nested (prompt.messages, prompt.llm_config), while the server stores it flat (prompt_template, model). The restore then wrote the nested shape over the flat server data. The patch is now the stored (flat) data plus the draft, against the server. This also fixes the same links for evaluators connected in the app playground.
/w: the adapter is shared, and /w builds its playground links with it too. For an app, the patch no longer carries schemas that were only filled in on the client; those are filled in again on restore. The /w type check passes.
… drawer
New prompt now opens the local draft in the editable revision drawer, as /w does.
The user can edit and test the prompt, and Create names it and makes the app,
then the new app opens in the /m playground.
Entire-Checkpoint: 01M6R95RE61YVR8YWTMXQ2X0V3
Create new and the folder menu offer Set up workflow in beta developer mode, as /w
does. The form checks the name against existing apps, tests the URL's health route,
creates the app in the open folder and opens it in the /m playground.
Entire-Checkpoint: 01M6RB085GT0MEFMDSG2HCXVB1
…d summary chips on /m
Add the /w run header to the /m evaluation run page: a run menu with Edit evaluation (name and
description, saved through PATCH /simple/evaluations/{id} with the run's steps and origins), the
Evaluations chip row and a Compare entry built on compareBlockReason and compareCandidates. The
overview summary shows test set, application and variant chips with versions and links, a status
dot and title case metric names. Adds buildRunEditBody, editEvaluationRun, humanizeMetricLabel
and the test set revision version to @agenta/entities/evaluationRun.
Entire-Checkpoint: 01M6RC7Z0WXCY4DF2KVEERTV3Z
…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
…ons and Observability
In beta developer mode an evaluator id under /apps/<id>/ gets the app menu as
an evaluator (no Registry, Playground opens the evaluator playground), its own
Overview (usage charts, recent revisions, evaluations, no Deployment), and the
switcher lists evaluators next to prompt apps. Evaluator rows link to the
Overview from their menu.
… /m test set editor
- The search and the page actions (Import, Add row, Commit) share one
row. Add column and the table settings sit in the last column header;
Delete selected moves into the settings menu, as in /w. TestcaseTable
and EntityTable get an opt-in settingsDelete prop.
- Commit is outlined while there is nothing to commit.
- Edit details shows Name and Description labels; the rename dialog
labels its field. NameDialog gets an optional label, so the Settings
dialogs stay as they are.
- The upload and import previews say Preview (N of M rows);
readTestsetFilePreview returns totalRows.
…e, compact boxes in /m
- TestcaseDataEditor gets two opt-in props for the form without a column
list: fieldOrder ("sorted" by default, or "data" for the row's key
order) and fieldControls (true by default). The /m test set drawer uses
the row order and no per-field add or delete, as in /w.
- The /m drawer caps text boxes at their content (the shared editor theme
sets 150px and loads unlayered in /m) and shows message text in the
normal font, scoped to the drawer.
- The drill-in field delete button gets the label "Delete field".
- The grid test also checks that a reader gets no Delete selected.
Back goes to Prompts, dates show the time, the type icon matches the Prompts list, and the list gets row selection with bulk Restore and CSV export.
Entire-Checkpoint: 01M6RD0VMSN7NBV1HVXA9J3XAT
…st set editor
As in /w, three entry points open the queue picker for test cases:
- Toolbar "Add annotation queue": the selected saved rows the grid
shows, or else every saved row it shows.
- Row menu "Add annotation queue" on a saved row.
- Drawer header "Add to queue" for a saved row.
A row that is not saved yet has no id and is never sent. The picker is
the /m AddToQueuePicker, loaded on first open. The row menu keeps its
focus from closing the picker as the menu closes.
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.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
You can now drop a CSV file into the test-set load dialog to open the creation flow with the file ready to upload.
The file name is displayed and used to prefill the test-set name; you can edit it before creating the test set.
The playground now opens test-set creation when a user drops a file in the load dialog. The create dialog passes that file to the upload step, which processes it as the initial upload.
Changes: Playground test-set creation
Layer / File(s)
Summary
Add file-drop creation to the load dialog web/packages/agenta-playground-ui/src/panels/testsets/LoadTestsetDialog.tsx, web/mobile/src/features/playground/PlaygroundTestsetDrop.tsx, web/mobile/src/features/playground/PlaygroundTestsetMenu.tsx
The load dialog accepts host-provided creation content instead of an onCreate callback. The playground provides a file-drop control and retains the dropped file when opening the create dialog.
Pass the dropped file to upload web/mobile/src/features/testsets/create/CreateTestsetDialog.tsx, web/mobile/src/features/testsets/create/UploadTestsetStep.tsx, web/mobile/tests/unit/playgroundCreateTestset.render.test.tsx, web/mobile/tests/unit/uploadTestset.test.tsx
The create dialog passes an optional initial file to the upload step. The upload step processes it once. Tests cover the playground drop flow, filename prefill, and upload request.
Agenta-AI/agenta#8038: Adds the file-drop and test-set upload components that this change reuses and extends.
Agenta-AI/agenta#8062: Adds the playground test-set menu and load dialog that this change extends with file-drop creation.
Merge Risk: Minimal · previous review 29d55
Users can still select a file to create and load a test set. The non-developer entrypoint looks different, but no material workflow failure is established.
Pre-merge checks: 5
Check name
Status
Explanation
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. 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.
Title check
The title describes the test-set file-drop change. Its evaluator-state claim is not supported by the supplied changes.
Description check
The description explains the test-set file-drop flow. Its evaluator-state claims are not supported by the supplied changes.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. 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 0 functions across 7 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.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
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.
…keep archived app revisions read-only
A live run with no run-wide metric row showed the newest minute's value as the run value.
The old app shows no value there, so the card now shows none.
An archived app's overview opened the editable revision drawer in beta developer mode, which
can commit a new revision. It now opens the read-only drawer.
Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.
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.
… test cases and the evaluator draft
Entire-Checkpoint: 01M6S91994Q0MSY279H311R0RK
mmabrouk
changed the title
feat(frontend): drop a file to create a test set from the /m playground load dialog
feat(frontend): drop a file to create a test set from the /m playground load dialog, and keep the evaluator playground state in its address
Nov 6, 2026
Review skipped: 345 files exceed the limit of 300.
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.
… the real router
Entire-Checkpoint: 01M6SDF7ZKH3WCB68MWQ6PXGX0
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.
Based on
main, withrelease/v0.128.10merged in (batch 2: #8182, #8199). The diff shrinks once that release merges.What the user sees
In /m developer mode, the playground's "Load test set" dialog has the "Create a new test set" drop zone back, as /w has (parity finding playground-testset-load-01; decided: keep the /m preview, add the drop zone). Drop a CSV or JSON file on it, or click it to pick one: the create dialog opens with that file already in it and the test set name filled from the file name. "Create test set" uploads it, and the playground loads the new test set, as the old "Create a new test set" button did.
Before, the dialog had only a "Create a new test set" button, and the file had to be picked again inside the create dialog.
/m without developer mode does not change: the playground is a developer view. The test sets page's own create dialog is unchanged (it opens with no file, as before).
How
LoadTestsetDialog(@agenta/playground-ui, only /m renders it) takes acreateslot instead ofonCreate. The /m host putsPlaygroundTestsetDropthere, which reuses the test sets page'sTestsetFileDrop.CreateTestsetDialogandUploadTestsetSteptake an optionalinitialFile. The step reads it once, as if the user had dropped it there: the same checks, the preview and the name prefill.What the tests cover
Risks: the dropped file is not the one uploaded, or the upload goes to the test sets page instead of loading into the playground (saved data sent wrong); the create dialog code loads with the playground (speed).
playgroundCreateTestset.render.test.tsx(real playground and loadable controllers, only HTTP mocked): dropping a file in the load dialog opens the create dialog with the file and its name, upload only; the create code loads only on the drop; Create sends exactlyfile,file_typeand the trimmed name, and the playground connects to the new revision; draft rows are kept; a failed load connects nothing; closing returns to the load dialog.uploadTestset.test.tsx: a step opened with a file shows it, prefills the name, and the upload hands the new test set to the host without opening the test set page.playgroundEvaluator.render.test.tsx: a reload from the written address brings back the app (by name) and the test case; a link with test cases and no app opens on "Run on a test case"; an edited LLM judge reloads on the same revision, still dirty, with the same nested configuration the form reads. The last test fails without the adapter fix (the configuration comes back flat and the edit is gone).Checks: /m,
@agenta/entitiesand /w type checks pass. The@agenta/entities(all butmcp-policy-ladder, which fails only on the remote copy),@agenta/playgroundand /m playground tests pass on the remote machine. ESLint and Prettier pass on the changed files.Live check of the address: Answer correctness (LLM judge) with Capital finder v3 and "Peru"; after a reload the app, the test case, the Draft tag and the prompt form are back, and Commit is still Commit.
Live check: /m from this branch behind a proxy to the QA stack. Capital finder, Test set, Connect test set: the drop zone shows above the test set list. Picking
capitals-6.6.csvopens "Create new test set" with the file and the name "capitals-6.6".The evaluator playground address (evaluators-pg-08)
The evaluator playground now writes the
#pgSnapshothash like the app playground: the connected app, the test cases and the evaluator's unsaved edits. A reload or a shared link opens the same state.?revisions=keeps naming the evaluator. A link with test cases and no app opens on "Run on a test case". The restored app shows its name ("Capital finder v3"), not its id.The evaluator's edits come back in place, on the same revision, so Commit stays Commit, as in /w (decision).
Before this, a restored evaluator showed a raw schema form ("Prompt Template: Array with 2 items") and lost the edit. The cause was not a placeholder:
buildDraftPatchin@agenta/entities/workflow/snapshotAdapter.tsdiffed the entity's display data against the server data. For an evaluator the display data is nested (prompt.messages,prompt.llm_config), while the server stores it flat (prompt_template,model). The restore then wrote the nested shape over the flat server data. The patch is now the stored (flat) data plus the draft, against the server. This also fixes the same links for evaluators connected in the app playground./w: the adapter is shared, and /w builds its playground links with it too. For an app, the patch no longer carries schemas that were only filled in on the client; those are filled in again on restore. The /w type check passes.