Repository navigation
feat(tui): ink is the truecolor default theme with terminal as the ANSI fallback (U5) - #110
Merged
Merged
Conversation
…SI fallback (U5) Slice U5 of docs/plans/tui-redesign.md (ENG-851). ADR 0036. The compiled ANSI palette is renamed `terminal` and stays selectable. When no theme is set, or `theme: "qq"` is, the composition root's one-time COLORTERM read (`truecolor`/`24bit`, case-insensitive) picks `ink` or `terminal`; `qq` is an alias for that rule, not a third palette. Explicit names always win: `terminal` on a truecolor terminal and `ink` without one are honored as written. The picker lists `ink` and `terminal`, never `qq`, and marks the resolved default active. Goldens and bench unchanged.
Collaborator
Author
|
Linear: ENG-851. Stacked: #111 (U6) targets this branch; retarget to main after merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
U5:
inkis the truecolor default theme;terminalis the ANSI fallbackSpec: docs/plans/tui-redesign.md#s6-default-theme (decision D1) ADR:
docs/adr/0036-truecolor-default-theme.mdLinear: ENG-851 (parent ENG-843)Targets
main.What changed
terminal(qq-configTERMINAL_THEME,qq-tuiTheme::terminal()/Palette::TERMINAL;Theme::default().name == "terminal"). It stays selectable.qq-config::theme::load): when the theme is unset or"qq", pickinkif truecolor is advertised, elseterminal. Truecolor =COLORTERMequalstruecoloror24bit(case-insensitive). Detection runs once in the composition root (src/main.rstruecolor_support(Option<&OsStr>)) at TUI startup and inconfig check;qq-tui/qq-confignever read env.theme: "terminal"on a truecolor terminal → terminal;theme: "ink"without truecolor → ink."qq"remains valid as an alias for the default rule, so existing configs behave the same or better. There is no third palette namedqq; discovery skips a user file namedqq.ron/terminal.ron.inkandterminal(neverqq); the active marker works when the theme came from the default rule. Gallery sortsinkfirst.docs/adr/README.mdindexed;root.mdreservation row updated.How verified
cargo test --workspace1680 passed: root 170 → 172, qq-config 89 → 90, qq-tui 289 → 290. fmt, clippy-D warnings.qq× truecolor/24bit/none → ink/terminal; explicitterminalandinkwin regardless),terminalresolves to the compiled palette, every shipped theme loads,Theme::default()name, picker contents and active marker.Measurements
Bench-neutral:
steady_state_frame22.0 µs,golden_path39.4,keystroke26.8,run_on_32kb417.6 (core 2). The harness still runs onTheme::default(), the same ANSI palette under its new name, so it measures the same layout on the same colors.Design notes
ink.ronkeeps nosyntaxblock: its derived roles already use only its own palette.README.mdexample changed fromtheme: "qq"to"ink"with one sentence on the default; it was the last user-facing text implyingqqwas a palette.Docs
docs/design/theme.md§§ Defaults, Selection rule, Shipped Themes, Theme Picker, runtime model. ADR 0036. Ledger receipt.Compatibility
theme: "qq"keeps working (alias). Users on non-truecolor terminals seeterminal, which is what they had. PROTOCOL / DESCRIPTOR / schema: unchanged.