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:
@@ -1,39 +1,39 @@
|
||||
---
|
||||
phase: "06-ux-polish"
|
||||
plan: "03"
|
||||
subsystem: "api/broker"
|
||||
tags: ["tdd", "expand", "hasRrule", "ical", "recurrence", "d-08", "d-06"]
|
||||
phase: '06-ux-polish'
|
||||
plan: '03'
|
||||
subsystem: 'api/broker'
|
||||
tags: ['tdd', 'expand', 'hasRrule', 'ical', 'recurrence', 'd-08', 'd-06']
|
||||
dependency_graph:
|
||||
requires:
|
||||
- "apps/api/src/broker/expand.ts (CalendarOccurrence interface)"
|
||||
- "apps/api/tests/fixtures/*.ics (existing fixtures)"
|
||||
- 'apps/api/src/broker/expand.ts (CalendarOccurrence interface)'
|
||||
- 'apps/api/tests/fixtures/*.ics (existing fixtures)'
|
||||
provides:
|
||||
- "CalendarOccurrence.hasRrule: boolean (server source-of-truth)"
|
||||
- "weekly-count3.ics test fixture (bounded RRULE, COUNT=3)"
|
||||
- "expand.test.ts hasRrule + bounded-RRULE assertions"
|
||||
- 'CalendarOccurrence.hasRrule: boolean (server source-of-truth)'
|
||||
- 'weekly-count3.ics test fixture (bounded RRULE, COUNT=3)'
|
||||
- 'expand.test.ts hasRrule + bounded-RRULE assertions'
|
||||
affects:
|
||||
- "apps/api/src/broker/expand.ts (CalendarOccurrence consumers — routes/events.ts)"
|
||||
- "apps/pwa/src/api/client.ts (mirror field added in Plan 05)"
|
||||
- 'apps/api/src/broker/expand.ts (CalendarOccurrence consumers — routes/events.ts)'
|
||||
- 'apps/pwa/src/api/client.ts (mirror field added in Plan 05)'
|
||||
tech_stack:
|
||||
added: []
|
||||
patterns:
|
||||
- "TDD RED→GREEN: test-only commit followed by implementation commit"
|
||||
- "Capture event.isRecurring() once before branch, pass to both push sites"
|
||||
- "epochMilliseconds (not epochSeconds) for Temporal duration arithmetic with temporal-polyfill"
|
||||
- 'TDD RED→GREEN: test-only commit followed by implementation commit'
|
||||
- 'Capture event.isRecurring() once before branch, pass to both push sites'
|
||||
- 'epochMilliseconds (not epochSeconds) for Temporal duration arithmetic with temporal-polyfill'
|
||||
key_files:
|
||||
created:
|
||||
- "apps/api/tests/fixtures/weekly-count3.ics"
|
||||
- 'apps/api/tests/fixtures/weekly-count3.ics'
|
||||
modified:
|
||||
- "apps/api/src/broker/expand.ts"
|
||||
- "apps/api/tests/broker/expand.test.ts"
|
||||
- 'apps/api/src/broker/expand.ts'
|
||||
- 'apps/api/tests/broker/expand.test.ts'
|
||||
decisions:
|
||||
- "D-08: hasRrule derived from event.isRecurring() — no DB query change needed (already available on the parsed ICAL.Event)"
|
||||
- "Captured isRecurring once before the non-recurring/recurring branch (single capture pattern from PATTERNS.md)"
|
||||
- "epochMilliseconds used for Temporal duration math — temporal-polyfill returns number not BigInt for this property"
|
||||
- "weekly-count3.ics uses UTC DTSTART/DTEND (no VTIMEZONE needed) for simplicity in the bounded test fixture"
|
||||
- 'D-08: hasRrule derived from event.isRecurring() — no DB query change needed (already available on the parsed ICAL.Event)'
|
||||
- 'Captured isRecurring once before the non-recurring/recurring branch (single capture pattern from PATTERNS.md)'
|
||||
- 'epochMilliseconds used for Temporal duration math — temporal-polyfill returns number not BigInt for this property'
|
||||
- 'weekly-count3.ics uses UTC DTSTART/DTEND (no VTIMEZONE needed) for simplicity in the bounded test fixture'
|
||||
metrics:
|
||||
duration: "11m"
|
||||
completed: "2026-06-10"
|
||||
duration: '11m'
|
||||
completed: '2026-06-10'
|
||||
tasks_completed: 2
|
||||
files_modified: 3
|
||||
---
|
||||
@@ -44,10 +44,10 @@ Added `hasRrule: boolean` to the `CalendarOccurrence` interface in `expand.ts` a
|
||||
|
||||
## Tasks Completed
|
||||
|
||||
| # | Task | Type | Commit | Outcome |
|
||||
|---|------|------|--------|---------|
|
||||
| 1 | RED — failing tests for hasRrule + bounded expansion | TDD test | 593302e | 3 hasRrule failures + duration test confirmed red |
|
||||
| 2 | GREEN — add hasRrule to interface and populate it | TDD impl | 44d336c | 10/10 expand tests pass |
|
||||
| # | Task | Type | Commit | Outcome |
|
||||
| --- | ---------------------------------------------------- | -------- | ------- | ------------------------------------------------- |
|
||||
| 1 | RED — failing tests for hasRrule + bounded expansion | TDD test | 593302e | 3 hasRrule failures + duration test confirmed red |
|
||||
| 2 | GREEN — add hasRrule to interface and populate it | TDD impl | 44d336c | 10/10 expand tests pass |
|
||||
|
||||
## What Was Built
|
||||
|
||||
@@ -60,10 +60,12 @@ Added `hasRrule: boolean` field to `CalendarOccurrence` interface with JSDoc. Ca
|
||||
Added two new `describe` blocks:
|
||||
|
||||
**`hasRrule field — D-08`** (2 tests):
|
||||
|
||||
- `weekly-dst.ics` (recurring): all occurrences have `hasRrule === true`
|
||||
- `single-duration.ics` (non-recurring): the single occurrence has `hasRrule === false`
|
||||
|
||||
**`Bounded RRULE (COUNT=3) — D-06 invariant`** (3 tests):
|
||||
|
||||
- `COUNT=3` within a 6-month window returns exactly 3 occurrences
|
||||
- Each bounded occurrence duration = 1 hour from DTSTART→DTEND (not recurrence span)
|
||||
- Bounded occurrences have `hasRrule === true`
|
||||
@@ -80,6 +82,7 @@ New fixture: `FREQ=WEEKLY;COUNT=3`, `DTSTART:20260601T090000Z`, `DTEND:20260601T
|
||||
## Deviations from Plan
|
||||
|
||||
**1. [Rule 1 - Bug] Duration test using `epochMilliseconds` instead of `epochSeconds`**
|
||||
|
||||
- **Found during:** Task 1 test writing
|
||||
- **Issue:** `Temporal.ZonedDateTime.epochSeconds` returns `NaN` in the `temporal-polyfill` package used in the test suite; `epochMilliseconds` returns a regular `number`
|
||||
- **Fix:** Duration assertion uses `endZdt.epochMilliseconds - startZdt.epochMilliseconds` and compares to `3_600_000` (1 hour in ms)
|
||||
|
||||
Reference in New Issue
Block a user