feat(tui): add automatic light theme selection - #1217
Open
TheGreatAxios wants to merge 2 commits into
Open
TheGreatAxios wants to merge 2 commits into
TheGreatAxios wants to merge 2 commits into
Conversation
TheGreatAxios
force-pushed
the
cl-8993-light-palette
branch
2 times, most recently
from
September 28, 2026 18:33
b242e76 to
ae1055b
Compare
TheGreatAxios
force-pushed
the
cl-8993-light-palette
branch
from
September 28, 2026 18:37
ae1055b to
72253d8
Compare
TheGreatAxios
commented
Sep 28, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Critic review — exact head 72253d8b62fe9ed3a95b84b0ee84e87425ee9414
Verdict: no residual blockers; ready to merge from the behavioral/correctness review lane.
Historical blocker map:
- Closed: no eager production module-init
UI/semantic color snapshots. An AST probe over all productionsrc/tui/**/*.tsfound none; lockup ramps are deferred closures, MCP tones resolve through liveUIroles, and prompt/markdown native style caches are keyed byUI.name. - Closed: rendered contrast and dynamic styling. Focused renderer tests passed for lockup and MCP; MCP warning/error/status tones rendered in both light and dark at >=4.5:1. Stream/diff/tool detail roles resolve after theme selection, and a direct dark-to-light prompt cache probe rendered
#8f4f16as the light action color. - Closed: semantic palette behavior. Direct probes verified stable palette and entry identity, truthful
Object.keys/Object.entries/property descriptors, and continued nested entry updates afterObject.freeze(palette). - Closed: truecolor and ANSI-256 coverage, warning hierarchy, and shared MCP warning/error semantics. The contrast matrix and hierarchy tests pass; MCP/plugin attention uses warning, meter 61–80 warning, and 81–100 error.
- Closed: startup selection and OSC claims.
runTUIresolves and applies the theme before session preparation and host mount; production has no OSC 11 query, anddocs/TUI.mdaccurately says so. - Closed: causal scope. The two-commit diff is limited to theme settings/detection, TUI palette consumers, tests, and TUI documentation.
Evidence:
- Focused review run: 168 passed, 0 failed across lockup, MCP, palette, theme, stream, diff, diff rows, and shell tests.
- Canonical
bun run checkin a clean isolated exact-head checkout: lint/typecheck/dead exports/build passed; guarded suite 8,630 passed, 0 failed. - Current PR head still matches the reviewed SHA; GitHub checks are green (the optional one-process pollution detector is skipped in CI, while the local canonical one-process suite passed).
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.
Summary
COLORFGBG, synchronous OS appearance, then dark fallback.#655275: 5.86:1 on#f7ead5, with CIE76 distances 48.07/53.97 from in-flight roles, 49.46 from heading, and 59.23 from error.Verification
bun run checkpasses with 8,630 tests across 553 files.bun test src/tui/lockup.test.ts src/tui/mcp-view.test.ts tests/unit/tui/theme.test.tspasses all 46 focused tests without forcingCOLORTERM.#ef766aon#3d2a28at 4.79:1 and ANSI203on52at 4.75:1; dark ANSI added is151on22at 4.99:1, text on pending is252on24at 4.56:1, and text on success is252on22at 5.16:1.22on surface230at 7.79:1 and on added background194at 7.27:1. Brand/accent/live remain distinct at94/60/58; dark brand/accent/live are173/74/110.Fixes CL-8993