fix(studio): use singular agent_name/agent_version in experiments views - #311
fix(studio): use singular agent_name/agent_version in experiments views#311marcusds wants to merge 1 commit into
Conversation
ExperimentGroupDataView and ExperimentDetailMetrics read plural agent_names/agent_versions as arrays (.join), but the generated SDK type ExperimentResponse exposes singular agent_name/agent_version (one agent per experiment). The plural fields never existed in the TS SDK, so studio typecheck has been red since #294 (d516541). Read the singular fields directly. ASTD-244 Signed-off-by: mschwab <mschwab@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughExperiment UI displays agent information via single-value fields instead of comma-joined arrays. Table columns for ChangesAgent Field Display Updates
Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
|
Closing: misdiagnosis on my part. web/packages/sdk/generated is git-ignored/generated; my local copy was stale (singular agent_name), so a local typecheck showed false errors. The real spec/SDK exposes plural agent_names/agent_versions (string[]), so #294 and main were always correct and green on CI. This PR's singular change is the actual regression. No fix needed. |
Summary
Fixes the 3
TS2551errors that have made the Studiotypecheckcheck red onmain:ExperimentGroupDataView/index.tsx:127,133—agent_names/agent_versionsnot onExperimentRowExperimentDetailRoute/ExperimentDetailMetrics.tsx:31—agent_namesnot onExperimentResponseRoot cause: #294 (
d5165414bd, "Roll up agent_names/agent_versions") left these views reading pluralagent_names/agent_versionsas arrays (.join(', ')), but the generated SDK typeExperimentResponseexposes singularagent_name: string/agent_version: string(one agent per experiment). The plural fields never existed in the TS SDK, so typecheck has been broken since that commit.Changes
ExperimentGroupDataView:agent_names/agent_versionscolumns → singularagent_name/agent_versionaccessors; headers "Agent Name"/"Agent Version".ExperimentDetailMetrics:agent_names?.join(', ')→agent_name; label "Agent Name".Testing
typecheck: 0 errors (was 3)eslintclean; no remainingagent_names/agent_versionsreferences in studio; no specs cover these filesResolves ASTD-244.
Summary by CodeRabbit