Repository navigation
fix(render): draw tail window when sparkline data exceeds area width - #84
Conversation
ratatui's Sparkline widget renders `data.iter().take(min(area.width, data.len()))`, i.e. the head of the series. Fetchers like `git_commits_activity` that emit a long time-anchored series (364 daily values) paired with a narrow widget would silently drop everything after the leading cells — for sparse "recent activity" data (this repo's commits land in the last few days out of a year) that reads as an empty widget. Slice the tail to `area.width` before handing off so the most-recent cells are what actually get drawn. Regression test pins the behaviour. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Previous dogfood was a "one of every fetcher" showcase (~500 lines). When someone cd's into this repo the per-dir splash should instead match the project_github_activity preset we plan to ship (#77): hero (animated_postfx hsl_shift over text_ascii quadrant) → subtitle → section dividers → body (recent commits / CI / open PRs & issues / releases). Rough edges explicitly traded for now — follow-up lands post #79 / #81: - hero uses `static "splashboard"` (will become `project_name` fetcher) - subtitle is hand-written (will become `project` Entries fetcher) - hero uses text_ascii blocks quadrant (will pick up figlet banner font) 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 25 minutes and 14 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 (2)
📝 WalkthroughWalkthroughThis pull request restructures the dogfood showcase configuration, replacing numerous widget types with a focused "project_github_activity" layout featuring hero/subtitle/divider/body sections. Additionally, it fixes a sparkline rendering bug where data beyond widget width was not displayed correctly. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
…stay legible ratatui's `Sparkline` renders a 0-value column as an empty cell. A sparse series like `git_commits_activity` (hundreds of days with zero activity, spikes at the tail) ends up reading as "mostly no data" instead of "mostly no commits" — the gap between a zero day and a padding cell is gone. Post-draw, paint `▁` styled with `text_dim` on the bottom row at every zero column in the visible window. Every datum now leaves a tick, so spikes are clearly "peaks above a baseline" rather than "lone bars in a void". Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
… from small bars The prior baseline glyph was `▁`, which is also ratatui's smallest non-empty bar glyph — the one a tiny value like 1 out of max=74 naturally lands on. A day with "no commits" ended up visually identical to a day with "a handful of commits", defeating the point of the baseline. Swap to the middle-dot `·` so zero columns read as axis ticks rather than tiny bars. Test updated to pin the new glyph. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…s, baseline-friendly sparkline rows - Swap hero effect from `hsl_shift` to `coalesce` and extend duration to 2500ms; wrap subtitle in `sweep_in_down` for a follow-through reveal. - Restore the commits / CI-history sparkline row so the baseline-tick fix from this branch has a dogfood showcase. - Set explicit `length` widths on every row.child with `flex = "center"`: 70 for body / divider, 35 × 2 for paired columns, 30 for the CI badge. Percentages stretched past the divider dash counts; fixed length keeps everything aligned until #79 lands row-level `border = "top"`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
data.iter().take(min(area.width, data.len()))), so a long series paired with a narrow widget silently drops the recent cells. Forgit_commits_activity(364 daily values) on a repo with bursty recent activity, the widget rendered blank. Slice the tail toarea.widthbefore handing off..splashboard/config.tomlto preview theproject_github_activitypreset (feat: ship dashboard presets (home_splash / home_daily / home_github / project_github_activity) #77): hero / subtitle / dividers / recent commits / CI / open PRs & issues / releases. ~500 lines down to ~160. Rough edges (static hero, hand-written subtitle, blocks-style text_ascii) get follow-up from feat(render): layout border-sides + renderer option polish for 0.x presets #79 / feat(fetcher): add fetchers needed by 0.x presets (weather / git_repo_name / github_repo / github_avatar / system Text / clock format) #81 landings.Closes #83.
Test plan
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test(all 346 tests pass, including newtail_window_is_rendered_when_data_exceeds_width)cargo runin this repo — sparkline inputs now visibly render; dogfood splash renders in the new layout🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes