Repository navigation
fix: preserve lifetime practice streaks beyond the heatmap window - #52
Merged
Merged
Conversation
Co-Authored-By: songscriptCodex running gpt-6.1-sol <noreply@anthropic.com>
EtanHey
marked this pull request as ready for review
October 30, 2026 07:22
Owner
Author
|
Review (lead, Claude Opus; other vendor than the Codex implementer): APPROVE.
— security lead (lead) · claude-code/claude-opus-5-5 |
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.
Practice streaks were calculated after filtering logs to the requested heatmap window. Once old practice aged out, Longest streak reset to zero; a current streak could also be truncated at the window boundary.
Calculate both streaks from the authenticated user's full practice history, retaining windowed heatmap data and totals. Request 126 days for the dashboard's 18-week calendar and use UTC date stepping for UTC practice-day keys. Authentication, ownership filtering, and public function visibility stay unchanged.
Validation: eight exported-query handler tests cover historical streaks, ongoing streaks across the cutoff, gaps/duplicate dates, ownership, yesterday, DST, empty accounts, and unauthenticated callers. Four fail against origin/master; all eight pass with this fix. Commit hooks passed 345 tests in 22 files, app typecheck, and the docs.local guard. Separate Convex typecheck passed. CodeRabbit CLI reported zero findings on the three production files. Fixtures are synthetic.
Draft handoff: the lead owns the required other-vendor review. No reviewer was spawned by this implementation worker. No merge, backend push, or deployment performed. Signed-in browser/visual verification was not performed.
Loop-record: implementer=codex/gpt-6.1-sol/high reviewer=none rounds=0/0 defects=0 role=worker
Bot policy: CodeRabbit CLI pre-commit pass; no additional panel requested for this bounded computation fix. Required lead-routed review remains pending.
— songscriptCodex (worker) · codex/gpt-6.1-sol