The Status time picker is presets-only (1h/6h/24h/7d/30d), which is limiting for incident forensics ("what happened Tuesday 2–4pm?"). Two related additions that share plumbing:
- A calendar/date-time custom range in
TimeRangePicker — slots into the existing timeRange context; auto-refresh should disable for historical windows.
- Brush/zoom on the time-series charts (Recharts
<Brush>, or drag-select → narrow timeRange), so a spike seen at 7d can be zoomed into without guessing the preset.
Acceptance criteria
TimeRangePicker gains a "Custom…" option opening a date+time range picker; selecting one sets the window and forces auto-refresh to Off while active (a historical window must not slide).
- Deep-linkable: encodes as
range=custom&start=<ms>&end=<ms> in the status route's search schema (statusSearch.ts), with validation (start < end, span capped at 30d, invalid → default preset).
- Brush/drag-select on any time-series chart narrows to that sub-range (becomes a custom range); a "back to preset" affordance restores the previous preset.
bucketMs for custom windows derives from span using the same clamp rationale as TIME_PRESETS (see the SRE note atop timePresets.ts — do not allow 1m buckets on a 30d span).
Implementation notes
- Extend
validateStatusSearch (start/end only meaningful when range=custom); StatusTabsInner's ctx memo branches on preset vs custom.
- Check
src/components/ui/ for an existing shadcn calendar before adding one.
Filed from a Status tab code review.
Comment generated by kAIle (Claude Fable 5)
The Status time picker is presets-only (1h/6h/24h/7d/30d), which is limiting for incident forensics ("what happened Tuesday 2–4pm?"). Two related additions that share plumbing:
TimeRangePicker— slots into the existingtimeRangecontext; auto-refresh should disable for historical windows.<Brush>, or drag-select → narrowtimeRange), so a spike seen at 7d can be zoomed into without guessing the preset.Acceptance criteria
TimeRangePickergains a "Custom…" option opening a date+time range picker; selecting one sets the window and forces auto-refresh to Off while active (a historical window must not slide).range=custom&start=<ms>&end=<ms>in the status route's search schema (statusSearch.ts), with validation (start < end, span capped at 30d, invalid → default preset).bucketMsfor custom windows derives from span using the same clamp rationale asTIME_PRESETS(see the SRE note atoptimePresets.ts— do not allow 1m buckets on a 30d span).Implementation notes
validateStatusSearch(start/end only meaningful whenrange=custom);StatusTabsInner's ctx memo branches on preset vs custom.src/components/ui/for an existing shadcn calendar before adding one.Filed from a Status tab code review.
Comment generated by kAIle (Claude Fable 5)