Skip to content

fix(macos): keep the translucent window surface on by default - #1790

Merged
vastsa merged 1 commit into
mainfrom
fix/macos-translucent-window-default
Oct 20, 2026
Merged

vastsa merged 1 commit into
mainfrom
fix/macos-translucent-window-default

Conversation

@vastsa

@vastsa vastsa commented Oct 20, 2026

Copy link
Copy Markdown
Owner

What

Fixes two problems in the setting shipped by #1788:

  1. Turning translucency on did nothing, even after a restart. createWindow
    painted the host background right after new BrowserWindow, and that call
    did not know about the surface choice — so the vibrancy window was created
    and then immediately covered with an opaque colour. The post-creation paint
    now skips a translucent macOS window, the same way the window.setBackgroundColor
    IPC and the theme path already did.
  2. Translucency is the default again. An absent preference means the
    sidebar material; only an explicit false opts into the opaque surface.
    The stored flag and the Settings switch follow that (!== false), so
    existing installs get the shipped look back without touching settings.

The opaque surface stays available as the opt-out for the GPU cost of the
material (#1064): with the switch off, the window leaves WindowServer's
per-frame recomposition path and the windowAppearance.backgroundColor of a
plugin theme applies on macOS.

Verification

  • apps/desktop typecheck: pass
  • biome lint (repo config): 125 files, no findings
  • apps/desktop node --test: 4144 tests, 4141 pass, 0 fail (3 skipped)
  • packages/shared vitest: 1280 pass; packages/i18n vitest: 30 pass
  • apps/desktop/test/macos-window-translucency.test.mjs now also asserts that
    the post-creation background paint skips a translucent macOS window, which is
    the regression this PR fixes.

Not run: verify:ui:* (no Electron instance was started; the surface contract
is covered by the unit tests above).

Docs: ADR 0332 (title, decision, consequences, alternatives), ADR 0248,
ADR index, 04-ux/06-settings-ia.md, 04-ux/08-component-spec.md,
04-ux/07-ui-design-system.md, plugin permissions matrix, decisions log (D667).

The window was created with the vibrancy material and then had the opaque
host colour painted over it immediately after creation, because the
post-creation background paint did not know about the surface choice. Turning
translucency on therefore looked inert even after a restart. That paint now
skips a translucent macOS window, the same way the background IPC and the
theme path already did.

Translucency is also the shipped look again: an absent preference means the
material, only an explicit `false` opts into the cheaper opaque surface, and
the stored flag defaults to translucent so a boot that cannot read settings
still paints the window the user expects.

Docs and tests follow the corrected default (ADR 0332, D667).
Copilot AI balanced review requested due to automatic review settings October 20, 2026 16:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vastsa
vastsa merged commit 494b5f7 into main Oct 20, 2026
6 checks passed
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.

2 participants