style(13-03): apply Prettier formatting across repo

Mechanical reformat — no logic changes. 398 files changed, 19125
insertions(+), 16457 deletions(-). Prettier 3.8.4 with .prettierrc
(singleQuote:true, semi:true, tabWidth:2, trailingComma:all,
printWidth:100). Isolated per D-13-08 for reviewability.
This commit is contained in:
Lucas Berger
2026-06-11 20:35:18 -04:00
parent 4bc0445173
commit 982438dc10
398 changed files with 19050 additions and 16382 deletions
@@ -28,7 +28,7 @@ decisions:
- vi.importActual used for IN-03 export test to bypass vi.mock() on calendarStore
metrics:
duration_minutes: 40
completed_date: "2026-06-06T00:42:08Z"
completed_date: '2026-06-06T00:42:08Z'
tasks_completed: 2
files_modified: 4
---
@@ -39,12 +39,12 @@ EventForm edit mode now pre-populates correctly from TanStack cache (even when o
## Tasks Completed
| Task | Type | Description | Commit |
|------|------|-------------|--------|
| 1 RED | test | WR-03 blank/recurrence, WR-05 zone, IN-03 export — failing tests | 02e312a |
| 1 GREEN | feat | WR-03 deps fix, WR-05 parseDateTime fix, IN-03 todayIso export | f0f1361 |
| 2 RED | test | WR-07 focus trap Tab/Shift+Tab cycle — failing tests | 4244e8c |
| 2 GREEN | feat | WR-07 inline focus trap on dialogRef + onKeyDown | e971e16 |
| Task | Type | Description | Commit |
| ------- | ---- | ---------------------------------------------------------------- | ------- |
| 1 RED | test | WR-03 blank/recurrence, WR-05 zone, IN-03 export — failing tests | 02e312a |
| 1 GREEN | feat | WR-03 deps fix, WR-05 parseDateTime fix, IN-03 todayIso export | f0f1361 |
| 2 RED | test | WR-07 focus trap Tab/Shift+Tab cycle — failing tests | 4244e8c |
| 2 GREEN | feat | WR-07 inline focus trap on dialogRef + onKeyDown | e971e16 |
## What Was Built
@@ -73,6 +73,7 @@ The old implementation mixed `toISOString().slice(0,10)` (UTC date) with `getHou
The docblock claimed "Focus trap while open" but the implementation only called `.focus()` once on open. Tab escaped the modal to background content.
**Fix:** Added `dialogRef` and `handleDialogKeyDown` handler on the dialog div. On Tab/Shift+Tab, queries all focusable elements inside `dialogRef.current` and wraps focus at the boundaries:
- Tab on last element → `first.focus()` + `preventDefault()`
- Shift+Tab on first element → `last.focus()` + `preventDefault()`
@@ -81,6 +82,7 @@ No external library added. Existing focus-on-open (titleRef) and Escape-to-close
### PWA-01/PWA-02: Install assets confirmed present (IN-04)
All three required PWA install assets exist in `apps/pwa/public/`:
- `icon-192.png` — 192×192 manifest icon
- `icon-512.png` — 512×512 manifest icon (+ maskable)
- `apple-touch-icon.png` — iOS Add-to-Home-Screen icon
@@ -89,24 +91,26 @@ Referenced in `index.html` and `vite.config.ts` manifest. No code change needed;
## TDD Gate Compliance
| Gate | Commit | Status |
|------|--------|--------|
| Task 1 RED | 02e312a | test(03-12): failing tests added (3 failed) |
| Task 1 GREEN | f0f1361 | feat(03-12): 27 tests passing |
| Task 2 RED | 4244e8c | test(03-12): 2 failing focus trap tests |
| Task 2 GREEN | e971e16 | feat(03-12): 29 tests passing |
| Gate | Commit | Status |
| ------------ | ------- | ------------------------------------------- |
| Task 1 RED | 02e312a | test(03-12): failing tests added (3 failed) |
| Task 1 GREEN | f0f1361 | feat(03-12): 27 tests passing |
| Task 2 RED | 4244e8c | test(03-12): 2 failing focus trap tests |
| Task 2 GREEN | e971e16 | feat(03-12): 29 tests passing |
## Deviations from Plan
### Auto-fixed Issues
**1. [Rule 2 - Missing] Add todayIso to calendarStore vi.mock() in test file**
- **Found during:** Task 1 GREEN
- **Issue:** EventForm now imports `todayIso` from calendarStore, but the `vi.mock('../store/calendarStore.js')` factory in EventForm.test.tsx only exported `useCalendarStore`. Tests crashed with "No todayIso export is defined on the mock."
- **Fix:** Added `todayIso: () => new Date().toISOString().slice(0, 10)` to the mock factory so the mocked module matches the real module's export surface.
- **Files modified:** `apps/pwa/src/components/EventForm.test.tsx`
**2. [Rule 2 - Missing] Use vi.importActual for IN-03 test**
- **Found during:** Task 1 GREEN
- **Issue:** The IN-03 test used `await import('../store/calendarStore.js')` which returns the mock (not the real module), so `actualModule.todayIso` was undefined.
- **Fix:** Changed to `await vi.importActual('../store/calendarStore.js')` to bypass the mock and test the real module export.
@@ -117,27 +121,30 @@ Referenced in `index.html` and `vite.config.ts` manifest. No code change needed;
```
cd apps/pwa && npx vitest run src/components/EventForm.test.tsx
```
**Result:** 29 passed (29)
```
cd apps/pwa && npm run build
```
**Result:** Built successfully — 509.67 kB bundle, PWA service worker generated.
## Issues Closed
| ID | Description | Status |
|----|-------------|--------|
| WR-03 | Edit form blank when occurrence resolves after open | CLOSED |
| WR-03 | Editing recurring event resets recurrence to 'none' | CLOSED |
| WR-05 | parseDateTime mixes UTC date and local time | CLOSED |
| WR-07 | Focus trap claim without real trap implementation | CLOSED |
| IN-03 | Duplicate todayIso helpers | CLOSED |
| IN-04 | PWA install assets not verified | CLOSED (assets confirmed present) |
| ID | Description | Status |
| ----- | --------------------------------------------------- | --------------------------------- |
| WR-03 | Edit form blank when occurrence resolves after open | CLOSED |
| WR-03 | Editing recurring event resets recurrence to 'none' | CLOSED |
| WR-05 | parseDateTime mixes UTC date and local time | CLOSED |
| WR-07 | Focus trap claim without real trap implementation | CLOSED |
| IN-03 | Duplicate todayIso helpers | CLOSED |
| IN-04 | PWA install assets not verified | CLOSED (assets confirmed present) |
## Self-Check: PASSED
Files exist:
- [x] apps/pwa/src/components/EventForm.tsx — modified
- [x] apps/pwa/src/components/EventForm.test.tsx — modified
- [x] apps/pwa/src/store/calendarStore.ts — modified (todayIso exported)
@@ -147,6 +154,7 @@ Files exist:
- [x] apps/pwa/public/apple-touch-icon.png
Commits exist:
- [x] 02e312a — RED Task 1
- [x] f0f1361 — GREEN Task 1
- [x] 4244e8c — RED Task 2