Repository navigation
feat(render): heatmap renderer for contribution grids - #42
Conversation
A 2D intensity grid — the primitive that powers GitHub contribution graphs,
habit trackers, and any daily/periodic metric. One renderer unlocks a whole
family of widgets that all share the "grid of colored cells" shape; future
fetchers (github_contributions, git_commits_activity, ReadStore-backed habit
trackers) feed this same renderer.
Each cell is 2 columns × 1 row to read as square-ish despite terminal's 1:2
aspect. Values bucket into 5 intensity levels; level 0 is reserved for zero
("no activity") so it stays visually distinct even on low-variance data.
Thresholds come from the payload when supplied, otherwise auto-quartile from
the non-zero values. When the slot is narrower than the grid, the rightmost
columns survive — "the most recent weeks" is what users want to see.
Palette is hardcoded to the classic GitHub grass for now; will route through
the theme system once #17 lands.
Ships a deterministic `contributions` stub fetcher so the default config
shows the grid out of the box without needing github_contributions or
ReadStore to exist yet. The default config now has a 52-week slot above the
existing disk/commits/system/prs rows.
Checkbox tracked in #41.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Keeps the dogfood config's "every shape, every renderer" invariant — the heatmap renderer was added on this branch but only to the default baked config. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The first pass painted both columns of each 2-column cell with a background fill, so adjacent cells merged into a continuous band with no cell definition. Now paints a filled-block glyph in column 0 with a colored foreground and leaves column 1 as the terminal default — cells read as distinct squares separated by subtle gaps, matching the GitHub contribution-graph look and how gitfetch renders. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Level 0 now uses GitHub's light-mode empty color (#ebedf0) instead of the dark background fill. Inactive cells read as "no activity" rather than as a dark mass, and the green gradient stands out more against the light base. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 15 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Paints `col_labels` as a top row when the area has vertical room for it (grid rows + 1). Labels right-align with their cell column and truncate before colliding with the next label. The contributions stub now fills in labels for the week that contains each month's 1st, so the demo shows Jan through Dec sliding with today's date. Both the baked default config and the dogfood config bump the contributions row by one line to accommodate the label row. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Heatmap was pinning to the left edge of its slot, which looked lopsided next to centered widgets in the same splash. The renderer now reads `opts.align` (left / center / right) and shifts the grid's x-origin by the slack inside the area. Column labels shift with the grid so they stay above their weeks. Both the baked default and dogfood configs set `align = "center"` for the contribution widget, which is the natural default for a decorative primary widget in a wide terminal. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Promotes the contributions widget into the hero band — right after `notes` — and drops the border + title so it reads as a flat decorative element, matching the other hero-band widgets. The previous slot at the bottom of the dense grid is removed. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Open merge requests authored by the authenticated GitLab user across every
project. Uses `/api/v4/merge_requests?scope=created_by_me&state=opened`.
9 shapes via the shared forge_items dispatcher: LinkedTextBlock (default) /
TextBlock / MarkdownTextBlock / ImageLinkedList / Entries / Text / Bars /
Badge ("N open MRs") / Timeline. `host` option (default `gitlab.com`)
covers self-hosted instances; `limit` clamps 1..=30 (default 10).
Mirrors `github_my_prs`; differences are GitLab-specific (`reviewer_username`
filter, `references.full` slug, MR `!42` instead of PR `#42`).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Ticks the `heatmap grid` primitive in #41.
Summary
Why this first
Per #41's prioritization rubric: renderer primitives unlock many fetchers at once. One heatmap renderer covers github contributions, habit trackers, goal heatmaps, and any ReadStore-backed daily metric. Highest leverage among primitive gaps, and visually striking enough to show in screenshots.
Test plan
🤖 Generated with Claude Code