Repository navigation
Add chat contrast and "Match terminal interface" - #25659
Conversation
dc86f8e to
5d3db3c
Compare
e8f8e48 to
5042029
Compare
4f3a07a to
d2c9dc5
Compare
abfc971 to
c78b547
Compare
40947d8 to
696c88e
Compare
4ee3ddd to
bcf7b88
Compare
67fce01 to
39c7118
Compare
|
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 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
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 Update (head
Captured before/after (
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 |
39c7118 to
1b6a7a6
Compare
…hat-contrast-terminal-match # Conflicts: # src/renderer/src/components/native-chat/native-chat-row-height-estimate.ts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (38)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe 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 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)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
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. Comment |
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.
…hat-contrast-terminal-match
…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>
…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)
…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>
…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>
…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>
…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>









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
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 head586ea47). 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.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
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 atb75213100b5358bedb7e16b48afd30645e54de14using the same inert sample. Final head9fcd7748715077b48372b4cfa3fb9150335584b4changes 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.Dark app with light terminal colors · Light app with dark terminal colors · Complete expanded command and end marker · Pointer release saved value
Testing
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
Notes
Head
7562c8bf05091870859b83db39becca7181dcb74is based on main at07981bd12ee738fe96bb2d5990cc385dc22c7d7d. Its only changes after the captured04518c1are a test-name rename for the anti-slop lint and the merge of main. Current main fails the scoped web typecheck insrc/shared/structured-agent-session-live-turn.test.ts(from #25751); this PR does not touch that file or the type it uses.Checklist