Repository navigation
feat(templates): ship home_splash / home_daily / home_github / project_github_activity presets - #92
Conversation
Four curated dashboards, embedded via `include_str!` in a new `src/templates/` module with a tiny catalog API (`TEMPLATES` + `find` / `for_context`). They're the shapes the `splashboard install --template <name>` subcommand (#58) will copy into place. - `home_splash` (Home) — terminal-name figlet hero with a postfx reveal + date bar / ambient weather / moon / year-progress. - `home_daily` (Home) — block-font time hero; weather / sunrise / moon on the left, year/month/week/day gauges on the right. - `home_github` (Home) — avatar + handle banner, contribution heatmap, PR / review-queue lanes, recent activity timeline. - `project_github_activity` (Project) — dynamic `project_name` / `project` hero + subtitle, branch state, commit / CI sparklines, open PRs, recent releases. Resolves the repo at fetch time, so the same file works for any repo it ships with. Tests cover: every template parses, every fetcher and renderer referenced exists in the builtin registries, every widget id is referenced by the layout, and every template renders end-to-end through `render_to_buffer_with_layout_and_specs` at 100x40 with sample payloads (sourced via each fetcher's `sample_body`) without panicking. Exposes `runtime::derive_shapes` as `pub(crate)` so the render test uses the same shape-derivation path runtime takes — keeps the test honest about what users will actually see. Addresses #77 (tracks #76 0.x scope). Screenshot gallery (#78) and the install --template CLI (#58) are out of scope here; both will consume this catalog. 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 9 minutes and 45 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 (9)
📝 WalkthroughWalkthroughAdds a templates registry with multiple embedded dashboard presets, new clock/github/quote fetchers, richer timezone/hemisphere options, FIGlet font assets and figlet support, panel title-alignment config, a preview_template example, and assorted rendering and calendar styling updates. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI
participant Templates as TemplatesRegistry
participant Runtime
participant Fetcher
participant Renderer
CLI->>Templates: request template "home_splash"
Templates-->>CLI: Template (TOML)
CLI->>Runtime: build DashboardConfig from TOML
Runtime->>Fetcher: for each realtime widget -> compute Payload (zone/hemisphere/options)
Fetcher-->>Runtime: Payloads (Text / TextBlock / Entries)
Runtime->>Renderer: render pass 1 (initial)
Renderer-->>Runtime: frame buffer
Runtime->>Runtime: sleep (post-effects)
Runtime->>Renderer: render pass 2 (settled)
Renderer-->>CLI: ASCII grid output
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 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 #92 +/- ##
==========================================
+ Coverage 76.38% 78.78% +2.40%
==========================================
Files 77 81 +4
Lines 12143 12898 +755
==========================================
+ Hits 9275 10162 +887
+ Misses 2868 2736 -132
🚀 New features to boost your workflow:
|
Shakedown pass after actually rendering each preset through a headless backend. Three fixes + a dev tool: - `examples/preview_template.rs` — `cargo run --example preview_template -- <name> [w] [h]` renders a template into a `TestBackend` using each fetcher's `sample_body` and prints the cell grid as plain text. Useful for layout sanity checks during template authoring; full-fidelity runs still need real `splashboard` against a throwaway `SPLASHBOARD_HOME`. Exposes `runtime::derive_shapes` as `pub` (was `pub(crate)`) so the example can reuse the same shape-picking path the runtime takes. - `system` fetcher: reorder `shapes()` from `[Entries, TextBlock, Text]` to `[Text, TextBlock, Entries]` and pin `default_shape()` to `Entries` explicitly. The previous order made multi-shape renderers (`text_plain`, `animated_postfx`) pick `TextBlock` / `Entries` first, which meant the hero/attribution widgets in `home_splash` rendered the full rollup instead of the single identity string the `kind` option picks. `no render` still defaults to Entries, so existing users don't see a change; only `render = "text_plain"` on a system widget gains the (saner) Text behaviour. - Templates: `gap` widgets switch from `format = ""` to `format = " "` so they render as a blank line instead of triggering the shared `nothing here yet` placeholder (empty body is treated as missing data everywhere, including wider layout slots where the placeholder would be visible). - Templates: `[[row]]` that opens a section with `border = "top"` needs `height = 2` because the border rule consumes the first row. Fixed on `home_splash` (`today` divider) and `project_github_activity` (`branch` divider); `home_daily` was already correct. All 431 existing tests plus the 5 template tests still green. clippy / fmt clean. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ood layout Ported the template over from `./.splashboard/dashboard.toml`, which has been the reference design through multiple polish passes. Same widget set (hero / subtitle / repo_stats / repo_prs / repo_issues / commits_heatmap / top_contributors / languages / releases) and the same 3-section 2-column body (languages+released / PRs+issues / commits+top contributors) on top of the `bg = "subtle"` header band. Drops the earlier branch-state + CI sparkline + review-queue configuration the first draft used — those were my interpretation of the #77 mockup, but the dogfood layout is the shipping look. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
All four presets now share the same body band width — every content row sits inside a 70-col column centred on the viewport, so section dividers (`border = "top"`), text_plain lines, gauges, and 2-up list columns all line up at the same left / right edges. The one exception is the `home_github` contributions heatmap, which keeps its full-width row because 52 weeks × 2 cells per day overflows any narrower band. - `home_splash`: body (today / date_bar / weather / sunrise / moon / year_ratio) was a mix of full-width and a stray 60-col gauge. Now everything below the figlet hero shares a 70-col band. - `home_daily`: 4-rail outside/time section was 36+2+36 = 74 cells wide. Tightened to 34+2+34 = 70 so it matches the body band used by the other templates. - `home_github`: avatar + figlet handle header now hosted inside the 70-col band; attention lane (PRs | review queue) and recent activity timeline too. The header bands that use `bg = "subtle"` still span full width — same pattern the polished `project_github_activity` layout uses — so the hero reads as a distinct panel and the body reads as a tight grid underneath. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
… heroes, real content Reworks the four 0.x presets after a design review round. Main moves: Layout — `title_align` on rows and row children ------------------------------------------------- New `title_align = "left" | "center" | "right"` option on `[[row]]` and `[[row.child]]` entries, plumbed through the layout `Panel` to ratatui's `Block::title_alignment`. Templates that set `title_align = "center"` get `── title ──` style section dividers (title centred between dashes) instead of the left-sticky ratatui default. The `build_block` helper keeps Left as the default so existing configs / dogfood render the same. home_daily — hero is the date, not the time -------------------------------------------- - Hero: `clock %a %e` in `text_ascii` blocks-quadrant. "Thu 23" style. - Subtitle: `clock %e %B %Y · %A` — full human date, no trailing time. - Body: two stacked sections (outside / time) with centred dividers, both inside the 70-col band. Outside stacks weather → sunrise → moon. Time stacks 4 gauges; labels are right-padded to 5 chars so the bars line up vertically across year / month / week / day. home_splash — block-font hero, no duplicate attribution ------------------------------------------------------- - Hero: `system kind=terminal` in `animated_postfx` over `text_ascii` blocks-quadrant with `sweep_in` effect. Modern block glyphs instead of the figlet-banner look that drew the "ダサい" feedback. - Attribution: a 2-widget row (`terminal · powered by ` + system `kind=os_version`) so the line reads cohesively rather than two independent centred fragments. - Body: `today` section (date / weather / sunrise / moon / season) plus a `year` section with the year-progress gauge. home_github — avatar + big-text handle, unified widths ------------------------------------------------------ - Hero: `static "@unhappychoice"` in `text_ascii` blocks-sextant so the handle is visible at a glance without going full-figlet. Subtitle explicitly includes `member since YYYY`. - Contributions heatmap now lives inside the 70-col body band (≈ 35 weeks visible at 2 cells/day). Users who want the full 52 weeks widen the row. Docs it in a comment. - Section titles: `my PRs` / `review queue` / `notifications` — all centred dividers. project_github_activity — same polish pass ------------------------------------------ - Hero switched from figlet banner to blocks-quadrant so it matches the home presets visually; height tightened from 8 → 5 rows. - Every section title gets `title_align = "center"` and a 2-char padding pair (`" languages "`) so the dividers read as dedicated section markers. Preview example — realtime fetchers use compute() ------------------------------------------------- `examples/preview_template.rs` now runs `compute()` for any realtime fetcher (clock / system / clock_*) so the widget's `format` and `options` actually affect the preview output — the hero renders the real `%a %e`, moon shows the configured `kind = "moon_phase"`, the gauge percentages reflect the real date. Async cached fetchers still fall through to `sample_body` (they'd need a tokio runtime to run inline, which isn't worth it for a layout-focused preview tool). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…n figlet fonts Two pieces of user feedback this pass: Density inversion ----------------- `home_splash` was packed with ambient content; `home_daily` was short. Swap them — a "splash" screen should be title-card-sparse with an animated hero, and the "daily" dashboard should be information-dense so one `cd` answers "what do I need to know today?". **home_splash** — now four widgets on a lot of whitespace: - `system kind=terminal` as a block-font hero wrapped in `animated_postfx` (`sweep_in`, 1200ms). - A time-of-day greeting pair (`good ` + `clock_derived kind=time_of_day`). - A `HH:MM` clock rendered at block-font full-pixel density, with a `fade_in` postfx on its own draw cycle. - A `%A · %e %B %Y` subtitle. **home_daily** — now a full-length information dashboard: - Compact hero (`clock %a %e`) + date line with `day %j of %Y`. - Outside section: weather (rows layout, 3 lines) → sunrise/sunset (rows, 2 lines) → moon phase → season → zodiac. - Time-elapsed: year / month / week / day gauges stacked, labels padded to 5 chars so the bars align. - Current-month calendar via `clock → grid_calendar`. More figlet fonts for `text_ascii style = "figlet"` --------------------------------------------------- `text_ascii` now ships four additional FIGlet fonts alongside the existing standard / small / big / banner: - `ansi_shadow` — drop-shadow Unicode block glyphs (modern, 3D look). - `slant` — classic Glenn Chappell italic. - `isometric` — 3D isometric ASCII (tall). - `doom` — bold block face by Frans P. de Vries. Files land verbatim under `src/render/figlet_fonts/` and are embedded via `include_str!` the same way the existing four are. `load_font` grew matching arms; `option_schemas` lists the new names. Licensing / attribution entries added to THIRDPARTY-LICENSES.md. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/render/text_ascii.rs (1)
199-210:⚠️ Potential issue | 🟡 MinorExpand font tests and fail loudly on bundled font parse failures.
The new fonts (
ansi_shadow,slant,isometric,doom) are not tested at all, and line 210 silently masks parse failures by falling back to the standard font. A malformed.flffile would ship undetected since the test would still pass with the fallback.Change the parse error handling to fail loudly on bundled fonts:
Proposed changes
fn load_font(name: Option<&str>) -> FIGfont { let source = match name.unwrap_or("standard") { "small" => FONT_SMALL, "big" => FONT_BIG, "banner" => FONT_BANNER, "ansi_shadow" => FONT_ANSI_SHADOW, "slant" => FONT_SLANT, "isometric" => FONT_ISOMETRIC, "doom" => FONT_DOOM, _ => FONT_STANDARD, }; - FIGfont::from_content(source).unwrap_or_else(|_| FIGfont::standard().expect("standard font")) + FIGfont::from_content(source).expect("bundled FIGlet font should parse") } ... - for name in ["standard", "small", "big", "banner"] { + for name in [ + "standard", + "small", + "big", + "banner", + "ansi_shadow", + "slant", + "isometric", + "doom", + ] { let text = figletify("hi", Some(name)); assert!(!text.is_empty(), "font {name} produced empty output"); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/render/text_ascii.rs` around lines 199 - 210, The loader function load_font currently masks parse failures by falling back to FIGfont::standard() which hides malformed bundled fonts; change it so FIGfont::from_content(source) returns an Err for any bundled font parse error (panic or propagate) instead of silently using the standard font—i.e., remove the unwrap_or_else fallback and propagate the error for non-default fonts (use FIGfont::from_content(source).expect(...) or return Result), referencing load_font, FIGfont::from_content and the FONT_* constants (FONT_SMALL, FONT_BIG, FONT_BANNER, FONT_ANSI_SHADOW, FONT_SLANT, FONT_ISOMETRIC, FONT_DOOM, FONT_STANDARD); also add unit tests that parse each bundled font (assert FIGfont::from_content(FONT_ANSI_SHADOW), FIGfont::from_content(FONT_SLANT), FIGfont::from_content(FONT_ISOMETRIC), FIGfont::from_content(FONT_DOOM), etc.) so any parse failure fails the test suite.
🧹 Nitpick comments (2)
examples/preview_template.rs (1)
85-107: Coupling to the template'sduration_msis fragile.The
1600mssleep and the1500ms in the templatescomment are both implicitly pinned to whatever the currentanimated_postfxdurations happen to be. If any shipped template later raisesduration_msabove 1500 (or a user points the example at a custom template), the seconddraw_once()will still land mid-animation and the printed grid will look wrong for no obvious reason.Since
DashboardConfigis already in hand here, consider scanningconfig.widgetsfor the maxduration_msacrossanimated_postfxrender specs and sleeping formax + small buffer. Falls back cleanly to ~0ms for templates with no post-effects. Not a blocker since this is a dev-only example.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/preview_template.rs` around lines 85 - 107, The hardcoded 1600ms sleep is fragile; instead inspect the DashboardConfig's widgets to compute the max duration_ms used by any animated_postfx render spec and sleep for that max plus a small buffer before the second draw. Locate the closure draw_once and the surrounding code that has access to the DashboardConfig (e.g., config or config.widgets), scan each widget's render spec for animated_postfx entries and extract duration_ms (defaulting to 0 if absent), compute max_duration = max(found durations) and then call std::thread::sleep(Duration::from_millis(max_duration + 100)) (or 0 if none) before calling draw_once() a second time so the second pass always hits the rest frame.src/templates/project_github_activity.toml (1)
126-126: Nit: panel titlereleasedis inconsistent with sibling titles.Every other titled panel in this template uses a plural noun (
languages,PRs,issues,commits,top contributors), but this one uses the past-tense verbreleased. The underlying widget id is alsoreleases. Consider aligning for visual/lexical consistency.✏️ Proposed tweak
- title = " released " + title = " releases "🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/templates/project_github_activity.toml` at line 126, Summary: The panel title is inconsistent — change the title key value from the past-tense "released" to a plural noun to match siblings. Update the title = " released " entry to a clean plural like "releases" (trim surrounding whitespace) so it aligns lexically with other panels, keeping the underlying widget id 'releases' unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/render/figlet_fonts/isometric1.flf`:
- Around line 36-387: The isometric1 font file has blank glyphs for
punctuation/digits (glyphs for '!' through '@', including '-', '.', '/',
'0'–'9', ':') defined in src/render/figlet_fonts/isometric1.flf (lines ~36–387),
causing dynamic names to drop characters; either populate those glyph slots with
appropriate ASCII art glyphs for the common characters (at minimum '-', '.',
'/', ':', and '0'–'9') to make the font safe for dynamic text, or explicitly
mark the face as alphabetic-only by adding a clear note to the font
header/comment and any consuming docs/usage checks so callers avoid using
isometric1 for identifiers containing digits/punctuation.
In `@src/render/text_ascii.rs`:
- Line 38: Update the FIGlet font documentation string (the description field
that mentions style = "figlet") to reflect the new bundled fonts and correct the
isometric description: replace the claim that `isometric` uses Unicode
box-drawing with a note that `isometric` (bundled as `isometric1.flf`) is ASCII
line art with limited punctuation/digit coverage, and update the other
FIGlet-related sentences (the later doc lines that mention custom bundled
fonts/fallbacks) to state that custom bundled fonts are now available and
unknown names fall back to `standard`; reference the `description` text for
`style = "figlet"` and the font names `isometric`, `ansi_shadow`,
`isometric1.flf`, `slant`, and `doom` when making the edits.
In `@src/runtime.rs`:
- Line 45: The function derive_shapes is exposed publicly but is an internal
utility; change its visibility from pub to pub(crate) in runtime.rs (i.e., make
derive_shapes pub(crate) instead of pub) so it's only available inside the
crate, and then update the example examples/preview_template.rs to import via
the crate-internal path or provide a templates-facing wrapper in
src/templates/mod.rs that calls runtime::derive_shapes; if you choose to keep it
public instead, add derive_shapes to the module-level documentation and export
it from a documented runtime helpers section.
In `@src/templates/home_github.toml`:
- Around line 20-26: Replace the maintainer-specific defaults in the template:
change the top-level format value currently set to "@unhappychoice" and the
[[widget]] with id "subtitle" that has format "github profile · member since
2013" to neutral placeholders (e.g., empty string or generic tokens like
"<github_username>" and "<member_since>") so the preset does not ship a real
username or date; update the entries referenced by format = "@unhappychoice" and
the subtitle widget (id = "subtitle", format = "github profile · member since
2013") to use non-personal defaults that require the user to fill them in.
In `@src/templates/home_splash.toml`:
- Around line 6-7: The top comment mentioning editing `format` on `welcome` /
`farewell` is stale because this template no longer defines `welcome` or
`farewell`; update the comment to either remove that sentence or replace it with
accurate guidance that references the actual fields/widgets present in this
template (not `welcome`/`farewell`) so users aren't directed to non-existent
keys—locate the current explanatory comment near the top of
src/templates/home_splash.toml and change the reference to the real widget names
or give a generic instruction like "edit the relevant widget's `format` in this
template."
In `@src/templates/mod.rs`:
- Around line 46-51: The description for the Template "project_github_activity"
(TemplateContext::Project) is inaccurate versus the actual body
include_str!("project_github_activity.toml"); update the description string to
accurately list the shipped widgets (languages, releases, repo_prs, repo_issues,
commits_heatmap, top_contributors, repo_stats) or alternatively add the missing
branch-state and CI widgets to project_github_activity.toml to match the current
description—ensure the visible description in src/templates/mod.rs exactly
reflects the template body.
In `@THIRDPARTY-LICENSES.md`:
- Around line 56-60: The THIRDPARTY-LICENSES.md entry for "ANSI Shadow"
(ansi_shadow.flf / "Font Author: ?") lacks an explicit redistribution/permission
statement; update the ANSI Shadow entry to either (A) add a verifiable
redistribution license line matching the style of other fonts (e.g., "Permission
is hereby given to modify and redistribute this font..." with a source citation
and archival URL) and cite the authoritative source proving the license, or (B)
if you cannot verify permission, remove the ansi_shadow.flf reference from the
bundle and delete the corresponding "ANSI Shadow" paragraph; ensure the change
references the exact identifier ansi_shadow.flf (or "ANSI Shadow") so reviewers
can confirm the provenance or removal.
---
Outside diff comments:
In `@src/render/text_ascii.rs`:
- Around line 199-210: The loader function load_font currently masks parse
failures by falling back to FIGfont::standard() which hides malformed bundled
fonts; change it so FIGfont::from_content(source) returns an Err for any bundled
font parse error (panic or propagate) instead of silently using the standard
font—i.e., remove the unwrap_or_else fallback and propagate the error for
non-default fonts (use FIGfont::from_content(source).expect(...) or return
Result), referencing load_font, FIGfont::from_content and the FONT_* constants
(FONT_SMALL, FONT_BIG, FONT_BANNER, FONT_ANSI_SHADOW, FONT_SLANT,
FONT_ISOMETRIC, FONT_DOOM, FONT_STANDARD); also add unit tests that parse each
bundled font (assert FIGfont::from_content(FONT_ANSI_SHADOW),
FIGfont::from_content(FONT_SLANT), FIGfont::from_content(FONT_ISOMETRIC),
FIGfont::from_content(FONT_DOOM), etc.) so any parse failure fails the test
suite.
---
Nitpick comments:
In `@examples/preview_template.rs`:
- Around line 85-107: The hardcoded 1600ms sleep is fragile; instead inspect the
DashboardConfig's widgets to compute the max duration_ms used by any
animated_postfx render spec and sleep for that max plus a small buffer before
the second draw. Locate the closure draw_once and the surrounding code that has
access to the DashboardConfig (e.g., config or config.widgets), scan each
widget's render spec for animated_postfx entries and extract duration_ms
(defaulting to 0 if absent), compute max_duration = max(found durations) and
then call std::thread::sleep(Duration::from_millis(max_duration + 100)) (or 0 if
none) before calling draw_once() a second time so the second pass always hits
the rest frame.
In `@src/templates/project_github_activity.toml`:
- Line 126: Summary: The panel title is inconsistent — change the title key
value from the past-tense "released" to a plural noun to match siblings. Update
the title = " released " entry to a clean plural like "releases" (trim
surrounding whitespace) so it aligns lexically with other panels, keeping the
underlying widget id 'releases' unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c23666f9-b698-4301-ae5e-3324e6f5bd2e
📒 Files selected for processing (17)
THIRDPARTY-LICENSES.mdexamples/preview_template.rssrc/config.rssrc/fetcher/system.rssrc/layout.rssrc/lib.rssrc/render/figlet_fonts/ansi_shadow.flfsrc/render/figlet_fonts/doom.flfsrc/render/figlet_fonts/isometric1.flfsrc/render/figlet_fonts/slant.flfsrc/render/text_ascii.rssrc/runtime.rssrc/templates/home_daily.tomlsrc/templates/home_github.tomlsrc/templates/home_splash.tomlsrc/templates/mod.rssrc/templates/project_github_activity.toml
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @ | ||
| @@ |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify common dynamic-name characters are blank in isometric1.flf.
python - <<'PY'
from pathlib import Path
p = Path("src/render/figlet_fonts/isometric1.flf")
lines = p.read_text().splitlines()
header = lines[0].split()
height = int(header[1])
comment_lines = int(header[5])
glyph_start = 1 + comment_lines
for ch in "-./0123456789:":
code = ord(ch)
start = glyph_start + (code - 32) * height
glyph = lines[start:start + height]
has_pixels = any(line.rstrip("@").replace("$", "").strip() for line in glyph)
print(f"{ch!r}: {'has glyph content' if has_pixels else 'blank glyph'}")
PYRepository: unhappychoice/splashboard
Length of output: 306
Avoid using isometric1 for dynamic text without digit/punctuation glyphs.
Lines 36–387 define blank glyphs for ! through @, including -, ., /, 0-9, and :. Dynamic project/repo names can silently lose those characters when rendered with this font. Either fill the common glyphs or document/constrain this face as alphabetic-only.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/render/figlet_fonts/isometric1.flf` around lines 36 - 387, The isometric1
font file has blank glyphs for punctuation/digits (glyphs for '!' through '@',
including '-', '.', '/', '0'–'9', ':') defined in
src/render/figlet_fonts/isometric1.flf (lines ~36–387), causing dynamic names to
drop characters; either populate those glyph slots with appropriate ASCII art
glyphs for the common characters (at minimum '-', '.', '/', ':', and '0'–'9') to
make the font safe for dynamic text, or explicitly mark the face as
alphabetic-only by adding a clear note to the font header/comment and any
consuming docs/usage checks so callers avoid using isometric1 for identifiers
containing digits/punctuation.
| required: false, | ||
| default: Some("\"standard\""), | ||
| description: "FIGlet font when `style = \"figlet\"`. Unknown names fall back to `standard`.", | ||
| description: "FIGlet font when `style = \"figlet\"`. Unknown names fall back to `standard`. `ansi_shadow` and `isometric` use Unicode box-drawing characters; `slant` is the classic italic; `doom` is a bold block face.", |
There was a problem hiding this comment.
Update the FIGlet font docs to match the new options.
Line 38 says isometric uses Unicode box-drawing characters, but isometric1.flf is ASCII line art and has limited punctuation/digit coverage. Lines 74-75 are also stale now that custom bundled fonts have landed.
📝 Proposed doc update
- description: "FIGlet font when `style = \"figlet\"`. Unknown names fall back to `standard`. `ansi_shadow` and `isometric` use Unicode box-drawing characters; `slant` is the classic italic; `doom` is a bold block face.",
+ description: "FIGlet font when `style = \"figlet\"`. Unknown names fall back to `standard`. `ansi_shadow` uses Unicode block/box-drawing glyphs; `isometric` is ASCII line art with alphabetic-focused coverage; `slant` is the classic italic; `doom` is a bold block face.",
...
-/// - `style = "figlet"`: classic FIGlet ASCII art via `figlet-rs`. No sub-options yet
-/// (custom fonts land when we make a config decision on font bundling).
+/// - `style = "figlet"`: classic FIGlet ASCII art via `figlet-rs`. Sub-option
+/// `font` selects one of the bundled FIGlet faces.Also applies to: 72-75
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/render/text_ascii.rs` at line 38, Update the FIGlet font documentation
string (the description field that mentions style = "figlet") to reflect the new
bundled fonts and correct the isometric description: replace the claim that
`isometric` uses Unicode box-drawing with a note that `isometric` (bundled as
`isometric1.flf`) is ASCII line art with limited punctuation/digit coverage, and
update the other FIGlet-related sentences (the later doc lines that mention
custom bundled fonts/fallbacks) to state that custom bundled fonts are now
available and unknown names fall back to `standard`; reference the `description`
text for `style = "figlet"` and the font names `isometric`, `ansi_shadow`,
`isometric1.flf`, `slant`, and `doom` when making the edits.
| /// [`fetcher::Fetcher::default_shape`]. Unknown fetcher / renderer names drop out here — we skip | ||
| /// them and let the downstream dispatch / render paths surface the mismatch as placeholders. | ||
| fn derive_shapes( | ||
| pub fn derive_shapes( |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether derive_shapes is only used internally or also by examples/external-facing code.
# Expected: if matches are limited to crate internals/tests, `pub(crate)` should be sufficient.
rg -nP -C2 '\bderive_shapes\s*\('Repository: unhappychoice/splashboard
Length of output: 2252
🏁 Script executed:
#!/bin/bash
# Check the structure of src/runtime.rs to see where public items are placed
# and what the current public API surface looks like.
head -80 src/runtime.rs | cat -nRepository: unhappychoice/splashboard
Length of output: 3784
🏁 Script executed:
#!/bin/bash
# Check what's publicly exported from src/runtime.rs
rg '^\s*pub\s+(fn|struct|enum|mod|const)\s+' src/runtime.rs | head -20Repository: unhappychoice/splashboard
Length of output: 90
🏁 Script executed:
#!/bin/bash
# Check how runtime is exported in src/lib.rs
rg -A3 -B3 'mod runtime|pub.*runtime' src/lib.rsRepository: unhappychoice/splashboard
Length of output: 184
Consider restricting derive_shapes to pub(crate).
derive_shapes is the only public export from the runtime module, and it's a low-level shape-derivation utility internal to the crate's fetcher/renderer coordination. It's used in src/templates/mod.rs (internal) and examples/preview_template.rs, but examples are typically demonstration code, not drivers of public API. If this function must remain public, add it to the module-level documentation alongside other public runtime helpers; if it can be pub(crate), update the example to use the internal path or provide a templates-facing wrapper instead.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/runtime.rs` at line 45, The function derive_shapes is exposed publicly
but is an internal utility; change its visibility from pub to pub(crate) in
runtime.rs (i.e., make derive_shapes pub(crate) instead of pub) so it's only
available inside the crate, and then update the example
examples/preview_template.rs to import via the crate-internal path or provide a
templates-facing wrapper in src/templates/mod.rs that calls
runtime::derive_shapes; if you choose to keep it public instead, add
derive_shapes to the module-level documentation and export it from a documented
runtime helpers section.
| Template { | ||
| name: "project_github_activity", | ||
| context: TemplateContext::Project, | ||
| description: "Dynamic repo hero + subtitle; branch state, commit / CI sparklines, open PRs, and recent releases.", | ||
| body: include_str!("project_github_activity.toml"), | ||
| }, |
There was a problem hiding this comment.
Description for project_github_activity does not match the actual template.
The description advertises branch state, commit / CI sparklines, open PRs, and recent releases, but project_github_activity.toml ships languages, releases, repo_prs, repo_issues, commits_heatmap, top_contributors, and repo_stats — there is no branch-state widget and commits_heatmap is a heatmap, not a sparkline, and no CI widget exists. Since this string is specifically called out as feeding the install-time picker and docs gallery, users will pick based on features that aren't actually there.
Either update the description to reflect the current widget set, or add the missing widgets (branch/CI) if they were intended for this preset.
✏️ Suggested description that matches the shipped template
Template {
name: "project_github_activity",
context: TemplateContext::Project,
- description: "Dynamic repo hero + subtitle; branch state, commit / CI sparklines, open PRs, and recent releases.",
+ description: "Dynamic repo hero + subtitle; stars / PRs / issues, commit heatmap, top contributors, languages, and recent releases.",
body: include_str!("project_github_activity.toml"),
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Template { | |
| name: "project_github_activity", | |
| context: TemplateContext::Project, | |
| description: "Dynamic repo hero + subtitle; branch state, commit / CI sparklines, open PRs, and recent releases.", | |
| body: include_str!("project_github_activity.toml"), | |
| }, | |
| Template { | |
| name: "project_github_activity", | |
| context: TemplateContext::Project, | |
| description: "Dynamic repo hero + subtitle; stars / PRs / issues, commit heatmap, top contributors, languages, and recent releases.", | |
| body: include_str!("project_github_activity.toml"), | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/templates/mod.rs` around lines 46 - 51, The description for the Template
"project_github_activity" (TemplateContext::Project) is inaccurate versus the
actual body include_str!("project_github_activity.toml"); update the description
string to accurately list the shipped widgets (languages, releases, repo_prs,
repo_issues, commits_heatmap, top_contributors, repo_stats) or alternatively add
the missing branch-state and CI widgets to project_github_activity.toml to match
the current description—ensure the visible description in src/templates/mod.rs
exactly reflects the template body.
| ANSI Shadow — author unattributed in the font header. Shipped widely | ||
| with FIGlet-compatible collections; built using patorjk's figfont | ||
| editor (http://patorjk.com/figfont-editor). Uses Unicode box-drawing | ||
| characters to produce a drop-shadow block look. | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify bundled FIGlet font headers contain attribution/license clues.
# Read-only reconnaissance.
for f in src/render/figlet_fonts/ansi_shadow.flf src/render/figlet_fonts/isometric1.flf src/render/figlet_fonts/slant.flf src/render/figlet_fonts/doom.flf; do
echo "===== $f (first 80 lines) ====="
sed -n '1,80p' "$f"
echo
done
echo "===== license/permission keywords in bundled figlet fonts ====="
rg -n -i 'copyright|license|permission|redistribut|author|modified|public domain' src/render/figlet_fonts/*.flfRepository: unhappychoice/splashboard
Length of output: 7024
Missing explicit redistribution permission for ansi_shadow.flf is a compliance risk.
The font header shows author as unknown ("Font Author: ?") and references a Wayback Machine link, but does not include an explicit permission grant statement like other bundled fonts (e.g., slant.flf, doom.flf both state "Permission is hereby given to modify this font…"). Add a verifiable redistribution license statement to the THIRDPARTY-LICENSES.md entry, or remove the font until its licensing provenance is clarified.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@THIRDPARTY-LICENSES.md` around lines 56 - 60, The THIRDPARTY-LICENSES.md
entry for "ANSI Shadow" (ansi_shadow.flf / "Font Author: ?") lacks an explicit
redistribution/permission statement; update the ANSI Shadow entry to either (A)
add a verifiable redistribution license line matching the style of other fonts
(e.g., "Permission is hereby given to modify and redistribute this font..." with
a source citation and archival URL) and cite the authoritative source proving
the license, or (B) if you cannot verify permission, remove the ansi_shadow.flf
reference from the bundle and delete the corresponding "ANSI Shadow" paragraph;
ensure the change references the exact identifier ansi_shadow.flf (or "ANSI
Shadow") so reviewers can confirm the provenance or removal.
home_daily — outside + calendar side-by-side at top
---------------------------------------------------
Layout reshuffle following the "outside と calendar 横並びで上に"
feedback:
- Top body band: `[weather | calendar]` in a shared 8-row row (34 +
2 + 34 cells). Row height chosen to fit the full month calendar
(8 rows = border + weekday header + 5 week rows + padding);
weather renders 3 rows of key/value and leaves the rest blank, so
both panels are vertically anchored at the top without stretching.
- Sun & moon band underneath: sunrise inline line + moon + season +
zodiac, stacked inside the 70-col band with a centred `sun & moon`
divider.
- Time elapsed gauges stay at the bottom (year / month / week /
day), labels padded to 5 chars for bar alignment.
home_github — plain-text handle + live profile block
-----------------------------------------------------
Following "ハンドル名はシンプルなテキストでよい。プロフィールの
description とか表示すべきでは":
- Handle switches from block-font figlet to `static` text_plain
styled with `color = "panel_title"`. Clearer at-a-glance than the
noisy sextant-density big-text rendering.
- Subtitle swaps the static "github profile · member since 2013"
placeholder for the new `github_user` fetcher in TextBlock mode:
three lines containing display name / bio / location ·
member-since year. Missing fields collapse so users without a bio
don't get a stranded blank line.
`github_user` fetcher
---------------------
New `github_*` fetcher hitting `/users/{login}`. Safety::Safe (fixed
api.github.com host). Supports three shapes:
- `TextBlock` (default): `name / bio / location · member since YYYY`
- `Text`: `@login · Location · Company`, tight one-liner
- `Entries`: `name / bio / location / company / member_since /
followers / following / public_repos`
Shape ordering lists `TextBlock` first so `text_plain` (which accepts
both Text and TextBlock) lands on the multi-line profile block by
default — matches the header-band use case the template drives.
Follows the existing `github_avatar` login-resolution pattern:
`user` option, `GITHUB_USER` env var fallback, sensible error
placeholder when neither is set. Ships with unit tests covering
one-liner / text-block composition, empty-field collapse,
login-fallback when `name` is missing, and join-year parsing.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
home_daily
----------
- `sun & moon` section is now a single aligned key/value table: sunrise /
sunset render via `grid_table rows` with `column_align = ["right", "left"]`,
then moon / season / zodiac are individual label-widget + value-widget
pairs on 28 / 1 / 41 columns — the 1-cell gap matches ratatui Table's
default column_spacing so all labels and all values line up in the same
two columns across every row.
- Calendar column now fills the 8-row body band: adds month header
("April 2026") + weekday header ("Su Mo Tu We Th Fr Sa") via ratatui
Monthly's `show_month_header` / `show_weekdays_header`, so the grid is
readable as a standalone widget instead of bare date numbers.
grid_calendar renderer
----------------------
Enable `show_month_header(panel_title bold)` and
`show_weekdays_header(text_dim)` by default. The previous bare-numbers
output was essentially unreadable — users couldn't tell which weekday
each column was without counting from "1". No new options: the headers
are the baseline now.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Season was northern-hemisphere-hardcoded: April always read as "Spring", even for users in Sydney / Auckland / Buenos Aires where it's Autumn. Adds `hemisphere = "north" | "south"` under `[widget.options]` for `clock_derived` — defaults to `north` so existing configs don't change. `south` flips the Spring↔Autumn and Summer↔Winter pairs. Tests cover July being Summer up north / Winter down south, April being Autumn in the south (the reported case), and that the fetcher still produces a valid season without the option. `home_daily.toml` gets an inline comment pointing Southern-Hemisphere users at the option. Moon phase / zodiac / time-of-day stay hemisphere-neutral (same moon overhead, zodiac signs are calendar-driven, clock hour doesn't care which half of the globe you're on). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
A default template that requires per-widget configuration to render isn't a default — users copying `home_splash` / `home_daily` unchanged shouldn't land on "⚠ missing latitude" placeholders. The rule is: bundled templates work end-to-end on first run without any `[widget.options]` editing. home_splash stays as-is (was already lat/lon-free: hero / greeting / clock / date). Only the header comment is updated to say so explicitly. home_daily rebuilds around zero-config widgets: - `this month` — month calendar (full 70-col width). - `sky` — moon phase / season / zodiac / chinese zodiac as a label / gap / value 28 / 1 / 41 table, under a dedicated 1-row section divider. - `time elapsed` — year / quarter / month / week / day gauges. Five periods instead of four, matching `clock_ratio`'s full set. Users who want weather / sunrise / sunset drop `weather` or `clock_sunrise` blocks into their own `$HOME/.splashboard/home.dashboard.toml` with their own latitude + longitude; both template headers point to this. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…k, system stats
Templates should pull their weight; `home_daily` was thin after dropping
the weather widgets. Fills it back out with widgets that all work
without any per-widget configuration:
home_daily sections (in order)
------------------------------
- Quote of the day — 2-line `quote_of_day` TextBlock at the top.
- Hero (`clock %a %e` block) + full date line.
- `this month` — month calendar (existing).
- `sky` — moon / season / zodiac / chinese / iso week / day-of-year.
Two extra rows over the previous pass (`iso week`, `day-of-year`).
- `world clock` — 5 cities via `clock_timezones` with the new
`{ tz, label }` syntax so rows read `UTC / NYC / London / Tokyo /
Sydney` instead of full IANA names.
- `system` — `system_uptime` / `system_cpu` / `system_memory` /
`system_load`, each in the same 28 / 1 / 41 column grid as the sky
panel so the values line up.
- `time elapsed` — year / qtr / month / week / day gauges (existing).
Every new section uses realtime fetchers (compute < 1ms, infallible,
no I/O), so the dashboard stays snappy on first paint.
`quote_of_day` (new fetcher)
----------------------------
Realtime, Safety::Safe. Bundles 50 quotes from well-known public-domain
/ commonly-attributed sources. Selection is `day-of-year % len` so the
line advances at local midnight and repeats annually — deterministic,
same splashboard invocation on the same day always shows the same quote.
Shapes: `TextBlock` (quote / `— author` on separate lines, default) and
`Text` (tight `quote — author` one-liner). Tests cover default shape,
one-liner join, stability within a day, and day-over-day advance.
`clock_timezones` aliases
-------------------------
`timezones` now accepts either a plain IANA string or a
`{ tz, label }` pair via an untagged serde enum:
timezones = [
"UTC",
{ tz = "America/New_York", label = "NYC" },
]
Plain strings preserve the old behaviour (tz string doubles as label);
the pair form lets templates render short city names without exposing
every user to the same alias table hard-coded in code.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ayout
home_daily now 2-column where it matters
----------------------------------------
Previously every new section stacked vertically (calendar, sky, world
clock, system, time-elapsed) — 30+ rows of pure vertical scroll for
content that comfortably pairs side-by-side. Rearranged into two
2-column rows of multi-row widgets plus a full-width gauge stack:
quote
hero + date
[calendar | sky almanac]
[world clock | system]
time elapsed (5 gauges)
Each column is a single widget that renders multiple rows internally,
so a standard `[[row]]` + `[[row.child]]` layout is enough — no grammar
extension. Row heights pinned so both columns in a pair line up (8-row
calendar vs 7-row almanac leaves one trailing blank in the almanac
cell; 7-row world-clock vs 7-row system matches exactly).
clock_almanac (new fetcher)
---------------------------
Adapter fetcher that emits a 6-row Entries rollup of the same
date-arithmetic values `clock_derived` exposes one-at-a-time:
moon 🌖 Waning Gibbous
season Spring
zodiac ♉ Taurus
chinese 🐎 Horse
iso week 2026-W17
day of year 114 of 365
Shape choices: Entries (default — pairs with `grid_table rows`) and
TextBlock (`key: value` per line). Shares a `hemisphere` option with
`clock_derived` so the season row flips for southern-hemisphere users.
`derived::invoke` was lifted to `pub(crate)` so almanac calls back
into the same formatting functions — single source of truth for
"moon phase at timestamp X", etc.
Zero-config: no latitude, no env vars, no GitHub token. Registered
alongside the rest of the `clock_*` realtime family.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two alignment fixes after the 2-column layout landed: - `grid_calendar` now honours `align = "left" | "center" | "right"` by pinning a 21-cell natural width (7 weekday columns × 3 cells each) and using a ratatui `Flex` layout to position that slot inside a wider area. Previously the widget always drew flush-left against the cell, but ratatui's `Monthly` centres its month-name header while leaving the weekday / date grid flush — so "April 2026" hovered over a stranded weekday row when the cell was wider than the grid. - `home_daily` switches every `grid_table rows` in the dashboard (almanac / world clock / system) from `column_align = ["right", "left"]` to `["left", "left"]`, and the calendar to `align = "left"`. Keys and values now start at consistent columns across both rows of the 2-col layout — left edges of `UTC / LA / NYC` line up with the left edges of `moon / season / zodiac` underneath, and both line up with the band's left edge instead of each cell picking its own right-flush baseline. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/render/grid_calendar.rs (1)
15-15:⚠️ Potential issue | 🟡 MinorUpdate
COLOR_KEYSto include the newly used theme colors.The renderer uses
theme.panel_titleandtheme.text_dim(lines 92, 94), butCOLOR_KEYSonly listsACCENT_TODAY,ACCENT_EVENT, andTEXT. Sincecolor_keys()is used for documentation generation viarender_color_keys_section()in the matrix generator, the omitted tokens won't appear in the generated theme reference docs.Proposed fix
-const COLOR_KEYS: &[ColorKey] = &[theme::ACCENT_TODAY, theme::ACCENT_EVENT, theme::TEXT]; +const COLOR_KEYS: &[ColorKey] = &[ + theme::ACCENT_TODAY, + theme::ACCENT_EVENT, + theme::TEXT, + theme::PANEL_TITLE, + theme::TEXT_DIM, +];🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/render/grid_calendar.rs` at line 15, COLOR_KEYS currently only lists theme::ACCENT_TODAY, theme::ACCENT_EVENT and theme::TEXT but the renderer also uses theme.panel_title and theme.text_dim; update the COLOR_KEYS constant to include those missing tokens (e.g., theme::PANEL_TITLE and theme::TEXT_DIM or whatever exact token names are used) so that color_keys() exposes them and render_color_keys_section() will include them in the generated docs; modify the COLOR_KEYS declaration accordingly.src/fetcher/clock/mod.rs (1)
236-250:⚠️ Potential issue | 🟡 MinorExtend the “full family” registration test to cover
clock_almanac.A new
ClockAlmanacFetcheris registered at Line 54, but theexpectedlist here wasn’t updated. The test name implies completeness, and the current assertion (contains(&expected)) is satisfied by any superset, so the missed entry silently passes.🔧 Suggested diff
for expected in [ "clock", "clock_timezones", "clock_countdown", "clock_ratio", "clock_state", "clock_sunrise", "clock_derived", + "clock_almanac", ] { assert!(names.contains(&expected), "missing: {expected}"); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/fetcher/clock/mod.rs` around lines 236 - 250, The test realtime_fetchers_registers_full_family is missing the new ClockAlmanacFetcher; update the expected list inside that function to include "clock_almanac" so the assertion checks the full registered family (i.e., add "clock_almanac" to the array of expected names checked against fetchers.iter().map(|f| f.name())).
🧹 Nitpick comments (2)
src/fetcher/clock/timezones.rs (1)
140-172: Add test coverage for theNamed { tz, label }variant.All three tests exercise only the
Plainstring form. Given the newTimezoneSpec::Namedvariant is the primary motivator of this change (short labels like"LA","NYC"inhome_daily.toml), please add a test that asserts the label is used as the entry key / row prefix and that the time is still computed fromtz. This also guards against future regressions in the untagged deserialize ordering.🧪 Proposed test
+ #[test] + fn named_spec_uses_label_as_key_and_tz_for_time() { + let p = ClockTimezonesFetcher.compute(&ctx( + Some(Shape::Entries), + "timezones = [{ tz = \"Asia/Tokyo\", label = \"Tokyo\" }]", + )); + match p.body { + Body::Entries(d) => { + assert_eq!(d.items.len(), 1); + assert_eq!(d.items[0].key, "Tokyo"); + assert!(d.items[0].value.is_some()); + } + _ => panic!("expected entries"), + } + } + + #[test] + fn named_spec_without_label_falls_back_to_tz() { + let p = ClockTimezonesFetcher.compute(&ctx( + Some(Shape::Entries), + "timezones = [{ tz = \"UTC\" }]", + )); + match p.body { + Body::Entries(d) => assert_eq!(d.items[0].key, "UTC"), + _ => panic!("expected entries"), + } + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/fetcher/clock/timezones.rs` around lines 140 - 172, Tests only cover the Plain timezone string form; add a new unit test that exercises TimezoneSpec::Named by calling ClockTimezonesFetcher.compute with a context containing a Named spec (e.g., timezone entry with tz and label), then assert the resulting Body (TextBlock or Entries as appropriate) uses the provided label as the row/entry key/prefix and that the displayed time is derived from the tz value (not the label); locate test helpers around ClockTimezonesFetcher.compute and ctx, and assert via matching on Body::TextBlock(d) or Body::Entries(d) similarly to existing tests.src/fetcher/github/user.rs (1)
120-137: Avoid eager clone in the name fallback.
unwrap_or(info.login.clone())evaluates the clone even whennameis populated. Swap tounwrap_or_elseso the login string is only cloned on the missing-name path.♻️ Suggested diff
- let name = nonempty(&info.name).cloned().unwrap_or(info.login.clone()); + let name = nonempty(&info.name) + .cloned() + .unwrap_or_else(|| info.login.clone());🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/fetcher/github/user.rs` around lines 120 - 137, In text_block_lines, avoid eagerly cloning info.login by changing the fallback from unwrap_or(info.login.clone()) to lazy evaluation with unwrap_or_else(|| info.login.clone()) so the login string is only cloned when name is None; update the expression that builds name (in function text_block_lines using nonempty(&info.name) and info.login) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/fetcher/clock/mod.rs`:
- Around line 236-250: The test realtime_fetchers_registers_full_family is
missing the new ClockAlmanacFetcher; update the expected list inside that
function to include "clock_almanac" so the assertion checks the full registered
family (i.e., add "clock_almanac" to the array of expected names checked against
fetchers.iter().map(|f| f.name())).
In `@src/render/grid_calendar.rs`:
- Line 15: COLOR_KEYS currently only lists theme::ACCENT_TODAY,
theme::ACCENT_EVENT and theme::TEXT but the renderer also uses theme.panel_title
and theme.text_dim; update the COLOR_KEYS constant to include those missing
tokens (e.g., theme::PANEL_TITLE and theme::TEXT_DIM or whatever exact token
names are used) so that color_keys() exposes them and
render_color_keys_section() will include them in the generated docs; modify the
COLOR_KEYS declaration accordingly.
---
Nitpick comments:
In `@src/fetcher/clock/timezones.rs`:
- Around line 140-172: Tests only cover the Plain timezone string form; add a
new unit test that exercises TimezoneSpec::Named by calling
ClockTimezonesFetcher.compute with a context containing a Named spec (e.g.,
timezone entry with tz and label), then assert the resulting Body (TextBlock or
Entries as appropriate) uses the provided label as the row/entry key/prefix and
that the displayed time is derived from the tz value (not the label); locate
test helpers around ClockTimezonesFetcher.compute and ctx, and assert via
matching on Body::TextBlock(d) or Body::Entries(d) similarly to existing tests.
In `@src/fetcher/github/user.rs`:
- Around line 120-137: In text_block_lines, avoid eagerly cloning info.login by
changing the fallback from unwrap_or(info.login.clone()) to lazy evaluation with
unwrap_or_else(|| info.login.clone()) so the login string is only cloned when
name is None; update the expression that builds name (in function
text_block_lines using nonempty(&info.name) and info.login) accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f19bf7b3-f03e-4a9d-8989-77b948264ba1
📒 Files selected for processing (12)
src/fetcher/clock/almanac.rssrc/fetcher/clock/derived.rssrc/fetcher/clock/mod.rssrc/fetcher/clock/timezones.rssrc/fetcher/github/mod.rssrc/fetcher/github/user.rssrc/fetcher/mod.rssrc/fetcher/quote_of_day.rssrc/render/grid_calendar.rssrc/templates/home_daily.tomlsrc/templates/home_github.tomlsrc/templates/home_splash.toml
✅ Files skipped from review due to trivial changes (1)
- src/templates/home_splash.toml
🚧 Files skipped from review as they are similar to previous changes (2)
- src/templates/home_github.toml
- src/templates/home_daily.toml
Keeps `align = "left"` for `world_clock` / `system` / `almanac` (their labels and values read cleanly from the band's left edge) but reverts the `calendar` widget to `align = "center"`. A centred calendar block is the natural shape for a month grid; forcing it flush-left made the `April 2026` month header sit over empty cells in the first week row instead of hovering centred above the grid.
`blocks` (tui-big-text) was the modern look, but `ansi_shadow` is more distinctive — drop-shadow block glyphs over Unicode box-drawing chars. Applied to every hero that renders big text: - `home_splash`: terminal-name hero + `HH:MM` clock. - `home_daily`: `%a %e` date hero. - `project_github_activity`: project-name hero. Hero rows bumped to `height = 7` (ansi_shadow is 7 rows tall) and the project preset's subtle header band grew from 5 → 7 to match. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ro font
Two related fixes to the ansi_shadow pass:
`text_ascii` figlet now word-wraps
----------------------------------
`figlet_wrapped` renders the input text, measures the output's max-line
width, and — when it overflows the area and the text contains
whitespace — greedily packs words into per-line figlet blocks and
stacks those blocks vertically. So "Windows Terminal" at ansi_shadow
(~100+ cells joined) renders as "WINDOWS" followed by "TERMINAL" on a
second block instead of silently clipping off the right edge. Short or
single-word inputs ("iTerm2", "Fri 24") skip the wrap path and render
as a single block.
`home_splash` bumps the hero row to 14 cells so a 2-block wrap
(`7 + 7`) fits; single-word terminals (`iTerm2`) use half the space
with the rest as breathing room before the attribution line.
`home_daily` reverts the hero back to blocks-quadrant
-----------------------------------------------------
The `FRI 24` date hero looks better in tui-big-text's half-block font
than in ansi_shadow (compact, 4-row quadrant glyphs fit the dense
dashboard layout without stealing the vertical budget a figlet hero
would take). Hero row height back to 4.
Tests cover: wrapping produces more lines than joined rendering on a
narrow width, short text keeps its one-block shape, every bundled font
name loads without panicking.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Fixed-14 hero row was wasteful for single-word terminal names ("iTerm2"
uses 7 of 14 rows) and a magic number either way. `figlet_wrapped` now
also takes the area's height: wrap produces one block per line only if
the resulting stack still fits vertically; otherwise it falls back to
the single joined block (ratatui's `Paragraph` clips the sideways
overflow — less lossy than rendering into an empty cell).
`home_splash` hero row goes back to `height = 7`, matching the natural
height of one ansi_shadow block. Short names render perfectly; "Windows
Terminal" clips at the right edge instead of pushing the rest of the
layout down by seven blank rows.
Test coverage: same narrow width as the existing wrap test, but with
only 7 rows of height, produces the joined (unwrapped) output.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Replaces the "pick a magic length and clip / pad the rest" approach for
figlet heroes. Rows / columns can now be sized `"auto"`; the layout
engine asks the child widget's renderer how tall it naturally wants to
be, then substitutes a matching `Length(n)` constraint when it splits
the area. A single-word `iTerm2` hero gets 7 rows, a wrapped
`Windows Terminal` hero gets 14 — no fixed magic number, no empty cells.
Renderer trait
--------------
New `natural_height(body, opts, max_width, registry) -> u16` with a
default of 1 (one-line output). Three overrides today:
- `text_ascii`:
- `style = "figlet"`: runs `figlet_wrapped` at `max_width` with
`u16::MAX` height, counts lines. The wrap decision at measure time
matches the wrap at render time, so the row size reflects what
will actually be drawn.
- `style = "blocks"`: returns the block glyph row count for the
configured `pixel_size`.
- `animated_postfx`: delegates to `opts.inner`'s renderer via
`registry` so the postfx wrapper doesn't flatten the measurement.
Layout plumbing
---------------
- `SizeSpec::Auto` (config) → `Size::Auto` (layout). TOML accepts
`height = "auto"` (serde unit variant under `rename_all =
"snake_case"`).
- `to_constraint` takes the child layout + parent area + widgets +
specs + registry; `Auto` resolves to `Length(natural_length(..))`
and everything else keeps its existing `Constraint` mapping.
- `natural_length` walks the layout subtree: widget leaves call the
renderer, matching-axis stacks sum, cross-axis stacks take the max,
top-border panels add 1 to the vertical axis. Non-Auto children
with a concrete length on the measurement axis use their own length
as the summand so the Auto row's estimate matches what ratatui will
actually hand out.
home_splash hero
----------------
`home_splash` switches its hero row from the magic-14 length back to
`height = "auto"`. "iTerm2" / "Ghostty" etc. get 7 rows; "Windows
Terminal" / "VS Code" wrap onto two blocks and the row grows to 14.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ansi_shadow was the same font as the hero above — visually redundant stack. is slimmer and reads as a clearly different register: heavy 3D blocks for the terminal hero, thin classic strokes for the clock digits.
PR #92 added a `loading: &HashMap<WidgetId, Shape>` parameter to `layout::draw`; PR #89 (docs-site dashboard snapshots) was already open against the pre-#92 signature. Both merged cleanly at the text level but produced a build break on main. Sample previews never have pending fetches, so pass an empty map. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…system_* split PR #89 renamed `static` → `basic_static`, `read_store` → `basic_read_store`, and `disk_usage` → `system_disk_usage` to give every registered name a family prefix. PR #92 (preset templates) landed in parallel with TOMLs referencing the old names; both merged without a text conflict but the templates::tests checks exploded on main with "unknown fetcher `static`". Swap the four template files to the new names. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Ships the four 0.x-scope dashboard presets (#77). Each is a ready-to-run
DashboardConfigembedded viainclude_str!in a newsrc/templates/module, with a small catalog API (TEMPLATES+find/for_context) that the futuresplashboard install --template <name>subcommand (#58) will consume.home_splash(Home) — terminal-name figlet hero wrapped inanimated_postfx, plus date bar / ambient weather / moon / year-progress. Usessystem(kind = terminal / os_version),clock,weather,clock_sunrise,clock_derived,clock_ratio.home_daily(Home) — block-fontHH:MMhero, then weather / sunrise / moon on the left and year/month/week/day gauges on the right in paired 1-row rails.home_github(Home) — avatar (github_avatar→media_image) next to a figlet handle, contribution heatmap full-width, my PRs / review queue side-by-side, and a notifications timeline.project_github_activity(Project) — dynamicproject_name/projecthero + subtitle on abg = \"subtle\"band, branch state, commit + CI sparklines (with astatus_badge), open PRs / review queue, recent releases. Works for any repo because the data comes fromgit remoteat fetch time.All four depend only on fetchers / renderers already in main — #79 (renderer polish) and #82 (settings/dashboard split) are closed; #81's
project_name/project/weather/github_avatar/systemText /clockformat are all landed.Implementation notes
src/templates/<name>.tomland are picked up byinclude_str!insrc/templates/mod.rs. No discovery / no filesystem I/O at startup.TEMPLATES: &[Template]— stable declaration-order list.find(name)— lookup forinstall --template.for_context(TemplateContext::{Home, Project})— picker-friendly filter.runtime::derive_shapesaspub(crate)so the render test uses the same shape-derivation path the runtime takes; keeps the test honest about what users will actually see.[general]/[theme]) are deliberately not in the templates — those belong in$HOME/.splashboard/settings.tomlper the 0.x config split (refactor(config): split settings.toml + dashboard.toml, rename from config.toml #82).Test plan
cargo test— 5 new tests undertemplates::testsall green; every preexisting test still passes.cargo clippy --all-targets -- -D warnings— clean.cargo fmt --all -- --check— clean.DashboardConfig(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).Tracks #76 (0.x release scope) · Addresses #77. Catalog entry on #41 / #76.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores