Repository navigation
Under the Hood: let users open a bounded range of past monthly reports - #234
Open
aunysillyme wants to merge 6 commits into
Open
aunysillyme wants to merge 6 commits into
aunysillyme wants to merge 6 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
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.
Addresses the "pick a past month" ask in #232. Builds on #233 (merge that first; this branch contains its commits).
Problem
Only one month is ever reachable. Monthly aggregates are already stored keyed by
(userId, monthBucket), but the serving column's view isUnit, so there is no way to ask for an earlier month, and a download always refetches the default month.Change (behind
under_the_hood_report_history_months, default0= off)YYYYMM, the existingmonthBucketencoding), passed from an optional GraphQL$monthvariable.UnderTheHoodReportInfo.availableMonths(new optional field) lists the selectable months; it is empty when history is off, and the selector renders only when it is non-empty.monthquery parameter is carried through the landing page, the report page, the shared URL helper and the download route, so a historical report downloads the same month it shows.Safety
With the switch at
0the view is ignored, the GraphQL variable is undefined, and responses match the status branch.Verification
Static, as in #233:
tsc --strictclean on_lib/report.ts.Needs X's internal build: the non-
Unitview syntax,ctx.viewand the generated alias arguments. I followed the nearest in-repo precedent but could not compile them.Mock states added: a historical month and an out-of-range request.
🤖 Generated with Claude Code