fix(nav): restore analytics tabs and mark sub-pages active #766

Open
dries wants to merge 2 commits from fix/nav-active-states into main
Owner

Summary

  • Analytics section tabs collapsed to their 1px border once the page overflowed: .nav-tabs is a horizontal scroll container inside the .page-content flex column, so its automatic min-height is 0. Added flex-shrink: 0.
  • Main nav now highlights the owning destination on every page: Factory sub-pages (/factory/epics/..., /issues, ...), project pages (/project/<dir>, worktrees, settings), and Usage on /subscription-usage. Replaces the Home-only activeOnSession flag with a per-item activePrefix.
  • Imports the missing act in SessionTerminalDock.test.tsx, which broke tsc -b on main.

Testing

  • New e2e: analytics tab strip keeps its height in a short viewport (failed before the CSS fix).
  • New table test in App.test.tsx: every route in App.tsx marks exactly one nav entry active (Factory, Projects, and Usage rows failed before the fix).
  • tsc -b, pnpm lint, guard scripts, full vitest (2756 passed), and the dashboard/shell-styles/inbox e2e specs.
## Summary - Analytics section tabs collapsed to their 1px border once the page overflowed: `.nav-tabs` is a horizontal scroll container inside the `.page-content` flex column, so its automatic min-height is 0. Added `flex-shrink: 0`. - Main nav now highlights the owning destination on every page: Factory sub-pages (`/factory/epics/...`, `/issues`, ...), project pages (`/project/<dir>`, worktrees, settings), and Usage on `/subscription-usage`. Replaces the Home-only `activeOnSession` flag with a per-item `activePrefix`. - Imports the missing `act` in `SessionTerminalDock.test.tsx`, which broke `tsc -b` on main. ## Testing - New e2e: analytics tab strip keeps its height in a short viewport (failed before the CSS fix). - New table test in `App.test.tsx`: every route in `App.tsx` marks exactly one nav entry active (Factory, Projects, and Usage rows failed before the fix). - `tsc -b`, `pnpm lint`, guard scripts, full vitest (2756 passed), and the dashboard/shell-styles/inbox e2e specs.
test(terminal): import act in the terminal dock test
All checks were successful
CI / Frontend (pull_request) Successful in 14m46s
CI / Backend (pull_request) Successful in 16m38s
CI / Playwright E2E (pull_request) Successful in 13m44s
CI / Coverage Results (pull_request) Successful in 26s
CI / Semantic Tag (pull_request) Successful in 10s
06508e3b6d

Coverage ratchet: ✅ pass

Suite Baseline This PR Δ
frontend 82.90% 82.91% +0.01 ✅
go 84.80% 84.80% +0.00 ✅

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

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | frontend | 82.90% | 82.91% | +0.01 | ✅ | | go | 84.80% | 84.80% | +0.00 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
dries force-pushed fix/nav-active-states from 06508e3b6d
All checks were successful
CI / Frontend (pull_request) Successful in 14m46s
CI / Backend (pull_request) Successful in 16m38s
CI / Playwright E2E (pull_request) Successful in 13m44s
CI / Coverage Results (pull_request) Successful in 26s
CI / Semantic Tag (pull_request) Successful in 10s
to d4531ec690
Some checks are pending
CI / Frontend (pull_request) Successful in 14m48s
CI / Playwright E2E (pull_request) Successful in 13m18s
CI / Backend (pull_request) Successful in 16m16s
CI / Coverage Results (pull_request) Waiting to run
CI / Semantic Tag (pull_request) Waiting to run
2026-09-29 10:54:17 +02:00
Compare
Some checks are pending
CI / Frontend (pull_request) Successful in 14m48s
Required
Details
CI / Playwright E2E (pull_request) Successful in 13m18s
Required
Details
CI / Backend (pull_request) Successful in 16m16s
Required
Details
CI / Coverage Results (pull_request) Waiting to run
Required
Details
CI / Semantic Tag (pull_request) Waiting to run
Required
Details
Some required checks are missing.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/nav-active-states:fix/nav-active-states
git switch fix/nav-active-states
Sign in to join this conversation.
No description provided.