Skip to content

Phase 3 — Client feature slices #42

Description

@rsml

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorDemo-quality refactor phases

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions