feat: M3 planner & routine — weekly routines, cycle mode, stats and web push - #3
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- core planner: weekly rrule subset, topological schedule allocation, weighted cycle round-robin, forward-only replan, buildToday merge - core stats: net hours per day, streak, accuracy, iso-week comparison, weak-topic detector - db repos: routines, targets (progress by metric/period), reminders, cycle slots (atomic replace + local pointer), stats feeds, updateTrack - worker: /push/subscribe, /push/vapid, 5-min cron sending payload-less VAPID web push (ES256 via WebCrypto, jwt signature-verified in tests), gen-vapid script and secret format docs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- /routines: weekly grid, day toggles, track binding, delete - cycle editor on track view (mode toggle, weights, debounced replace-all) - /stats: 12-week heatmap (heat tokens), streak, iso-week comparison, accuracy by track, weak topics - /reminders: CRUD, local notifications (permission on click), push subscribe flow, .ics export - Today v2: buildToday merge (reviews + plan blocks + reminders with data-kind), target progress bars, calm replan note - service worker (payload-less push -> generic notification) + header nav - e2e: planner-loop.cy.ts (routine->Today block, due reminder, stats after session, ics download) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Milestone 3 (planner & routine), complete — a week of routine auto-populates Today, and falling behind produces a calm forward replan, never a backlog:
packages/core): weekly RRULE subset (FREQ=WEEKLY;BYDAY=…), schedule-mode allocation in topological order (deps first, per-track cursor), weighted cycle round-robin with persisted pointer, forward-only idempotentreplan, andbuildTodaymerging overdue reviews → due reminders → today's blocks → fresh reviews.packages/core): net seconds per day (zero-filled), streak with yesterday fallback, accuracy by track, ISO-week comparison, weak-topic detector (0.7·low-rating share + 0.3·inverse net time).packages/db): routines, targets (targetProgressby metric/period incl. track-scoped review joins), reminders, cycle slots (atomic replace-all + local-only pointer), read-only stats feeds,updateTrack.apps/worker):/push/subscribe,/push/vapid, 5-min cron sending payload-less VAPID pushes (ES256 via WebCrypto — JWT signature verified in tests with a per-run keypair), 404/410 cleanup,gen-vapid.ts+ secret format docs./routinesweekly grid; cycle editor with weights on the track view;/stats(12-week amber heatmap, streak, comparison, weak topics);/reminders(local notifications with permission-on-click, push subscribe,.icsexport); Today v2 with plan blocks, target progress bars and the replan note; service worker + full header nav.Tests
planner-loop.cy.ts(routine → Today block, due reminder → Today, stats after a session,.icsdownload) + all previous specs green; fixed a cross-spec OPFS contamination instudent-loop(shared db across specs)🤖 Generated with Claude Code