fix(tui): render correctly under Windows Terminal / WSL - #3
Merged
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. Signed-off-by: Gautham Venkatasubramanian <gautham@elide.dev>
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.
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
auraunder Windows Terminal +tmuxwithTERM=screen-256color, and the tui italics didn't render nicely. Now it skips italics.Testing
bun checkpasses