Migrate all TUI colors to base16 palette#1542
Conversation
Introduce cmd/entire/cli/palette as the single source of truth for terminal colors (ANSI 0-15 plus semantic aliases) and route every lipgloss style, the agent display map, the recap label/activity colors, mdrender's non-chroma styling, and the huh form theme (ThemeBase16) through it. Primary accent is now magenta. Code-block chroma stays on hex (glamour's chroma parser rejects ANSI palette indices). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR standardizes Entire’s TUI/terminal styling by migrating nearly all UI colors to a shared base16 (ANSI 0–15) palette, ensuring consistent theming that respects the user’s terminal color scheme.
Changes:
- Introduces a new dependency-free
palettepackage defining the 16 ANSI slots plus semantic aliases (Accent/Muted/Success/etc.). - Routes lipgloss- and glamour-based styling across multiple TUIs (status/activity/search/recap/review/dispatch/investigate/auth/core tables) through the shared palette.
- Updates recap golden assertions to match the new base16-derived ANSI escape sequences.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/uiform/uiform.go | Switches huh theme to base16 and updates theme documentation. |
| cmd/entire/cli/status_style.go | Replaces hardcoded colors (including hex accent) with palette-based lipgloss colors. |
| cmd/entire/cli/search_tui.go | Moves search TUI accents and muted styles onto the shared palette. |
| cmd/entire/cli/review/tui_model.go | Updates spinner styling to use palette muted color. |
| cmd/entire/cli/recap/styles.go | Replaces recap style constants with palette values. |
| cmd/entire/cli/recap/static_server_test.go | Updates ANSI escape expectations to match base16 palette output. |
| cmd/entire/cli/recap_tui.go | Updates footer/help styling to palette muted color (with faint/bold for hierarchy). |
| cmd/entire/cli/palette/palette.go | Adds the shared base16 palette slots and semantic aliases. |
| cmd/entire/cli/mdrender/mdrender.go | Routes markdown (non-chroma) styling through base16 palette; documents chroma hex exception. |
| cmd/entire/cli/investigate/tui_model.go | Updates spinner styling to palette muted color. |
| cmd/entire/cli/explain.go | Updates checkpoint header accent color to palette Accent. |
| cmd/entire/cli/dispatch_tui.go | Updates dispatch TUI status styles (title/subtitle/spinner) to palette colors. |
| cmd/entire/cli/corecmd.go | Updates core table styles (header/cell/primary) to palette colors. |
| cmd/entire/cli/auth.go | Updates auth table styles (header/id) to palette colors. |
| cmd/entire/cli/activity_tui.go | Updates activity TUI spinner/footer and core styles to palette colors. |
| cmd/entire/cli/activity_render.go | Converts agent display colors from hex/256-color to base16 palette slots. |
| const ( | ||
| searchAccentOrange = "#fb923c" // matches agentDisplayMap["claude"] in activity_render.go | ||
| searchAccentPurple = "#c084fc" // matches agentDisplayMap["kiro"] in activity_render.go | ||
| searchAccentBlue = "#60a5fa" // matches agentDisplayMap["gemini"] in activity_render.go | ||
| searchAccent = palette.Accent // matches agentDisplayMap["claude"] in activity_render.go | ||
| searchDetailAccent = palette.BrightMagenta // matches agentDisplayMap["kiro"] in activity_render.go | ||
| searchLinkAccent = palette.Blue // matches agentDisplayMap["gemini"] in activity_render.go | ||
| ) |
| // Agent colors match the dark-mode CSS variables from entire.io (Tailwind 400-level). | ||
| // Lipgloss resolves hex to the best representation for the terminal's color profile. | ||
| // Agent colors are distinct base16 slots so bar charts stay legible across | ||
| // agents. Claude takes the primary accent; the rest fan out across the palette. | ||
| var agentDisplayMap = map[string]agentDisplay{ | ||
| "claude": {Label: "Claude Code", Color: "#fb923c", Char: '▓'}, // orange-400 | ||
| "gemini": {Label: "Gemini", Color: "#60a5fa", Char: '▓'}, // blue-400 | ||
| "amp": {Label: "Amp", Color: "#f87171", Char: '▓'}, // red-400 | ||
| "codex": {Label: "Codex", Color: "#818cf8", Char: '▓'}, // indigo-400 | ||
| "opencode": {Label: "OpenCode", Color: "#22d3ee", Char: '▓'}, // cyan-400 | ||
| "copilot": {Label: "Copilot", Color: "#a78bfa", Char: '▓'}, // violet-400 | ||
| "pi": {Label: "Pi", Color: "#fbbf24", Char: '▓'}, // amber-400 | ||
| "cursor": {Label: "Cursor", Color: "#38bdf8", Char: '▓'}, // sky-400 | ||
| "droid": {Label: "Droid", Color: "#f472b6", Char: '▓'}, // pink-400 | ||
| "kiro": {Label: "Kiro", Color: "#c084fc", Char: '▓'}, // purple-400 | ||
| "unknown": {Label: "Unknown", Color: "245", Char: '░'}, |
There was a problem hiding this comment.
I think for these we have to make an exception.
- Restore per-agent brand colors (agentDisplayMap) as hex: base16 has fewer distinct hues than agents, so collapsing them made bar charts illegible. Documented as a deliberate exception alongside the mdrender chroma block. - Customize the huh form theme (uiform.Theme): magenta selection pointer and chosen options; titles and unselected options left unstyled so they inherit the terminal's default foreground. - Make "primary text" inherit the default foreground instead of pinning white (activity repo names, core table primary cell, mdrender body/heading text). A pinned slot (black "7"/white) can't invert and disappears on the opposite background; the default fg inverts like the terminal's own text. - Drop the palette.Primary alias (primary text should be unstyled, not pinned) and refresh stale "orange" comments to "accent/magenta". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Entire-Checkpoint: fdbf89042374
…por/base-16-colors
The experts command (plain output + interactive TUI) was missed by the base16 migration and still carried its own Tailwind-400 hex colors (#fb923c, #22d3ee, #818cf8) and extended 256-color codes (245, 241), so it ignored the user's terminal theme. Route every experts style through cmd/entire/cli/palette: - orange accent (title/agent/bullet/selected/section) -> palette.Accent (magenta) - cyan (label/file) -> palette.Info - indigo (facet) -> palette.Blue - grays 8/241/245 -> palette.Muted, with Faint(true) for the dimmest help tier Update the self-contained TestRenderExpertsWithStylesUsesEntirePalette fixture to the palette constants so the assertion matches the migration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Entire-Checkpoint: 891898a2f93d
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 96ade85. Configure here.
Migrate entire experts to base16 palette
ThemeBase16 copies Focused into Blurred wholesale, so clearing the foreground only on Focused.Title/Group.Title/Focused.UnselectedOption left the Blurred variants pinned to base16 slots (title 8, unselected option 7). Inactive fields in multi-field forms (e.g. review --edit pickers) rendered with those pinned colors and couldn't invert with the terminal background. Clear Blurred.Title and Blurred.UnselectedOption as well so inactive-field text inherits the terminal default, matching the buttons which already set both Focused and Blurred variants. Adds a regression test over the theme's blurred/focused/group foreground state for both dark and light. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Entire-Checkpoint: 0eb7ac1654c1

What
Restrict TUI colors to the base16 (ANSI 0–15) palette so the UI respects the user's terminal theme and stays internally consistent. Colors were previously a mix of base16 codes, extended 256-color codes (
214,240–245,170, …), and Tailwind-400 hex strings re-typed independently in every command file.How
cmd/entire/cli/palettepackage — single source of truth: the 16 ANSI slots as dependency-free string constants plus semantic aliases (Accent,Muted,Success,Error,Warning,Info). Plain strings, so any package imports it without cycles.lipglossstyle, recap label/activity colors, andmdrender's non-chroma styling through the palette.240/241/243/245) collapse toMuted(bright black8); dimmest tier usesFaint(true).uiform.Theme): derived fromhuh.ThemeBase16— magenta selection pointer + chosen options; titles and unselected options left unstyled so they use the terminal's default foreground.Inverting vs pinned colors
"Primary/body text" is deliberately left unstyled (no
Foreground) so it inherits the terminal's default text color, which inverts with the background. Pinning a slot — white (7) or black (0) — can't invert and disappears on the opposite background. This applies to form titles/unselected options, activity repo names, the core table primary cell, andmdrenderbody/heading text. There's intentionally nopalette.Primaryalias, to steer callers away from pinning primary text.Two hex exceptions
Not everything can be base16:
agentDisplayMap) — there are more agents than base16 has distinct hues, so collapsing them makes bar charts/legends illegible. Kept as the per-agent brand hexes.mdrenderchroma) — glamour parses chroma colors through the chroma library, which only accepts#rrggbband panics on ANSI indices.Both are documented inline.
Verification
mise run fmt && mise run lint— clean (0 issues)go build ./...— passesgo test ./...— 7002 pass, 3 skipped. Two golden-style recap tests that hardcoded old 256-color escapes were updated to the new base16 SGR codes.entire status,entire activity,entire search,entire recap, a markdown path (entire review/entire dispatch), and huh pickers (entire agent) — confirm titles/primary text and repo names stay readable in each mode.🤖 Generated with Claude Code
Note
Low Risk
Presentation-only color and theme changes with no auth or data-path logic; residual risk is visual regressions on some terminals (light/dark) rather than functional breakage.
Overview
Introduces
cmd/entire/cli/paletteas the shared source for terminal colors (ANSI 0–15 slots plus semantic aliases likeAccent,Muted,Success,Error). Call sites across activity, auth, core tables, dispatch, explain/status, search, recap, investigate/review TUIs,mdrender, anduiformnow use those constants instead of ad hoc"8",240–245, and Tailwind hex.The primary brand accent shifts from orange to magenta (
palette.Accent) for checkpoints, spinners, H1/list accents, and similar UI. Secondary grays collapse toMutedwithFaint(true)where appropriate. Body/primary text is often left unstyled (no pinned foreground) so repo names, table primary cells, and markdown body text follow the terminal default and stay readable on light and dark themes.uiform.Thememoves off Dracula tohuh.ThemeBase16with magenta selection and theme-inverting titles/buttons.mdrenderheadings/links use the palette; code-block chroma stays hex (glamour/chroma limitation). Agent bar-chart colors stay per-agent brand hex with documented rationale; only the unknown agent usespalette.Muted. Recap golden tests were updated for new SGR sequences.Reviewed by Cursor Bugbot for commit 96ade85. Configure here.