Repository navigation
Description
Motivation
A project-local .splashboard/config.toml today is one file → one splash. But a real repo has multiple audiences with different "what do I care about" needs:
- Dev — git status, CI, open PRs, recent commits, local branch hygiene.
- PM / lead — release calendar, milestone progress, aggregate PR/issue throughput.
- Designer / docs — design doc TODOs, broken-link reports, RSS from the blog.
- On-call — incident count, oncall rotation, latency dashboard status.
Right now the only way to cover two of those is "commit the one the majority wants, anyone else hand-edits it locally." The first user of splashboard on the repo wins; everyone else either suffers through someone else's layout or maintains a git-ignored local copy. Neither is great.
The per-directory config is the killer feature (per AGENTS.md) — this is the next step: let a repo ship several project configs and let each cloner pick which one renders for them, without editing the tracked files.
Proposal
1. Root config can declare variants
Root config (./.splashboard/config.toml or ./.splashboard.toml) grows an optional [[variant]] section:
# root .splashboard/config.toml
[variants]
# Optional. If a user hasn't picked, this variant renders. Unset = root config itself
# (widgets / rows below) renders as the fallback.
default = "dev"
[[variant]]
name = "dev"
path = ".splashboard/variants/dev.toml"
description = "Day-to-day: git status, CI, open PRs, recent commits"
[[variant]]
name = "pm"
path = ".splashboard/variants/pm.toml"
description = "Release cadence, milestone progress, aggregate throughput"
[[variant]]
name = "oncall"
path = ".splashboard/variants/oncall.toml"
description = "Incident count, oncall rotation, latency dashboard"
# ... widgets / rows can still live at the root and act as the fallback when
# `[variants].default` is unset and no user selection applies.- Each variant's
pathis a normal splashboard config file — same shape as any other, fully independent. - Paths are relative to the root config's directory; absolute paths rejected (security — don't let a committed file pull in
/etc/…). nameis a free-form identifier, must be unique within the root,[a-z0-9_-]+.- Presence of
[[variant]]triggers the feature; absence keeps current behaviour (root config renders as-is).
2. User selection persists per project
When a user picks a variant, splashboard records {canonical project path → variant name} in a new per-user state file:
$HOME/.splashboard/selections.toml
[[selection]]
project = "/home/alice/repos/acme-web"
variant = "dev"
[[selection]]
project = "/home/alice/repos/ops-runbook"
variant = "oncall"Resolution order on splash render:
SPLASHBOARD_VARIANTenv var (for CI, scripting, one-off overrides).- Matching entry in
selections.tomlfor the canonical project path. - Root config's
[variants].default. - Root config itself renders (fallback — the current behaviour).
Steps 1–3 load the named variant's file instead of the root config. Variants are full replacements, not overlays — simpler mental model, simpler implementation.
3. CLI
splashboard variants # list variants for the nearest project + highlight the current selection
splashboard use <name> # persist a selection for this project
splashboard use --clear # drop the selection; revert to default/root
use without a name in a TTY pops an interactive picker with name + description. Non-interactive invocations need the positional arg.
variants output is plain-text (name, path, description, one-line "← current" marker) so it's scriptable. --json flag for tooling.
4. Trust interplay
Each variant is a separate file → each variant is a separate trust entry ((canonical path, sha256)). Concretely:
splashboard trustin a directory prompts for the currently-selected variant (the file that would actually render), not the root.- Switching variants may re-trigger the trust prompt on first render of the new one. That's correct — the user is consenting to a different file's capabilities.
- Selecting a variant (
splashboard use) does not grant trust. Trust and selection are orthogonal.
5. Docs-site / catalog implications
The docs site (docs-site) picks up variants naturally: if a repo ships variants, each is just another .toml file to render screenshots from. No extra infrastructure, but we'll want to mention the pattern in the "project config" docs.
Open questions
- Overlay vs replace. Full replacement is simpler; overlay (variant inherits from root, overrides specific widgets) is more powerful but harder to reason about (merge semantics for
[[widget]]/[[row]]arrays). Start with replacement; overlay can be a follow-up if real demand emerges. - Where to store
selections.toml.$HOME/.splashboard/selections.tomlmatches the existing state dir. Alternative is inside the project (.splashboard/.local.toml, git-ignored), which keeps selection with the repo — useful for multi-machine setups but brittle if.gitignoreisn't maintained. Leaning global. - Nicknames for variants?
splashboard use das a shortcut fordev? Prefix-match is user-friendly but ambiguous once two variants share a prefix. Probably skip for v1. SPLASHBOARD_VARIANTscoping. Env var is global for the shell — if the user has multiple splashboards running from different directories (cd hook), they all pick the same variant. Is that the right behaviour? Probably yes (it's an override), but worth documenting.- What about
homeconfigs?$HOME/.splashboard/config.tomlcould also have variants ("work mornings" vs "weekend hacking"). Same mechanism works — nothing special about project scope. Initial implementation scopes to project configs to keep surface area small; extending to home later is a one-line relaxation. - Catalog command integration. Should
splashboard cataloglearn about variants? Probably out of scope — catalog documents the built-in fetchers/renderers, not user configs.
Non-goals
- No variant composition / inheritance. No
extends = "dev"or multi-variant stacking. One variant renders at a time. - No auto-detection of "what role is this user." Splashboard doesn't guess; the user picks.
- No variant marketplace / sharing. Variants live in the repo, shared via the repo's normal mechanism (git). No central registry.
- No per-widget per-user toggles. If a user wants to hide one widget from the
devvariant, they fork the file locally. Per-widget visibility-by-user is a bigger feature than this.
Activity