Skip to content

feat(studio): intake trace/span view tweaks#489

Merged
rrhyne merged 1 commit into
mainfrom
rrhyne/intake-tweaks
Jun 26, 2026
Merged

feat(studio): intake trace/span view tweaks#489
rrhyne merged 1 commit into
mainfrom
rrhyne/intake-tweaks

Conversation

@rrhyne

@rrhyne rrhyne commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up UX tweaks to the intake trace & span detail views (PR #460).

  • Annotations header: always render the annotation count as a badge, including 0.
  • Span row header: removed the annotation count badge; the note icon now gets a highlight (Guardrail-kind accent, --text-color-accent-yellow) when the span has note annotations, with matching tooltip/aria.
  • Metadata → Attributes: renamed the Metadata accordion to "Attributes" in both span and trace views (internal section ids unchanged).
  • Trace-level error banner: only shown when the trace itself has an error message (sourced from the root span, which defines the trace status). Removed the "N error span in this trace" count warning — child-span errors still surface on their own span detail.
  • Docs: README note pointing at the span-type showcase seed script.

Testing

  • pnpm --filter nemo-studio-ui typecheck — passes
  • pnpm --filter nemo-studio-ui test src/components/IntakeDetail — 29/29
  • ESLint + Prettier clean on changed files

Note

The Trace API type has no error_message/error_type field, so the trace-level banner reads them from the root span (which the trace's status derives from). If Trace is meant to carry its own error message, that's an SDK/OpenAPI gap to address separately.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Updated span feedback controls to better reflect when notes have been added, including clearer tooltip text, button labeling, and icon state.
    • Renamed several accordion sections from “Metadata” to “Attributes” for clearer wording.
    • Annotation badges now display consistently, including a visible zero state when no annotations are present.
  • Documentation

    • Improved Intake Detail docs with clearer guidance on span templates and updated terminology for trace details.

- Always show the annotation count badge on the span Annotations header (incl. 0).
- Remove the count badge from the span row header; orange/guardrail-yellow highlight on the note icon when the span has notes.
- Rename the Metadata accordion to Attributes in span and trace views.
- Trace-level error banner shows only the trace's own error message (root span), dropping the error-span-count warning.
- Doc note pointing at the span-type showcase seed script.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Rob Rhyne <rrhyne@nvidia.com>
@rrhyne rrhyne requested review from a team as code owners June 26, 2026 19:29
@github-actions github-actions Bot added the feat label Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Trace/span intake components now derive note presence and root-span error state differently, rename trace and accordion labels from Metadata to Attributes, and update the README to describe span template output and specialized KIND handling.

Changes

IntakeDetail label and note-state changes

Layer / File(s) Summary
Root span banner and notes
web/packages/studio/src/components/IntakeDetail/TraceSpanAccordions.tsx
TraceSpanAccordions now derives trace-level error banner content from the root span and builds feedbackBySpan, annotationCountBySpan, and notesBySpan.
Note state threading
web/packages/studio/src/components/IntakeDetail/IntakeComponents/SpanFeedbackControls.tsx, web/packages/studio/src/components/IntakeDetail/TraceSpanTreeView.tsx, web/packages/studio/src/components/IntakeDetail/TraceSpanListView.tsx, web/packages/studio/src/components/IntakeDetail/TraceSpanAccordions.tsx
hasNotes replaces annotationCount in SpanFeedbackControls, and notesBySpan is threaded through the tree and list views into the feedback controls.
Attributes labels and docs
web/packages/studio/src/components/IntakeDetail/SpanMetadataAccordions.tsx, web/packages/studio/src/components/IntakeDetail/TraceDetailView.tsx, web/packages/studio/src/components/IntakeDetail/README.md
Accordion and trace detail labels change from Metadata to Attributes, the annotations badge always renders a count, and the README adds span template notes and the architecture wording update.

Sequence Diagram(s)

sequenceDiagram
  participant TraceSpanAccordions
  participant TraceSpanListView
  participant TraceSpanTreeView
  participant SpanFeedbackControls
  TraceSpanAccordions->>TraceSpanAccordions: derive rootSpan and notesBySpan
  TraceSpanAccordions->>TraceSpanAccordions: compute root-span error banner
  TraceSpanAccordions->>TraceSpanListView: pass notesBySpan
  TraceSpanAccordions->>TraceSpanTreeView: pass hasNotes and annotationCount
  TraceSpanListView->>SpanFeedbackControls: pass hasNotes per span
  TraceSpanTreeView->>SpanFeedbackControls: pass hasNotes for selected span
Loading

Possibly related PRs

  • NVIDIA-NeMo/nemo-platform#460: Introduced the IntakeDetail span view components that this PR updates, including SpanFeedbackControls, TraceSpanTreeView, and TraceSpanListView.

Suggested labels

fix

Suggested reviewers

  • nakolean
  • shanaiabuggy
🚥 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 is concise and accurately reflects the Studio intake trace/span view updates, though it is broad.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rrhyne/intake-tweaks

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
web/packages/studio/src/components/IntakeDetail/README.md (1)

10-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep this page explanatory or make the seed-script note runnable.

Lines 10-11 add a task, but only give a path. Move it to a separate HOW-TO, or add prerequisites and an actual command here.

As per coding guidelines, **/*.{md,rst} pages should fit one Diataxis quadrant, use concrete examples with real code/commands, and always list prerequisites at the top of documentation pages before other content.

🤖 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/README.md` around lines 10 -
11, This README mixes explanatory content with an incomplete task reference, so
make it fit a single documentation purpose. Either keep the page purely
explanatory and move the seed-script guidance into a separate HOW-TO, or make
the existing note actionable by adding prerequisites first and replacing the
path-only reference with a concrete runnable command for the span template
showcase script. Use the existing IntakeDetail README content and the span seed
script mention as the anchors when updating the page structure.

Source: Coding guidelines

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

Nitpick comments:
In `@web/packages/studio/src/components/IntakeDetail/README.md`:
- Around line 10-11: This README mixes explanatory content with an incomplete
task reference, so make it fit a single documentation purpose. Either keep the
page purely explanatory and move the seed-script guidance into a separate
HOW-TO, or make the existing note actionable by adding prerequisites first and
replacing the path-only reference with a concrete runnable command for the span
template showcase script. Use the existing IntakeDetail README content and the
span seed script mention as the anchors when updating the page structure.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ddffb759-0042-4d44-8da0-94af234464e7

📥 Commits

Reviewing files that changed from the base of the PR and between 58c56ec and 37d93f4.

📒 Files selected for processing (7)
  • web/packages/studio/src/components/IntakeDetail/IntakeComponents/SpanFeedbackControls.tsx
  • web/packages/studio/src/components/IntakeDetail/README.md
  • web/packages/studio/src/components/IntakeDetail/SpanMetadataAccordions.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceDetailView.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceSpanAccordions.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceSpanListView.tsx
  • web/packages/studio/src/components/IntakeDetail/TraceSpanTreeView.tsx

@github-actions

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 21322/27924 76.4% 61.4%
Integration Tests 12353/26693 46.3% 19.7%

@rrhyne rrhyne added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit f7d79d0 Jun 26, 2026
53 checks passed
@rrhyne rrhyne deleted the rrhyne/intake-tweaks branch June 26, 2026 20:08
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