Skip to content

docs(site): add Guides section (Getting started / Configuration / Presets / Themes / Trust / Cookbook) - #89

Merged
unhappychoice merged 22 commits into
mainfrom
docs/expand-guides
Apr 23, 2026
Merged

unhappychoice merged 22 commits into
mainfrom
docs/expand-guides

Conversation

@unhappychoice

@unhappychoice unhappychoice commented Apr 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Refs #78 (ticks all DoD checkboxes except the screenshot-dependent ones, which depend on #77).

Test plan

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Generated rendered dashboard previews exported as HTML for the docs site.
  • Documentation

    • Added comprehensive guides: concepts, configuration, getting started, cookbook, presets, themes, trust model.
    • Added showcases gallery and improved docs navigation and landing content.
    • Updated docs styling for consistent snapshot previews.
  • Configuration

    • Fetcher names renamed in configs: static → basic_static, read_store → basic_read_store, disk_usage → system_disk_usage.
  • Chores

    • Docs build now copies markdown into the site output.

…sets / Themes / Trust / Cookbook)

Expands docs-site beyond the auto-generated Reference section with a full
Guides surface. Adds the Guides sidebar group above Reference in
astro.config.mjs and rewrites the landing to lead with guide links rather
than the reference index.

Presets page documents the four planned 0.x presets (home_splash,
home_daily, home_github, project_github_activity) with ASCII previews and
role tables from #77. Only project_github_activity ships a full working
TOML today (copied from the dogfood dashboard); the home_* presets land
full TOMLs + screenshots when #77 / #81 finalize the fetcher set.

Themes page covers the six preset palettes, per-token overrides, and the
"reset" escape hatch for light terminals.

Refs #78.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 23, 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 24 minutes and 58 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 24 minutes and 58 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: c02293d0-ba6c-40a0-bb94-3546c34a428d

📥 Commits

Reviewing files that changed from the base of the PR and between d2ad7c4 and b914952.

