Repository navigation
feat(templates): fill preset family (home_minimal / project_splash / project_minimal) - #104
Conversation
Close the gaps left by #77 (four-preset drop) so every context has a low-density, everyday, and wow variant. `home_minimal` / `project_minimal` are three-to-four-line centred presets — greeting + date + quote for home, repo name + slug/description/license for project. `project_splash` is the repo-side sibling of `home_splash`: figlet repo hero with a particle-burst reveal and no body panels, for repo-shipped ./.splashboard/dashboard.toml configs that want to feel like a title screen when a visitor clones. No new fetchers or renderers — every widget reuses existing building blocks (git_repo_name, github_repo, clock/clock_derived, quote_of_day, animated_postfx). xtask snapshot list and the docs-site presets / getting-started / showcases pages updated to match. Dropped the `project_dev_status` candidate from #96 after discussion — branch / ahead-behind / dirty is prompt territory (starship, p10k) and the remaining widgets overlapped project_github_activity. Refs: #96, #76 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 35 minutes and 47 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 (4)
📝 WalkthroughWalkthroughThis PR expands the curated dashboard template library by adding three new presets: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #104 +/- ##
==========================================
+ Coverage 76.73% 76.88% +0.14%
==========================================
Files 92 92
Lines 15352 15390 +38
==========================================
+ Hits 11781 11832 +51
+ Misses 3571 3558 -13
🚀 New features to boost your workflow:
|
Swap `github_repo` for `git_latest_tag` so the preset no longer hits the GitHub REST API or requires `gh auth login`. The whole point of a minimal preset is acknowledgment without noise — a background network fetch per cache refresh contradicts that. Now every widget in project_minimal reads local git only; the dashboard renders identically offline, behind a firewall, and without a token. Trimmed from 4 lines (repo name + slug + description + license) to 2 (repo name + latest tag) to match. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two lines felt too empty for a preset users would actually ship. Adds a three-entry `git_recent_commits` timeline below the name/tag block so the splash says "here's what you were just doing" alongside acknowledging the repo. Still local-only — `git_recent_commits` walks HEAD via gix, no GitHub call — so the offline / no-auth guarantee from the previous fix is preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/templates/home_minimal.toml (1)
52-60: Minor: centered 17-cell greeting block is visually biased left for shorter values.
flex = "center"centres the combined 5+12 = 17-cell block, but becausegreetingisalign = "left"inside a 12-cell width, shorter values like"night"(5) /"morning"(7) /"evening"(7) leave trailing padding on the right, so the rendered text sits visibly left of the viewport centre. The "crisp seam" between prefix and value still works as documented, but "visually centred" is not quite what the preset delivers.If you want the full greeting to look centred across all four values, sizing the greeting child to its content avoids the trailing pad:
♻️ Proposed tweak
[[row]] height = { length = 1 } flex = "center" [[row.child]] widget = "greeting_prefix" width = { length = 5 } [[row.child]] widget = "greeting" - width = { length = 12 } + width = { length = 9 } # longest time_of_day value ("afternoon")…or drop the fixed widths entirely and let
flex = "center"pack the two children around the natural text width. Happy to defer if the bias is intentional.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/templates/home_minimal.toml` around lines 52 - 60, The centered 17-cell block is biased because both row.child entries (widget = "greeting_prefix" and widget = "greeting") have fixed width lengths; remove the fixed width fields (or replace them with an "auto"/"content" sizing if your layout schema supports it) for those two row.child entries so that flex = "center" packs the children by their natural text width (alternatively drop both width entries entirely) to ensure the combined greeting is visually centered across all values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/templates/home_minimal.toml`:
- Around line 52-60: The centered 17-cell block is biased because both row.child
entries (widget = "greeting_prefix" and widget = "greeting") have fixed width
lengths; remove the fixed width fields (or replace them with an "auto"/"content"
sizing if your layout schema supports it) for those two row.child entries so
that flex = "center" packs the children by their natural text width
(alternatively drop both width entries entirely) to ensure the combined greeting
is visually centered across all values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0bfa0683-04b1-405a-adcd-42a174b06069
📒 Files selected for processing (8)
docs-site/src/content/docs/guides/getting-started.mddocs-site/src/content/docs/guides/presets.mdxdocs-site/src/content/docs/showcases.mdsrc/templates/home_minimal.tomlsrc/templates/mod.rssrc/templates/project_minimal.tomlsrc/templates/project_splash.tomlxtask/src/main.rs
`list_timeline` defaults to left-align inside its cell, which made the recent-commits block start at the left edge of the centred 60-col cell instead of sitting visually under the centred hero. Pass `align = "center"` so the whole block centres on its widest line and reads as one vertical stack with the repo name and tag. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Switch `git_recent_commits` from the default Timeline shape (which renders each event as title + a detail row for the short hash, so 3 commits took 6 rows and the 3-row cell clipped at 1.5 entries) to TextBlock shape paired with `list_plain`. TextBlock formats each commit as `"<short_hash> <summary>"` on a single line, so the cell height of 3 now shows exactly three commits. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
A minimal preset on a cold cache used to take ~2s to first paint even though every fetcher completed in <100ms. `run()` sets `animated = true` whenever any cached widget lacks a fresh payload so loading spinners don't freeze mid-frame, which also sets `animation_deadline = start + ANIMATION_WINDOW`. The loop's exit condition `daemon_done && !animation_pending` then held the loop for the full 2s window even though the reason to animate (spinners) had disappeared the moment the daemon wrote the cache entries. Split the static `animated` flag into `real_animated` (configured animated renderers) and loading-driven animation (checked per iteration against the live `loading` set). The animation window is only binding while something actually needs to animate — once the daemon fills the last spinner the window stops blocking exit. Real animated presets (`home_splash`, `project_splash`) still get the full ANIMATION_WINDOW because `real_animated` stays true. Factored the condition into `animation_still_due` so the behaviour can be regressioned without a full runtime harness. Discovered while testing the minimal presets added in this PR. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
home_minimal,project_splash,project_minimal. The family now has a low-density / everyday / wow variant in each context (home + project).home_minimal/project_minimalare three-to-four-line centred presets — greeting + date + quote (home), repo name + subtitle (project). No figlet, lots of whitespace. For users who want acknowledgment without a dashboard taking over every shell start.project_splashis the repo-side sibling ofhome_splash— figlet repo hero wrapped inanimated_postfx(particle_burst) + slug/description/license subtitle, no body panels. Aimed at repo-shipped./.splashboard/dashboard.tomlconfigs that want to feel like a title screen when a visitor clones.project_dev_statuscandidate from feat(templates): add a second project-side preset (self/project axis) #96's original proposal after discussion — branch / ahead-behind / dirty is prompt territory (starship, p10k) and the remaining widgets overlappedproject_github_activitytoo heavily to be load-bearing.Family after this PR
home_splashhome_daily+home_githubhome_minimal(new)project_splash(new)project_github_activityproject_minimal(new)Test plan
cargo fmt --all -- --checkcargo clippy --all-targets -- -D warningscargo test— 508 lib + 12 integration tests green, includingevery_template_parses/every_widget_fetcher_is_registered/every_widget_renderer_is_registered/every_widget_id_is_referenced_by_layout/every_template_renders_without_panicpicking up the three new templates automaticallycargo xtaskregenerateddocs-site/src/assets/rendered/{home_minimal,project_splash,project_minimal}.htmlwithout warnings; existing snapshots unchangedtemplates::for_contextiteratesTEMPLATESdirectly (added entries + descriptions only, no wiring changes)presets.mdxnow imports three extra rendered snippets;getting-started.mdtemplate lists updatedRefs: #96, #76
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
home_minimalandhome_splashfor home dashboards, andproject_splashandproject_minimalfor project dashboards.Documentation