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
@@ -16,29 +16,29 @@ requirements: [NOTIF-03]
must_haves:
truths:
- "When the other member adds or meaningfully changes an event, the first member receives a push with the event title + action (NOTIF-03, D-02/D-03)"
- "Meaningful = new event, deletion, or change to time/date/title/location; description-only edits are silent (D-04)"
- "The actor (the member whose sync detected/wrote the change) is never notified of their own change (D-03)"
- "calendar_events.title is populated from VEVENT SUMMARY during sync so reminder + change copy show a readable title (NOTIF-01 dependency closed)"
- "syncCalendar exposes detected changes via a callback consumed by both the poller (external changes) and the outbox resync (this-member writes)"
- "D-13: event-change detection reads only from the MariaDB cache / poller / outbox — no tsdav or direct Fastmail I/O in eventChangeDispatcher (broker stays the sole Fastmail boundary, carried from Phase 3 D-12)"
- 'When the other member adds or meaningfully changes an event, the first member receives a push with the event title + action (NOTIF-03, D-02/D-03)'
- 'Meaningful = new event, deletion, or change to time/date/title/location; description-only edits are silent (D-04)'
- 'The actor (the member whose sync detected/wrote the change) is never notified of their own change (D-03)'
- 'calendar_events.title is populated from VEVENT SUMMARY during sync so reminder + change copy show a readable title (NOTIF-01 dependency closed)'
- 'syncCalendar exposes detected changes via a callback consumed by both the poller (external changes) and the outbox resync (this-member writes)'
- 'D-13: event-change detection reads only from the MariaDB cache / poller / outbox — no tsdav or direct Fastmail I/O in eventChangeDispatcher (broker stays the sole Fastmail boundary, carried from Phase 3 D-12)'
artifacts:
- path: "apps/api/src/lib/eventChangeDispatcher.ts"
provides: "dispatchEventChange(change, actorUserId) — builds copy, fans out to non-actor members"
exports: ["dispatchEventChange", "isMeaningfulChange"]
- path: 'apps/api/src/lib/eventChangeDispatcher.ts'
provides: 'dispatchEventChange(change, actorUserId) — builds copy, fans out to non-actor members'
exports: ['dispatchEventChange', 'isMeaningfulChange']
min_lines: 35
- path: "apps/api/src/broker/sync.ts"
provides: "syncCalendar populates title + emits added/updated/deleted change records via onChanges callback"
contains: "title"
- path: 'apps/api/src/broker/sync.ts'
provides: 'syncCalendar populates title + emits added/updated/deleted change records via onChanges callback'
contains: 'title'
key_links:
- from: "apps/api/src/broker/sync.ts"
to: "apps/api/src/lib/eventChangeDispatcher.ts"
via: "onChanges callback dispatches detected event changes"
pattern: "onChanges"
- from: "apps/api/src/lib/eventChangeDispatcher.ts"
to: "apps/api/src/lib/pushDispatcher.ts"
via: "dispatchPush to each non-actor member subscription"
pattern: "dispatchPush"
- from: 'apps/api/src/broker/sync.ts'
to: 'apps/api/src/lib/eventChangeDispatcher.ts'
via: 'onChanges callback dispatches detected event changes'
pattern: 'onChanges'
- from: 'apps/api/src/lib/eventChangeDispatcher.ts'
to: 'apps/api/src/lib/pushDispatcher.ts'
via: 'dispatchPush to each non-actor member subscription'
pattern: 'dispatchPush'
---
<objective>
@@ -92,19 +92,21 @@ Output: eventChangeDispatcher.ts (dispatchEventChange + isMeaningfulChange); syn
</feature>
<threat_model>
## Trust Boundaries
| Boundary | Description |
|----------|-------------|
| Boundary | Description |
| ------------------------- | ----------------------------------------------------------------------------- |
| sync diff → push audience | change eligibility + actor identity come from the sync context, not a request |
## STRIDE Threat Register
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|-----------|----------|-----------|-------------|-----------------|
| T-05-20 | Spoofing | actor notified of own event change | mitigate | dispatchEventChange excludes actorUserId; poller/outbox supply the correct actor |
| T-05-21 | Denial of Service | description-edit spam | mitigate | isMeaningfulChange filters description-only edits (D-04) — no push |
| T-05-22 | Information Disclosure | event change in notification code calling Fastmail | mitigate | D-13: notification code reads MariaDB cache only; no tsdav in eventChangeDispatcher |
| Threat ID | Category | Component | Disposition | Mitigation Plan |
| --------- | ---------------------- | -------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------- |
| T-05-20 | Spoofing | actor notified of own event change | mitigate | dispatchEventChange excludes actorUserId; poller/outbox supply the correct actor |
| T-05-21 | Denial of Service | description-edit spam | mitigate | isMeaningfulChange filters description-only edits (D-04) — no push |
| T-05-22 | Information Disclosure | event change in notification code calling Fastmail | mitigate | D-13: notification code reads MariaDB cache only; no tsdav in eventChangeDispatcher |
</threat_model>
<verification>
@@ -114,10 +116,11 @@ Output: eventChangeDispatcher.ts (dispatchEventChange + isMeaningfulChange); syn
</verification>
<success_criteria>
- Failing tests committed (RED).
- eventChangeDispatcher + syncCalendar diff/title/onChanges implemented (GREEN).
- Meaningful-only (D-04), actor-suppressed (D-03), specific copy (D-02), title populated — all verified.
</success_criteria>
</success_criteria>
<output>
Create `.planning/phases/05-web-push-notifications/05-07-SUMMARY.md` with RED/GREEN commits.