Skip to content

feat(trace-waterfall): Small tweaks to trace-waterfall tab#115584

Merged
nsdeschenes merged 13 commits into
masterfrom
nd/feat-trace-waterfall-update-trace-waterfall-tabs
May 19, 2026
Merged

feat(trace-waterfall): Small tweaks to trace-waterfall tab#115584
nsdeschenes merged 13 commits into
masterfrom
nd/feat-trace-waterfall-update-trace-waterfall-tabs

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

@nsdeschenes nsdeschenes commented May 14, 2026

Summary

Render trace detail tabs from trace meta counts instead of waiting for each tab’s backing data to load. This lets Logs, Application Metrics, and AI appear earlier when trace meta already knows those sections have data, while preserving existing fallbacks for legacy meta responses.

Trace Tab Visibility

The trace tab list now uses useTraceMeta counts for supported sections and falls back to loaded tab data where meta does not provide a definitive value. Logs and metrics still respect their product feature gates, and URL tab preservation during loading is also gated.

Header Counts

The trace header now shows the Application Metrics count from trace meta and uses meta-backed Logs counts before logs have loaded. This keeps the header in sync with tab visibility for logs-only and metrics-backed traces.

AI Span Detection

AI tab visibility can use positive meta counts, but still falls back to tree-based detection so traces with AI spans identified by gen_ai.operation.type are not hidden when span.op counts are incomplete.

Closes EXP-927

nsdeschenes and others added 3 commits May 14, 2026 14:54
Render trace detail tabs from trace metadata counts when the endpoint provides them. This avoids waiting on tab-specific result sets before showing or hiding those sections.

Keep legacy metadata paths falling back to loaded tab data where the count is not available.

Co-Authored-By: Codex <noreply@openai.com>
Add application metrics to the trace detail header summary when metrics are present. Use trace metadata for the count and fall back to the loaded metrics count when needed.

Co-Authored-By: Codex <noreply@openai.com>
Respect Logs and Application Metrics tab URLs while trace data is still loading. This lets each tab render its own loading state instead of briefly showing the trace waterfall placeholder.

Co-Authored-By: Codex <noreply@openai.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 14, 2026
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.56%

Update the trace context section spec mocks to return node-shaped values from findChild. This keeps the test aligned with the TraceTree API and satisfies tsgo.

Co-Authored-By: Codex <noreply@openai.com>
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 48fdebf. Configure here.

Keep the AI spans tab selected from the URL while trace metadata is
loading, matching the behavior for logs and metrics tabs.

Co-Authored-By: GPT-5.5 <noreply@example.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
nsdeschenes and others added 3 commits May 15, 2026 08:52
Keep AI span counts from legacy trace meta non-authoritative so legacy traces can still use tree-based AI node detection.

Co-Authored-By: Codex <noreply@openai.com>
Keep trace logs and metrics tab visibility behind their existing product feature flags when using trace meta counts. Preserve tree-based AI span detection when trace meta has no gen_ai span op count, since the tab detects AI spans from gen_ai.operation.type.

Co-Authored-By: Codex <noreply@openai.com>
Keep logs and metrics URL tabs from being preserved during loading when their product feature is disabled. This prevents loading-state tab selection from bypassing the trace tab feature gates.

Co-Authored-By: Codex <noreply@openai.com>
Comment thread static/app/views/performance/newTraceDetails/traceHeader/index.tsx
Pass trace meta into the header section checks so logs-only traces do not render a placeholder while the logs tab is available. Use trace meta logs counts in the header before the logs array has loaded.

Co-Authored-By: Codex <noreply@openai.com>
@nsdeschenes nsdeschenes marked this pull request as ready for review May 15, 2026 12:52
@nsdeschenes nsdeschenes requested a review from a team as a code owner May 15, 2026 12:52
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 15, 2026

EXP-927

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 22445db. Configure here.

Comment thread static/app/views/performance/newTraceDetails/useTraceLayoutTabs.tsx
nsdeschenes and others added 2 commits May 19, 2026 09:18
When EAP trace metadata reports no logs or metrics, avoid preserving those URL tabs during tree loading. This keeps the selected tab aligned with the available tab options after metadata loads.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Comment thread static/app/views/performance/newTraceDetails/useTraceLayoutTabs.tsx Outdated
Treat the tab query param as usable only when query-string returns a scalar string. This keeps initial tab selection typed around the values it can compare against.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@nsdeschenes nsdeschenes merged commit 0e7d8a4 into master May 19, 2026
71 checks passed
@nsdeschenes nsdeschenes deleted the nd/feat-trace-waterfall-update-trace-waterfall-tabs branch May 19, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants