Skip to content

Sonny: one visual system across every terminal theme - #405

Merged
lydakis merged 4 commits into
mainfrom
claude/project-thread-10vmuw
Oct 30, 2026
Merged

lydakis merged 4 commits into
mainfrom
claude/project-thread-10vmuw

Conversation

@lydakis

@lydakis lydakis commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Applies the visual system George approved on 30 Oct: the 16 colors still carry one meaning each, color repeats what a mark already says, and what Sonny computes for itself starts from the terminal's own theme colors. Sonny only; the daemon is untouched.

What changes

Rule fixes (one meaning per hue)

  • "needs you" is a yellow ● in /status too (was magenta ◐); waiting, queued and rate-limited ◌ are dim, not yellow.
  • Yellow leaves things that do not need you: footer and /background notices, margin ✎ marks, ask option numbers, the pane's jumped-to line number (now reversed).
  • Green leaves things that did not "work": the quote bar (dim), " · recommended" and "Why N:" (dim).
  • Magenta leaves the subscription ◎; cyan leaves the picker › (bold, as other pickers) and the trigger ↻; blue leaves the git rename letter.
  • Failures keep a red mark and keep their words in the text color: refusal reasons under a call, declared-tool errors, /config and MCP errors (✗ …).
  • The welcome's slash commands are cyan, not a fixed truecolor amber that read at 1.7:1 on white.

Muted text from the theme (look.rs, term.rs)

  • Sonny now also asks for the foreground (OSC 10) and the theme's red and green (OSC 4;1, 4;2) in the start-up probe it already sends.
  • Dim text in the default color is drawn as a gray blended from that foreground and background, 4.5:1 where the theme allows (three quarters of the theme's own text contrast in low-contrast themes, so muted still differs). This follows Codex's secondary_text_style. A terminal that does not answer keeps SGR dim, and so does a theme that switched since start.

Diffs

  • A - or + beside the bar, so a diff reads without color and with red-green color blindness.
  • Tints are blended from the reported background and the theme's own red and green. The fixed dark and light palettes remain for terminals that do not answer.

NO_COLOR (no-color.org)

  • Set and not empty: no foreground or background color is drawn, and bold, dim, underline and reverse stay. The find highlight is reversed and the welcome portrait is left out. Picture placeholders keep their color, which is how Kitty names the image.

Markdown is prose

  • Headings are bold with their # marks dim, so the level shows (Codex keeps the marks too). They have no hue: blue is for agents. HTML <h1>–<h6> match.

Screenshots

Real Sonny from this branch running a scripted model, replayed into xterm.js with each theme. Each "after" was recorded with Sonny reading that theme's own colors.

Solarized Dark
Terminal Basic
Deuteranopia simulation
NO_COLOR

Not changed

  • The /usage chart keeps magenta, cyan and blue for its three stacked series. A stacked bar needs three fills, and there are no three neutral shades that read in every theme. The legend names each series.
  • Syntax highlighting (bat's ansi theme), git status letters and the black-on-yellow find highlight follow their own conventions.

Tests

cargo test -p sonny passes 472 tests, and cargo clippy -p sonny --all-targets -D warnings and cargo fmt --check are clean. New tests cover:

  • the muted gray's contrast floor across three themes
  • how the frame treats dim, colored and background cells under the muted gray and under NO_COLOR
  • parsing the OSC 10, 11 and 4 answers

Diff, heading and status tests are updated for the -/+ column, the # marks and ●.

@lydakis lydakis self-assigned this Oct 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T02:36:11.478955Z 15e059d New commits
🔒 Security Review ✅ Completed 2026-10-30T02:36:16.505127Z 15e059d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4ca8407cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sonny/src/look.rs Resolved
Comment thread sonny/src/look.rs Resolved

lydakis commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 5fe12f6c25

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 5fe12f6c25

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Color repeats what a mark already says, and each of the 16 colors keeps
one meaning: yellow is only what needs you (needs you is a yellow ● in
/status too; queued, notices, note marks and ask numbers lose it), green
only what worked (no green quote bar, "recommended" or "Why N:"),
magenta only you, blue only agents (no blue git rename). Failures keep a
red mark and their words in the text color. The welcome's commands are
cyan instead of a fixed amber that read at 1.7:1 on white.

Dim text is a gray worked out from the theme's own foreground and
background (OSC 10 and 11, asked at start), 4.5:1 where the theme
allows, as Codex draws its secondary text; a terminal that does not say
keeps SGR dim. Diffs carry a - or + beside the bar and tint from the
theme's background and its own red and green (OSC 4). NO_COLOR is
honored: no color, attributes kept, the find highlight reversed and the
portrait left out. Markdown is prose: headings bold with their # marks
dim, no hue.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGGoDWwmZ3vbZxuMGcn
@lydakis
lydakis force-pushed the claude/project-thread-10vmuw branch from 5fe12f6 to 15e059d Compare October 30, 2026 02:33
@lydakis
lydakis merged commit 7c329ef into main Oct 30, 2026
4 checks passed
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