feat(studio): add session telemetry detail views - #793
Conversation
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughSession-first Intake and evaluation detail routes now load session telemetry, select traces and spans through query parameters, and update Studio links, navigation, explorer UI, mocks, and tests. ChangesSession-scoped Intake detail
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/packages/studio/src/components/IntakeDetail/IntakeComponents/AnnotationsPanel.test.tsx (1)
21-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReuse
SESSION_ID/SPAN_IDconstants instead of hardcoding literals.Both history URLs duplicate the literal values already defined as
SESSION_ID/SPAN_IDat the top of the file, risking drift.♻️ Suggested fix
- history: - '/workspaces/default/intake/sessions/session-agent-run-001?traceId=trace-agent-run-001&spanId=span-root-001', + history: + `/workspaces/default/intake/sessions/${SESSION_ID}?traceId=trace-agent-run-001&spanId=${SPAN_ID}`,Also applies to: 44-45
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/packages/studio/src/components/IntakeDetail/IntakeComponents/AnnotationsPanel.test.tsx` around lines 21 - 22, Update the history URL fixtures in the AnnotationsPanel tests to interpolate the existing SESSION_ID and SPAN_ID constants instead of repeating literal session and span values. Apply this to both duplicated history URLs while preserving their current paths and query structure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/packages/studio/src/components/IntakeDetail/README.md`:
- Around line 63-90: Update the route description in the README to acknowledge
both IntakeSessionDetailRoute and EvaluationSessionDetailRoute as valid detail
routes feeding SessionDetailView. Retain the shared traceId and spanId
query-parameter behavior, and remove the claim that /intake/sessions/:sessionId
is the only detail route.
In `@web/packages/studio/src/routes/utils.ts`:
- Around line 328-340: Encode sessionId before passing it to generatePath in
both getEvaluationSessionDetailRoute and getIntakeSessionRoute. In
web/packages/studio/src/routes/utils.test.ts lines 154-165, add coverage using a
session ID containing whitespace and a slash, verifying both helpers produce
correctly encoded routes.
---
Nitpick comments:
In
`@web/packages/studio/src/components/IntakeDetail/IntakeComponents/AnnotationsPanel.test.tsx`:
- Around line 21-22: Update the history URL fixtures in the AnnotationsPanel
tests to interpolate the existing SESSION_ID and SPAN_ID constants instead of
repeating literal session and span values. Apply this to both duplicated history
URLs while preserving their current paths and query structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 828cf609-8e23-453c-97f9-8318b9ace27b
📒 Files selected for processing (43)
services/studio/src/nmp/studio/studio_links.pyservices/studio/tests/unit/test_coding_agents.pyweb/packages/studio/src/components/IntakeDetail/IntakeComponents/AnnotationsPanel.test.tsxweb/packages/studio/src/components/IntakeDetail/IntakeComponents/spanKeyValues.test.tsxweb/packages/studio/src/components/IntakeDetail/IntakeComponents/spanKeyValues.tsxweb/packages/studio/src/components/IntakeDetail/IntakeComponents/traceKeyValues.test.tsxweb/packages/studio/src/components/IntakeDetail/IntakeComponents/traceKeyValues.tsxweb/packages/studio/src/components/IntakeDetail/README.mdweb/packages/studio/src/components/IntakeDetail/SessionDetailView.tsxweb/packages/studio/src/components/IntakeDetail/TraceDetailLayout.tsxweb/packages/studio/src/components/IntakeDetail/TraceDetailSpanTree.tsxweb/packages/studio/src/components/IntakeDetail/TraceDetailSummaryHeader.tsxweb/packages/studio/src/components/IntakeDetail/TraceDetailView.tsxweb/packages/studio/src/components/IntakeDetail/TraceSpanAccordions.tsxweb/packages/studio/src/components/IntakeDetail/TraceSpanTreeView.tsxweb/packages/studio/src/components/IntakeDetail/TraceViewToolbar.tsxweb/packages/studio/src/components/IntakeLists/IntakeSpansTable.test.tsxweb/packages/studio/src/components/IntakeLists/IntakeSpansTable.tsxweb/packages/studio/src/components/IntakeLists/IntakeTracesTable.test.tsxweb/packages/studio/src/components/IntakeLists/IntakeTracesTable.tsxweb/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.test.tsxweb/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.tsxweb/packages/studio/src/constants/routes.tsweb/packages/studio/src/mocks/handlers.tsweb/packages/studio/src/mocks/intake/telemetry.tsweb/packages/studio/src/routes/EvaluationSessionDetailRoute/index.test.tsxweb/packages/studio/src/routes/EvaluationSessionDetailRoute/index.tsxweb/packages/studio/src/routes/EvaluationTraceDetailRoute/index.test.tsxweb/packages/studio/src/routes/EvaluationTraceDetailRoute/index.tsxweb/packages/studio/src/routes/IntakeSessionDetailRoute/index.test.tsxweb/packages/studio/src/routes/IntakeSessionDetailRoute/index.tsxweb/packages/studio/src/routes/IntakeTraceDetailRoute/index.test.tsxweb/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsxweb/packages/studio/src/routes/agents/ClaudeCodeChatRoute/artifacts.test.tsweb/packages/studio/src/routes/agents/ClaudeCodeChatRoute/artifacts.tsweb/packages/studio/src/routes/constants.tsweb/packages/studio/src/routes/groups/experimentRoutes.tsxweb/packages/studio/src/routes/groups/intakeRoutes.tsxweb/packages/studio/src/routes/index.test.tsxweb/packages/studio/src/routes/utils.test.tsweb/packages/studio/src/routes/utils.tsweb/packages/studio/src/tests/title-change.test.tsxweb/packages/studio/src/util/intakeTelemetry.ts
💤 Files with no reviewable changes (4)
- web/packages/studio/src/routes/EvaluationTraceDetailRoute/index.test.tsx
- web/packages/studio/src/routes/IntakeTraceDetailRoute/index.test.tsx
- web/packages/studio/src/routes/EvaluationTraceDetailRoute/index.tsx
- web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
Resolve conflicts from #641 (trace comparison view) landing on main: - Keep the session-detail direction for the shared IntakeDetail components (TraceDetailView, TraceSpanAccordions). - Drop the now-orphaned trace-based comparison (EvaluationTraceDetailRoute, IntakeTraceDetailRoute): the router points at session routes and the comparison is superseded by session detail views. It is re-homed onto the session pattern in a follow-up commit. Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
…ws [ASE-186] Reworks the trace comparison from #641 to follow the session detail model: the test-case comparison now renders two side-by-side session (test case) views instead of two trace detail views, driven by ?compareWith on the evaluation session route. Studio: * Compare inside EvaluationSessionDetailRoute via ?compareWith, rendering two SessionCompareColumns; re-key the run selector and test-case run fetching from trace_id to session_id. New useSessionCompareRuns hook is shared by the single session view and the compare view (React Query dedupes the overlapping fetches). * Restore the "Compare against evaluation run" selector as an entry point in the single session view's header — picking a run sets ?compareWith — plus the Clear button beside it in compare mode. * Render each compare column on the read-only SpanListView so spans show as expandable accordion rows (Attributes / Evaluation Context, per-row feedback, expand/collapse) with local open-state, rather than the flat span tree. * Add default MSW handlers + fixtures for experiment-groups / evaluations / evaluation-sessions and a regression test for the compare entry point. Seed: * seed_experiments_demo.py gains a cost_usd_cycle knob and a secondary-sort-fixtures group with tied per-session and aggregate costs, so the tables' secondary (tie-break) sort can be exercised locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
c92b531 to
dd6f7b2
Compare
Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
* feat(studio): add session telemetry detail views Signed-off-by: Brian Newsom <brnewsom@nvidia.com> * style(studio): format session detail views Signed-off-by: Brian Newsom <brnewsom@nvidia.com> * test(studio): stabilize linked span hydration Signed-off-by: Brian Newsom <brnewsom@nvidia.com> * fix(studio): encode session route identifiers Signed-off-by: Brian Newsom <brnewsom@nvidia.com> * feat(studio): render test-case comparison as side-by-side session views [ASE-186] Reworks the trace comparison from NVIDIA-NeMo#641 to follow the session detail model: the test-case comparison now renders two side-by-side session (test case) views instead of two trace detail views, driven by ?compareWith on the evaluation session route. Studio: * Compare inside EvaluationSessionDetailRoute via ?compareWith, rendering two SessionCompareColumns; re-key the run selector and test-case run fetching from trace_id to session_id. New useSessionCompareRuns hook is shared by the single session view and the compare view (React Query dedupes the overlapping fetches). * Restore the "Compare against evaluation run" selector as an entry point in the single session view's header — picking a run sets ?compareWith — plus the Clear button beside it in compare mode. * Render each compare column on the read-only SpanListView so spans show as expandable accordion rows (Attributes / Evaluation Context, per-row feedback, expand/collapse) with local open-state, rather than the flat span tree. * Add default MSW handlers + fixtures for experiment-groups / evaluations / evaluation-sessions and a regression test for the compare entry point. Seed: * seed_experiments_demo.py gains a cost_usd_cycle knob and a secondary-sort-fixtures group with tied per-session and aggregate costs, so the tables' secondary (tie-break) sort can be exercised locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com> * fix flaky test Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com> --------- Signed-off-by: Brian Newsom <brnewsom@nvidia.com> Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com> Co-authored-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Validation
bash tools/lint/lint-all.sh(13/13 passed)services/studio/tests/unit/test_coding_agents.py(54 passed)Notes
Summary by CodeRabbit
studio_linksupport forintake_session.