TUI theme presets selectable from [tui] config #122

Closed
opened 2026-08-25 12:18:01 +01:00 by naps62-yolo · 1 comment
Collaborator

With the TUI's colours behind named roles, let the operator choose the values. Two parts.

Presets. Ship a handful of complete palettes, each supplying every role. They are Color::Rgb, so a preset's contrast is a property of the palette rather than of the user's terminal theme. Include one preset built from the 16 named ANSI colours as the escape hatch for terminals without truecolor, and for operators who would rather the TUI inherit their terminal's own theme. Name the presets for what they are, and pick a small set — a dark default, a light peer, and the ANSI one is a reasonable floor.

Config. [tui] in crates/maestro-config/src/lib.rs:153 gains a theme field naming a preset. Absent means the default preset, exactly as every other field in that file has a default. An unknown preset name is a config error the operator can read and fix, not a silent fallback to the default — a typo in a theme name should say so.

web/src/styles.css and DESIGN.md define the web's own token palette, and its dark theme is the closest thing this project has to a house look. The default TUI preset should read as the same product. This is not a request to port every token — the TUI has no gradients, no tints, and four activity colours — but the neutrals and the green "alive" accent should be recognisably the ones DESIGN.md specifies.

Tests: every preset supplies every role (a preset missing one should not compile, or should fail a test if the shape allows it), an unknown name in config is rejected with a message naming the field, and the default preset is selected when the field is absent.

Document the field and the preset names in docs/INSTALL.md alongside the other [tui] settings.

Non-goals: no user-defined palettes in config, no live theme switching from inside the TUI, no per-role overrides. A preset is chosen by name and that is all. Each of those is a reasonable follow-up and none of them is this issue.

Depends on: #118

With the TUI's colours behind named roles, let the operator choose the values. Two parts. **Presets.** Ship a handful of complete palettes, each supplying every role. They are `Color::Rgb`, so a preset's contrast is a property of the palette rather than of the user's terminal theme. Include one preset built from the 16 named ANSI colours as the escape hatch for terminals without truecolor, and for operators who would rather the TUI inherit their terminal's own theme. Name the presets for what they are, and pick a small set — a dark default, a light peer, and the ANSI one is a reasonable floor. **Config.** `[tui]` in `crates/maestro-config/src/lib.rs:153` gains a theme field naming a preset. Absent means the default preset, exactly as every other field in that file has a default. An unknown preset name is a config error the operator can read and fix, not a silent fallback to the default — a typo in a theme name should say so. `web/src/styles.css` and `DESIGN.md` define the web's own token palette, and its dark theme is the closest thing this project has to a house look. The default TUI preset should read as the same product. This is not a request to port every token — the TUI has no gradients, no tints, and four activity colours — but the neutrals and the green "alive" accent should be recognisably the ones `DESIGN.md` specifies. Tests: every preset supplies every role (a preset missing one should not compile, or should fail a test if the shape allows it), an unknown name in config is rejected with a message naming the field, and the default preset is selected when the field is absent. Document the field and the preset names in `docs/INSTALL.md` alongside the other `[tui]` settings. Non-goals: no user-defined palettes in config, no live theme switching from inside the TUI, no per-role overrides. A preset is chosen by name and that is all. Each of those is a reasonable follow-up and none of them is this issue. Depends on: #118
naps62-yolo added this to the TUI shell milestone 2026-08-25 12:18:01 +01:00
naps62-yolo added the area/tuidifficulty/mediumtype/feat labels 2026-08-25 12:18:01 +01:00
naps62-yolo added a new dependency 2026-08-25 12:18:57 +01:00
Author
Collaborator

Out-of-scope gate failure observed after the #122 changes: the full bash /home/naps62/.codex/skills/tracker-common/scripts/gate.sh -- just test run failed in crates/maestro-e2e/tests/e2e.rs::retained_store_survives_a_daemon_restart because /api/worktrees returned Connection reset by peer after restart. The scoped config/TUI tests, fmt, and clippy passed.

Out-of-scope gate failure observed after the #122 changes: the full `bash /home/naps62/.codex/skills/tracker-common/scripts/gate.sh -- just test` run failed in `crates/maestro-e2e/tests/e2e.rs::retained_store_survives_a_daemon_restart` because `/api/worktrees` returned `Connection reset by peer` after restart. The scoped config/TUI tests, fmt, and clippy passed.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#122