Conversation
Shows where in the week cost is spent — a 7x24 matrix over the last 30 days (local time) rendered below the heatmap legend. - heatmap.ts: aggregateByDowHour(entries, days) returns a number[7][24] grid of total USD per (day-of-week, hour); HeatmapData gains dowHour - panel.ts: punch-card grid reusing the heatmap intensity levels (getCostLevel / hm-cell l0-l4), localized weekday row labels, 3-hourly column labels, per-cell cost tooltips - l10n: EN/JA/ZH section title - Docs: punch card section in docs/features/05-heatmap.md, CHANGELOG - Tests: empty grid shape, cell accumulation, window cutoff Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZLCLQeudf1LQBnBSyyr4f
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.
Summary
The dashboard's Usage History card gains a GitHub-style punch card: a 7 × 24 weekday × hour matrix showing where in the week cost is spent, over the last 30 days in local time. Complements the existing calendar heatmap (which days) and hourly bar chart (which hours on average) by exposing weekly patterns — e.g. "Monday mornings and weekday evenings".
Implementation
heatmap.ts: newaggregateByDowHour(entries, days)→number[7][24]grid of total USD per (day-of-week, hour) cell, row 0 = Sunday;HeatmapDatagainsdowHour, computed in the same pass as the existing aggregates (no extra file reads).panel.ts: CSS-grid punch card reusing the heatmap's intensity classes (getCostLevel,hm-cell l0–l4) so both visualizations share one color language. Localized short weekday labels (toLocaleString), column labels every 3 hours, per-cell tooltipMon 09:00 — $0.312. Hidden automatically whendowHouris absent.docs/features/05-heatmap.md; CHANGELOG.Tests
New
aggregateByDowHoursuite: 7×24 zero-grid shape, cost accumulation into the correct cell (with a no-leakage total check), and the 30-day window cutoff — all with timestamps constructed to be deterministic.npm run lint✅,npm run compile✅, unit suites ✅ via mocha;@vscode/test-electroncannot download VS Code in this sandbox — please rely on CI for the extension-host suites.🤖 Generated with Claude Code
https://claude.ai/code/session_012ZLCLQeudf1LQBnBSyyr4f
Generated by Claude Code