Skip to content

Add chat contrast and "Match terminal interface" - #25659

Merged
brennanb2025 merged 18 commits into
mainfrom
brennanb2025/native-chat-contrast-terminal-match
Oct 6, 2026
Merged

brennanb2025 merged 18 commits into
mainfrom
brennanb2025/native-chat-contrast-terminal-match

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1216 $\color{#cf222e}{\Huge{\mathbf{−}}}$​56 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1160
Prod 24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​661 $\color{#cf222e}{\Huge{\mathbf{−}}}$​180 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​481

ELI5

Native chat's softer text had fixed contrast, and its appearance could not follow the terminal interface. This adds a Contrast slider and “Match terminal interface” switch on the Chat settings page. Matching uses the terminal font and text size for body and code, terminal colors, and full-strength body text.

What Changed

  • Matching disables Contrast, Text size and Code text size, with one short explanation beside each. Hovering any of the three also shows a tooltip: “Matching your terminal interface. Turn off Match terminal interface to change this.” Width remains adjustable and has no tooltip; with matching off, none of the controls has one.
  • Saved chat contrast and sizes return when matching is off. Chat size commands preserve those choices while matching is on and do not zoom the window.
  • Shared appearance calculations derive fonts, sizes, colors and row measurements from existing settings, including live terminal changes. Both chat renderers use the same store selection; there is no second saved effective appearance.
  • Contrast ranges from 50–150 when matching is off. Code uses the terminal font. Tool summaries wrap up to two lines, while expanded tools retain their complete input. When a summary wraps, the terminal icon, check mark and chevron stay level with the first line and the second line starts under the first line's text, not under the icon.
  • Main's single Chat page, visibility gate, navigation/search targets, translations and separate failed/interrupted call counts are retained. Repeated appearance selection moved into one hook to keep the structured renderer within its existing line limit.

Why

Deriving appearance from terminal settings keeps chat current without overwriting saved chat choices or introducing a separate font and palette configuration. Sharing the existing selection also keeps the two chat renderers and row measurements consistent.

Linked Issue

N/A (maintainer)

Visual Proof

Latest changes (head 04518c1, before/after against the previous head 586ea47). Captured in a hidden local Electron window with an isolated profile and a seeded inert transcript; no agent commands ran. The two-line rows use 17-pixel chat text so the 80-character summary wraps.

Before: icon between the two lines After: icon and check on the first line
Two-line summary before Two-line summary after

Measured: the icon's center sat 13.8 px below the first line's center before (exactly between the lines) and 0 px after; the check mark is also 0 px after. Single-line rows are unchanged (same 31.6 px height, icon on the line). Light theme after

Hover: Text size Hover: Code text size Hover: Contrast
Text size tooltip Code text size tooltip Contrast tooltip

Chat appearance with matching on. With matching off, hovering each of the three controls shows no tooltip.

Earlier verification (remote macOS). Final production code was verified remotely on M4Air at 8dd4bca81623c417421432b399d7e8d472735090, compared with main at b75213100b5358bedb7e16b48afd30645e54de14 using the same inert sample. Final head 9fcd7748715077b48372b4cfa3fb9150335584b4 changes only palette test assertions; all production code is byte-identical to that verified build. These are full-window captures; no agent commands ran. Both narrow captures use a 619-pixel chat pane, 20-pixel body text and 16-pixel code text.

Main: one-line tool summary This change: up to two lines
Main narrow summary Updated narrow summary
Matching on: three controls disabled Matching off: saved choices restored
Matching on Matching off

Dark app with light terminal colors · Light app with dark terminal colors · Complete expanded command and end marker · Pointer release saved value

Testing

  • Latest-head hidden local Electron before/after for the first-line alignment and the three tooltips
  • Earlier remote macOS Electron verification and same-sample main comparison
  • Focused automated tests and scoped typechecks

Latest changes: the tool-run tests now check that the summary row aligns to its top and that each icon/check/chevron sits in a one-line-tall slot for wrapped and single-line summaries (4 of 5 fail with the source change reverted). The settings tests check the tooltip text on hover for each matched control, that Width has none, and that no tooltip appears with matching off. 169 native-chat tool-row tests, 68 settings tests and 54 localization tests passed, with the scoped web typecheck, lint and changed-code quality checks.

The behavioral implementation passed 115 focused tests and scoped web/node typechecks. Subsequent header integration passed 55 tests across three files; the move to main's Chat settings page passed 61 tests across seven files and the scoped web typecheck. The final shared-hook cleanup passed 39 tests across four files, the queued web typecheck, affected-file lint, changed-code quality, formatting and diff checks. Localization checks passed, and all existing values in all six main catalogs were retained.

Fresh source review covered all eight readiness areas without the counsel step and found no open proven P0/P1. The final narrow review confirmed that the shared hook preserves the settings inputs, styles and row metrics. Final-head PR Checks passed: static analysis/typecheck, all five Node 24 test shards, relay integration, Linux and Windows packaging, and the verification job. Mobile Checks also passed its verification job; mobile runtime tests were skipped. Other skipped platform/compatibility and end-to-end gates are not claimed as verified. The stale palette expectations found in the previous run were corrected with stronger full-strength foreground assertions; 33 targeted palette/style tests and the fresh narrow review passed.

Remote Electron QA on the identical production code passed all 16 current-build scenarios and all five applicable main comparison scenarios. It checked contrast 50/100/150 in light and dark, both opposite app/terminal schemes, live terminal font/size/theme changes, disabled controls and saved-value restoration, two-line 80-character summaries, complete 5000-character expanded input with bounded inner scrolling, and pointer release reaching saved settings. Both apps used isolated profiles and exited cleanly, with no recorded page or network errors. All 12 uploaded original images were downloaded, checked against their original hashes and dimensions, and inspected.

Keyboard/menu size no-op has unit coverage. Runtime keyboard/menu, same-preferences restart, simultaneous failed/interrupted-count geometry, the follow-up preview, and Windows/Linux/SSH/mobile UI were not exercised.

Review

The architecture challenge, full source review and subsequent focused integration reviews found no remaining proven P0/P1. The review fixes preserve saved choices during terminal matching, keep the independent code-color role, serialize settings updates, cap tool summaries at two lines and retain newer main behavior. Font matching in pop-up menus outside chat remains an approved cosmetic deferral; those menus keep app colors.

Agent skill upstream boundary

  • Not applicable; no upstream skill source is copied.

Notes

Head 7562c8bf05091870859b83db39becca7181dcb74 is based on main at 07981bd12ee738fe96bb2d5990cc385dc22c7d7d. Its only changes after the captured 04518c1 are a test-name rename for the anti-slop lint and the merge of main. Current main fails the scoped web typecheck in src/shared/structured-agent-session-live-turn.test.ts (from #25751); this PR does not touch that file or the type it uses.

Checklist

  • Problem, user-facing change, mechanism and reason explained
  • Latest-head before/after alignment and hover-tooltip screenshots attached; earlier matching on/off screenshots kept
  • Source review and eight-area readiness scan complete
  • Targeted implementation checks passed; compatibility and remote paths considered
  • Final-head CI jobs that ran passed; skipped gates disclosed

@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-contrast-terminal-match branch from dc86f8e to 5d3db3c Compare October 5, 2026 19:32
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-contrast-terminal-match branch 2 times, most recently from e8f8e48 to 5042029 Compare October 5, 2026 23:31
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-appearance-settings branch 2 times, most recently from 4f3a07a to d2c9dc5 Compare October 6, 2026 00:07
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-contrast-terminal-match branch from abfc971 to c78b547 Compare October 6, 2026 00:23
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-appearance-settings branch 2 times, most recently from 40947d8 to 696c88e Compare October 6, 2026 02:19
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-contrast-terminal-match branch 2 times, most recently from 4ee3ddd to bcf7b88 Compare October 6, 2026 03:46
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/native-chat-appearance-settings to main October 6, 2026 06:05
@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-contrast-terminal-match branch 3 times, most recently from 67fce01 to 39c7118 Compare October 6, 2026 08:05
@brennanb2025

brennanb2025 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Native chat's softer text had fixed contrast and did not follow the terminal interface. This change adds adjustable contrast and terminal matching on the Chat settings page. Matching uses the terminal font and size for body and code, terminal colors and full-strength body foreground. Contrast, Text size and Code text size become disabled with an explanation; Width stays adjustable. Saved choices return when matching is off, and chat-size commands preserve them while matching is on.

Review fixes retain the separate code-color role, serialize settings writes, keep tool summaries within two lines and preserve complete expanded commands. Main's Chat navigation/search/translations and separate failed/interrupted-call counts are retained. One shared appearance-store hook removed the CI line-limit failure without changing behavior. Pop-up font matching outside chat remains an approved cosmetic deferral; those menus keep app colors.

Reviewed final head 9fcd7748715077b48372b4cfa3fb9150335584b4, based on main b75213100b5358bedb7e16b48afd30645e54de14.

The behavioral implementation passed 115 focused tests and scoped web/node typechecks. Subsequent header integration passed 55 tests across three files; the move to main's Chat settings page passed 61 tests across seven files and the scoped web typecheck. The final shared-hook cleanup passed 39 tests across four files, the queued web typecheck, affected-file lint, changed-code quality, formatting and diff checks. Localization checks passed, and all existing values in all six main catalogs were retained.

Fresh source review covered all eight readiness areas without the counsel step and found no open proven P0/P1. The final narrow review confirmed that the shared hook preserves the settings inputs, styles and row metrics. Final-head PR Checks passed: static analysis/typecheck, all five Node 24 test shards, relay integration, Linux and Windows packaging, and the verification job. Mobile Checks also passed its verification job; mobile runtime tests were skipped. Other skipped platform/compatibility and end-to-end gates are not claimed as verified. The stale palette expectations found in the previous run were corrected with stronger full-strength foreground assertions; 33 targeted palette/style tests and the fresh narrow review passed.

Remote Electron QA on the identical production code passed all 16 current-build scenarios and all five applicable main comparison scenarios. It checked contrast 50/100/150 in light and dark, both opposite app/terminal schemes, live terminal font/size/theme changes, disabled controls and saved-value restoration, two-line 80-character summaries, complete 5000-character expanded input with bounded inner scrolling, and pointer release reaching saved settings. Both apps used isolated profiles and exited cleanly, with no recorded page or network errors. All 12 uploaded original images were downloaded, checked against their original hashes and dimensions, and inspected.

Keyboard/menu size no-op has unit coverage. Runtime keyboard/menu, same-preferences restart, simultaneous failed/interrupted-count geometry, the follow-up preview, and Windows/Linux/SSH/mobile UI were not exercised.

The PR remains draft and mergeable, with auto-merge unset. Readiness belongs to the owner.

Final production code was verified remotely on M4Air at 8dd4bca81623c417421432b399d7e8d472735090, compared with main at b75213100b5358bedb7e16b48afd30645e54de14 using the same inert sample. Final head 9fcd7748715077b48372b4cfa3fb9150335584b4 changes only palette test assertions; all production code is byte-identical to that verified build. These are full-window captures; no agent commands ran. Both narrow captures use a 619-pixel chat pane, 20-pixel body text and 16-pixel code text.

Main: one-line tool summary This change: up to two lines
Main narrow summary Updated narrow summary
Matching on: three controls disabled Matching off: saved choices restored
Matching on Matching off

Dark app with light terminal colors · Light app with dark terminal colors · Complete expanded command and end marker · Pointer release saved value

Update after merging main (head 586ea477): main moved four commits, including the reasoning-row change in #19221, which conflicted in the row-height estimate. Both behaviors are kept: tool-run headers still estimate two lines at the chosen text size, and collapsed reasoning rows use main's one-line header estimate, now scaled with the chat text size (unchanged at the default size; one new test). No other code changed. Re-run after the merge: 417 tests in 39 files (every native-chat test main's new commits touched, plus this PR's appearance tests), the web typecheck, and the translation catalog check, all passing. The screenshots above remain valid: the merge did not change the appearance code they exercise.

Update (head 7562c8bf): two owner-requested changes.

  1. When a tool summary wraps to two lines, the terminal icon, check mark and chevron now stay level with the first line, and the second line starts under the first line's text instead of the icon sitting between the lines. Single-line rows are unchanged.
  2. With Match terminal interface on, hovering Contrast, Text size or Code text size shows a tooltip: "Matching your terminal interface. Turn off Match terminal interface to change this." Width has no tooltip, and with matching off none of the three has one. Disabled inputs don't fire hover events, so the tooltip sits on a wrapper around each control, as other disabled controls in the app do.

Captured before/after (586ea47 vs 04518c1) in a hidden local Electron window with an isolated profile and a seeded inert transcript; no agent commands ran. The rows use 17-pixel text so the 80-character summary wraps. Icon center offset from the first line: 13.8 px before, 0 px after; check mark 0 px after.

Before After
Before After
Text size Code text size Contrast
Text size tooltip Code text size tooltip Contrast tooltip

Checks: 169 native-chat tool-row tests, 68 settings tests and 54 localization tests, the scoped web typecheck, lint and changed-code quality passed on the change commits. The alignment tests fail on 4 of 5 cases with the source change reverted. After merging main at 07981bd1 and renaming one test parameter for the anti-slop lint, the anti-slop audit and the two touched test files pass. The scoped web typecheck now fails only in src/shared/structured-agent-session-live-turn.test.ts from main's #25751, a file this PR doesn't touch.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/native-chat-contrast-terminal-match branch from 39c7118 to 1b6a7a6 Compare October 6, 2026 11:41
…hat-contrast-terminal-match

# Conflicts:
#	src/renderer/src/components/native-chat/native-chat-row-height-estimate.ts
@brennanb2025
brennanb2025 marked this pull request as ready for review October 6, 2026 17:31
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9128054a-7d09-4d6c-98e6-69824e4f6927
📥 Commits

Reviewing files that changed from the base of the PR and between 842c6c6 and 586ea47.

📒 Files selected for processing (38)
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/native-chat/NativeChatResolvedView.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/NativeChatToolLine.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.appearance.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/components/native-chat/native-chat-appearance-palette.test.ts
  • src/renderer/src/components/native-chat/native-chat-appearance-style.test.ts
  • src/renderer/src/components/native-chat/native-chat-appearance-style.ts
  • src/renderer/src/components/native-chat/native-chat-appearance-write.test.ts
  • src/renderer/src/components/native-chat/native-chat-appearance.css
  • src/renderer/src/components/native-chat/native-chat-font-size.ts
  • src/renderer/src/components/native-chat/native-chat-row-height-estimate.test.ts
  • src/renderer/src/components/native-chat/native-chat-row-height-estimate.ts
  • src/renderer/src/components/native-chat/use-native-chat-appearance-style.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-font-size.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-row-typography.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-row-typography.ts
  • src/renderer/src/components/native-chat/use-native-chat-store-appearance-style.ts
  • src/renderer/src/components/settings/AppearanceChatContrastControls.draft.test.tsx
  • src/renderer/src/components/settings/AppearanceChatContrastControls.test.tsx
  • src/renderer/src/components/settings/AppearanceChatContrastControls.tsx
  • src/renderer/src/components/settings/AppearanceChatSection.test.tsx
  • src/renderer/src/components/settings/AppearanceChatSection.tsx
  • src/renderer/src/components/settings/ChatSettingsSection.test.tsx
  • src/renderer/src/components/settings/SettingsFormControls.tsx
  • src/renderer/src/components/settings/chat-appearance-search.ts
  • src/renderer/src/hooks/zoom-routing.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/native-chat-appearance-settings.test.ts
  • src/shared/native-chat-appearance-settings.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change adds chat contrast and terminal-interface matching settings. Native chat styling can resolve terminal colors and fonts, and the stylesheet derives chat colors from the active appearance. The settings section adds matching and contrast controls, search entries, and translations. Font-size actions respect terminal matching, tool-run summaries can wrap across two lines, and row-height estimates scale with typography.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 586ea

No identified issue blocks merging after normal checks. The combined failed/interrupted-count layout remains unverified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 30 files. (8 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the two main changes: adjustable chat contrast and matching the terminal interface.
Description check ✅ Passed The description covers the user-facing changes, rationale, linked-issue exception for maintainers, visual proof, testing, review, and checklist. It also identifies untested areas and skipped checks.
Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 30 files. (8 skipped: 8 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025
brennanb2025 marked this pull request as draft October 6, 2026 18:01
A wrapped two-line summary centered the leading icon, failure count, check,
and chevron between its lines. The header now top-aligns its items and gives
each mark a one-line-tall slot, so marks sit on line 1 and line 2 wraps under
the text.
While Match terminal interface is on, Contrast, Text size and Code text size
are disabled. Hovering any of them now shows a tooltip saying the chat is
matching the terminal interface and how to change it. Disabled controls drop
hover events, so an enabled wrapper carries the tooltip; with matching off the
controls render exactly as before.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 6, 2026 19:00
@brennanb2025
brennanb2025 merged commit 3268760 into main Oct 6, 2026
37 of 51 checks passed
pawel-kotowski added a commit to pawel-kotowski/orca that referenced this pull request Oct 6, 2026
…m main

Chat contrast (stablyai#25659) re-derives the chat palette on the appearance root from
--background, which glass clears in chat panes. Text and faint colors mixed
against transparent came out part-transparent, and each layer painting the
re-derived canvas laid a faint foreground veil over the glass. Resolve the
palette on the root against the solid theme surface and clear the canvas only
below it, so the glass tint is the one layer that paints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DennisHaijma pushed a commit to DennisHaijma/orca that referenced this pull request Oct 11, 2026
…m main

Chat contrast (stablyai#25659) re-derives the chat palette on the appearance root from
--background, which glass clears in chat panes. Text and faint colors mixed
against transparent came out part-transparent, and each layer painting the
re-derived canvas laid a faint foreground veil over the glass. Resolve the
palette on the root against the solid theme surface and clear the canvas only
below it, so the glass tint is the one layer that paints.

(cherry picked from commit 8c7a3cd)
pawel-kotowski added a commit to pawel-kotowski/orca that referenced this pull request Oct 12, 2026
…m main

Chat contrast (stablyai#25659) re-derives the chat palette on the appearance root from
--background, which glass clears in chat panes. Text and faint colors mixed
against transparent came out part-transparent, and each layer painting the
re-derived canvas laid a faint foreground veil over the glass. Resolve the
palette on the root against the solid theme surface and clear the canvas only
below it, so the glass tint is the one layer that paints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pawel-kotowski added a commit to pawel-kotowski/orca that referenced this pull request Oct 15, 2026
…m main

Chat contrast (stablyai#25659) re-derives the chat palette on the appearance root from
--background, which glass clears in chat panes. Text and faint colors mixed
against transparent came out part-transparent, and each layer painting the
re-derived canvas laid a faint foreground veil over the glass. Resolve the
palette on the root against the solid theme surface and clear the canvas only
below it, so the glass tint is the one layer that paints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pawel-kotowski added a commit to pawel-kotowski/orca that referenced this pull request Oct 19, 2026
…m main

Chat contrast (stablyai#25659) re-derives the chat palette on the appearance root from
--background, which glass clears in chat panes. Text and faint colors mixed
against transparent came out part-transparent, and each layer painting the
re-derived canvas laid a faint foreground veil over the glass. Resolve the
palette on the root against the solid theme surface and clear the canvas only
below it, so the glass tint is the one layer that paints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pawel-kotowski added a commit to pawel-kotowski/orca that referenced this pull request Oct 20, 2026
…m main

Chat contrast (stablyai#25659) re-derives the chat palette on the appearance root from
--background, which glass clears in chat panes. Text and faint colors mixed
against transparent came out part-transparent, and each layer painting the
re-derived canvas laid a faint foreground veil over the glass. Resolve the
palette on the root against the solid theme surface and clear the canvas only
below it, so the glass tint is the one layer that paints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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