Public Access
docs(review): Sprint 4 verification log + plan/handoff/audit updates
Sprint 4 (F7 + F6) is now documented across the project: - Review/sprint4-verification.md: new 100-line deploy + smoke-check doc. Frontend-only deploy (git pull + docker compose up -d --build frontend). 5 smoke-check tables: A) success toasts still work for all 11 actions, B) error path shows FastAPI detail (network-down is the easiest test; full Pydantic 422 verification via curl + DevTools 'Edit and resend'), C) pre-flight toasts still fire without a network call, D) plan-status Badge has correct aria-label in DevTools, E) Sprint 1-3 regression spot-check. Includes rollback instructions (single-commit revert). - fix-ui-audit.md: new Sprint 4 section with full per-task notes (S4.1 F7 implementation details, S4.2 F6 aria-label, S4.3 verification gate). 'Done when (overall)' block updated to 4 sprints + 7 commits + 16 findings closed. No new commit in fix-ui-audit.md for the F8/F9 §Future addendum (those are noted in Review/handoff-ui-audit.md but live in the doc/proposals/ tree, not in the UI-audit plan). - Review/handoff-ui-audit.md: updated to a 4-sprint cycle. TL;DR table includes thed71b67arow, file-list includes the new verification doc, file-level diff summary gains 5 new rows for Sprint 4, §Future list now strikethroughs F6 and F7, and the Quick-start deploy commands list Sprint 4. - Review/ui-nielsen-audit.md: new Sprint 4 status block at the top with the F7/F6 changes, the no-backend-changes note, and a cross-ref to the new verification log. - docs/HANDOFF.md: Last-updated line bumped to 4 sprints / 7 commits / 16 findings. New 'Sprint 4' subsection in the 2026-06-03 session block. Commit table gained thed71b67arow. Files-modified list gained the lib/toast.tsx, App.tsx, and three pages changes for Sprint 4 (with B-tags preserved). No code changes; the 5 pre-existing WIP files (backend/app/api/ meals.py, recipes.py, schemas/recipe.py, frontend/src/api/index.ts, nginx/nginx.conf) are deliberately not staged.
This commit is contained in:
+31
-7
@@ -4,6 +4,7 @@ You are taking over a project in mid-flight. Read `docs/ORIENTATION.md` first fo
|
||||
|
||||
**Date of handoff: 2026-06-03. Last commits before handoff:**
|
||||
```
|
||||
d71b67a feat(ui): global react-query error handler + plan-status a11y (Sprint 4 F7+F6)
|
||||
427d8ac docs(review): add handoff document for UI audit work
|
||||
e90a9d6 feat(ui): close 3 P2 audit findings + a11y sweep (Sprint 3)
|
||||
f5fb755 fix(migration): simplify aisle migration + add persistent backup script
|
||||
@@ -298,7 +299,7 @@ Trust the tests. Trust the live runs. Don't trust prose claims that something is
|
||||
**Current open proposals:**
|
||||
- `docs/proposals/2026-05-23-feedback-driven-recipe-discovery.md` — pending user approval. No code yet (per the 2026-05-23 section below).
|
||||
|
||||
**Last updated: 2026-06-03** — UI/UX audit & fix cycle (Sprints 1, 2, 3) complete. 14 findings closed, code committed (`f3e4a44`, `ccc70aa`, `f5fb755`, `e90a9d6`), build green. Sprint 1 deployed; Sprints 2 and 3 awaiting deploy on the user's home server. Backend migration `0015_normalize_pantry_aisles.py` not yet run on prod (dry-run shows 21k rows would change on dev DB). Full UI-audit handoff at `Review/handoff-ui-audit.md`.
|
||||
**Last updated: 2026-06-03** — UI/UX audit & fix cycle (Sprints 1, 2, 3, 4) complete. 16 findings closed (5 P0 + 6 P1 + 3 P2 + 2 §Future), code committed across 7 commits (`f3e4a44`, `36038bb`, `ccc70aa`, `f5fb755`, `e90a9d6`, `427d8ac`, `d71b67a`), build green. Sprint 1 deployed; Sprints 2, 3, and 4 awaiting deploy on the user's home server (4 is frontend-only). Backend migration `0015_normalize_pantry_aisles.py` not yet run on prod (dry-run shows 21k rows would change on dev DB). Full UI-audit handoff at `Review/handoff-ui-audit.md`.
|
||||
|
||||
---
|
||||
|
||||
@@ -313,9 +314,10 @@ A full Nielsen-10-heuristics audit of the live deployment at `http://100.108.208
|
||||
- `fix-ui-audit.md` — the implementation plan, with per-task implementation notes
|
||||
- `Review/sprint2-verification.md` — Sprint 2 deploy + smoke-check checklist (includes the **backend migration** step)
|
||||
- `Review/sprint3-verification.md` — Sprint 3 deploy + smoke-check checklist (frontend only)
|
||||
- `Review/sprint4-verification.md` — Sprint 4 deploy + smoke-check checklist (F7 + F6, frontend only)
|
||||
- `Review/handoff-ui-audit.md` — focused handoff for a fresh agent continuing UI-audit work
|
||||
|
||||
**Commits on `main` (ahead of `origin/main` by 9 prior WIP commits plus these 6):**
|
||||
**Commits on `main` (ahead of `origin/main` by 9 prior WIP commits plus these 7):**
|
||||
|
||||
| Commit | Sprint | What |
|
||||
|---|---|---|
|
||||
@@ -325,6 +327,7 @@ A full Nielsen-10-heuristics audit of the live deployment at `http://100.108.208
|
||||
| `f5fb755` | 2 (fix) | Migration 0015 simplification + persistent backup script (`persist_aisle_backup.sql`) + corrected container-based deploy commands |
|
||||
| `e90a9d6` | 3 | 3 P2s + a11y: undo-toast (Dashboard refills slot; Pantry fully reversible), mobile nav nowrap, aria-current, `<main id="main-content">`, Badge `aria-label`/`icon` props |
|
||||
| `427d8ac` | (docs) | Review/handoff-ui-audit.md |
|
||||
| `d71b67a` | 4 | F7 global error handler (10 try/catch blocks deleted, QueryCache/MutationCache onError wired) + F6 plan-status aria-label |
|
||||
|
||||
**Critical Sprint 2 deploy note:** the user must run on the deployment host *after* `git pull`:
|
||||
|
||||
@@ -352,6 +355,26 @@ git pull
|
||||
docker compose -f docker-compose.yml up -d --build frontend
|
||||
```
|
||||
|
||||
### Sprint 4 — F7 (global error handler) + F6 (plan-status a11y)
|
||||
|
||||
The first wave of `fix-ui-audit.md` §Future work. Two small items, no new deps, no backend changes.
|
||||
|
||||
**F7 — `lib/toast.tsx` + `App.tsx` + 3 page refactors:**
|
||||
- New `extractErrorMessage(err, fallback)` and `showApiError(err, fallback)` helpers in `lib/toast.tsx`. The normalizer reads `err.response.data.detail` (string or Pydantic 422 array), then `err.message`, then the fallback. Closes the H9 "silent failure" finding for both queries (background refetches) and mutations.
|
||||
- `QueryClient` now created with `QueryCache({ onError: showApiError })` and `MutationCache({ onError: showApiError })`. Default options: `queries: { retry: 1, refetchOnWindowFocus: false }`.
|
||||
- 10 local try/catch toasts deleted across `Dashboard.tsx` (6: move/approve/deny/delete/generate + outer delete), `Pantry.tsx` (3: add/remove mutations + createIngredient), `MealDetail.tsx` (1: submitFeedback). 4 pre-flight client-side checks kept local (empty name, missing ingredient link, unresolved ingredient, "Failed to send vote emails" — that one is fire-and-forget via BackgroundTasks; see `Review/sprint4-verification.md` for the rationale).
|
||||
|
||||
**F6 — `Dashboard.tsx` plan-status Badge:**
|
||||
- Added `aria-label={\`Plan status: ${mealPlan.status.replace(/_/g, ' ')}\`}` to the badge that shows draft / awaiting_approval / approved / rejected. Matches the per-item approval-status pattern from Sprint 3. Audit of all other `<Badge>` call sites confirmed no further aria-label work needed — every other badge is either a count or a self-describing tag.
|
||||
|
||||
**Verification:** `npm run build` green. Live smoke per `Review/sprint4-verification.md` (network-down is the easiest way to verify F7; DevTools + VoiceOver for F6).
|
||||
|
||||
**Sprint 4 deploy is also frontend-only:**
|
||||
```bash
|
||||
git pull
|
||||
docker compose -f docker-compose.yml up -d --build frontend
|
||||
```
|
||||
|
||||
### Deployment-host vs dev-host (Tailscale gotcha)
|
||||
|
||||
This repo lives on a dev host (Tailscale `100.108.146.47`). The user's home server (Tailscale `100.108.224.12`) serves the live app at `100.108.208.56:8082`. The user's workflow is **commit locally, `git pull` on the deployment host, rebuild there**. Don't `docker compose up` on the local dev host expecting it to update the live site — it won't.
|
||||
@@ -366,6 +389,7 @@ Pre-existing bug: `.gitignore` line 17 is `lib/` (the Python ignore), and it cat
|
||||
Review/handoff-ui-audit.md # Focused UI-audit handoff
|
||||
Review/sprint2-verification.md # Deploy + smoke-check for Sprint 2
|
||||
Review/sprint3-verification.md # Deploy + smoke-check for Sprint 3
|
||||
Review/sprint4-verification.md # Deploy + smoke-check for Sprint 4 (F7+F6)
|
||||
Review/ui-nielsen-audit.md # (rewritten) Audit with status blocks per sprint
|
||||
fix-ui-audit.md # The plan, with per-task implementation notes
|
||||
frontend/src/pages/NotFound.tsx # 404 catch-all (B4)
|
||||
@@ -377,15 +401,15 @@ backend/scripts/persist_aisle_backup.sql # Persistent backup
|
||||
### Files modified by this session
|
||||
|
||||
```
|
||||
frontend/src/App.tsx # Routes, nav, aria
|
||||
frontend/src/App.tsx # Routes, nav, aria, QueryCache/MutationCache
|
||||
frontend/src/api/index.ts # (pre-existing WIP, not mine)
|
||||
frontend/src/components/ui/Badge.tsx # icon + aria-label props
|
||||
frontend/src/components/ui/EmptyState.tsx # optional to prop
|
||||
frontend/src/lib/toast.ts → toast.tsx # renamed for JSX; showToast.undo()
|
||||
frontend/src/lib/toast.ts → toast.tsx # renamed for JSX; showToast.undo() (B12), extractErrorMessage/showApiError (F7)
|
||||
frontend/src/lib/utils.ts # cleanDescription() (B7)
|
||||
frontend/src/pages/Dashboard.tsx # B5, B6, B12
|
||||
frontend/src/pages/MealDetail.tsx # B2, B3, B7
|
||||
frontend/src/pages/Pantry.tsx # B8, B10, B12
|
||||
frontend/src/pages/Dashboard.tsx # B5, B6, B12, F6 aria-label, F7 handler refactor
|
||||
frontend/src/pages/MealDetail.tsx # B2, B3, B7, F7 submitFeedback onError
|
||||
frontend/src/pages/Pantry.tsx # B8, B10, B12, F7 add/remove/createIngredient onError
|
||||
frontend/src/pages/RecipeDetail.tsx # B1
|
||||
frontend/src/pages/Recipes.tsx # B11
|
||||
frontend/src/pages/ShoppingList.tsx # B9, S3.3
|
||||
|
||||
Reference in New Issue
Block a user