Match transparent canvas backgrounds to the active theme - #2700
Merged
jonathanKingston merged 3 commits intoSep 20, 2026
Merged
jonathanKingston merged 3 commits into
jonathanKingston merged 3 commits into
Conversation
Co-Authored-By: Copse <noreply@copse.dev> Copse-Models: gpt-6, acp:claude-acp#claude-fable-5-1[1m]
Contributor
Contributor
Reference screenshots ready for reviewReview GitHub’s image diffs in screenshot PR #2710. Rendered for If this source branch moves, a later successful render closes the stale review PR and replaces this link. |
jonathanKingston
deleted the
copse/from-id-be0d523a-d366-449e-ad4b-ae568a0f13-1e2561
branch
September 20, 2026 14:10
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.
Transparent inline canvases were composited against different surfaces: the visible webview exposed Copse's active theme, while the hidden agent mirror defaulted to white. A dark-theme canvas could therefore disagree with its preview even though both loaded the same artifact bytes.
This change samples Copse's resolved body background (including UI tint) and uses it as the hidden BrowserWindow's compositor backdrop. The visible webview host explicitly uses the same base theme surface. Artifact CSS remains authoritative, so an artifact that paints its own background still overrides the default; a fully transparent sampled color falls back to the resolved boot theme.
The focused Electron regression emits both a transparent artifact and one with an explicit background. It checks the preview pixel against the active tinted theme, checks the open canvas host against the app surface, verifies the explicit artifact color wins, and saves the transparent dark-theme state for review.
Validation:
pnpm test -- canvas-agent-mirror— 11 passedpnpm run build— passedpnpm run check:oracle— 262 specs live, 15 invariants passedpnpm run check:e2e-syntax— 289 files parsed cleanlyThe full
pnpm run checkcould not complete its unit phase in this command sandbox: unrelated watcher tests receiveEMFILE, fixed/tmppaths receiveEPERM, and a later durable rerun stalled behind the inaccessible orphaned test process. The focused local Electron spec also stopped before Copse launched because Chromium could not create its extension-unpack temp directory. CI should runtests/e2e/canvas-background-parity.e2e.tsand publish the visual evidence.Co-Authored-By: Copse noreply@copse.dev
Copse-Models: acp:codex-acp#gpt-5.6-sol, acp:claude-acp#claude-fable-5-1[1m]