⛔ Files ignored due to path filters (2)
  • docs-site/package-lock.json is excluded by !**/package-lock.json
  • docs-site/public/favicon.svg is excluded by !**/*.svg
📒 Files selected for processing (8)
  • docs-site/.gitignore
  • docs-site/astro.config.mjs
  • docs-site/package.json
  • docs-site/scripts/build-og.mjs
  • docs-site/src/content/docs/guides/presets.mdx
  • docs-site/src/content/docs/index.mdx
  • docs-site/src/styles/snapshot.css
  • docs-site/src/styles/theme.css
📝 Walkthrough

Walkthrough

Renamed built-in fetcher identifiers (static → basic_static, read_store → basic_read_store, disk_usage → system_disk_usage) across code, tests, and docs. Added extensive docs-site content (Guides, Showcases), enabled starlight-llms-txt, added a markdown copy build step, restructured generated reference docs into family-based subdirectories, and added an xtask dashboard HTML snapshot renderer.

Changes

Cohort / File(s) Summary
Fetcher identifier renames
src/fetcher/static_text.rs, src/fetcher/read_store.rs, src/fetcher/system.rs
Updated Fetcher name() return values: "static" → "basic_static", "read_store" → "basic_read_store", "disk_usage" → "system_disk_usage".
Test updates
src/config.rs, src/fetcher/mod.rs, src/runtime.rs, src/trust.rs
Adjusted test fixtures, registry lookups, and assertions to use the renamed fetcher identifiers (basic_static, basic_read_store, system_disk_usage).
Docs and examples
.splashboard/dashboard.toml, AGENTS.md, README.md, docs-site/src/content/docs/index.mdx, docs-site/src/content/docs/index.md
Updated documentation and example config to reflect renamed fetcher families and family-based naming conventions.
New Guides & Showcases
docs-site/src/content/docs/guides/... (concepts.md, configuration.md, cookbook.md, getting-started.md, presets.md, themes.md, trust.md), docs-site/src/content/docs/showcases.md
Added multiple comprehensive guide pages and a showcases gallery.
Docs-site infra & build
docs-site/astro.config.mjs, docs-site/package.json, docs-site/scripts/copy-markdown.mjs, docs-site/.gitignore, docs-site/src/styles/snapshot.css
Enabled starlight-llms-txt plugin, disabled markdown smartypants, added sidebar entries, added a post-build markdown-copy script, updated .gitignore, and improved snapshot CSS for consistent previews.
Reference generation restructuring
xtask/src/gen_matrix.rs
Emit fetcher/renderer pages under family subdirectories and update link helpers (rel_path, cross_link, family_of).
Snapshot rendering & CLI
xtask/src/dashboard_snapshot.rs, xtask/src/main.rs, xtask/src/snapshots.rs
Added dashboard → HTML snapshot renderer (render_config_html), CLI --rendered-out support to write rendered snapshots, and omitted animated renderers from previews.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 Hopping through toml and docs I prance,

basic_static< now leads the dance.
Guides sprout leaves and snapshots gleam,
family folders tidy the stream.
A carrot-coded cheer — hop, review, and dream!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a Guides section to the documentation site with six specific guide pages listed. It is concise, clear, and directly related to the primary focus of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 81.25% which is sufficient. The required threshold is 80.00%.
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 docs/expand-guides

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 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.40%. Comparing base (82c6566) to head (b914952).
⚠️ Report is 50 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   76.88%   76.40%   -0.48%     
==========================================
  Files          74       77       +3     
  Lines       11354    12149     +795     
==========================================
+ Hits         8729     9282     +553     
- Misses       2625     2867     +242     
Files with missing lines Coverage Δ
src/config.rs 81.28% <100.00%> (ø)
src/fetcher/mod.rs 76.00% <100.00%> (+0.09%) ⬆️
src/fetcher/read_store.rs 71.48% <100.00%> (ø)
src/fetcher/static_text.rs 86.11% <100.00%> (ø)
src/fetcher/system.rs 74.78% <100.00%> (-3.86%) ⬇️
src/runtime.rs 78.57% <100.00%> (+1.54%) ⬆️
src/trust.rs 83.03% <100.00%> (ø)

... and 8 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 7 commits April 23, 2026 21:56
Bucket generated pages into `fetchers/<family>/<name>.md` (and
`renderers/<family>/<name>.md`) when a family has 2+ members. Starlight's
`autogenerate` sidebar then produces collapsible groups per family
(clock / git / github / project / system for fetchers; animated / chart /
gauge / grid / list / text for renderers), replacing the previous
alphabetical flat dump that scanned as a 30-item wall.

Families of 1 (`static`, `read_store`, `disk_usage`, `media_image`,
`status_badge`) stay flat at the reference root to avoid a group-of-one
rendering as clutter.

Cross-links between pages compute depth from both source and target
layout so mixed grouped/flat references stay correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…aw .md)

Adds starlight-llms-txt so the build emits /llms.txt (curated index),
/llms-small.txt (abridged, ~400 lines), and /llms-full.txt (complete dump,
~8k lines) at the site root — the emerging llmstxt.org convention for
feeding docs into AI tools and agents.

Also mirrors every page's Markdown source into dist/ via a small post-build
script so /guides/getting-started.md and every reference page are served
verbatim alongside the rendered HTML. Tools that prefer fetching raw source
over scraping HTML can hit the .md directly.

Pinned starlight-llms-txt to ^0.7 because 0.8+ needs Starlight 0.38+ which
needs Astro 6 — avoids pulling that upgrade into this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
smartypants rewrites ASCII ' and " into curly U+2019 / U+201C / U+201D in
the rendered output, which the llms-*.txt feeds derive from. Valid UTF-8
but: (a) the source markdown never had curly quotes, so this is pure drift
added by the pipeline; (b) any client fetching the plain-text feed with a
latin-1 fallback mojibakes them into `’`; (c) LLM ingestion gets noise
that isn't in the source.

Em-dashes written as literal U+2014 in the source stay — smartypants
wasn't responsible for those.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…erer model

The existing guides dropped straight from "install" into "TOML schema"
without explaining why widgets are composed of three separate pieces. A
user reading Configuration cold has no mental model for "why do I write
fetcher and render on separate lines" or "why does one fetcher work with
several renderers".

New Concepts page leads with the composition equation, then walks through
fetcher (cached vs realtime), renderer (family_variant naming), the shape
contract between them, and concrete examples of same-fetcher-different-look
and same-renderer-different-source. Closes with the curated-renderer
stance + the ReadStore escape hatch.

Slotted between Getting started and Configuration so the progression reads
install → mental model → schema → curated dashboards → themes → security →
recipes. Added cross-links from the landing page, getting-started's "From
here", and a preamble on Configuration that points back to Concepts.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Four diagrams, all in fenced blocks so they render in both the HTML and
the raw .md / llms-*.txt outputs:

- Concepts: Widget composition (fetcher → renderer → layout slot, as
  separate boxes under the WHAT/HOW/WHERE labels).
- Concepts: Shape as contract — N fetchers ─ Shape::Text ─ M renderers,
  showing why adding one fetcher unlocks every compatible renderer.
- Concepts: Layout slot viewport / rows / children hierarchy.
- Concepts: Cached vs Realtime fetcher timing — cache read paints
  instant, detached child refreshes for next render; realtime has no
  cache and runs per-frame.
- Configuration: Dashboard resolution flowchart — per-dir → project →
  home decision tree mirroring the numbered list underneath.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Scaffold for screenshots — presets, themes, and community dashboards.
Placed as a peer of Guides/Reference in the sidebar so visual-first
browsers hit it without digging into docs. Three section placeholders
(Presets / Themes / In the wild) mark where PRs drop PNGs once the
preset work in #77 lands and community submissions arrive.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…oup pages by family

Closes the last orphan-prefix gaps so every registered name lives in a
family and the sidebar's collapsible groups become unconditional:

  static       → basic_static
  read_store   → basic_read_store    (new `basic_*` family — the two
                                       data-source escape hatches)
  disk_usage   → system_disk_usage   (already was a system-info reader,
                                       now joins the system_* family)

xtask/gen_matrix: drop the `>=2 members` check that kept lone-wolf pages
flat. Every name has a family now so every page nests under
<kind>/<family>/<name>.md unconditionally, simplifying rel_path /
cross_link to constant depth-2 paths. Starlight's sidebar picks up
`basic/`, `media/`, `status/` as groups in addition to the existing
clock / git / github / project / system / animated / chart / gauge /
grid / list / text.

Config-level renames propagate through:
- dogfood `.splashboard/dashboard.toml` (the gap widget)
- guide pages (concepts diagram, configuration examples, cookbook
  recipes, presets full TOML)
- README fetcher index
- AGENTS.md invariants section

Breaking change for any external configs referencing the old names; the
project is pre-1.0 and this aligns with the "family prefix for every
named token" convention already baked into the codebase.

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.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs-site/src/content/docs/guides/concepts.md`:
- Around line 134-135: The docs mention a `Timeline` shape but the runtime
`Body` enum in src/payload.rs (the Body enum that enumerates shapes) lacks a
`Timeline` variant; add a `Timeline` variant to the `Body` enum and wire it up
to the corresponding shape type used by renderers/fetchers (the shape backing
the `list_timeline` table entry), update serialization/deserialization/serde
attributes if present, and ensure any shape module/type for `Timeline` is
imported and referenced so the runtime payload contract matches the docs and
fetcher/renderer coupling.
- Around line 8-10: The unlabeled fenced code blocks containing the ASCII
diagrams (e.g., the block with "Widget = Fetcher × Renderer × Layout slot")
should be updated to use a language tag of `text` to satisfy markdown linting
(MD040); locate each similar fence (the ranges noted: 8-10, 17-27, 51-71,
94-107, 141-153) and change the opening triple-backtick to ```text so the
diagrams are explicitly plain-text fenced.
- Around line 184-211: The examples conflict: git_commits_activity is shown once
as driving grid_heatmap (Heatmap) and later as emitting NumberSeries defaulting
to chart_sparkline; pick the actual mapping and make both examples match it.
Update the first example to use github_contributions for grid_heatmap (Heatmap)
and keep git_commits_activity in the later example as emitting
NumberSeries/defaulting to chart_sparkline, or alternatively change the later
example to state git_commits_activity emits Heatmap/defaults to
grid_heatmap—ensure consistency for the fetcher name git_commits_activity and
the renderers grid_heatmap and chart_sparkline so both occurrences reflect the
same shape-to-renderer mapping.

In `@docs-site/src/content/docs/guides/configuration.md`:
- Around line 261-262: The docs text uses the incorrect token form "bg.subtle";
update the explanatory sentence to use the documented token key "bg_subtle" or
explicitly show the row setting form (e.g., bg = "subtle") so readers see the
correct usage; replace the occurrence of `bg.subtle` in the header-band
description with either `bg_subtle` (token) or `bg = "subtle"` to match the
documented API.
- Around line 28-36: Mark the plain-text diagram/code fences in
docs-site/src/content/docs/guides/configuration.md as explicit non-TOML text
blocks by changing the triple-backtick fences from ``` to ```text for the tree
diagram block (the $HOME/.splashboard/ tree shown in the diff) and for the
subsequent render diagram block (the second fenced block around "splashboard
render"); ensure both fenced blocks use ```text at start and ``` at end so MD040
lint warnings are resolved.

In `@docs-site/src/content/docs/guides/cookbook.md`:
- Around line 92-110: The habit-tick script may fail writing to "$store" when
the "$HOME/.splashboard/store/" directory doesn't exist; update the script
(habit-tick) to create the parent directory before touching or writing the store
file by invoking a mkdir -p on the directory portion of the store path (use the
store variable or explicit "$HOME/.splashboard/store") so the subsequent touch
and heredoc redirect succeed.
- Around line 62-86: The JSON example for the gauge_line/read store is using the
wrong key name—update the snippet under the `gauge_line` example to use the
RatioData field name `value` instead of `ratio` so deserialization succeeds;
e.g., replace `"ratio": 0.6` with `"value": 0.6` (you may also mention the
optional `denominator` field if relevant) and keep the rest of the example
(`label`, widget `id`/filename convention, fetcher `basic_read_store`, renderer
`gauge_line`) as-is.

In `@docs-site/src/content/docs/guides/presets.md`:
- Around line 49-53: Several preset table rows still reference the old fetcher
ID "static" instead of the renamed "basic_static"; update each affected preset
entry (notably the rows for "attribution", "ambient", "moon" and any other table
entries referenced later in the doc) to use `basic_static` as the fetcher ID so
the examples work when copied. Search the preset tables for occurrences of
`static` used as a fetcher ID and replace them with `basic_static`, preserving
the rest of each row (e.g., keep the same modifiers like
`system`/`weather`/`clock_derived` and column values such as `text_plain` or
`dim`). Ensure consistency across the three mentioned sections and the other
occurrences called out in the review so no old `static` IDs remain.

In `@docs-site/src/content/docs/guides/trust.md`:
- Line 28: The link text "fetcher roadmap ([`#62` –
`#68`](https://github.com/unhappychoice/splashboard/issues/41))" is inconsistent
(labels `#62`–#68 but URL points to issue 41); update the markdown so the label
and target match by either changing the visible text to "#41" or updating the
URL to the correct issue/PR range (e.g., /issues/62 through /issues/68 or a
single consolidated issue/PR URL). Locate the exact markdown snippet "fetcher
roadmap ([`#62` – `#68`](https://github.com/unhappychoice/splashboard/issues/41))"
and make the label and destination consistent. Ensure the final link directs
readers to the intended roadmap discussion.
🪄 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: 8befe0f6-5f3e-4811-b9c2-bd198bfaeffc

📥 Commits

Reviewing files that changed from the base of the PR and between 82c6566 and da3c0b7.

⛔ Files ignored due to path filters (1)
  • docs-site/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (23)
  • .splashboard/dashboard.toml
  • AGENTS.md
  • README.md
  • docs-site/astro.config.mjs
  • docs-site/package.json
  • docs-site/scripts/copy-markdown.mjs
  • docs-site/src/content/docs/guides/concepts.md
  • docs-site/src/content/docs/guides/configuration.md
  • docs-site/src/content/docs/guides/cookbook.md
  • docs-site/src/content/docs/guides/getting-started.md
  • docs-site/src/content/docs/guides/presets.md
  • docs-site/src/content/docs/guides/themes.md
  • docs-site/src/content/docs/guides/trust.md
  • docs-site/src/content/docs/index.md
  • docs-site/src/content/docs/showcases.md
  • src/config.rs
  • src/fetcher/mod.rs
  • src/fetcher/read_store.rs
  • src/fetcher/static_text.rs
  • src/fetcher/system.rs
  • src/runtime.rs
  • src/trust.rs
  • xtask/src/gen_matrix.rs

Comment on lines +8 to +10
```
Widget = Fetcher × Renderer × Layout slot
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Tag ASCII diagram fences as text to satisfy markdown linting.

These unlabeled fences are likely triggering MD040 warnings.

Also applies to: 17-27, 51-71, 94-107, 141-153

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/concepts.md` around lines 8 - 10, The
unlabeled fenced code blocks containing the ASCII diagrams (e.g., the block with
"Widget = Fetcher × Renderer × Layout slot") should be updated to use a language
tag of `text` to satisfy markdown linting (MD040); locate each similar fence
(the ranges noted: 8-10, 17-27, 51-71, 94-107, 141-153) and change the opening
triple-backtick to ```text so the diagrams are explicitly plain-text fenced.

Comment on lines +134 to +135
| `Timeline` | chronological entries | `list_timeline` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Timeline shape appears undocumented in runtime payload enum.

The table introduces a Timeline shape, but src/payload.rs’s Body enum (Line 23-52 in snippet) lists shapes through Badge and does not include Timeline. This makes the contract section inaccurate.

Based on learnings: “Shapes are the only coupling point between fetchers and renderers; if you need raw fetcher data in a renderer, add a new shape instead”.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/concepts.md` around lines 134 - 135, The
docs mention a `Timeline` shape but the runtime `Body` enum in src/payload.rs
(the Body enum that enumerates shapes) lacks a `Timeline` variant; add a
`Timeline` variant to the `Body` enum and wire it up to the corresponding shape
type used by renderers/fetchers (the shape backing the `list_timeline` table
entry), update serialization/deserialization/serde attributes if present, and
ensure any shape module/type for `Timeline` is imported and referenced so the
runtime payload contract matches the docs and fetcher/renderer coupling.

Comment on lines +184 to +211
The `grid_heatmap` renderer accepts a `Heatmap` shape. Any fetcher that
emits one drives it:

```toml
[[widget]]
id = "my_commits"
fetcher = "git_commits_activity" # your local repo's commit cadence
render = "grid_heatmap"

[[widget]]
id = "my_github"
fetcher = "github_contributions" # your GitHub contribution graph
render = "grid_heatmap"
```

Same visual treatment, two different data sources.

### Defaults that just work

Every shape has a default renderer, so omitting `render` picks a sensible
one:

```toml
[[widget]]
id = "commits"
fetcher = "git_commits_activity" # emits NumberSeries
# render omitted → defaults to chart_sparkline (the default for NumberSeries)
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Conflicting guidance for git_commits_activity shape/default renderer.

Earlier, git_commits_activity is shown driving grid_heatmap (Heatmap). Later this section says it emits NumberSeries and defaults to chart_sparkline. Please make these examples consistent with the actual fetcher shape/default mapping.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/concepts.md` around lines 184 - 211, The
examples conflict: git_commits_activity is shown once as driving grid_heatmap
(Heatmap) and later as emitting NumberSeries defaulting to chart_sparkline; pick
the actual mapping and make both examples match it. Update the first example to
use github_contributions for grid_heatmap (Heatmap) and keep
git_commits_activity in the later example as emitting NumberSeries/defaulting to
chart_sparkline, or alternatively change the later example to state
git_commits_activity emits Heatmap/defaults to grid_heatmap—ensure consistency
for the fetcher name git_commits_activity and the renderers grid_heatmap and
chart_sparkline so both occurrences reflect the same shape-to-renderer mapping.

Comment on lines +28 to +36
```
$HOME/.splashboard/
├── settings.toml # [general], [theme]
├── home.dashboard.toml # ambient splash
├── project.dashboard.toml # repo-root splash when the repo ships no config
├── trust.toml # trust store (auto-managed)
├── cache/ # per-widget cache
└── store/ # ReadStore files
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add explicit language to non-TOML fenced blocks (text).

These diagram/tree fences are plain text; tagging them avoids MD040 lint warnings.

Suggested doc fix
-```
+```text
 $HOME/.splashboard/
 ...
-```
+```

-```
+```text
                    splashboard render
 ...
-```
+```

Also applies to: 48-65

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/configuration.md` around lines 28 - 36,
Mark the plain-text diagram/code fences in
docs-site/src/content/docs/guides/configuration.md as explicit non-TOML text
blocks by changing the triple-backtick fences from ``` to ```text for the tree
diagram block (the $HOME/.splashboard/ tree shown in the diff) and for the
subsequent render diagram block (the second fenced block around "splashboard
render"); ensure both fenced blocks use ```text at start and ``` at end so MD040
lint warnings are resolved.

Comment on lines +261 to +262
The header band paints on `bg.subtle` to lift it off the main content. Rows
beneath split into two equal columns with a top rule and title over each.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix theme token typo in closing explanation.

bg.subtle is not the documented key form; use bg_subtle (token) or explicitly reference row setting bg = "subtle".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/configuration.md` around lines 261 - 262,
The docs text uses the incorrect token form "bg.subtle"; update the explanatory
sentence to use the documented token key "bg_subtle" or explicitly show the row
setting form (e.g., bg = "subtle") so readers see the correct usage; replace the
occurrence of `bg.subtle` in the header-band description with either `bg_subtle`
(token) or `bg = "subtle"` to match the documented API.

Comment on lines +62 to +86
```toml
# dashboard.toml
[[widget]]
id = "habit"
fetcher = "basic_read_store"
file_format = "json"
render = "gauge_line"
```

splashboard reads from
`$HOME/.splashboard/store/habit.json` (the filename matches the widget
`id`). Write anything there — a cron job, a shell function, a
post-commit hook — and the splash picks it up.

ReadStore understands every non-dynamic shape: `Text`, `TextBlock`,
`Entries`, `Ratio`, `NumberSeries`, `PointSeries`, `Bars`, `Image`,
`Calendar`, `Heatmap`. The shape you get is the one the renderer
accepts; `gauge_line` above takes a `Ratio`, so:

```json
{
"ratio": 0.6,
"label": "habit · 6 of 10 days"
}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
fd -t f 'read_store.rs' -x cat {}
echo '---'
ast-grep --pattern 'pub struct RatioData { $$$ }'

Repository: unhappychoice/splashboard

Length of output: 15244


Fix JSON key name: use "value" not "ratio".

The filename-from-id convention is correct, but the JSON example is wrong. The RatioData struct uses value as its field name, not ratio. Users copying this verbatim will hit a deserialization error.

Correct example:

{
  "value": 0.6,
  "label": "habit · 6 of 10 days"
}

(The optional denominator field also exists in the struct if the widget knows the total count.)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/cookbook.md` around lines 62 - 86, The JSON
example for the gauge_line/read store is using the wrong key name—update the
snippet under the `gauge_line` example to use the RatioData field name `value`
instead of `ratio` so deserialization succeeds; e.g., replace `"ratio": 0.6`
with `"value": 0.6` (you may also mention the optional `denominator` field if
relevant) and keep the rest of the example (`label`, widget `id`/filename
convention, fetcher `basic_read_store`, renderer `gauge_line`) as-is.

Comment on lines +92 to +110
```bash
#!/usr/bin/env bash
# ~/.local/bin/habit-tick
store="$HOME/.splashboard/store/habit.json"
touch "$HOME/.splashboard/habit.log"
date +%Y-%m-%d >> "$HOME/.splashboard/habit.log"
sort -u -o "$HOME/.splashboard/habit.log" "$HOME/.splashboard/habit.log"

count=$(grep -c "^$(date +%Y-%m)" "$HOME/.splashboard/habit.log")
days=$(date +%d)
ratio=$(awk "BEGIN { printf \"%.3f\", $count / $days }")

cat > "$store" <<EOF
{ "ratio": $ratio, "label": "this month · $count of $days days" }
EOF
```

Call `habit-tick` on the days you did the thing; the splash reflects it
next render.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Minor: habit-tick script creates the log via touch but doesn't ensure $HOME/.splashboard/store/ exists.

First run on a fresh machine will fail at the final heredoc redirect (> "$store") if $HOME/.splashboard/store/ doesn't exist yet. A one-line mkdir -p avoids a confusing "No such file or directory" for users who copy-paste the recipe.

Proposed tweak
 store="$HOME/.splashboard/store/habit.json"
+mkdir -p "$(dirname "$store")"
 touch "$HOME/.splashboard/habit.log"
📝 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.

Suggested change
```bash
#!/usr/bin/env bash
# ~/.local/bin/habit-tick
store="$HOME/.splashboard/store/habit.json"
touch "$HOME/.splashboard/habit.log"
date +%Y-%m-%d >> "$HOME/.splashboard/habit.log"
sort -u -o "$HOME/.splashboard/habit.log" "$HOME/.splashboard/habit.log"
count=$(grep -c "^$(date +%Y-%m)" "$HOME/.splashboard/habit.log")
days=$(date +%d)
ratio=$(awk "BEGIN { printf \"%.3f\", $count / $days }")
cat > "$store" <<EOF
{ "ratio": $ratio, "label": "this month · $count of $days days" }
EOF
```
Call `habit-tick` on the days you did the thing; the splash reflects it
next render.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/cookbook.md` around lines 92 - 110, The
habit-tick script may fail writing to "$store" when the
"$HOME/.splashboard/store/" directory doesn't exist; update the script
(habit-tick) to create the parent directory before touching or writing the store
file by invoking a mkdir -p on the directory portion of the store path (use the
store variable or explicit "$HOME/.splashboard/store") so the subsequent touch
and heredoc redirect succeed.

Comment on lines +49 to +53
| attribution | `static` + `system` (kind = os_version) → `text_plain` dim |
| date bar | `clock` → `text_plain`, em-dash decorated |
| ambient | `static` + `weather` + `clock_sunrise` → `text_plain` |
| moon | `static` + `clock_derived` (kind = moon) → `text_plain` |
| year progress | `clock_ratio` (period = year) → `gauge_line` (percent) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use renamed fetcher ID basic_static consistently in preset tables.

These rows still document static, but this PR renamed it to basic_static. Leaving old IDs here makes the preset guidance non-working when copied by users.

Suggested doc fix
-| attribution | `static` + `system` (kind = os_version) → `text_plain` dim |
+| attribution | `basic_static` + `system` (kind = os_version) → `text_plain` dim |
-| ambient | `static` + `weather` + `clock_sunrise` → `text_plain` |
+| ambient | `basic_static` + `weather` + `clock_sunrise` → `text_plain` |
-| moon | `static` + `clock_derived` (kind = moon) → `text_plain` |
+| moon | `basic_static` + `clock_derived` (kind = moon) → `text_plain` |
-| label | `static "today"` → `text_plain` dim |
+| label | `basic_static "today"` → `text_plain` dim |
-| hero | `static` (username) → `text_ascii` figlet |
+| hero | `basic_static` (username) → `text_ascii` figlet |
-| subtitle | `static` → `text_plain` dim |
+| subtitle | `basic_static` → `text_plain` dim |

Also applies to: 89-89, 131-132

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/presets.md` around lines 49 - 53, Several
preset table rows still reference the old fetcher ID "static" instead of the
renamed "basic_static"; update each affected preset entry (notably the rows for
"attribution", "ambient", "moon" and any other table entries referenced later in
the doc) to use `basic_static` as the fetcher ID so the examples work when
copied. Search the preset tables for occurrences of `static` used as a fetcher
ID and replace them with `basic_static`, preserving the rest of each row (e.g.,
keep the same modifiers like `system`/`weather`/`clock_derived` and column
values such as `text_plain` or `dim`). Ensure consistency across the three
mentioned sections and the other occurrences called out in the review so no old
`static` IDs remain.

:::note
Every fetcher that ships in 0.x today is classified `Safe`. Network
widgets (RSS, calendar feeds, custom URLs) arrive with the
fetcher roadmap ([#62 – #68](https://github.com/unhappychoice/splashboard/issues/41)).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Issue link text and target mismatch.

The text says #62 – #68``, but the URL points to /issues/41. Please align the label and destination so readers can actually follow the roadmap reference.

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 28-28: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/content/docs/guides/trust.md` at line 28, The link text
"fetcher roadmap ([`#62` –
`#68`](https://github.com/unhappychoice/splashboard/issues/41))" is inconsistent
(labels `#62`–#68 but URL points to issue 41); update the markdown so the label
and target match by either changing the visible text to "#41" or updating the
URL to the correct issue/PR range (e.g., /issues/62 through /issues/68 or a
single consolidated issue/PR URL). Locate the exact markdown snippet "fetcher
roadmap ([`#62` – `#68`](https://github.com/unhappychoice/splashboard/issues/41))"
and make the label and destination consistent. Ensure the final link directs
readers to the intended roadmap discussion.

unhappychoice and others added 6 commits April 24, 2026 00:16
`animated_postfx` and `animated_typewriter` each run an effect over the
process-wide elapsed clock; the preview pipeline renders a single frame
near t=0, which catches `fade_in` mid-fade (cells come out as
`color:#040404` — nearly pure black against the docs-site dark bg, which
reads as "broken output" to anyone browsing the reference). A static
PNG-equivalent of motion is misleading regardless of what frame we land
on, so drop them from previews entirely via the existing `animates()`
declaration. The reference page for each animated renderer still
documents options / accepted shapes / color keys.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Previews were sitting on Starlight's generic inline-code background —
readable but it made every preview look like a code sample "rendered
inside splashboard", not "what the splash itself looks like". Pin
bg / fg / border to the Splash default palette (`#0e172a` deep-ocean
navy, `#c5d2dc` diffuse text, `#4a6b75` teal panel chrome) so each
snapshot previews on the exact surface the renderer was tuned for.

Left as literal hex rather than CSS variables: the Splash palette is
dark-by-design and the snapshot should stay on it even when a visitor
flips the site to light mode. Kept a doc comment pointing at
src/theme/mod.rs so the two stay in sync if the palette ever shifts.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add a mock titlebar strip + three traffic-light dots above each preview so
it reads as an actual terminal render, not a styled code block. Pure CSS
via `::before` (titlebar, painted in the Splash `bg_subtle` lift) and
`::after` (one real dot plus two cloned by `box-shadow` — classic macOS
red/yellow/green). The xtask-emitted HTML stays a plain `<pre>`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Previous landing was a bullet list of links — technically functional,
visually empty. Replace with Starlight's `template: splash`:

- Hero: title, tagline explaining what splashboard does, three actions
  (Getting started → primary, Concepts → secondary, GitHub → minimal).
- Short "What is this" paragraph for first-visit context.
- `<CardGrid>` of `<LinkCard>`s for the six guide pages — visually
  scannable instead of a wall of bullets.
- Second CardGrid for the catalog entries (Reference overview,
  Showcases, Trust model) since they're distinct entry points.

File switched to .mdx so the Starlight components can be imported.
copy-markdown.mjs already handles `.mdx`, and llms-txt pulls from the
rendered output so both derivative feeds pick the new landing up.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Instead of a screenshot, `cargo xtask` now composes a whole dashboard
TOML through the real layout engine, using each fetcher's `sample_body`
in place of network/filesystem reads, and writes the resulting HTML to
`docs-site/src/assets/rendered/`. `index.mdx` imports that HTML via
Astro's `?raw` loader and drops it above "What is this" with the same
`<pre class="splash-snapshot">` chrome the per-widget previews use — so
visitors see the actual splash output (terminal titlebar, traffic-light
dots, Splash palette) rather than a marketing asset.

Animated renderers (`animated_postfx`, `animated_typewriter`) are
unwrapped to their inner / final renderer before render so the preview
shows the effect's rested state instead of the t=0 fade-to-black that a
single-frame snapshot would otherwise catch. Sample output for
`basic_static` widgets honours `widget.format` so the dogfood's gap
widgets stay invisible rather than each spitting "Hello, splashboard!".

Rendered files gitignored — rebuilt each time `cargo xtask` runs, same
deal as the auto-generated reference pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…orizontal scroll

Dogfood render is 120 cells wide (figlet hero needs the breathing room).
At the reference previews' 0.95rem font-size that's ~1100px, wider than
Starlight's content column on anything below ~1100px viewport → the user
saw horizontal scroll. Wrap the landing fragment in `.splash-landing` and
clamp the font-size so the whole splash scales with the column width
(0.5rem floor keeps glyphs legible on mobile, 0.8rem ceiling stops it
from dominating ultra-wide screens). Line-height tightened to 1.05 to
match the smaller cell height.

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.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs-site/src/styles/snapshot.css (1)

9-9: Nit: stylelint flags unnecessary quotes on SFMono-Regular.

Stylelint's font-family-name-quotes rule expects single-word family names unquoted. Low priority, but easy to silence:

Proposed fix
-  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
+  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs-site/src/styles/snapshot.css` at line 9, Remove the unnecessary quotes
around the single-word font family name in the font-family declaration to
satisfy stylelint's font-family-name-quotes rule; locate the font-family
property (font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo,
Consolas, monospace;) in snapshot.css and change "SFMono-Regular" to
SFMono-Regular (leave other quoted multi-word names like "JetBrains Mono"
intact).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs-site/src/content/docs/index.mdx`:
- Around line 9-20: Update the hero action links so they include the
/splashboard/ base-path prefix to match the CardGrid links: find the hero action
objects with keys like link: /guides/getting-started/, /guides/concepts/, and
the external GitHub link in the docs index (the hero block in
docs-site/src/content/docs/index.mdx) and prepend /splashboard to internal paths
(e.g., /splashboard/guides/getting-started/, /splashboard/guides/concepts/) so
all internal navigation matches the CardGrid pattern while leaving external
links (GitHub) unchanged.

In `@xtask/src/dashboard_snapshot.rs`:
- Around line 79-99: resolve_shape currently may return a shape from the
renderer's accepted list (accepted.first()) that the fetcher doesn't actually
support, causing fetcher.sample_body(shape) to return None and silently drop the
widget; change the branch in resolve_shape so that when accepted is Some but no
shape in fetcher.shapes() matches, you fall back to fetcher.default_shape()
instead of accepted.first(), and emit a warning (using the crate's logger) that
the renderer requested an unsupported shape for the given
WidgetConfig/RegisteredFetcher so misconfiguration surfaces during snapshot
creation (reference resolve_shape, fetcher.shapes(), fetcher.default_shape(),
fetcher.sample_body(), RegisteredFetcher, RenderRegistry, WidgetConfig).

In `@xtask/src/main.rs`:
- Around line 33-44: DASHBOARD_SNAPSHOTS entries and the rendered_out default
are currently resolved relative to the process CWD which breaks when xtask is
invoked from other directories; update startup to compute the workspace root via
env!("CARGO_MANIFEST_DIR").parent() (e.g., a workspace_root() helper) and
resolve both the default rendered_out PathBuf and each path in
DASHBOARD_SNAPSHOTS against that workspace_root() before using/reading them so
paths like ".splashboard/dashboard.toml" and "docs-site/src/assets/rendered" are
anchored to the repository root rather than the CWD.

---

Nitpick comments:
In `@docs-site/src/styles/snapshot.css`:
- Line 9: Remove the unnecessary quotes around the single-word font family name
in the font-family declaration to satisfy stylelint's font-family-name-quotes
rule; locate the font-family property (font-family: "JetBrains Mono",
ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;) in snapshot.css and
change "SFMono-Regular" to SFMono-Regular (leave other quoted multi-word names
like "JetBrains Mono" intact).
🪄 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: 196efb62-2f5c-4706-84b6-3d2ae79cd336

📥 Commits

Reviewing files that changed from the base of the PR and between da3c0b7 and d2ad7c4.

📒 Files selected for processing (7)
  • docs-site/.gitignore
  • docs-site/src/content/docs/index.md
  • docs-site/src/content/docs/index.mdx
  • docs-site/src/styles/snapshot.css
  • xtask/src/dashboard_snapshot.rs
  • xtask/src/main.rs
  • xtask/src/snapshots.rs
💤 Files with no reviewable changes (1)
  • docs-site/src/content/docs/index.md
✅ Files skipped from review due to trivial changes (1)
  • docs-site/.gitignore

Comment thread docs-site/src/content/docs/index.mdx Resolved
Comment on lines +79 to +99
fn resolve_shape(
w: &WidgetConfig,
fetcher: &RegisteredFetcher,
renderers: &RenderRegistry,
) -> Option<Shape> {
let shapes = fetcher.shapes();
let accepted = w
.render
.as_ref()
.and_then(|spec| renderers.get(spec.renderer_name()))
.map(|r| r.accepts().to_vec());
if let Some(accepted) = accepted {
if let Some(shape) = shapes.iter().find(|s| accepted.contains(s)) {
return Some(*shape);
}
if let Some(&first) = accepted.first() {
return Some(first);
}
}
Some(fetcher.default_shape())
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

resolve_shape can return a shape the fetcher doesn't support, silently dropping the widget.

When accepted is set but none of the fetcher's shapes() match, the fallback returns accepted.first(). The caller then calls fetcher.sample_body(shape) with a shape the fetcher doesn't produce, which returns None, and filter_map drops the widget without warning. The dashboard preview will just be missing a cell.

Consider falling back to fetcher.default_shape() in that branch (so sample_body has a chance of succeeding), and/or logging a warning so misconfigured dashboards surface at snapshot time rather than vanishing from the preview:

Proposed fix
     if let Some(accepted) = accepted {
         if let Some(shape) = shapes.iter().find(|s| accepted.contains(s)) {
             return Some(*shape);
         }
-        if let Some(&first) = accepted.first() {
-            return Some(first);
-        }
+        eprintln!(
+            "warning: widget '{}' fetcher '{}' shapes {:?} incompatible with renderer-accepted {:?}; using fetcher default",
+            w.id, w.fetcher, shapes, accepted,
+        );
     }
     Some(fetcher.default_shape())
📝 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.

Suggested change
fn resolve_shape(
w: &WidgetConfig,
fetcher: &RegisteredFetcher,
renderers: &RenderRegistry,
) -> Option<Shape> {
let shapes = fetcher.shapes();
let accepted = w
.render
.as_ref()
.and_then(|spec| renderers.get(spec.renderer_name()))
.map(|r| r.accepts().to_vec());
if let Some(accepted) = accepted {
if let Some(shape) = shapes.iter().find(|s| accepted.contains(s)) {
return Some(*shape);
}
if let Some(&first) = accepted.first() {
return Some(first);
}
}
Some(fetcher.default_shape())
}
fn resolve_shape(
w: &WidgetConfig,
fetcher: &RegisteredFetcher,
renderers: &RenderRegistry,
) -> Option<Shape> {
let shapes = fetcher.shapes();
let accepted = w
.render
.as_ref()
.and_then(|spec| renderers.get(spec.renderer_name()))
.map(|r| r.accepts().to_vec());
if let Some(accepted) = accepted {
if let Some(shape) = shapes.iter().find(|s| accepted.contains(s)) {
return Some(*shape);
}
eprintln!(
"warning: widget '{}' fetcher '{}' shapes {:?} incompatible with renderer-accepted {:?}; using fetcher default",
w.id, w.fetcher, shapes, accepted,
);
}
Some(fetcher.default_shape())
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@xtask/src/dashboard_snapshot.rs` around lines 79 - 99, resolve_shape
currently may return a shape from the renderer's accepted list
(accepted.first()) that the fetcher doesn't actually support, causing
fetcher.sample_body(shape) to return None and silently drop the widget; change
the branch in resolve_shape so that when accepted is Some but no shape in
fetcher.shapes() matches, you fall back to fetcher.default_shape() instead of
accepted.first(), and emit a warning (using the crate's logger) that the
renderer requested an unsupported shape for the given
WidgetConfig/RegisteredFetcher so misconfiguration surfaces during snapshot
creation (reference resolve_shape, fetcher.shapes(), fetcher.default_shape(),
fetcher.sample_body(), RegisteredFetcher, RenderRegistry, WidgetConfig).

Comment thread xtask/src/main.rs
Comment on lines +33 to +44
#[arg(long, default_value = "docs-site/src/assets/rendered")]
rendered_out: PathBuf,
}

/// Each entry renders `source_config` at `(width, height)` and writes the HTML to `output_name`
/// under `--rendered-out`. Sizes are picked per-config so the whole layout lands without clipping.
const DASHBOARD_SNAPSHOTS: &[(&str, &str, u16, u16)] = &[(
".splashboard/dashboard.toml",
"project_github_activity.html",
120,
42,
)];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

DASHBOARD_SNAPSHOTS config paths and the --rendered-out default are resolved relative to CWD.

.splashboard/dashboard.toml and docs-site/src/assets/rendered only resolve correctly when cargo xtask is invoked from the workspace root. Any other CWD (e.g., CI scripts that cd xtask, or docs CI that runs from docs-site/) will fail with a confusing "read ... No such file" context. Consider anchoring to CARGO_MANIFEST_DIR's parent (workspace root) or asserting CWD at startup:

Sketch
fn workspace_root() -> PathBuf {
    Path::new(env!("CARGO_MANIFEST_DIR"))
        .parent()
        .expect("xtask has a parent")
        .to_path_buf()
}

Then resolve relative entries against workspace_root() before reading.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@xtask/src/main.rs` around lines 33 - 44, DASHBOARD_SNAPSHOTS entries and the
rendered_out default are currently resolved relative to the process CWD which
breaks when xtask is invoked from other directories; update startup to compute
the workspace root via env!("CARGO_MANIFEST_DIR").parent() (e.g., a
workspace_root() helper) and resolve both the default rendered_out PathBuf and
each path in DASHBOARD_SNAPSHOTS against that workspace_root() before
using/reading them so paths like ".splashboard/dashboard.toml" and
"docs-site/src/assets/rendered" are anchored to the repository root rather than
the CWD.

unhappychoice and others added 8 commits April 24, 2026 01:14
Previous clamp(...vw...) trick shrank the font but not proportionally —
wide viewports still overflowed the content column because the preview's
intrinsic width (120 cells) is wider than Starlight's column at any
viewport width where vw-scaling hadn't kicked in yet.

Treat the snapshot like an `<img>` with a fixed aspect ratio instead:
the landing wrapper becomes an inline-size query container, and the
snapshot's font-size is pinned to `100cqi / 82` (120 cells at ~0.6em
per mono glyph + small safety margin). Every other dimension inside
(cells at `1ch`, padding / titlebar / dots at `em`) tracks the font,
so width and height stay in lockstep — the splash scales to whatever
column width it's inside, never scrolls, never has dead padding. Capped
at 0.9rem on ultra-wide so it doesn't eat the fold.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The snapshot sits in a `<pre>` that defaults to `width: auto` = the full
container. With the container-query safety margin in the font-size calc,
the actual rendered content is ~10 % narrower than the container, and
the leftover whitespace lands on the right — reads as left-aligned.
Shrink the pre to its rendered width (`width: fit-content`) and centre
it in the column (`margin-inline: auto`) so the splash sits symmetric.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Starlight's hero action links bypass the Astro `base` auto-prefix — the
sidebar and markdown links add `/splashboard/` automatically, actions do
not. Hero buttons were pointing at `/guides/getting-started/` and
`/guides/concepts/` which 404 on the deployed GH Pages URL. Prepend
`/splashboard/` explicitly so they resolve to the same targets the
CardGrid entries already use.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…page

Replace the ASCII mock in the project_github_activity section with the
same xtask-generated HTML snippet the landing page uses. The snippet is
already produced by `cargo xtask` for the landing hero; import it once
more via `?raw` and drop it into the section with the existing
`.splash-landing` wrapper (aspect-ratio scaling, terminal chrome, Splash
bg — all inherited from the shared snapshot.css).

File renamed .md → .mdx so the import / component syntax works.
`home_splash` / `home_daily` / `home_github` stay on ASCII mocks until
their missing fetchers ship in #81.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…views

Browsers were showing Starlight's default favicon; social platforms were
showing a blank card when the URL got pasted in Slack / GitHub / Twitter.

- `public/favicon.svg` — mini terminal window in the Splash palette
  (`#0e172a` bg, `#17243b` titlebar lift, macOS traffic-light dots, coral
  / cyan / steel mock widget bars). Recognisable as "splashboard" at 16px.
- `public/og.svg` — 1200×630 card: big `splashboard` title in coral over
  the deep-ocean bg, tagline underneath, a contribution-heatmap accent
  row at the bottom. Source SVG is committed; the PNG is rasterised
  fresh each build (gitignored).
- `scripts/build-og.mjs` — uses sharp (already a dep) to render og.svg
  → og.png at build time. One extra step in `npm run build`.
- `astro.config.mjs` — adds `og:image` / `twitter:image` meta site-wide
  so every page shares the same preview card.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
librsvg (the SVG rasteriser under sharp) ignores `@font-face` directives
entirely — even inlined as a base64 data URL. Without JetBrains Mono in
the host's fontconfig the card rendered in DejaVu / Liberation Mono on
Linux CI, which defeated the branding point.

Switch to text-to-path: `opentype.js` turns each headline / tagline into
an SVG `<path d=...>` carrying the glyph outlines, and sharp rasterises
paths natively without ever needing a font-resolution pathway. The WOFF2
from `@fontsource/jetbrains-mono` is decompressed to TTF at build time
via `wawoff2` so opentype.js can parse it.

The separate `public/og.svg` source is gone — the card layout lives in
`build-og.mjs` now, since the file had to be constructed programmatically
to inject the path data anyway.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
JetBrains Mono at 160 px read as "code dump" rather than "wordmark" —
splashboard wants a title treatment distinct from the terminal body.
Orbitron's geometric, slightly futuristic feel keeps the dev-tool vibe
while giving the card a clear brand anchor. Body copy stays on JetBrains
Mono so the terminal identity still reads at a glance.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The site chrome was sitting on Starlight's generic purple-tinted dark
scheme, but the embedded landing preview (and every per-widget snapshot)
is painted in splashboard's own Splash palette — deep-ocean navy bg,
coral panel_title, teal-steel chrome, cyan accents. The mismatch made
the previews read as foreign screenshots.

New `src/styles/theme.css` overrides the Starlight CSS variables to the
same colour tokens `Theme::default()` in src/theme/mod.rs exports:

- gray scale → Splash chrome ladder (`#eef3f7` down to `#0e172a`), so
  Starlight's gray-2 body text lands on the Splash `text` token, gray-4
  on `panel_border`, etc.
- accent → coral (`#ff8c7a`, `panel_title`) with darker / lighter
  siblings for hover + heading tints.
- bg / bg-nav / bg-sidebar / bg-inline-code mapped to the same tokens
  Splash uses internally.
- Overrides applied to every `data-theme` attribute value so they stick
  regardless of the user's prior toggle preference. The theme toggle is
  hidden — Splash is dark-by-design and a light-mode palette around the
  dark preview blocks would read as broken.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@unhappychoice
unhappychoice merged commit f7ae093 into main Apr 23, 2026
7 checks passed
@unhappychoice
unhappychoice deleted the docs/expand-guides branch April 23, 2026 20:53
unhappychoice added a commit that referenced this pull request Apr 23, 2026
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]>
unhappychoice added a commit that referenced this pull request Apr 23, 2026
…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]>
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