Repository navigation
fix(native-chat): lift the approval card off the dark chat pane - #52420
Merged
orca-remote-automation[bot] merged 2 commits intoNov 29, 2026
Merged
Conversation
Dark mode only: the quiet and full approval cards share one surface mixed 4.5% toward the foreground over --card, with a 10% foreground edge, both from host-owned tokens so plugin themes cannot restyle consent. Light mode, layout and the dock-joined card are unchanged.
[Low impact] The PR appears safe to merge; no actionable defects were found. SummaryThe PR lifts approval cards off the dark chat pane and gives worker approvals a matching dock surface.
Reviews (2) · Last reviewed commit: "fix(native-chat): give the worker dock's..." · Reviewed by Greptile |
…dark surface The dock draws the frame for its joined cards, so it now gets the same dark surface and 10% edge (outline, no layout change), from the host-owned security tokens by name since the dock sits outside the cards' SecuritySurface. Light mode is unchanged.
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.
Summary
In dark mode the approval card painted
--card(#171717) on the chat pane (#161616), about 1.01:1, with a 7% edge (tool prompts) or a 15% edge (plan, sign-in, terminal prompts). It blended into the pane. This PR changes only the card's surface and edge, in dark mode, and uses the same values for both card kinds:color-mix(in srgb, var(--foreground) 4.5%, var(--card)), which renders as #212121. Card vs pane is now 1.12:1.foreground/10, which renders as #353535. Edge vs pane is 1.48:1.Light mode is pixel-identical to main. Its full card moves from
border-inputtoborder-border, and both tokens are #e5e5e5 inside.plugin-security-chrome. Titles, copy, buttons, options, layout, spacing and behavior are unchanged.Worker dock (joined cards, e.g. a worker's "Allow Bash?"). The dock draws the frame for its joined cards, so
NativeChatWorkerApprovalStackgets the same dark surface and 10% edge (APPROVAL_DOCK_DARK_FRAME). The edge is an inset outline, so nothing moves. The dock sits outside the cards'SecuritySurface, so these classes name the host-owned--orca-security-*tokens directly. Light mode keeps the flat dock. The joined card itself still has no frame, so nothing is double-bordered.Every other path already goes through
approvalCardFrameClasses: the composer slot, stacked cards (paired-server asks), the subagent sheet, PTY-read prompts (parsedFromTerminal) and the bot group dock (composer placement).Both colors come from
--foregroundand--card. The card renders insideSecuritySurface, which remaps those to host-owned--orca-security-*tokens, so a plugin theme cannot restyle the consent card. Checked against how comparable products handle this.Evidence
Component fixtures with real renderer components (no Electron, no real profile). The new
NativeChatApprovalCard:inChatWideandNativeChatApprovalCard:inChatNarrowfixtures show the transcript rows, a quiet tool card with the longest command, a full terminal prompt with the longest title, and the composer, at 720 and 360 px. The dock-joined case usesNativeChatWorkerApprovals:openWithOwnPrompt.bg-chat-foreground/5) and the focus ring all still read on the lifted surface. I checked the focus ring with a keyboard-focus capture.Screenshots are attached below.
Tests
APPROVAL_DOCK_DARK_FRAMEis dark-only and names only--orca-security-*tokens (this fails on the previous head).native-chat-approval-card-frame.test.tschecks that the quiet and full cards share one surface and edge, built only from the host tokens. It fails on main.Performance
This is a class-string change on one element per open approval card, with a static color-mix and no new renders, listeners or layout. I expect no measurable effect.
List scale
N/A: no lists are involved.
Screenshots (before | after; red dashed guides at card/composer edges)
Worker dock (before = previous head, after = this head; guides at the composer edges and the icon column)
The dock edges are at the same x as the composer (64/1456 at 2x for 720 px, 64/656 for 360 px). Text and icon positions are unchanged: zero offset gives the best match, and the only mismatches are anti-aliasing. Light mode and the non-dock cards are pixel-identical to the previous head.