Repository navigation
feat(frontend): /m run Configuration tab with prompt template, Add evaluator and Edit - #8193
Conversation
…tor, Edit The Configuration tab gets the /w content: Edit on the summary card, the test set, app and variant as chips with links, the prompt template the run used, the evaluator type and output metrics, and Add evaluator. The edit dialog has the run's evaluators and a picker; Update adds the picked evaluators to the run (same origin as its other evaluators) and runs them on every scenario without overwriting results, as /w does.
|
Caution Review failedThe pull request is closed.
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. |
Website previewPreview URL: https://pr-8193-agenta-website-preview.mahmoud-637.workers.dev Built from |
Railway Preview Environment
Dependent tests finished. Post /preview for manual review. Environment absence verified; retained storage requires separate provider accounting. Post |
# Conflicts: # web/mobile/src/features/evaluation-run/RunDetailsHeader.tsx # web/mobile/src/features/evaluation-run/overview/RunOverviewView.tsx # web/mobile/src/features/evaluation-run/overview/runSummaryRows.tsx
📘 Docs preview
This comment updates in place on every push. |
|
🤖 The AI agent says: @coderabbitai review |
|
Action not completed
|
Context
On an evaluation run, the /w Configuration tab shows the prompt that was evaluated, links to the test set and variant, the evaluator type and output metrics, and lets you edit the run and add an evaluator to it. The /m tab showed plain text, no prompt, no evaluator type or metrics, and could not edit anything. Users could not see the prompt that was evaluated, add an evaluator to a finished run, or rename the run from this tab.
Changes
Configuration tab
01a1acfc…d003with copy, as in /w.RevisionConfigView, now exported from@agenta/entity-ui/variant), loaded withnext/dynamic. A custom workflow without a schema still shows its JSON.Edit dialog (also opened from the run's "⋮" menu): name, description, and an Evaluators list with an "Add evaluator" picker, the one the new evaluation uses (human evaluators for a human run, automatic ones for the others). The run's evaluators show as picked. Picks are staged and can be removed; nothing is saved until Update.
Saving, as /w's
saveEvaluationEditAtomdoes:An added evaluator gets the origin of the run's other evaluators, so a human run stays human. Then, only when evaluators were added, every scenario id of the run is read page by page and sent to
POST /simple/evaluations/{id}/processwithoverwrite: false: the new evaluator fills its cells, the old results stay. Every query keyed by the run and the runs list then reload. If the process call fails, the edit is still saved, the page reloads, and the dialog says the update failed.New in
@agenta/entities/evaluationRun:buildRunEditBodytakesaddedEvaluatorRevisionIds;processNewEvaluatorSteps.Who can edit: unchanged from #8183. A live run, a closed run, and a reader without
edit_evaluation_runsget no Edit and no Add evaluator.Stacked on #8183 (base
feat/m-parity-evaluation-run-header).Not matched yet
What the tests cover
Risks, in order: the edit sends a wrong body (loses steps, flips origins, drops the new evaluator); new evaluators never run, or old results are overwritten; someone who may not edit sees the controls; the tab shows the wrong revision.
runDetailsHeader.render.test.tsx(real run page, real save code, only HTTP mocked):overwrite: false.evaluation-run-edit.test.ts(entities): the added evaluator's origin for auto and human runs, a duplicate changes nothing, the scenario ids are read across pages, no scenarios means no process request, and a failed process throws.runConfigSections.render.test.tsx: the test set and variant chips link with the run's revision ids; the prompt template shows the run's revision; a custom workflow shows JSON instead.runConfigEvaluators.render.test.tsx: the output metrics and type come from the revision the run used.runSummaryCard.render.test.tsx: Edit shows for an editor only (this replaces the old "no Edit" test).Tests / notes
@agenta/mobile,@agenta/entitiesand@agenta/oss(/w, because two shared packages changed): pass. /w sees no change: it does not importRevisionConfigView, and the newbuildRunEditBodyargument is optional.What to QA