diff --git a/codebase-review/PROGRESS.md b/codebase-review/PROGRESS.md index 39590db..73e9299 100644 --- a/codebase-review/PROGRESS.md +++ b/codebase-review/PROGRESS.md @@ -106,11 +106,42 @@ emits amounts as JSON numbers. --- -## Phase 3 — Frontend Data Layer & Feedback 🔄 IN PROGRESS +## Phase 3 — Frontend Data Layer & Feedback ✅ DONE (3.4 deferred) -Started 2026-06-10. Scope per plan: TanStack Query adoption (3.1), toast + -error-state standard (3.2), auth-flow fixes (3.3), type alignment (3.4 — scope -assessed at the end), small-fix batch (3.5). +Completed 2026-06-10. + +| Plan item | Status | Commit | +|---|---|---| +| 3.1 TanStack Query: provider, api timeout/signal, useBudget, Budget | ✅ | `65dffda` | +| 3.1 All remaining pages on queries with ErrorState+retry | ✅ | `7a1733b` | +| 3.2 Sonner toasts on every mutation; confirm on override clear | ✅ | (toasts) | +| 3.3 Auth probe: network failure ≠ logged out (retry once) | ✅ | (auth) | +| 3.5 Lazy context init, CK repair logging, upload-result cap | ✅ | (auth/pages) | +| 3.4 OpenAPI type generation | ⏸ **deferred** | — | + +**What changed for the user:** every page now shows an explicit error panel with +a Reintentar button when the API fails (previously: silent empty charts/tables); +every mutation (transaction save/delete, deferred toggle, recurring items, +balance overrides) confirms success or failure with a toast; month navigation +keeps the previous month visible while loading; rapid filter/month changes can +no longer paint stale results (request cancellation); all requests time out at +30s instead of hanging; clearing a balance override asks for confirmation; the +privacy mask and theme no longer flash wrong on reload; a transient network +blip at app start no longer kicks an authenticated user to the login page. + +**Architecture:** TanStack Query with `staleTime` 30s and one retry; +`['budget']`, `['transactions']`, `['analytics']`, `['salarios']`, +`['pensions']`, `['municipal']` key families; mutations invalidate their family. +`useBudget` keeps its original return shape so consumers didn't churn. + +**3.4 (OpenAPI type generation) deferred to its own pass:** it needs the backend +`response_model` sweep (ARCH-16) first and touches every endpoint plus the +api.ts type exports — a separate, mechanical change with its own verification. +The hand-written types are currently accurate (typecheck is green against real +responses). Revisit after Phase 4's backend endpoints land. + +**Closed as already-handled during implementation:** FE-04 (the Pensions ROI +fallback already guarded `len >= 2`). ## Phase 3 — Frontend Data Layer & Feedback ⏳ NOT STARTED