beadboard/tests
zenchantlive 4b8770c78c feat(hooks): complete bb-ui2.4 - URL State Hook
STORY:
The Unified UX needs URL as the single source of truth for view state.
This enables deep linking, bookmarking, and shareable URLs that
preserve exactly what the user was looking at.

COLLABORATION:
Created useUrlState hook using Next.js useSearchParams and useRouter:

Interface:
- view: 'social' | 'graph' | 'swarm' (default: social)
- taskId: selected task ID (for detail panel)
- swarmId: selected swarm ID
- panel: 'open' | 'closed' (detail panel state)
- graphTab: 'flow' | 'overview' (graph view mode)

URL Patterns:
- /?view=social
- /?view=social&task=bb-buff.1&panel=open
- /?view=swarm&swarm=bb-buff
- /?view=graph&task=bb-buff.1&graphTab=flow

The hook uses router.push for URL updates, ensuring no local state
drift from the URL source of truth.

DELIVERABLES:
- src/hooks/use-url-state.ts with parseUrlState, buildUrlParams, useUrlState
- tests/hooks/use-url-state.test.ts with 18+ tests

VERIFICATION:
- npm run typecheck: PASS
- npm run lint: PASS
- npm run test: PASS (all tests including new ones)

CLOSES: bb-ui2.4
BLOCKS: bb-ui2.5
2026-02-15 21:17:30 -08:00
..
api feat(telemetry): complete bb-buff.1.3 - Backend Liveness Refactor 2026-02-15 21:14:05 -08:00
components feat(sessions): complete bb-buff.3.4 - Role-Based Color Coding 2026-02-15 21:16:08 -08:00
guards feat(telemetry): complete bb-buff.1.3 - Backend Liveness Refactor 2026-02-15 21:14:05 -08:00
hooks feat(hooks): complete bb-ui2.4 - URL State Hook 2026-02-15 21:17:30 -08:00
lib feat(sessions): progress bb-buff.3.3 - Active Mission Pathing (data layer) 2026-02-15 21:15:48 -08:00
scripts feat(telemetry): complete bb-buff.1.3 - Backend Liveness Refactor 2026-02-15 21:14:05 -08:00
skills/beadboard-driver docs(beads): etch project history into memory bank and finalize skill-bb 2026-02-14 00:21:25 -08:00
types chore: initialize beadboard baseline 2026-02-11 17:42:51 -08:00
bootstrap.test.mjs chore: initialize beadboard baseline 2026-02-11 17:42:51 -08:00