fix(studio): show target in sidebar label for active/in-progress runs#1225
Merged
fix(studio): show target in sidebar label for active/in-progress runs#1225
Conversation
When a Studio-launched eval run has 0 results written yet, the run list could not derive the target from the JSONL (no records = no target field). The label showed "07/05 10:56 · 0%" instead of "07/05 10:56 · wtalms-stg · 0%". Fix: when the Studio launches a run it now: - Generates the output directory path ahead of time (same logic as the CLI default) - Passes it via --output to the CLI subprocess so the path is deterministic - Stores the target and outputDir on the in-memory StudioRun handleRuns in serve.ts falls back to getActiveRunTarget(indexJsonlPath) when the JSONL has 0 records, matching by the known output directory path. The target also now appears in the /api/eval/runs response. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
15a8143
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2b500d38.agentv.pages.dev |
| Branch Preview URL: | https://fix-show-target-in-active-ru.agentv.pages.dev |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
07/05 10:56 · 0%(no target), while completed runs correctly showed07/05 10:12 · wtalms-stg · 100%targetfrom the first JSONL record, but when a run has just started and 0 results have been written yet, there are no records to read from--targetin the Studio'sPOST /api/eval/runrequest)Fix
Three changes in the server (
eval-runner.ts+serve.ts):Generate output dir ahead of time: When Studio launches an eval, it now generates the output directory path using the same default logic as the CLI (
buildDefaultRunDir), passes it via--outputto the subprocess, and stores it alongside thetargeton the in-memoryStudioRunLookup function: Exported
getActiveRunTarget(indexJsonlPath)fromeval-runner.ts— matches a filesystem run to its in-memoryStudioRunby the deterministic output pathFallback in
handleRuns: When JSONL has 0 records,handleRunsinserve.tscallsgetActiveRunTargetto retrieve the target from the active runs trackerThe
targetfield also now appears in/api/eval/runsresponses.Before / After
Before:
07/05 10:56 · 0%After:
07/05 10:56 · wtalms-stg · 0%Test plan
run-label.test.ts: active run (pass_rate=0) with target shows target in labelbun test apps/cli— 518 pass, 0 failbun test apps/studio— 18 pass, 0 fail🤖 Generated with Claude Code