Skip to content

Emulate terminal dim as a muted gray instead of dropping it#657

Merged
h0x91b merged 1 commit into
mainfrom
fix/dev3-ansi-dim-emulate
Jun 15, 2026
Merged

Emulate terminal dim as a muted gray instead of dropping it#657
h0x91b merged 1 commit into
mainfrom
fix/dev3-ansi-dim-emulate

Conversation

@h0x91b

@h0x91b h0x91b commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Follow-up to Fix unreadable dim text in Claude Code select prompts (dark theme) #655. Dropping the terminal dim attribute entirely (so unreadable muted text became legible) regressed the input ghost/placeholder suggestion: it rendered at full intensity and looked like already-typed input.
  • Dim over the default foreground is now emulated as an explicit muted gray (dark rgb(112,120,150), light rgb(130,130,130)) — readable yet clearly secondary, so placeholder/ghost text, select-prompt descriptions, recap and hints all read correctly in both themes.
  • The dim is resolved at SGR sequence end and emulated only when no explicit fg accompanies it (a color still wins); reset by SGR 0 and SGR 22.

Verified live in the dark theme. Covered by updated unit tests in ansi-theme-adapt.test.ts; module doc comment and decision record 066 updated.

Dropping dim entirely (so unreadable muted text became legible) made the
input ghost/placeholder suggestion render at full intensity, looking like
already-typed input. Dim over the default foreground is now substituted
with an explicit muted gray (dark rgb(112,120,150), light rgb(130,130,130)):
readable yet clearly secondary. The dim is resolved at SGR sequence end and
emulated only when no explicit fg accompanies it (a color still wins);
reset by SGR 0 and SGR 22.
@h0x91b h0x91b enabled auto-merge (squash) June 15, 2026 09:38
@h0x91b h0x91b merged commit 061da49 into main Jun 15, 2026
4 checks passed
@h0x91b h0x91b deleted the fix/dev3-ansi-dim-emulate branch June 15, 2026 09:39
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.

1 participant