fix(sessions): keep sidebar open when archiving the last session #199

Merged
dries merged 2 commits from fix/archive-last-session-empty-sidebar into main 2026-07-03 10:21:51 +02:00
Owner

Summary

  • Archiving the last remaining session no longer bounces the user to the dashboard
  • Navigates to a /session/new sentinel: useSession skips the fetch and reports an empty live view
  • Detail pane shows an empty-state hint on what to do next
  • Sidebar keeps listing unarchived projects (with empty session lists) in projects view instead of "No sessions yet"
  • pickNextSessionAfterArchive falls back to the newest remaining session anywhere when the project is emptied

Testing

  • make lint + make test (1355 frontend, all Go tests pass)
  • Added useSession new-sentinel test; updated sidebarHelpers fallback test
## Summary - Archiving the last remaining session no longer bounces the user to the dashboard - Navigates to a `/session/new` sentinel: `useSession` skips the fetch and reports an empty live view - Detail pane shows an empty-state hint on what to do next - Sidebar keeps listing unarchived projects (with empty session lists) in projects view instead of "No sessions yet" - `pickNextSessionAfterArchive` falls back to the newest remaining session anywhere when the project is emptied ## Testing - `make lint` + `make test` (1355 frontend, all Go tests pass) - Added `useSession` `new`-sentinel test; updated sidebarHelpers fallback test
fix(sessions): keep sidebar open when archiving the last session
Some checks failed
CI / Frontend (pull_request) Successful in 4m17s
CI / Backend (pull_request) Successful in 4m21s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m21s
CI / Playwright E2E (pull_request) Failing after 8m5s
CI / Build (pull_request) Successful in 4m31s
CI / Semantic Tag (pull_request) Has been skipped
CI / Coverage Ratchet (pull_request) Successful in 6m8s
85a140270f
Archiving the last session in a project sent the user to the dashboard.
Now it stays on the detail page via a 'new' sentinel id: the sidebar
keeps listing unarchived projects (empty session lists) and the detail
pane shows a hint on what to do next.

Coverage ratchet: pass

Suite Baseline This PR Δ
go 69.50% 69.50% +0.00
frontend 58.56% 58.60% +0.04

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

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | go | 69.50% | 69.50% | +0.00 | ✅ | | frontend | 58.56% | 58.60% | +0.04 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
test(e2e): update archive test for /session/new sentinel; stub remote settings routes
All checks were successful
CI / Frontend (pull_request) Successful in 4m31s
CI / Backend (pull_request) Successful in 4m33s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m0s
CI / Playwright E2E (pull_request) Successful in 8m40s
CI / Build (pull_request) Successful in 5m23s
CI / Coverage Ratchet (pull_request) Successful in 8m36s
CI / Semantic Tag (pull_request) Has been skipped
10b94ef968
- session-actions: archiving the last session now navigates to the
  /session/new sentinel (per this PR), not /.
- fixtures: stub /api/remotes and /api/settings/remote-access so the
  Remotes settings group can't 401 against a real auth-enabled backend
  behind the vite proxy, which was booting auth tests to the lockscreen.
dries merged commit ac5b1340bf into main 2026-07-03 10:21:51 +02:00
Sign in to join this conversation.
No description provided.