You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a shared code-header appearance to EMCN CopyCodeButton and migrate its two matching chat code-header consumers. Keep the third, distinct consumer on the default appearance. Give the icon-only button a stable accessible name while preserving copied/check feedback.
Base and validation
Targets live staging at 316fea02ec. Six EMCN tests cover both appearances, clipboard copying, the temporary Check icon, and the accessible name. EMCN and app type checks, Biome, and diff whitespace checks passed. Independent source review found no remaining code blocker.
Matched source-derived captures cover light/dark, 16px/20px root text, and rest/hover/focus/disabled states. Computed visual styles match in all 16 pairs; 15 pairs are pixel identical, and one unchanged manifest-card border differs by at most 2/255 in 23 pixels. Evidence is stored outside the product checkout.
The local design diff check and comparable full scans are queued. Keep this PR unmerged until those results, both bot reviews, all required checks, and all review threads are complete.
The PR appears safe to merge from this code review, subject to the required checks and reviews noted by the author.
Summary
The PR centralizes the code-header appearance for CopyCodeButton, applies it to two matching chat code headers, and adds an accessible name and component tests.
The previous test-coverage finding is resolved: both appearances now have class assertions.
No new actionable issue was identified in the PR changes.
What changed: Both code-block headers now ask EMCN CopyCodeButton for the same code-header appearance. EMCN owns the muted ink and hover colours; the workspace caller keeps its local -mr-2 layout offset. The button also gets the accessible name “Copy code.” The copy/check interaction remains in the shared component.
// Before — workspace code header<CopyCodeButtoncode={codeString}className='-mr-2 text-[var(--text-tertiary)] hover-hover:bg-[var(--surface-5)] hover-hover:text-[var(--text-secondary)]'/>// After<CopyCodeButtoncode={codeString}appearance='code-header'className='-mr-2'/>
What to inspect: Header button size, muted ink, hover fill, focus, and disabled appearance. These are labeled isolated renders of the actual EMCN button with source-derived chat code headers and product CSS, captured against staging 316fea02ec; they are not authenticated chat-route screenshots. The current PR diff at 1312c6d158a1 retains this treatment. Across the full light/dark × 16px/20px × rest/hover/focus/disabled capture set, computed button and icon geometry and colours matched. The four representative pairs below are pixel identical.
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
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
Add a shared code-header appearance to EMCN
CopyCodeButtonand migrate its two matching chat code-header consumers. Keep the third, distinct consumer on the default appearance. Give the icon-only button a stable accessible name while preserving copied/check feedback.Base and validation
Targets live staging at
316fea02ec. Six EMCN tests cover both appearances, clipboard copying, the temporary Check icon, and the accessible name. EMCN and app type checks, Biome, and diff whitespace checks passed. Independent source review found no remaining code blocker.Matched source-derived captures cover light/dark, 16px/20px root text, and rest/hover/focus/disabled states. Computed visual styles match in all 16 pairs; 15 pairs are pixel identical, and one unchanged manifest-card border differs by at most 2/255 in 23 pixels. Evidence is stored outside the product checkout.
The local design diff check and comparable full scans are queued. Keep this PR unmerged until those results, both bot reviews, all required checks, and all review threads are complete.