Repository navigation
Closed
Labels
featFeature enhancement
Description
Tracks #76 (0.x release scope).
Background
Today: $HOME/.splashboard/config.toml is a single file that carries [general] + [theme] + widgets + rows all together. ./.splashboard/config.toml (per-dir) has the same structure.
UX problems:
- Re-running
splashboard install --template <preset>(feat: "splashboard install" — one-shot setup (rc wiring + starter config from template) #58) overwrites the user's edited[theme]/[general]along with the dashboard. - When implementing a one-shot
splashboard theme <name>command, editing the same file as the dashboard definition has too broad a blast radius. - Per-dir config is "the dashboard specific to this repo" — not a place to override the user's preferences. The filename
config.tomldoesn't convey that scope. cdinto a project without config still shows the home splash — the killer feature (different splash per project) doesn't fire. A project default is needed.
Proposed file layout
$HOME/.splashboard/
├── settings.toml # [general] + [theme] — user preferences
├── home.dashboard.toml # non-git / $HOME / ambient context
├── project.dashboard.toml # default when sitting at a git repo root with no repo-side override
├── cache/
├── store/
└── trust.toml
# per-project override (walk-up lookup target)
./.splashboard/dashboard.toml
./.splashboard.toml # shorthand (loaded directly as a dashboard)
home.dashboard.toml / project.dashboard.toml / dashboard.toml share the same schema (widgets + rows).
Dashboard resolution logic
Design principle: only render the project-specific splash when sitting at the root of that project. Otherwise it gets annoying firing on every subdirectory.
At startup (and on --on-cd), decide in this order:
- walk-up local (direct only): if CWD directly has
./.splashboard/dashboard.tomlor./.splashboard.toml→ render it. - project root: if (1) misses and the repo root returned by
gix::discover(cwd)equals CWD (= CWD is the repo top) → render$HOME/.splashboard/project.dashboard.toml. - home: if all of the above miss →
$HOME/.splashboard/home.dashboard.toml.
Key properties:
- (2) does not hit in subdirectories.
cdintosrc/ordocs/and CWD doesn't match repo root, so "nothing happens" (silent exit on--on-cd). - walk-up stays "direct only" for per-dir config. A parent dir's
.splashboard/doesn't render in a subdirectory. Matches the current--on-cdbehavior. $HOMEexception: for people who keep dotfiles in a git repo at$HOME,CWD == $HOMEskips the git check and forces home.
Settings is always at HOME — per-dir settings override is out of scope for 0.x.
Migration
Breaking change within 0.x. The old config.toml is supported for one release:
- If
$HOME/.splashboard/config.tomlexists, on first launch:- Extract
[general]+[theme]intosettings.toml. - Extract widgets + rows into
home.dashboard.toml. - Rename
config.tomltoconfig.toml.bak. - stderr: "migrated".
- Extract
- For per-dir
./.splashboard/config.toml: suggest renaming to./.splashboard/dashboard.toml(non-destructive — old name still readable but warns). - Drop
config.tomlsupport one release later (targeted 0.2.0).
Definition of Done
- Split
src/config.rsintoSettingsConfig+DashboardConfig -
src/paths.rs:settings_path()/home_dashboard_path()/project_dashboard_path()+ walk-up impl - Dashboard resolution (direct-local → git-root-match → home fallback + $HOME exception)
- Old-
config.tomlmigration + deprecation warning - Split the baked default into
default_home_dashboard.toml+default_project_dashboard.toml+default_settings.toml - Rename the dogfood
./.splashboard/config.tomlto./.splashboard/dashboard.toml - Update the Configuration page in docs (docs: expand docs-site with guide section (Getting Started / Configuration / Presets / Themes / Trust / Cookbook) #78) to match
Out of scope
- Per-dir settings override
- Dashboard-file hot reload
- Non-git project detection (package.json / pyproject.toml, etc.)
- Multiple named dashboards (feat: per-project config variants (Dev / PM / ... selectable per user) #60)
Metadata
Metadata
Assignees
Labels
featFeature enhancement
Activity
refactor(config): split settings.toml + dashboard.toml, resolve by CW…
Merge pull request #85 from unhappychoice/feat/split-settings-dashboard