feat(ui): configurable session time windows, default 3 days #163

Merged
dries merged 1 commit from feat/configurable-session-time-windows into main 2026-06-26 15:12:24 +02:00
Owner

Summary

Makes the two session time windows user-configurable under Settings → Sessions, both defaulting to 3 days (72h).

  • #141 — the start-screen Sessions list defaulted to a 12h lookback. Now uses a configurable dashboardTimeRangeDefault (default 72h); the time-range buttons still override per-view via the ?t= URL param.
  • #142 — the in-session Recent Sessions sidebar used a fixed SIDEBAR_RECENT_HOURS = 72 constant, so it went empty when viewing a session older than that window. Now reads a configurable sidebarRecentHours (default 72h).

Both settings live in the existing persisted uiStore (localStorage), mirroring autoApproveDelayMs. No backend changes, no migration — these are pure client-side display preferences. Store version bumped to v6; absent keys fall back to defaults.

Testing

  • pnpm exec tsc -b — clean
  • pnpm lint — clean (incl. platform-branching check)
  • pnpm test — 1289 passing; added uiStore tests for the new setters (clamp min/max, rounding, non-finite fallback, 72h default)
  • go build ./... — clean (no Go changes)

Closes #141
Closes #142

## Summary Makes the two session time windows user-configurable under **Settings → Sessions**, both defaulting to **3 days** (72h). - **#141** — the start-screen Sessions list defaulted to a 12h lookback. Now uses a configurable `dashboardTimeRangeDefault` (default 72h); the time-range buttons still override per-view via the `?t=` URL param. - **#142** — the in-session *Recent Sessions* sidebar used a fixed `SIDEBAR_RECENT_HOURS = 72` constant, so it went empty when viewing a session older than that window. Now reads a configurable `sidebarRecentHours` (default 72h). Both settings live in the existing persisted `uiStore` (localStorage), mirroring `autoApproveDelayMs`. No backend changes, no migration — these are pure client-side display preferences. Store version bumped to v6; absent keys fall back to defaults. ## Testing - `pnpm exec tsc -b` — clean - `pnpm lint` — clean (incl. platform-branching check) - `pnpm test` — 1289 passing; added uiStore tests for the new setters (clamp min/max, rounding, non-finite fallback, 72h default) - `go build ./...` — clean (no Go changes) Closes #141 Closes #142

Coverage ratchet: ✅ pass

Suite Baseline This PR Δ
go 69.40% 69.40% +0.00 ✅
frontend 56.25% 56.25% +0.00 ✅

Tolerance: -0.1%. Baseline stored on gh-pages.

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | go | 69.40% | 69.40% | +0.00 | ✅ | | frontend | 56.25% | 56.25% | +0.00 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
dries force-pushed feat/configurable-session-time-windows from 5afa5d7e38
All checks were successful
CI / Backend (pull_request) Successful in 2m52s
CI / Frontend (pull_request) Successful in 3m5s
CI / Build (pull_request) Successful in 4m5s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 4m19s
CI / Coverage Ratchet (pull_request) Successful in 4m59s
CI / Playwright E2E (pull_request) Successful in 3m24s
CI / Semantic Tag (pull_request) Has been skipped
to dcfe6d39fe
All checks were successful
CI / Frontend (pull_request) Successful in 3m43s
CI / Backend (pull_request) Successful in 2m26s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m11s
CI / Build (pull_request) Successful in 3m49s
CI / Coverage Ratchet (pull_request) Successful in 5m31s
CI / Playwright E2E (pull_request) Successful in 6m55s
CI / Semantic Tag (pull_request) Has been skipped
2026-06-25 16:15:43 +02:00
Compare
dries merged commit 539c44655f into main 2026-06-26 15:12:24 +02:00
dries deleted branch feat/configurable-session-time-windows 2026-06-26 15:12:24 +02:00
Sign in to join this conversation.
No description provided.