Skip to content

feat(appearance): add background image with panel and terminal translucency - #27485

Closed
mark22013333 wants to merge 1 commit into
stablyai:mainfrom
mark22013333:feat/app-background-image
Closed

mark22013333 wants to merge 1 commit into
stablyai:mainfrom
mark22013333:feat/app-background-image

Conversation

@mark22013333

Copy link
Copy Markdown

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

  • Before: Orca has fixed light and dark surfaces; there is no way to set a background image.
  • After: Settings → Appearance has a new Background section at the top:
    • Choose or remove an image (png / jpg / jpeg / gif / webp, up to 20 MB).
    • Scope: the whole window (default) or only the workspace area.
    • Four sliders: image opacity, image blur, interface panel opacity, and terminal background opacity (this last one is the existing terminalBackgroundOpacity setting).
    • A scaled-down preview of the Orca layout. Adjustments only change a draft; nothing in the app changes until you press Apply, and Discard throws the draft away. The draft survives leaving and returning to the settings page, and when the section is collapsed its summary says "Unapplied changes".

How it works

  • Main process: a new appBackground IPC surface (pick / read / commit / discard). When an image is picked, its size and file header are checked (the header check was moved out of src/main/pi/rpc-prompt.ts into a shared module so both places use one copy). The file is copied to userData/appearance/.staging/; on Apply it is moved into userData/appearance/ and appBackgroundImageId is written to settings. The renderer cannot write that field directly — settings:set strips 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.
  • Renderer: the image is read over IPC and shown through a blob URL (the sandboxed renderer cannot load file://). Only after the image has actually loaded does the host element get data-app-background; panels marked data-app-background-surface then switch to color-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.
  • Terminal: while an image is showing, xterm's opaque canvas background is skipped and only one layer at the pane root carries terminalBackgroundOpacity, so a value of 0.6 really means 60% instead of two stacked layers.
  • Draft: an in-memory zustand slice (not persisted). If settings change from another window or from the existing controls, fields you have not touched in the draft follow along, and Apply writes only the fields you changed.
  • The web build does not show this section or render the background layer. The mobile app is untouched.

Why

  • A DOM layer instead of a transparent native window. Window-level transparency behaves very differently on each platform and has a known performance cost on macOS (see [Bug]: Window Blur causes sustained high GPU power and heat on macOS #8482, where Window Blur caused sustained GPU power and heat). A DOM layer looks the same on macOS, Linux and Windows.
  • A new "interface panel opacity" setting instead of reusing an existing one. workspaceBoardOpacity is not read by any screen, and leftSidebarTintOpacity is a color-mix ratio whose result is always opaque. Changing what either of them means would change existing behavior for current users.
  • Draft plus preview instead of applying each change live. The image, the scope and several opacity values only make sense together. Previewing first avoids the user ending up with a screen they can no longer read while still adjusting it.

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)
No background image

After: light theme, whole window, terminal split into two panes
Light theme, window scope, split terminal

After: dark theme, whole window
Dark theme, window scope

After: light theme, workspace area only
Light theme, workspace scope

Settings → Appearance → Background (draft not yet applied)
Settings section

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 main pixel for pixel.

  • Windows: 16 manual checks, 13 passed. Not fully confirmed:

    • Split panes combined with a full-screen terminal program — result was inconclusive.
    • Window Blur (acrylic) turned on together with a background image — not tested.
    • The "image file missing" notice did not appear. Panels correctly stayed opaque, so this was judged not to affect use, but the notice itself is not confirmed on Windows.
  • Automated: pnpm tc, pnpm lint (including the localization gates) and pnpm run check:code-quality:changed upstream/main pass on this branch. The 16 new or updated test files plus src/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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Relation to feat(terminal): background image behind terminal panes (#7714) #15836. feat(terminal): background image behind terminal panes (#7714) #15836 also addresses [Feature]: Feature Request: Support custom background images in the IDE #7714. It adds an image behind terminal panes only, configured under the terminal settings, and stores the image inline in settings as a data URL. This PR takes a broader approach: the image can cover the whole window or just the workspace, sidebars / title bar / tab bars become translucent along with the terminals, changes go through a draft with a layout preview before they apply, and the image file is stored under userData with 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.
  • Known limitations: the embedded browser tab, the Monaco editor, the bottom status bar, the panels inside the right sidebar, and settings-page cards stay opaque. In dark mode with an image, the 1px divider between the sidebar and the workspace lets a thin line of the image's brighter colors through.
  • With the workspace scope, the host element still uses isolation: isolate, so high z-index overlays inside the workspace are stacked within that area. No visible problem was found in testing.
  • Backwards compatibility: all new settings fields are optional, so existing settings files need no migration.
  • Remote SSH / mobile: this is local appearance state only. It adds no remote RPC and changes nothing a client and host exchange; the mobile app is untouched.
  • Security: the renderer cannot choose the stored image path; only the main process writes appBackgroundImageId, and images are size-capped and header-checked before being accepted.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

We 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 @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 37934145-e68a-4bb5-a77a-bc73da40e64d
📥 Commits

Reviewing files that changed from the base of the PR and between 265e4d4 and 6484c2da7c1389e87b2e948bec427adaedd5d97f.

📒 Files selected for processing (67)
  • src/main/image-file-signature.test.ts
  • src/main/image-file-signature.ts
  • src/main/ipc/app-background-storage-paths.ts
  • src/main/ipc/app-background.test.ts
  • src/main/ipc/app-background.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/ipc/settings.test.ts
  • src/main/ipc/settings.ts
  • src/main/pi/rpc-prompt.ts
  • src/main/startup/main-process-ready-runtime.ts
  • src/preload/api-types.ts
  • src/preload/api/app-background-api.ts
  • src/preload/api/app-background-bridge.ts
  • src/preload/index.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/app-shell/AppWorkspaceShell.tsx
  • src/renderer/src/app-shell/use-app-background-appearance.test.tsx
  • src/renderer/src/app-shell/use-app-background-appearance.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/Landing.tsx
  • src/renderer/src/components/app-background/AppBackgroundLayer.tsx
  • src/renderer/src/components/app-background/app-background-blob-cache.test.ts
  • src/renderer/src/components/app-background/app-background-blob-cache.ts
  • src/renderer/src/components/app-background/app-background-visibility.ts
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/AppBackgroundPreview.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/AppearancePane.tsx
  • src/renderer/src/components/settings/appearance-background-search.test.ts
  • src/renderer/src/components/settings/appearance-background-search.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/renderer/src/components/settings/appearance-usage-percentage-search.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/tab-group/TabGroupPanel.tsx
  • src/renderer/src/components/tab-group/TabGroupSplitLayout.tsx
  • src/renderer/src/components/terminal-pane/terminal-appearance.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/terminal-pane/use-pane-title-background.test.ts
  • src/renderer/src/components/terminal-pane/use-pane-title-background.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-projection.ts
  • src/renderer/src/hooks/settings-navigation-interface-sections.ts
  • src/renderer/src/i18n/app-background-locales.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/app-background-appearance.test.ts
  • src/renderer/src/lib/app-background-appearance.ts
  • src/renderer/src/lib/app-background-terminal-surface.test.ts
  • src/renderer/src/store/index.ts
  • src/renderer/src/store/slices/app-background-draft-model.ts
  • src/renderer/src/store/slices/app-background-draft.test.ts
  • src/renderer/src/store/slices/app-background-draft.ts
  • src/renderer/src/store/slices/store-test-helpers.ts
  • src/renderer/src/store/slices/ui/ui-slice-contract-contextual.ts
  • src/renderer/src/store/types.ts
  • src/shared/app-background-settings.test.ts
  • src/shared/app-background-settings.ts
  • src/shared/app-background-types.ts
  • src/shared/default-global-settings.ts
  • src/shared/global-settings-types.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The change adds support for selecting and applying background images across the window or workspace. It adds image validation, staging and storage, IPC methods, renderer image loading, and translucent surface styling. The Appearance settings pane adds background controls, preview, search entries, and localized text. Draft changes can be applied or discarded, and startup schedules cleanup of unused image files.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 6484c

The reviewed background-image changes have no identified issue requiring resolution before merge.

Pre-merge checks | Passed 3 | Failed 1 | Inconclusive 1

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check Warning Directly linked issue #7714 requires local image selection, background opacity, four display modes (Cover, Contain, Stretch, Center), and optional area selection for the editor, sidebar, terminal pane… Add the four display modes and the required per-area enable or disable controls, with automated tests. If the intended product scope is only window and workspace, update the directly linked issue requirements before treating this PR as …
Docstring Coverage Inconclusive Docstring coverage is 37.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 83 functions across 50 files. (17 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: adding background images with panel and terminal translucency.
Description check Passed The description is complete and directly addresses the template. It includes the user impact, implementation details, rationale, linked issue, visual proof, testing results, AI disclosure, limitations…
Out of Scope Changes check Passed The changes stay related to the background-image feature in #7714. Main-process storage, IPC, validation, renderer display, terminal translucency, settings UI, localization, state management, and thei…
Full details: Linked Issues check

Explanation

Directly linked issue #7714 requires local image selection, background opacity, four display modes (Cover, Contain, Stretch, Center), and optional area selection for the editor, sidebar, terminal panel, or full window. The PR implements local image selection and opacity. It provides only window or workspace scope. It does not implement the four display modes or independent area toggles.

Resolution

Add the four display modes and the required per-area enable or disable controls, with automated tests. If the intended product scope is only window and workspace, update the directly linked issue requirements before treating this PR as complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 37.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 83 functions across 50 files. (17 skipped: 7 unsupported, 10 over the file limit.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mark22013333
mark22013333 force-pushed the feat/app-background-image branch from 6484c2d to 202240a Compare October 19, 2026 23:22
…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
@nwparker

nwparker commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Closing as superseded by #36589: app themes can now set a background image with translucency, and #36796 shows it in native chat too. Thank you for this PR, it shaped the design.

@nwparker nwparker closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Feature Request: Support custom background images in the IDE

2 participants