feat(admin): draw an account's days as a calendar - #461
Merged
Conversation
The account page's bars carry magnitude but hide pattern: weekday rhythms, weekend gaps, and streak breaks all vanish into a row of heights. A GitHub-style intensity calendar under the usage chart folds the same zero-filled daily series into Monday-keyed UTC weeks — the retention grid's weeks — and fills each day against the account's own busiest day in the window, with the retention grid's color-mix technique and fill floor. A covered day with no calls keeps the faintest neutral fill, a day outside the window draws nothing, and today wears the retention grid's dashed border, read off generatedAt. The calendar draws only for windows past a week: a 7-day window folds to one column that restates the bars with less resolution. The account skeleton grows a matching card under the same rule, and the pure week-folding helper carries its own tests. 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
An intensity calendar of the account's activity on the admin account detail page, under the existing "Daily use · hosted tier" bar chart. The bars stay — they carry magnitude — and the calendar carries the pattern they hide: weekday rhythms, weekend gaps, and streak breaks.
Aug 12 — 5 voice · 3 attention, with the page's "(so far today)" wording on the partial day.color-mix(var(--chart-1) P%, transparent)with the same 8% floor so a one-call day stays a visible mark — scaled against the account's own busiest day in the window. One deliberate reading of the spec: the retention grid mixesin oklab, notin oklch, so the calendar reuses the grid's expression verbatim to keep the page on one interpolation space (mixing into transparent makes the two visually indistinguishable anyway).generatedAtvia the existingpartialDayKeyhelper, never the browser clock — a fade here would pose as a quiet day.How
Pure presentation; no server changes. The calendar composes from the response the page already holds — the zero-filled
activity.dailyseries,windowDays, andgeneratedAt. The week folding is a small pure helper,apps/web/src/activity-calendar.ts(calendarWeeks,monthLabels, structurally typed over{ day: string }likedaily-series.ts), with tests inapps/web/tests/activity-calendar.test.tscovering a window opening mid-week, a window ending on a partial today, the 90-day span's ragged first and last weeks, month labeling, and an empty account.Verification
./scripts/check.shpasses (exit 0) after rebasing ontofeae90a. One earlier full run tripped onapps/desktop/src/main/native/microphone-route.test.ts, which passes in isolation and on re-run — a flaky, unrelated desktop test.overflow-x-autowrapper is there for narrow viewports); the weekday rhythm, empty weekends, and a stubbed mid-window break all read at a glance, and today draws dashed. At 30d it draws five columns with Jul/Aug labels. At 7d no calendar draws. The loading state shows the new skeleton card in place below the chart skeleton.🤖 Generated with Claude Code
Automated visual evidence
Download the deterministic macOS evidence · workflow run
cc52eacd3c56ef71e1f542d2a4beb84e691128cbsmoke