fix(inspect): scoped auto-refresh + decouple raw-spans toggles#43
Merged
Conversation
- Split useAutoRefresh into table-scoped (`sessions-auto-refresh`, 30s default) and inspector-scoped (`inspect-auto-refresh`, 5s default) hooks, so the inspector no longer inherits the off-by-default table setting. Wired the inspector hook into session/trace detail pages and into both drawer hosts. - Add `INSPECT_AUTO_REFRESH_OPTIONS` (includes 5s) for the inspector dropdown; tables keep the existing options list. - Give the bulk raw-spans toggle its own boolean state instead of deriving it from `rawRoots.size`. Per-trace clicks no longer flip the bulk button, and the bulk button just opens/closes every root in one shot. - Bump per-trace raw-spans icon margin (mr-2 → mr-3) so it doesn't hug the tree scrollbar.
Address review on the decoupled raw-spans toggle: - When `rawAllOn` is true and new top-level spans arrive (streaming session), include them in `rawRoots` so the bulk state actually applies to every visible trace. - Reword the bulk toggle's tooltip/aria from "Show raw spans (all traces)" to "Open raw spans on every trace" so it reads as an action rather than implying current state of every row.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useAutoRefreshinto a table-scoped hook (sessions-auto-refresh, 30s default) and a new inspector-scopeduseInspectAutoRefresh(inspect-auto-refresh, 5s default) so the inspector no longer inherits the off-by-default table setting. Wired into session/trace detail pages and both drawer hosts.INSPECT_AUTO_REFRESH_OPTIONS(includes 5s) for the inspector dropdown; table pages keep the existing options list.rawRoots.size. Per-trace clicks no longer flip the bulk button; the bulk button just opens/closes every root in one shot.mr-2→mr-3) so it doesn't hug the tree scrollbar.Test plan
/sessionstable — refresh setting stays where it was, defaults30s/off as before./sessions/:id) — auto-refresh shows, defaults to5s, dropdown includes5soption./traces/:id) and trace drawer — same behavior.{ }button — only that trace flips; the bulk{ }toggle in the toolbar stays unpressed.{ }toggle — every root opens; click again — every root closes.{ }icon has visible breathing room from the tree scrollbar.