Repository navigation
Answer OSC 10/11 color queries so codex shades its logo to the background - #37
Merged
Merged
Conversation
…ound Codex asks the terminal for its foreground/background colors and shades each cell of its braille logo to the background when it gets an answer. Microhm answered nothing, so codex fell back to SGR 2 dim text, which renders much brighter than the subtle watermark macOS Terminal shows. The emulator now answers OSC 10/11 queries in xterm's rgb:RRRR/GGGG/BBBB form once setOscColors has been given the theme's colors, mirroring the CSI ? 996 n color-scheme pattern: only a client knows its theme, so the daemon never sets them and the queries reach the client. TerminalView pushes its default fg/bg on construction, theme change, and palette change.
Co-authored-by: ghosthack <ghosthack@users.noreply.github.com>
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.
Codex asks the terminal for its foreground/background colors (
OSC 10;?/OSC 11;?) and shades each cell of its braille logo to the background when it gets an answer. macOS Terminal answers; Microhm answered nothing, so codex fell back toSGR 2dim text, which renders much brighter than the subtle watermark Terminal shows.Verified by capturing codex 0.172.0's startup output in a pty: no reply produces the
ESC[2mdim fallback, while replying makes it emit per-cell dark truecolor (38;2;34;35;36, …).The emulator now answers OSC 10/11 queries in xterm's
rgb:RRRR/GGGG/BBBBform oncesetOscColorshas been given the theme's colors, mirroring theCSI ? 996 ncolor-scheme pattern: only a client knows its theme, so the daemon never sets them and the queries reach the client (the daemon already forwarded them).TerminalViewpushes its default fg/bg on construction, theme change, and palette change.Tests: OSC answered/unanswered/ignored cases in
TerminalEmulatorTest, theme/palette tracking inTerminalViewTest, reply-through-connection inSessionTerminalTest. Fullvtsuite (533) andapp.terminalpackage (146) pass.