Repository navigation
feat(but): add experimental light theme - #13446
Merged
Merged
Conversation
slarse
force-pushed
the
GB-1305/but-light
branch
from
April 21, 2026 20:01
5fb2efa to
2f43516
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an experimental light theme option to the but CLI/TUI, toggled via the EXPERIMENTAL_BUT_LIGHT_THEME environment variable, including a matching light syntax-highlighting theme for the TUI details diff view.
Changes:
- Switch
Theme::default()to choose between dark/light palettes based onEXPERIMENTAL_BUT_LIGHT_THEME, and introducedefault_dark()/default_light()builders. - Add a light Syntect theme (
Monokai Extended Light.tmTheme) and select it for syntax highlighting in the TUI details view when the env var is set. - Adjust white/gray foreground/background mapping for ANSI styling output.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
crates/but/src/theme.rs |
Adds light theme defaults and selects light/dark palette at runtime via env var. |
crates/but/src/command/legacy/status/tui/details/mod.rs |
Adds light syntax theme asset loading and switches Syntect theme selection based on env var. |
crates/but/assets/syntax-highlighting-themes/Monokai Extended Light.tmTheme |
New light syntax-highlighting theme asset. |
crates/but/assets/syntax-highlighting-themes/Monokai Extended License |
Updates license notice to cover both dark and light theme files. |
The theme is activated by defining the environment variable EXPERIMENTAL_BUT_LIGHT_THEME with any value. The reason it is prefixed "EXPERIMENTAL" is that this isn't the way we want to enable the theme, it's just a temporary way of enabling it.
slarse
force-pushed
the
GB-1305/but-light
branch
from
April 21, 2026 20:10
2f43516 to
741ceaf
Compare
slarse
enabled auto-merge
April 21, 2026 20:17
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.
The theme is activated by defining the environment variable EXPERIMENTAL_BUT_LIGHT_THEME with any value. The reason it is prefixed "EXPERIMENTAL" is that this isn't the way we want to enable the theme, it's just a temporary way of enabling it.
To justify the need for this, here's the dark theme on a light background:
And here's the light theme on light background:
There are most certainly small pieces I've missed, but this at least makes the TUI significantly more usable on a light background. While not very evident from the screenshots, the context lines of the diff view were entirely invisible, for one.