Skip to content

Add desktop Backdrop Opacity control - #54413

Closed
intellectronica wants to merge 4 commits into
NousResearch:mainfrom
intellectronica:intellectronica/backdrop-opacity-control
Closed

intellectronica wants to merge 4 commits into
NousResearch:mainfrom
intellectronica:intellectronica/backdrop-opacity-control

Conversation

@intellectronica

Copy link
Copy Markdown
Contributor

Summary

Adds a desktop Appearance setting for Backdrop Opacity, placed directly under the existing Window Translucency control.

The new control is a 0-100% slider with a default of 100%. At 100%, Hermes keeps the backdrop image at its current visual strength; at 0%, the backdrop image becomes transparent. This only affects the renderer backdrop image layer in the main window and does not change native window opacity or the existing Window Translucency behaviour.

Details

  • Adds a persisted renderer-side backdrop-opacity preference.
  • Wires the Appearance settings slider to that preference.
  • Multiplies the current backdrop image opacity by the selected percentage, preserving the existing backdrop tuning at 100%.
  • Adds i18n keys for the new title and description.
  • Covers the preference default, persistence, and clamping behaviour with a focused Vitest test.

Validation

  • npm --workspace apps/desktop run test:ui -- src/store/backdrop-opacity.test.ts
  • npm --workspace apps/desktop run typecheck
  • npx eslint src/store/backdrop-opacity.ts src/store/backdrop-opacity.test.ts src/components/Backdrop.tsx src/app/settings/appearance-settings.tsx src/i18n/en.ts src/i18n/ja.ts src/i18n/types.ts src/i18n/zh.ts src/i18n/zh-hant.ts from apps/desktop
  • npm --workspace apps/desktop run build

Note: full npm --workspace apps/desktop run lint is currently blocked by pre-existing lint errors in untouched files (electron/titlebar-overlay-width.cjs) plus existing padding warnings elsewhere.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Jun 28, 2026
@intellectronica
intellectronica marked this pull request as ready for review June 28, 2026 20:06

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the focused renderer-side control and persistence coverage.

Problems

  • apps/desktop/src/i18n/ja.ts:290-291, zh.ts:373-374, and zh-hant.ts:282-283 add English text rather than localized strings. The Desktop guide requires all locales to be updated (apps/desktop/AGENTS.md:197-198).
  • Current main has since merged the binary backdrop toggle in #64598. Its render gate is now on && statue.enabled at apps/desktop/src/components/Backdrop.tsx:94, and GitHub reports this PR as conflicting. Salvage should retain that gate and compose the opacity multiplier with the current statue.opacity value.

Suggested changes

  • Supply translations for the three non-English locale entries.
  • Resolve the #64598 overlap by keeping both the existing on/off toggle and this slider in Appearance.

Automated hermes-sweeper review.

Comment thread apps/desktop/src/i18n/ja.ts Outdated
toolViewDesc: 'プロダクト表示は生のツールペイロードを隠し、テクニカル表示は入出力をすべて表示します。',
translucencyTitle: 'ウィンドウの透過',
translucencyDesc: 'ウィンドウ全体を透過させてデスクトップを表示します。macOS と Windows のみ。',
backdropOpacityTitle: 'Backdrop Opacity',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please provide Japanese strings here (and translate the matching new zh.ts and zh-hant.ts entries). The Desktop guide requires all locales to be updated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added in 1729082

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 15, 2026
@intellectronica
intellectronica requested a review from teknium1 July 15, 2026 20:01
@intellectronica

Copy link
Copy Markdown
Contributor Author

Not necessary with the new toggle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants