Skip to content

feat(templates): fill preset family (home_minimal / project_splash / project_minimal) - #104

Merged
unhappychoice merged 6 commits into
mainfrom
feat/fill-preset-family
Apr 24, 2026
Merged

unhappychoice merged 6 commits into
mainfrom
feat/fill-preset-family

Conversation

@unhappychoice

@unhappychoice unhappychoice commented Apr 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add three presets to close the gaps left by feat: ship dashboard presets (home_splash / home_daily / home_github / project_github_activity) #77: home_minimal, project_splash, project_minimal. The family now has a low-density / everyday / wow variant in each context (home + project).
  • home_minimal / project_minimal are 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_splash is the repo-side sibling of home_splash — figlet repo hero wrapped in animated_postfx (particle_burst) + slug/description/license subtitle, no body panels. Aimed at 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.
  • Dropped the project_dev_status candidate 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 overlapped project_github_activity too heavily to be load-bearing.

Family after this PR

splash daily / activity quiet
home home_splash home_daily + home_github home_minimal (new)
project project_splash (new) project_github_activity project_minimal (new)

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test — 508 lib + 12 integration tests green, including every_template_parses / every_widget_fetcher_is_registered / every_widget_renderer_is_registered / every_widget_id_is_referenced_by_layout / every_template_renders_without_panic picking up the three new templates automatically
  • cargo xtask regenerated docs-site/src/assets/rendered/{home_minimal,project_splash,project_minimal}.html without warnings; existing snapshots unchanged
  • Manual check of the install picker — new presets should appear in the TTY gallery because templates::for_context iterates TEMPLATES directly (added entries + descriptions only, no wiring changes)
  • docs-site build — presets.mdx now imports three extra rendered snippets; getting-started.md template lists updated

Refs: #96, #76

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Three new dashboard templates are now available for selection: home_minimal and home_splash for home dashboards, and project_splash and project_minimal for project dashboards.
  • Documentation

    • Updated guides to document the expanded preset library, now offering seven total curated dashboard options with clear setup instructions for selecting home and project presets.

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]>
@coderabbitai

coderabbitai Bot commented Apr 24, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@unhappychoice has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 47 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b970f45a-3747-4b70-b97d-36247f2a58ad

📥 Commits

Reviewing files that changed from the base of the PR and between 8b00977 and 5c1222f.

📒 Files selected for processing (4)
  • docs-site/src/content/docs/guides/presets.mdx
  • src/runtime.rs
  • src/templates/mod.rs
  • src/templates/project_minimal.toml
📝 Walkthrough

Walkthrough

This PR expands the curated dashboard template library by adding three new presets: home_minimal (home dashboard), and project_splash and project_minimal (project dashboards). The new templates are registered in the template registry, documented with descriptions and widget details, and wired into the build snapshot pipeline.

Changes

Cohort / File(s) Summary
Documentation Updates
docs-site/src/content/docs/guides/getting-started.md, docs-site/src/content/docs/guides/presets.mdx, docs-site/src/content/docs/showcases.md
Updated guides and showcases to reference the three new templates with expanded preset descriptions (seven total: four home, three project), widget-to-implementation tables, narrative descriptions, and HTML asset inclusions.
New Template Definitions
src/templates/home_minimal.toml, src/templates/project_splash.toml, src/templates/project_minimal.toml
Added three new TOML template files: home_minimal renders a minimal home display (greeting, datetime, quote); project_splash renders an animated figlet hero with repo details; project_minimal renders a quiet two-line project display (name and latest tag).
Template Registry & Build Configuration
src/templates/mod.rs, xtask/src/main.rs
Registered the three new templates in the TEMPLATES constant with names, contexts, and TOML includes; added corresponding snapshot rendering mappings to the CLI build pipeline.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 Three dashboards bloom, a minimal delight,
One greets the day, two sparkle bright—
The splash goes "ta-da!" with repo's name,
While quiet tiles play a simpler game,
All stitched together, presets unified! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding three new template presets (home_minimal, project_splash, project_minimal) to expand the preset family.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fill-preset-family

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Apr 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.88%. Comparing base (a9dcbb1) to head (5c1222f).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/runtime.rs 68.42% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
src/templates/mod.rs 98.90% <ø> (ø)
src/runtime.rs 79.02% <68.42%> (+0.02%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

unhappychoice and others added 2 commits April 25, 2026 03:50
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]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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 because greeting is align = "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

📥 Commits

Reviewing files that changed from the base of the PR and between a9dcbb1 and 8b00977.

📒 Files selected for processing (8)
  • docs-site/src/content/docs/guides/getting-started.md
  • docs-site/src/content/docs/guides/presets.mdx
  • docs-site/src/content/docs/showcases.md
  • src/templates/home_minimal.toml
  • src/templates/mod.rs
  • src/templates/project_minimal.toml
  • src/templates/project_splash.toml
  • xtask/src/main.rs

unhappychoice and others added 3 commits April 25, 2026 03:56
`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]>
@unhappychoice
unhappychoice merged commit 438ba52 into main Apr 24, 2026
7 checks passed
@unhappychoice
unhappychoice deleted the feat/fill-preset-family branch April 24, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant