feat: paint the TUI from the theme and route first runs into setup - #57
feat: paint the TUI from the theme and route first runs into setup#57N4M3Z wants to merge 1 commit into
Conversation
The TUI palette now derives from the resolved theme: the five tones carry the meaning and a light flag on each theme picks light or dark surfaces, so a light theme restyles the TUI without a second setting. The status bar shows the deck name, the bound target, and one glyph per enabled provider state. When the scan finds no deck and no modules, a first-run panel replaces the list and names rune setup, rune config set deck, and rune tui --source. The help overlay names its close keys and the version. Closes tasks 1.5 and 2.3 of the herdr-theme-system change. Decision: CLI-0036. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01Fds3tf5rS1Ep47q5DGhsr3
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a new first-run TUI workflow and startup provider/target detection while replacing styling across many existing TUI surfaces. The resulting user-facing and startup behavior changes are broader than a small isolated UI adjustment. Notes:
You can add or adjust custom eligibility rules. Learn more. |
| /// The scan finished and found neither a deck nor modules: the first-run | ||
| /// state, which routes into setup instead of an empty list. | ||
| fn is_first_run(&self) -> bool { | ||
| self.scan_state != ScanState::Loading |
There was a problem hiding this comment.
🚫 [runeseer] reported by reviewdog 🐶
High — A failed scan leaves the view empty with scan_state back at Idle, so is_first_run reports true and the TUI tells the user there is no deck instead of showing the scan error.
src/tui/app.rs:884the scan-error arm setsscan_state = ScanState::Idleand stores the message inpalette_errorwhileself.viewstays the empty dashboard.src/tui/app.rs:1437the first-run footer replacesfooter_text(), the only reader ofpalette_error, so the stored error never reaches the screen.
Runeseer review — 1 open finding
Request changes. A scan that fails ends with an empty view and an idle scan state, so the new first-run panel claims there is no deck and the recorded scan error never reaches the screen.
1 open · Reviewed |
|
@N4M3Z, the following findings block this head:
Choose one action:
|
Paint the TUI from the resolved theme, show the workspace facts in the status bar, and route an unconfigured root into setup.
src/tui/styles.rs: onePalettederived fromtheme::current(); the five tones carry the meaning and a newlightflag on each theme picks light or dark surfaces. Accessor functions replace the constants; every namedColor::in the TUI goes through them.✓current,↑outdated,✗needs repair,~modified,·not installed). Detection runs once at load through the shared registry.rune setup,rune config set deck,rune tui --source; the footer points at setup.tui-first-run, decision CLI-0036.Verified with
rune tui --snapshoton an empty root and on the deck. 1365 tests, clippy clean.Release Notes
rune setupwhen no deck is configuredhttps://claude.ai/code/session_01Fds3tf5rS1Ep47q5DGhsr3
Note
Derive TUI styles from theme palette and add first-run setup panel
Palettestruct in styles.rs that maps the current theme to light/dark TUI colors. Replaces hardcoded colors across all TUI renderers with shared palette accessors.light_backgroundflag toThemeTonesin theme.rs to drive palette surface and text roles.Palette::from_themebranches and renderer migrations in app.rs.Macroscope summarized 972e088.