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
@@ -3,7 +3,7 @@ phase: 02-calendar-display
plan: 04
type: execute
wave: 3
depends_on: ["02-02", "02-03"]
depends_on: ['02-02', '02-03']
files_modified:
- apps/pwa/src/components/CalendarShell.tsx
- apps/pwa/src/App.tsx
@@ -14,32 +14,32 @@ user_setup: []
must_haves:
truths:
- "Opening the app renders a Schedule-X calendar populated with REAL windowed Fastmail occurrences fetched from /api/events"
- 'Opening the app renders a Schedule-X calendar populated with REAL windowed Fastmail occurrences fetched from /api/events'
- "Events render in their owner's member color; shared-family events render in the reserved rose color (D-06)"
- "The user can switch between day, week, month, and agenda views and events render in each (D-04)"
- "Recurring events show all in-window occurrences; all-day events appear as full-day banners on the correct date with no shift"
- "The visible window drives the TanStack Query key; navigating to a new window refetches"
- "Default view is agenda on phone and month on tablet/desktop (D-05)"
- 'The user can switch between day, week, month, and agenda views and events render in each (D-04)'
- 'Recurring events show all in-window occurrences; all-day events appear as full-day banners on the correct date with no shift'
- 'The visible window drives the TanStack Query key; navigating to a new window refetches'
- 'Default view is agenda on phone and month on tablet/desktop (D-05)'
artifacts:
- path: "apps/pwa/src/components/CalendarShell.tsx"
provides: "Schedule-X calendar wired to TanStack Query + hydrateEvents + Zustand range"
- path: 'apps/pwa/src/components/CalendarShell.tsx'
provides: 'Schedule-X calendar wired to TanStack Query + hydrateEvents + Zustand range'
min_lines: 60
- path: "apps/pwa/src/App.tsx"
provides: "renders CalendarShell as the app root (replaces EventProof landing)"
contains: "CalendarShell"
- path: 'apps/pwa/src/App.tsx'
provides: 'renders CalendarShell as the app root (replaces EventProof landing)'
contains: 'CalendarShell'
key_links:
- from: "apps/pwa/src/components/CalendarShell.tsx"
to: "/api/events"
- from: 'apps/pwa/src/components/CalendarShell.tsx'
to: '/api/events'
via: "useQuery(['events',start,end]) → fetchEvents"
pattern: "fetchEvents"
- from: "apps/pwa/src/components/CalendarShell.tsx"
to: "Schedule-X eventsService"
via: "eventsService.set(hydrateEvents(data.occurrences))"
pattern: "hydrateEvents"
- from: "apps/pwa/src/components/CalendarShell.tsx"
to: "apps/pwa/src/store/calendarStore.ts"
via: "calendarRange drives query key; onRangeUpdate updates it"
pattern: "useCalendarStore"
pattern: 'fetchEvents'
- from: 'apps/pwa/src/components/CalendarShell.tsx'
to: 'Schedule-X eventsService'
via: 'eventsService.set(hydrateEvents(data.occurrences))'
pattern: 'hydrateEvents'
- from: 'apps/pwa/src/components/CalendarShell.tsx'
to: 'apps/pwa/src/store/calendarStore.ts'
via: 'calendarRange drives query key; onRangeUpdate updates it'
pattern: 'useCalendarStore'
---
<objective>
@@ -95,6 +95,7 @@ Output: CalendarShell.tsx wired to the full data pipeline; App.tsx renders it; a
Render `<ScheduleXCalendar calendarApp={calendar} />` filling the available space. Use token-based styling only (className/var(--token)) — no hard-coded hex/px (Phase 2 rule). The AppNav/ViewToolbar/ColorLegend/popover chrome is Plan 05; CalendarShell here may render a minimal toolbar placeholder or rely on Schedule-X's built-in controls so the four views are switchable and verifiable now.
Update `apps/pwa/src/App.tsx`: replace the EventProof landing content with `<CalendarShell />` as the app root. Migrate any remaining hard-coded hex/px in App.tsx to tokens (Phase 2 rule). Leave the meQuery sign-in-required error branch intact for unauthenticated state.
</action>
<verify>
<automated>cd apps/pwa && grep -q "ScheduleXCalendar" src/components/CalendarShell.tsx && grep -q "hydrateEvents" src/components/CalendarShell.tsx && grep -q "queryKey: \['events'" src/components/CalendarShell.tsx && grep -q "CalendarShell" src/App.tsx && echo SHELL_WIRED</automated>
@@ -143,18 +144,20 @@ Output: CalendarShell.tsx wired to the full data pipeline; App.tsx renders it; a
</tasks>
<threat_model>
## Trust Boundaries
| Boundary | Description |
|----------|-------------|
| Boundary | Description |
| ---------------------------------- | -------------------------------------------------- |
| /api/events JSON → calendar render | server occurrences rendered into the DOM via React |
## STRIDE Threat Register
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|-----------|----------|-----------|-------------|-----------------|
| T-02d-01 | Tampering (XSS) | event title/location/description in render | mitigate | React JSX default escaping; never dangerouslySetInnerHTML for event fields (carried into Plan 05 popover) |
| T-02d-02 | Information disclosure | events from another member's account | accept | API already enforces auth + per-credential scoping (Plan 02 / CAL-08-DECISION); client renders only what the authed endpoint returns |
| Threat ID | Category | Component | Disposition | Mitigation Plan |
| --------- | ---------------------- | ------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| T-02d-01 | Tampering (XSS) | event title/location/description in render | mitigate | React JSX default escaping; never dangerouslySetInnerHTML for event fields (carried into Plan 05 popover) |
| T-02d-02 | Information disclosure | events from another member's account | accept | API already enforces auth + per-credential scoping (Plan 02 / CAL-08-DECISION); client renders only what the authed endpoint returns |
</threat_model>
<verification>
@@ -164,19 +167,21 @@ Output: CalendarShell.tsx wired to the full data pipeline; App.tsx renders it; a
</verification>
<success_criteria>
- Real Fastmail occurrences render color-coded across day/week/month/agenda (CAL-02, CAL-03)
- Recurring + all-day occurrences render correctly in-window (CAL-07 display)
- Window navigation refetches via TanStack Query
</success_criteria>
</success_criteria>
<artifacts_produced>
## Artifacts this phase produces (Plan 04)
- `CalendarShell` (React component) — apps/pwa/src/components/CalendarShell.tsx
- App.tsx now renders CalendarShell as root (EventProof landing removed from render path)
- CalendarShell.test.tsx (CAL-03 render smoke)
- Schedule-X eventsService + eventModal plugin instances + useCalendarApp config in CalendarShell
</artifacts_produced>
</artifacts_produced>
<output>
Create `.planning/phases/02-calendar-display/02-04-SUMMARY.md` when done