fix(tui): render correctly under Windows Terminal / WSL - #2
Closed
Gautham (ahgamut) wants to merge 1 commit into
Closed
fix(tui): render correctly under Windows Terminal / WSL#2Gautham (ahgamut) wants to merge 1 commit into
Gautham (ahgamut) wants to merge 1 commit into
Conversation
Detect WT_SESSION as a truecolor terminal in detectTerminalId so TERMINAL.trueColor agrees with the color-mode and synchronized-output detectors, fixing dull/quantized markdown swatches, LaTeX colors, and the welcome brand gradient under WSL where COLORTERM is not forwarded. Default tui.scrollbackRebuild on for ConPTY hosts (native Windows and WSL) so a scrolled-off live preview no longer leaves a duplicate above its committed final form; an explicit setting still overrides. Suppress SGR 3 (italic) under screen-family terminfo. GNU screen and tmux's screen-256color default lack `sitm`, so the multiplexer substitutes standout/reverse and paints a solid inverse block over the welcome tip, thinking traces, blockquotes, and markdown emphasis. Resolve TERMINAL.italic at runtime (with an explicit user override) and route theme italics through it, emitting plain text where slanted text is unavailable.
Sam Gammon (sgammon)
approved these changes
Aug 1, 2026
Author
|
will open new PR with correct perms |
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.
What
Detect WT_SESSION as a truecolor terminal in detectTerminalId so TERMINAL.trueColor agrees with the color-mode and synchronized-output detectors, fixing dull/quantized markdown swatches, LaTeX colors, and the welcome brand gradient under WSL where COLORTERM is not forwarded.
Default tui.scrollbackRebuild on for ConPTY hosts (native Windows and WSL) so a scrolled-off live preview no longer leaves a duplicate above its committed final form; an explicit setting still overrides.
Suppress SGR 3 (italic) under screen-family terminfo. GNU screen and tmux's screen-256color default lack
sitm, so the multiplexer substitutes standout/reverse and paints a solid inverse block over the welcome tip, thinking traces, blockquotes, and markdown emphasis. Resolve TERMINAL.italic at runtime (with an explicit user override) and route theme italics through it, emitting plain text where slanted text is unavailable.Why
I was using tmux with
TERM=screen-256colorinside Windows Terminal, and the italics didn't look nice.Testing
bun checkpasses