Repository navigation
feat(frontend): Live evaluation creation in /m behind the developer view switch - #8068
Conversation
|
🤖 The AI agent says: Review loop result for head
Fixed:
Left on purpose:
|
|
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-8068-agenta-website-preview.mahmoud-637.workers.dev Built from |
|
🤖 The AI agent says: Review loop delta for head
Fixed: the trace filter trigger sat inside the form without a button type, so a click submitted the live evaluation. It is now a plain button, with a test. The Storybook shots showed the bug. |
Railway Preview Environment
Preview use finished or expired. Environment absence verified; retained storage requires separate provider accounting. Post |
createLiveEvaluation posts the trace query, reads its revision, then posts the live run. A failure after the query exists archives the query.
Create the live evaluation through the generated query and evaluation clients, name evaluators after the evaluator instead of the revision, keep the app scope rule in the route, and wait on state in the sheet tests.
cddc61b to
f6da834
Compare
b5a41ef to
1a24973
Compare
Do not merge into v0.128.4. This goes into the next release. Merge #8040 and #8043 first.
Context
The /m evaluations view had no way to start a live evaluation. The Live tab had no create button, its empty state had no start button, and the All tab menu had no Live item. In /w the same flow lives in the "Online evaluation" drawer, which is built on antd and has a few bugs (listed below). The view stays behind the hidden
evaluationsdeveloper view.Changes
A user with
edit_evaluation_runsnow gets "Live evaluation" in the All tab create menu, a "New evaluation" button on the Live tab, and a "Create Evaluation" button in the Live empty state. An app scoped list offers no Live item, because live evaluations are project wide (the Live tab is already hidden there).Each entry opens a new sheet with three sections:
trace_type is invocationrow locked at the top, and a sampling rate slider (0 to 100, default 100). The header says, for example, "2 filters • Sampling 25% • Live traffic".Create sends three requests, through the generated API clients:
The payload is the /w payload. The API ignores
is_active: falseand starts the run at once. On success the sheet closes, the runs list refetches, and the list switches to the Live tab. The request code iscreateLiveEvaluationin@agenta/entities/evaluationRun. It uses a newgetQueriesClientaccessor in@agenta/sdk/resources.The provider key check of the wizard moved to
new/providerKey.tsso both sheets share it. The wizard behaves as before.Not in this PR
The annotation row of the trace filter (pick an evaluator and its feedback) is not offered yet. It comes with
AnnotatedTracesFilter, which another open branch builds.LiveTraceFilter.tsxis the one place to swap in when it lands. The other filter fields work./w bugs fixed in the /m version
POST /simple/queries/{id}/archive, best effort).New user-facing text
Please check these; they are new or changed from /w:
Behavior changes from /w to flag
Tests
@agenta/entities:evaluation-run-create-live.test.tschecks the exact three request bodies, the sampling rate, a query without data, references rows without a key, the slug, the evaluator rule, and the archive after a failure./m:liveEvaluationSheet.render.test.tsxrenders the real sheet with the real evaluator stores, the realcreateLiveEvaluationand the real vault store. Only the HTTP layer (axios and the generated clients) is mocked. It asserts the exact request payloads, validation, the suggested name, a double click, a failure (input kept, query archived), the provider key block, the empty and error states, and the success path.evaluationsScreen,evaluationsRouteandliveEvaluatorSummarytests cover the entries, the app scope rule and the Live tab switch.agentPermissions,membersTabRoleChangeandtestsetCommit; on the last runaddToQueueSlotRegistrationalso timed out under load, and it passes alone), the entities suite (only the knownmcp-policy-ladderfailure on the remote copy), lint on the changed files,speed:check, and the antd route check on the evaluations route.@agenta/mobile/Developer/Evaluations/LiveEvaluationSheet(Empty, Filled, ValidationErrors, NoSupportedEvaluators, Creating, Phone).Known gaps:
FilterDialog.workflowLatestRevisionQueryAtomFamilyreturns null, so the sheet says no supported evaluator exists instead of showing a load error. The /w drawer has the same gap. Fixing it changes a shared atom, so it is a follow-up.What to QA
Turn on the
evaluationsdeveloper view first.