Repository navigation
feat(fetcher): add git_churn and enforce single-shape renderers - #166
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ 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 (16)
✨ 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 |
30a76df to
cf9838b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
- Coverage 78.06% 78.06% -0.01%
==========================================
Files 123 124 +1
Lines 23578 23783 +205
==========================================
+ Hits 18407 18567 +160
- Misses 5171 5216 +45
🚀 New features to boost your workflow:
|
Caches up to MAX_COMMITS=500 of HEAD's diff-walk and ranks files by modification count, capped at top 10. Default 30-day window via `format = "N"`. Shapes: Entries (default) / Bars / TextBlock / Text. Mirrors `git_blame_heatmap`'s diff iteration but flattens the per-week grid to plain totals — pairs with `code_largest_files` for the "where's the action vs where's the mass" framing called out in #164. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
… contract `Text` is "exactly one string" per AGENTS.md. Three fetchers were leaking newlines through: - `random_fortune` — multi-line cookies (haikus, short verses) preserved verbatim; now joined with ` · ` for Text, still split for TextBlock. - `basic_static` — user-provided `format = "..."` with embedded `\n` passed through; now collapsed to spaces for Text. - `read_store` (text format) — file content pushed through verbatim; now collapsed to spaces for Text. `TextBlock` paths are unchanged and remain the right shape for multi-line output. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
`Paragraph` honours `align = "center"` per line — short rows like a 3-char license sit under their block's centreline instead of hugging the longest line's left edge (the project_splash subtitle pattern). Adds `natural_height` so `height = "auto"` rows size to the entry count, and keeps the bullet / max_items semantics intact. No call-site changes; this is an internal swap that preserves `accepts() = [TextBlock]`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Six widgets paired `text_plain` with fetchers whose primary shape is TextBlock (random_quote in home_daily, random_fortune in home_feed, github_user in home_github, github_repo in project_github + project_splash). Switching to `list_plain` aligns each widget with the single-shape-per- renderer rule that lands next; per-line center alignment is preserved by the Paragraph-backed list_plain. `home_minimal::quote` already pins `shape = "text"` on random_quote and stays on text_plain — the single-line case is intentional there. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Each primary renderer should accept exactly one shape — overlapping acceptance forces shape negotiation at the runtime boundary, which previously made `text_plain` ambiguously render either a Text one-liner or a TextBlock paragraph depending on fetcher shape order. Now `text_plain` is `accepts() = [Text]` only, and `default_renderer_for(TextBlock)` points at `list_plain` (its sibling). The runtime negotiation test is reframed around the single-accept invariant. All template usages of `text_plain` were migrated in the previous commit, so no in-tree widget breaks. Animated post-process wrappers stay `ALL_SHAPES` because they delegate to an inner renderer rather than drawing payload data themselves. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
AGENTS.md elevates "primary renderer = single shape" from soft guidance
("usually one") to a contract, with the `text_plain` / `list_plain` pair
as the canonical sibling pattern and animated post-process wrappers as
the only ALL_SHAPES exception.
The `add-fetcher-renderer` skill mirrors the rule and adds an explicit
Phase 1 step: enumerate every Shape variant and accept-or-reject each one
(the bar is "can the data be meaningfully expressed in this form?", not
"is this the most natural form?"). Caught in the git_churn spec round
where TextBlock was almost dropped on the strength of a catalog blurb
that only mentioned Entries.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
cf9838b to
bc74d07
Compare
Summary
git_churnfetcher — top files by change count over the last N days (default 30, override viaformat = \"N\"), capped at top 10. Shapes: Entries (default) / Bars / TextBlock / Text. Walks the gix rev-walk diff with the same MAX_COMMITS = 500 safety cap asgit_blame_heatmap. Ticks the people-and-churn slot of feat(templates): add project_codebase preset — repo personality / analytics #164.text_plainnarrowed to Text only;list_plainis the TextBlock counterpart and now usesParagraphsoalign = \"center\"centres each line individually (the project_splash subtitle's MIT-under-hero behaviour).default_renderer_for(TextBlock)now points atlist_plain.text_plainwith TextBlock-emitting fetchers (random_quote in home_daily; random_fortune in home_feed; github_user in home_github; github_repo in project_github + project_splash) tolist_plain. Animated post-process wrappers stayALL_SHAPES— they delegate to an inner renderer.random_fortunejoins multi-line cookies with·;basic_staticandread_storetext-format collapse\nto spaces.add-fetcher-rendererskill.Reference
Fetcher
git_churngix::discover)format = \"<days>\")Test plan
.splashboard/dashboard.tomlcovering all 4 shapes (Entries / Bars / TextBlock / Text), one renderer eachgit_churncheckbox in meta: fetcher roadmap - VCS / Forge #63 after mergeCloses part of #164.
🤖 Generated with Claude Code