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
Match transparent canvas backgrounds to the active theme (#2700)
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 passed
- `pnpm run build` — passed
- Typecheck, type-aware lint, formatting, demo-site consistency, and
dead-code analysis — passed after the final edits
- `pnpm run check:oracle` — 262 specs live, 15 invariants passed
- `pnpm run check:e2e-syntax` — 289 files parsed cleanly
The full `pnpm run check` could not complete its unit phase in this
command sandbox: unrelated watcher tests receive `EMFILE`, fixed `/tmp`
paths receive `EPERM`, 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 run
`tests/e2e/canvas-background-parity.e2e.ts` and 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]
---------
Co-authored-by: Jonathan Kingston <KingstonMailBox@gmail.com>
0 commit comments