fix(03): revise plans based on checker feedback
This commit is contained in:
@@ -3,7 +3,7 @@ phase: 03-interaction-quality-and-completeness
|
||||
plan: 02
|
||||
type: execute
|
||||
wave: 1
|
||||
depends_on: []
|
||||
depends_on: ["03-00"]
|
||||
files_modified:
|
||||
- frontend/src/pages/CategoriesPage.tsx
|
||||
- frontend/src/pages/DashboardPage.tsx
|
||||
@@ -105,6 +105,9 @@ export { Spinner }
|
||||
<name>Task 1: Create shared EmptyState component and wire into Dashboard and Categories pages</name>
|
||||
<files>frontend/src/components/EmptyState.tsx, frontend/src/pages/DashboardPage.tsx, frontend/src/pages/CategoriesPage.tsx</files>
|
||||
<action>
|
||||
**Step 0 — Check shadcn registry first (per project skill rules):**
|
||||
Run `bunx --bun shadcn@latest search -q empty` in the frontend directory. If shadcn provides an EmptyState or similar component, use it instead of creating a custom one. If nothing relevant is found (expected), proceed with custom component below.
|
||||
|
||||
**Create `frontend/src/components/EmptyState.tsx`:**
|
||||
```typescript
|
||||
interface EmptyStateProps {
|
||||
@@ -128,7 +131,7 @@ export { Spinner }
|
||||
- Guard the grouped cards render with `{grouped.length > 0 && grouped.map(...)}` so both empty state and cards don't show simultaneously.
|
||||
</action>
|
||||
<verify>
|
||||
<automated>cd /home/jean-luc-makiola/Development/projects/SimpleFinanceDash/frontend && bun run build</automated>
|
||||
<automated>cd /home/jean-luc-makiola/Development/projects/SimpleFinanceDash/frontend && bun vitest run src/pages/DashboardPage.test.tsx src/pages/CategoriesPage.test.tsx && bun run build</automated>
|
||||
</verify>
|
||||
<done>EmptyState component exists and is used in DashboardPage (no-budgets case) and CategoriesPage (no-categories case). CategoriesPage has loading state to prevent empty-state flash. Build passes.</done>
|
||||
</task>
|
||||
@@ -190,7 +193,7 @@ export { Spinner }
|
||||
**CRITICAL:** The ON DELETE RESTRICT constraint means deleting a category with budget items returns 500. The catch block handles this — the error message displays inline in the dialog. The dialog does NOT auto-close on error, letting the user read the message and dismiss manually.
|
||||
</action>
|
||||
<verify>
|
||||
<automated>cd /home/jean-luc-makiola/Development/projects/SimpleFinanceDash/frontend && bun run build</automated>
|
||||
<automated>cd /home/jean-luc-makiola/Development/projects/SimpleFinanceDash/frontend && bun vitest run src/pages/CategoriesPage.test.tsx && bun run build</automated>
|
||||
</verify>
|
||||
<done>Delete button opens confirmation dialog. Confirm executes delete with spinner. Error from ON DELETE RESTRICT shows inline. Cancel closes dialog. Build passes with zero errors.</done>
|
||||
</task>
|
||||
|
||||
Reference in New Issue
Block a user