Skip to content

fix(inspect): scoped auto-refresh + decouple raw-spans toggles#43

Merged
ivanrdvc merged 2 commits into
mainfrom
fix/inspect-auto-refresh-and-raw-toggles
May 28, 2026
Merged

fix(inspect): scoped auto-refresh + decouple raw-spans toggles#43
ivanrdvc merged 2 commits into
mainfrom
fix/inspect-auto-refresh-and-raw-toggles

Conversation

@ivanrdvc
Copy link
Copy Markdown
Owner

Summary

  • Split useAutoRefresh into a table-scoped hook (sessions-auto-refresh, 30s default) and a new inspector-scoped useInspectAutoRefresh (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.
  • Added INSPECT_AUTO_REFRESH_OPTIONS (includes 5s) for the inspector dropdown; table pages keep the existing options list.
  • Bulk raw-spans toggle now owns its own boolean state instead of deriving from rawRoots.size. Per-trace clicks no longer flip the bulk button; the bulk button just opens/closes every root in one shot.
  • Bumped per-trace raw-spans icon margin (mr-2mr-3) so it doesn't hug the tree scrollbar.

Test plan

  • Open /sessions table — refresh setting stays where it was, defaults 30s/off as before.
  • Open session detail (/sessions/:id) — auto-refresh shows, defaults to 5s, dropdown includes 5s option.
  • Open session preview drawer from the list — auto-refresh now visible there too, independent of the list setting.
  • Open trace detail (/traces/:id) and trace drawer — same behavior.
  • In Spans view, click the per-trace { } button — only that trace flips; the bulk { } toggle in the toolbar stays unpressed.
  • Click the bulk { } toggle — every root opens; click again — every root closes.
  • Verify per-trace { } icon has visible breathing room from the tree scrollbar.

ivanrdvc added 2 commits May 28, 2026 20:04
- 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.
@ivanrdvc ivanrdvc merged commit 5b950ce into main May 28, 2026
2 checks passed
@ivanrdvc ivanrdvc deleted the fix/inspect-auto-refresh-and-raw-toggles branch May 28, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant