Part of the demo-quality refactor tracked in docs/plans/refactor/. Branch phase-3-client-slices. Depends on Phase 1, and rebases on the Phase 2 foundations PR.
Objective
Make the client feature sliced with exactly one typed API client. Today there are 84 raw fetch sites and a 2,244 line App.tsx. After this phase, components render and hooks hold logic.
Contents
- One typed
api/ client consuming the shared contract types, with zero raw fetch() outside it
- Feature slices for library, reader, creation, audiobook, and settings
App.tsx down to roughly 150 lines of providers and routes
- The 20 plus dialog
useState calls consolidated into a single dialog state machine, with reducer tests landing first
- Hooks extraction,
store.ts split into a store/ folder, named timing constants, and accessibility fixes
Gate
- Grep gates pass, meaning no
fetch( outside client/api/
- File size caps respected
- Persisted Redux state is byte identical before and after, so existing users lose nothing
- Manual full pass through the app
- Tests, typecheck, and lint all green
Part of the demo-quality refactor tracked in
docs/plans/refactor/. Branchphase-3-client-slices. Depends on Phase 1, and rebases on the Phase 2 foundations PR.Objective
Make the client feature sliced with exactly one typed API client. Today there are 84 raw fetch sites and a 2,244 line
App.tsx. After this phase, components render and hooks hold logic.Contents
api/client consuming the shared contract types, with zero rawfetch()outside itApp.tsxdown to roughly 150 lines of providers and routesuseStatecalls consolidated into a single dialog state machine, with reducer tests landing firststore.tssplit into astore/folder, named timing constants, and accessibility fixesGate
fetch(outsideclient/api/