proposal-system/web
Adam Moussa 8fbca7f780
refactor(web): fold Redux auth/ui slices into SHOC-shape auth context + storage module
Phase 4 tail of the SHOC-alignment plan. Matches SHOC's auth shape
(lib/auth storage module + providers/ context split) while keeping the
deliberate divergences:

- sessionStorage, not localStorage (WEB-C1 stands; SHOC's localStorage
  is on the SHOULD-NOT-ALIGN list)
- token acquisition stays in the auth pages (Cognito code exchange /
  dev-login) — the provider only owns session state
- 401 interceptor clears storage directly (WEB-M2 behavior preserved;
  full-page redirect resets provider state)

Sidebar open state moves to plain layout state in App passed down as
props (SHOC (protected)/_layout.tsx pattern), keeping localStorage
persistence. Drops @reduxjs/toolkit and react-redux.

Tests: authSlice tests replaced by authStorage + AuthProvider suites
(QA-C5 coverage preserved); client interceptor tests updated for the
storage-based 401 path. 59 vitest green, tsc clean, vite build OK.
Verified end-to-end headless: login redirect, seeded-session shell,
sidebar toggle persistence, logout, expired/malformed token handling,
RoleGuard bounce; recipe persisted as web/.claude/skills/verify.
2026-07-13 19:31:40 -04:00
..
.claude/skills/verify refactor(web): fold Redux auth/ui slices into SHOC-shape auth context + storage module 2026-07-13 19:31:40 -04:00
src refactor(web): fold Redux auth/ui slices into SHOC-shape auth context + storage module 2026-07-13 19:31:40 -04:00
.env.example Implement Phases 2-5: Frontend, AI/RAG, PDF Generation (#22) 2026-05-17 13:06:23 -04:00
index.html feat(web): adopt SHOC design system and shell layout (ADR 0003) 2026-07-13 16:47:17 -04:00
package-lock.json refactor(web): fold Redux auth/ui slices into SHOC-shape auth context + storage module 2026-07-13 19:31:40 -04:00
package.json refactor(web): fold Redux auth/ui slices into SHOC-shape auth context + storage module 2026-07-13 19:31:40 -04:00
tsconfig.json fix(web): apply Phase 4 code-review findings (10 correctness + 4 cleanup) 2026-07-13 19:06:08 -04:00
vite.config.ts fix(web): apply Phase 4 code-review findings (10 correctness + 4 cleanup) 2026-07-13 19:06:08 -04:00
vitest.config.ts fix(web): apply Phase 4 code-review findings (10 correctness + 4 cleanup) 2026-07-13 19:06:08 -04:00