Files
ottyl/tickets/024-popout-tab-independent-rolling-range-and-controls.md
T
2026-09-05 19:29:01 +01:00

2.2 KiB

Popped-out tabs should carry over the preset kind (not a frozen range) and have their own time-range controls

Opening a section in a new tab (PopOutButton in CollapsibleSection.tsx) does not currently carry over the active colour scheme/theme — see ticket 025 for that bug and its fix; this ticket is scoped to time-range handling only.

The time range handling is wrong for rolling presets. popOutUrl resolves the current range to absolute startMs/endMs query params at click time (CollapsibleSection.tsx ~line 101), and StandaloneRanged (App.tsx ~line 148) passes that frozen {startMs, endMs} straight into Metrics/Dashboards with no further updates. So opening a tab while "Last 5m" is active doesn't open a new tab that's also sliding its own independent 5-minute window — it opens a tab pinned forever to whatever absolute window happened to be resolved at that instant, and it has no time-range picker at all to change that afterward.

Acceptance criteria

  • Opening a new tab carries over which preset was active (e.g. 5m), not just its resolved absolute bounds — pass the preset id (TimeRangePresetId, LogTimeline.tsx) via query params instead of (or alongside) startMs/endMs.
  • If the source section was on a rolling preset (anything but a manually dragged/fixed range), the new tab starts its own independently-sliding window of the same size (e.g. its own "last 5m"), recomputed on its own polling cadence — it must NOT track or freeze to the source tab's window, and changes in the source tab's range after the popout was opened have no effect on it.
  • If the source section had a fixed/dragged range (not a preset), that fixed range is still carried over as absolute bounds, same as today.
  • The popped-out standalone page (StandaloneRanged in App.tsx, covering metrics and dashboards sections) gets its own time-range controls (the same preset buttons / drag-to-select UI LogTimeline.tsx already provides elsewhere), rather than only ever displaying whatever range was passed in the URL with no way to change it afterward.
  • The log and params standalone pages (which already have or don't need their own range picker) are unaffected.