Skip to content

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

Draft
nsdeschenes wants to merge 5 commits into
masterfrom
nd/feat-trace-waterfall-update-trace-waterfall-tabs
Draft

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

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

TODO

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.52%

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>
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 5ab1b21. Configure here.

return Object.entries(spansCountMap).reduce((count, [op, opCount]) => {
return op.startsWith('gen_ai') ? count + opCount : count;
}, 0);
}
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.

Legacy meta suppresses tree-based AI span detection

Low Severity

getTraceMetaAiSpanCount returns a definitive number (0) for legacy (non-EAP) meta via span_count_map, unlike getTraceMetaLogsCount and getTraceMetaMetricsCount which return undefined for legacy meta to allow fallback. This means hasCount(0, !!tree.root.findChild(getIsAiNode)) always evaluates to false for legacy traces, completely bypassing the tree-based AI node detection. Previously, hasAiSpans always used the tree check. If legacy span_count_map doesn't reliably contain gen_ai.* keys, the AI tab would be hidden even when the tree has AI nodes.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5ab1b21. Configure here.

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.

1 participant