Repository navigation
Soften native chat colors and code surfaces - #25651
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (35)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (35)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds chat-specific theme colors and a shared content-width token. Chat message and plan content use a markdown wrapper with scoped styling. Code blocks, composer controls, transcript surfaces, and status elements adopt chat-specific styles. Transcript layout tests and harnesses locate the transcript column through a data attribute. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable issue remains in the reviewed chat styling changes; the PR is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 45.16% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 33 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
Important
The NativeChatBackgroundTasksStatus class changes weren't reflected in a sidebar snapshot, so subagent-child-row-fallback-pixels.test.tsx currently fails. There's also a small code-block header truncation regression worth a look.
Reviewed changes
- Chat color tokens —
main.cssgains--color-chat-*theme entries plus light/dark--chat-*derivations (canvas, three foreground tiers, user/code/inline-code/composer surfaces and borders) and--chat-content-max-width: 46rem. - Scoped markdown styling — new
NativeChatMarkdownwrapsCommentMarkdownwith anative-chat-markdownclass, backed bynative-chat-markdown.css(heading/link/inline-code/pre styling plus a[data-native-chat-message-tone='faint']override). Sidebar comments are untouched. - Migration + token swaps —
CommentMarkdown→NativeChatMarkdownacross the chat components (NoticeRow also now passesrenderCodeBlock);bg-background/text-muted-foregroundswapped for the chat tokens. - Narrower reading column —
max-w-4xl→max-w-(--chat-content-max-width)(46rem), with tests/tooling switched to adata-native-chat-transcript-columnselector. - Code block + message row restyle — code header loses its icon and divider and shrinks to
h-7.5; the user bubble gets a border/rounder corners atmax-w-[80%]; reasoning drops italic and rows exposedata-native-chat-message-tone.
No data, IPC, or behavioral contracts change — this is presentation only.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
| <span | ||
| data-code-language={language} | ||
| className="flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground" | ||
| className="min-w-0 font-sans text-xs text-chat-foreground-faint" |
There was a problem hiding this comment.
Dropping flex from this wrapper makes the inner <span className="truncate"> (line 25) an inline child, where overflow/text-overflow don't apply — so the language label no longer ellipsizes. An unknown or long fence language can now overflow the header instead of truncating (the sibling copy button is shrink-0). Keep this a block/flex container: move truncate onto this span, or restore flex/add block.
fa517e4 to
da2da9d
Compare
|
Native chat used bright text and code surfaces with long reading lines, making conversations hard on the eyes. This PR derives softer chat colors from the existing themes and shares a 46rem reading column between messages and the composer, while retaining the shared Markdown renderer and existing interactions. Rebasing onto current main preserved its draft attachment handling and message rail behavior. No critical or high severity issue was established by the source reviews; the five reviewed appearance patches are unchanged. Deferred: expanded tool/diff payloads retain stronger fills (P2, related #25654), and quoted reasoning remains slightly brighter (P3). At pushed head Final-head remote M4Air screenshots are now attached in the PR body's Visual Proof. I verified and personally inspected all six full-app files, then checked the uploaded bytes. Hidden Electron with a seeded transcript exercised dark/light themes, folded/expanded activity, open tools, code scrolling, composer typing/focus, and intercepted copy feedback. The app reported isolated user data/home/provider directories and hooks hashes stayed unchanged; shared config hashes were recorded as observations. No real agent/account or desktop input was used. Native clipboard behavior was not verified. Narrow layout (resolved as pre-existing): at a 680px app width with both sidebars open, the chat pane is only 49px wide and the existing timestamp/actions row (111px) sticks out of it, giving 83px of horizontal overflow. I measured the same build setup on All review items are fixed or deferred with evidence; marking ready for review so the full CI runs. |
da2da9d to
7265cbc
Compare
Native chat surfaces moved to bg-chat-canvas (stablyai#25651), a token resolved on :root, so clearing --background no longer made them transparent and the chat lost its glass. (cherry picked from commit 26fba21b8e21f389ab9db29e67f2d96b9da92658)
Native chat surfaces moved to bg-chat-canvas (stablyai#25651), a token resolved on :root, so clearing --background no longer made them transparent and the chat lost its glass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Native chat surfaces moved to bg-chat-canvas (stablyai#25651), a token resolved on :root, so clearing --background no longer made them transparent and the chat lost its glass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Native chat surfaces moved to bg-chat-canvas (stablyai#25651), a token resolved on :root, so clearing --background no longer made them transparent and the chat lost its glass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Native chat surfaces moved to bg-chat-canvas (stablyai#25651), a token resolved on :root, so clearing --background no longer made them transparent and the chat lost its glass. Co-Authored-By: Claude Opus 5.5 <[email protected]>

ELI5
Native chat showed near-white messages on a near-black background, bright gray code blocks, and very long lines. That combination made conversations hard on the eyes. Messages now use softer text, quieter code surfaces, and a narrower reading column. Links have softer underlines and wrap at word boundaries before splitting an oversized token, and code blocks show a plain language label without the extra icon or dividing line.
What Changed
The reading column and message box shrink from 56rem to 46rem. User messages have rounded corners, a subtle border, and an 80% maximum width. The message box has rounder corners, a quieter placeholder and toolbar, and the same background around it as the conversation. Thinking and small system messages use upright, faint text, with matching bold text, links, headings, and code. Quoted reasoning retains the existing slightly brighter muted text color.
Chat colors derive from the existing light and dark themes. Dark body contrast changes from 18.968:1 to 10.798:1, with approximately #c8c8c8 text on #161616; light body contrast changes from 19.798:1 to 12.066:1. Headings and user messages retain a brighter tier. Code gets a subtle fill, thin border, rounded corners, and its own softer text color. Code headers are 30px tall, with tighter spacing above their contents.
A chat-only markdown wrapper applies these styles while retaining the shared markdown renderer. The existing card borders distinguish approvals, questions, queued messages, plans, and task lists from the conversation background. Tests identify the reading column by a dedicated attribute rather than a width class.
Why
Deriving a small set of chat colors from the current theme keeps light and dark appearances consistent. Separate text tiers preserve hierarchy while reducing glare. Keeping markdown styling scoped to chat prevents these appearance changes from affecting sidebar comments.
Linked Issue
N/A (maintainer)
Visual Proof
Current remote M4Air proof at pushed head
7265cbca0f26fe25a3d64f72ac2e193e87340778, using a seeded transcript in hidden Electron with isolated app data and home directories. These are uncropped full-app screenshots; the uploaded files were downloaded again and checked byte for byte.Dark: activity folded and expanded
Open tools: dark and light
Composer typing/copy feedback and narrow-window limitation
The narrow screenshot is light theme despite its filename. At a 680px app width, the open sidebar and inspector leave roughly 50px for chat, and the transcript exceeds its visible width by 75px. Code still scrolls within its own block. The no-overflow assertion failed; a current-main comparison could not complete, so this is an unresolved observation, not an established regression from this PR.
Earlier local before/after evidence from the same seeded transcript on main and the appearance branch:
Dark theme
Light theme
Tool activity expanded (dark)
Testing
At pushed head
7265cbca0f26fe25a3d64f72ac2e193e87340778, rebased onto main08a970a3f1176e2de1450acedb706200ef5191fb:Current-head M4Air checks completed dark/light rendering, folded/expanded activity, open tools, code scrolling, composer typing with focus through Chrome DevTools Protocol, and intercepted code-copy feedback. The app reported disposable user data and home/provider paths; hooks hashes remained unchanged. Shared Codex config hashes are observations only under the revised QA rules. No real agent or managed account was seeded, and no desktop input or window reveal was used. The native clipboard was not tested.
Narrow-window no-overflow failed as described above. Both Windows comparison agents were blocked at startup by an update prompt before any test app launched; both paired Linux runtimes were unreachable. Windows/Linux/SSH/mobile rendered behavior, full release validation, and the narrow issue's attribution remain unverified.
Review
Reviewed color inheritance, shared-markdown isolation, code spacing, and stable reading-column selectors. New tests cover markdown isolation, the chat-only link wrapping scope, upright thinking and system rows, and the plain code header.
Agent skill upstream boundary
Notes
These presentation changes apply to local and remote chat views. Expanded tool/diff payloads retain their existing stronger fills; separate tool appearance work is tracked in #25654. Quoted reasoning remains slightly brighter than other reasoning text. The PR stays draft. Current-head remote screenshots are attached; narrow-layout attribution and full downstream CI remain outstanding.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)