diff options
Diffstat (limited to '.rules/changelog/2026-03/28/10.md')
| -rw-r--r-- | .rules/changelog/2026-03/28/10.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.rules/changelog/2026-03/28/10.md b/.rules/changelog/2026-03/28/10.md new file mode 100644 index 0000000..a5f6de0 --- /dev/null +++ b/.rules/changelog/2026-03/28/10.md @@ -0,0 +1,15 @@ +# Phase 2: Calendar State + +## Added +- `src/calendar/calendar-state.ts` — observable state container for the calendar view + +## Details +- `CalendarState` class with private fields: `displayedMonth`, `today`, `activeFileDate`, `noteIndex` +- Read-only getters for all state fields +- `subscribe(cb)` / unsubscribe pattern using a `Set<() => void>` +- `setDisplayedMonth(m)` — clones and normalizes to start-of-month +- `setActiveFile(file, rootFolder)` — delegates to `getDateFromDailyNote()` from Phase 1 +- `reindex(app, rootFolder)` — delegates to `indexDailyNotes()` from Phase 1 +- `tick()` — heartbeat that notifies only on day rollover +- `rootFolder` passed as parameter (not stored) for consistency across methods +- No framework dependencies; strict TypeScript, no `any` |
