Skip to content

feat(studio): add session telemetry detail views - #793

Merged
shanaiabuggy merged 9 commits into
mainfrom
ase-599-session-detail-views/brnewsom
Jul 23, 2026
Merged

feat(studio): add session telemetry detail views#793
shanaiabuggy merged 9 commits into
mainfrom
ase-599-session-detail-views/brnewsom

Conversation

@BrianNewsom

@BrianNewsom BrianNewsom commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace trace detail routes with canonical session routes while preserving trace and span deep links
  • render session trace/span summaries in the shared detail explorer and hydrate only the selected trace or span payload
  • update Intake tables, evaluation sessions, and Coding Agent Studio links to use session URLs

Validation

  • bash tools/lint/lint-all.sh (13/13 passed)
  • Studio lint, typecheck, and production build
  • Intake/session route and component tests (136 passed, 1 skipped)
  • services/studio/tests/unit/test_coding_agents.py (54 passed)

Notes

Summary by CodeRabbit

  • New Features
    • Added canonical, session-scoped Studio intake links (session, trace, span) and MCP studio_link support for intake_session.
    • Introduced an Intake session detail page with a session-backed trace explorer (tree/list) and shared trace detail layout.
    • Updated evaluation session routing to open trace/span views within the selected session context.
  • Bug Fixes
    • Fixed deep-linking so navigation, annotation links, and headline/trace links consistently use the canonical session routes and required identifiers.
  • Tests / Documentation
    • Updated and expanded unit, route, and UI tests; refreshed Intake Detail documentation.

Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
@BrianNewsom
BrianNewsom requested review from a team as code owners July 20, 2026 19:47
@github-actions github-actions Bot added the feat label Jul 20, 2026
Signed-off-by: Brian Newsom <brnewsom@nvidia.com>
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 27151/34858 77.9% 62.1%
Integration Tests 15967/33570 47.6% 20.0%

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Session-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.

Changes

Session-scoped Intake detail

Layer / File(s) Summary
Studio link contracts
services/studio/src/nmp/studio/studio_links.py, web/packages/studio/src/routes/agents/...
Adds intake_session links and requires session_id for trace and span links.
Session routing and navigation
web/packages/studio/src/constants/routes.ts, web/packages/studio/src/routes/..., web/packages/studio/src/components/IntakeLists/*, web/packages/studio/src/routes/utils.ts
Replaces trace paths with session paths and query-based traceId/spanId selection for Intake and evaluation routes.
Session detail flow
web/packages/studio/src/components/IntakeDetail/SessionDetailView.tsx, web/packages/studio/src/components/IntakeDetail/TraceDetailView.tsx, web/packages/studio/src/routes/*SessionDetailRoute/*
Loads session-scoped telemetry, builds trajectories, manages deep links, and validates trace ownership.
Explorer, mocks, and validation
web/packages/studio/src/components/IntakeDetail/*, web/packages/studio/src/mocks/*, web/packages/studio/src/routes/*test.tsx
Adds session summary and trajectory navigation, updates span handling and fixtures, and covers loading, errors, navigation, and deep links.
Evaluator schema updates
plugins/nemo-evaluator/openapi/openapi.yaml
Adds response aggregation settings for streamed values in GenericAgent and NatAgentConfig schemas.

Suggested reviewers: sandychapman

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding session telemetry detail views in Studio.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ase-599-session-detail-views/brnewsom

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Reuse SESSION_ID/SPAN_ID constants instead of hardcoding literals.

Both history URLs duplicate the literal values already defined as SESSION_ID/SPAN_ID at 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0f2a028 and c81babe.

📒 Files selected for processing (43)
  • services/studio/src/nmp/studio/studio_links.py
  • services/studio/tests/unit/test_coding_agents.py
  • web/packages/studio/src/components/IntakeDetail/IntakeComponents/AnnotationsPanel.test.tsx
  • web/packages/studio/src/components/IntakeDetail/IntakeComponents/spanKeyValues.test.tsx
  • web/packages/studio/src/components/IntakeDetail/IntakeComponents/spanKeyValues.tsx
  • web/packages/studio/src/components/IntakeDetail/IntakeComponents/traceKeyValues.test.tsx
  • web/packages/studio/src/components/IntakeDetail/IntakeComponents/traceKeyValues.tsx
  • web/packages/studio/src/components/IntakeDetail/README.md
  • web/packages/studio/src/components/IntakeDetail/SessionDetailView.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceDetailLayout.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceDetailSpanTree.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceDetailSummaryHeader.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceDetailView.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceSpanAccordions.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceSpanTreeView.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceViewToolbar.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeSpansTable.test.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeSpansTable.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeTracesTable.test.tsx
  • web/packages/studio/src/components/IntakeLists/IntakeTracesTable.tsx
  • web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.test.tsx
  • web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.tsx
  • web/packages/studio/src/constants/routes.ts
  • web/packages/studio/src/mocks/handlers.ts
  • web/packages/studio/src/mocks/intake/telemetry.ts
  • web/packages/studio/src/routes/EvaluationSessionDetailRoute/index.test.tsx
  • web/packages/studio/src/routes/EvaluationSessionDetailRoute/index.tsx
  • web/packages/studio/src/routes/EvaluationTraceDetailRoute/index.test.tsx
  • web/packages/studio/src/routes/EvaluationTraceDetailRoute/index.tsx
  • web/packages/studio/src/routes/IntakeSessionDetailRoute/index.test.tsx
  • web/packages/studio/src/routes/IntakeSessionDetailRoute/index.tsx
  • web/packages/studio/src/routes/IntakeTraceDetailRoute/index.test.tsx
  • web/packages/studio/src/routes/IntakeTraceDetailRoute/index.tsx
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/artifacts.test.ts
  • web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/artifacts.ts
  • web/packages/studio/src/routes/constants.ts
  • web/packages/studio/src/routes/groups/experimentRoutes.tsx
  • web/packages/studio/src/routes/groups/intakeRoutes.tsx
  • web/packages/studio/src/routes/index.test.tsx
  • web/packages/studio/src/routes/utils.test.ts
  • web/packages/studio/src/routes/utils.ts
  • web/packages/studio/src/tests/title-change.test.tsx
  • web/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

Comment thread web/packages/studio/src/components/IntakeDetail/README.md Outdated
Comment thread web/packages/studio/src/routes/utils.ts
BrianNewsom and others added 4 commits July 20, 2026 14:07
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>
@shanaiabuggy
shanaiabuggy force-pushed the ase-599-session-detail-views/brnewsom branch from c92b531 to dd6f7b2 Compare July 23, 2026 00:47
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 23, 2026
Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
@shanaiabuggy
shanaiabuggy enabled auto-merge July 23, 2026 22:04
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 75c9c09 Jul 23, 2026
58 checks passed
@shanaiabuggy
shanaiabuggy deleted the ase-599-session-detail-views/brnewsom branch July 23, 2026 22:52
AnuradhaKaruppiah pushed a commit to AnuradhaKaruppiah/nemo-platform that referenced this pull request Jul 24, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants