Skip to content

fix(tui): render correctly under Windows Terminal / WSL - #2

Closed
Gautham (ahgamut) wants to merge 1 commit into
elide-dev:aurafrom
ahgamut:wsl-render-fixes
Closed

fix(tui): render correctly under Windows Terminal / WSL#2
Gautham (ahgamut) wants to merge 1 commit into
elide-dev:aurafrom
ahgamut:wsl-render-fixes

Conversation

@ahgamut

Copy link
Copy Markdown

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-256color inside Windows Terminal, and the italics didn't look nice.

Testing


  • bun check passes
  • Tested locally
  • CHANGELOG updated (if user-facing)

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.
@ahgamut

Copy link
Copy Markdown
Author

will open new PR with correct perms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants