Skip to content

Refactor shared frontend workflows - #14

Merged
PengfanZ merged 1 commit into
mainfrom
codex/react-maintainability-cleanup
Jul 29, 2026
Merged

Refactor shared frontend workflows#14
PengfanZ merged 1 commit into
mainfrom
codex/react-maintainability-cleanup

Conversation

@PengfanZ

Copy link
Copy Markdown
Owner

What changed

  • extracted browser-storage error handling and cross-tab synchronization into reusable utilities
  • consolidated the shared lifecycle for the language and currency dropdowns
  • moved snapshot and Live sharing orchestration out of App.tsx into a focused hook
  • memoized only the derived activity data and dashboard calculations that perform array scans
  • added direct tests for storage failures, unchanged writes, and unsupported values

Why

App.tsx and several persistence/menu components repeated the same infrastructure logic. Centralizing those responsibilities makes the frontend easier to read and change while preserving the existing UI, storage keys, URL formats, analytics, and Supabase contracts.

User impact

No intended user-facing behavior change. Local persistence, cross-tab updates, currency/language menus, snapshot sharing, Live sharing, and responsive layouts retain their existing behavior.

Validation

  • npm run typecheck
  • npm run lint
  • npm run test:coverage — 283 tests, 100% statements/branches/functions/lines
  • npm run test:backend — 121 pgTAP tests
  • npx supabase db advisors --local --type all --level warn --fail-on error — no issues
  • npm run test:e2e — 13 Playwright tests
  • npm run build:pages
  • browser QA: language, currency, expense creation, snapshot QR, reload persistence, mobile menu/Escape focus, and clean console

@PengfanZ
PengfanZ marked this pull request as ready for review July 29, 2026 19:15
@PengfanZ
PengfanZ merged commit 2520654 into main Jul 29, 2026
3 checks passed
@PengfanZ
PengfanZ deleted the codex/react-maintainability-cleanup branch July 29, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant