feat(admin): make the account calendar a full-width trailing year - #466
Merged
Conversation
The account activity calendar no longer follows the 7/30/90-day window switcher: the server now ships a calendar series of its own — the last 52 complete UTC weeks plus the current partial one, zero-filled — read by one additional bounded query beside the existing parallel reads. The calendar always draws, an all-quiet account showing the all-neutral year, intensity scales to the account's busiest day in the year, and the week columns flex to fill the card down to a minimum cell size, below which the wrapper scrolls. Weeks open on Sunday (Sun..Sat rows), the user's requested convention for this one surface; the retention grid and every other weekly surface stay Monday-keyed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
The account page's activity calendar no longer follows the 7/30/90-day window switcher. It is now a trailing-year intensity calendar: always the same span — the last 52 complete UTC weeks plus the current partial one — and always drawn, filling the full card width.
AdminUserSource.usage.calendarByDay,AdminUserDetail.activity.calendarDaily).How
apps/web/server/admin/admin-user.ts:calendarDayKeys(now)names the Sunday-opened trailing-year span; the builder zero-fillscalendarDailyfrom the newcalendarByDaymap.apps/web/server/admin/admin-queries.ts: one additional bounded query in the account read, alongside the existing parallel reads, at the calendar's own start bound.apps/web/src/activity-calendar.ts: the week fold is Sunday-keyed for this surface, with the convention (and its difference from the retention grid's) stated where the keying lives.apps/web/src/AdminDashboard.tsx: the render rule loses thewindowDays > DAYS_PER_WEEKand no-calls skips (comment updated to carry the year-span rationale), the grid gainsminmax(10px, 1fr)columns with aspect-square cells, weekday labels read Sun..Sat, and the caption says the span is the trailing year regardless of the window above.Verification
./scripts/check.shpasses (exit 0; one unrelatedapps/desktoptest,microphone-route.test.ts, flaked in an earlier run and passes standalone and in the clean rerun)./api/admin/userpayloads built by the realbuildAdminUserDetail:🤖 Generated with Claude Code
Automated visual evidence
Download the deterministic macOS evidence · workflow run
69de0a4d04e4e664fa81e981577a4a0926c2e8adsmoke