Repository navigation
feat(appearance): add background image with panel and terminal translucency - #27485
mark22013333 wants to merge 1 commit into
Conversation
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
6484c2d to
202240a
Compare
…ucency - Settings > Appearance gets a Background section: pick or remove a PNG, JPEG, GIF or WebP image (up to 20 MB), choose whether it covers the whole window or only the workspace area, and tune image opacity, image blur, panel opacity and terminal background opacity. - Changes are a draft shown in a scaled-down layout preview; nothing in the app changes until Apply, and Discard drops the draft. - While an image is showing, sidebars, title bar, tab bars, the landing page and terminal panes become translucent so the image shows through. Terminals keep a single translucent fill instead of stacking xterm's opaque canvas background on top. - Panels only turn translucent after the image has loaded, so a missing or unreadable file never leaves see-through panels over nothing. - The image is copied into userData rather than stored in settings, and its size and file header are checked before it is accepted. A failed settings write puts the image back in staging, and unreferenced images are cleaned up after startup. - The image header check reuses the existing image file signature detection in the main process. - The web build does not show the section or render the layer. - Adds translations for es, fr, ja, ko and zh. Fixes stablyai#7714
202240a to
029dcad
Compare
ELI5
You can put your own picture behind Orca and choose how see-through the interface is, so the picture shows through the sidebars, title bar, tab bars and terminals. If you never set a background image, nothing on screen changes.
What Changed
Before and after, as a user sees it
terminalBackgroundOpacitysetting).How it works
appBackgroundIPC surface (pick / read / commit / discard). When an image is picked, its size and file header are checked (the header check was moved out ofsrc/main/pi/rpc-prompt.tsinto a shared module so both places use one copy). The file is copied touserData/appearance/.staging/; on Apply it is moved intouserData/appearance/andappBackgroundImageIdis written to settings. The renderer cannot write that field directly —settings:setstrips it. If writing settings fails, the image is moved back to staging. Leftover staging files and images no longer referenced by settings are cleaned up shortly after startup.file://). Only after the image has actually loaded does the host element getdata-app-background; panels markeddata-app-background-surfacethen switch tocolor-mix(… var(--app-panel-alpha), transparent). Light mode scales panel opacity to 65% and dark mode to 85%, because a white overlay flattens the image's contrast much more than a dark one. If the image is missing or fails to load, panels stay opaque.terminalBackgroundOpacity, so a value of 0.6 really means 60% instead of two stacked layers.Why
workspaceBoardOpacityis not read by any screen, andleftSidebarTintOpacityis a color-mix ratio whose result is always opaque. Changing what either of them means would change existing behavior for current users.Linked Issue
Fixes #7714
Visual Proof
Taken with a test gradient image (terminal prompts and tab titles are pixelated).
Before: no background image (same as

main)After: light theme, whole window, terminal split into two panes

After: dark theme, whole window

After: light theme, workspace area only

Settings → Appearance → Background (draft not yet applied)

Testing
macOS: automated CDP screenshots of 6 scenarios — terminal renderer on (WebGL), off (DOM) and auto; switching renderer while running; vim / less / top; split panes; overlays stacking above the background; and no background image. Also tested by hand.
Linux (Ubuntu 24.04 arm64 under xvfb): 5 scenarios, including Linux's custom-drawn title bar and both DOM and WebGL (SwiftShader) rendering. With no background image the result matched
mainpixel for pixel.Windows: 16 manual checks, 13 passed. Not fully confirmed:
Automated:
pnpm tc,pnpm lint(including the localization gates) andpnpm run check:code-quality:changed upstream/mainpass on this branch. The 16 new or updated test files plussrc/main/pi/rpc-prompt.test.ts(which uses the shared header check) pass: 17 files, 209 tests.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Claude (Anthropic) was used for planning, implementation and review. Each stage was also checked by a separate review pass and verified with tests and screenshots. The macOS screenshot scenarios and the Linux run were automated by AI agents; I reviewed the changes and tested macOS and Windows by hand.
Review
Agent skill upstream boundary
Notes
userDatawith its file header verified rather than embedded in settings. The two overlap in the terminal transparency handling, so they would need to be reconciled if both were wanted; I'm happy to adjust this PR in whichever direction you prefer.isolation: isolate, so high z-index overlays inside the workspace are stacked within that area. No visible problem was found in testing.appBackgroundImageId, and images are size-capped and header-checked before being accepted.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)