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
keep Windows capsule Acrylic enabled, but clip the native window region to the visible rounded pill instead of tinting the whole host rectangle
update the capsule Acrylic region whenever translation mode changes the host height, unioning a separate rounded badge region for the translation badge
realign Windows capsule frontend metrics with the Rust/native contract: 220px host = 196px pill + 12px side insets, with a 52px visible pill height
keep QA Acrylic intact because QA fills its native host and does not have capsule's transparent-margin geometry problem
add a focused Windows capsule contract test that rejects the old whole-host Acrylic path and rejects a plain rollback
Why this is not a rollback
PR #496 proved that removing capsule Acrylic makes the gray rectangle disappear, but that also gives up the original material fallback. This PR fixes the actual layer violation instead: Acrylic is still used for capsule, but the HWND region is clipped to the real visual shapes before Acrylic is applied. Transparent shadow/badge host margins stay outside the native region, so they cannot be painted gray.
On Windows the capsule now disables backdrop filtering entirely and makes the pill nearly opaque. That removes the translucent material fallback the capsule previously had, so any Windows launch will show a flatter white chip instead of a blurred surface.
I re-tested the current #497 head after replacing the DWM/region approach with the transparent-host + DOM-pill boundary.
Why this matches the original report
The original user-visible bug was a gray/transparent rectangular host behind the Windows capsule. The root cause was applying HWND-level material to a native host that is intentionally larger than the visible pill. That host needs transparent margins for shadow, badge, and animation room, so full-window Acrylic/SystemBackdrop paints those margins gray.
This revision keeps the capsule native host transparent and lets the DOM pill own the visible capsule shape. It also explicitly prevents the two regression paths that caused trouble:
no apply_acrylic(&capsule, ...)
no capsule DwmEnableBlurBehindWindow / DWMWA_SYSTEMBACKDROP_TYPE / SetWindowRgn
QA still keeps Acrylic because its panel fills the native host; capsule is different because its host has transparent margins.
Environment: Windows, 125% scale, solid green background RGB(37,200,81) behind the capsule.
host rect: 275x105 physical pixels, corresponding to 220x84 at 125% scale
top-left / top-right / bottom-left / bottom-right / left-at-pill-center / right-at-pill-center: all sampled as RGB(37,200,81)
maxSampleDistanceFromGreen = 0
transparentMargins = true
noHostSizedGrayRect = true
compactVisualWidth = true
compactVisualHeight = true
human HITL gate: pass
macOS safety check
This change should not remove the existing macOS glass behavior:
Capsule.tsx now uses const useBackdrop = os !== 'win';, so macOS still keeps backdropFilter: blur(28px) saturate(180%) and the original rgba(255, 255, 255, 0.85) pill surface.
capsuleLayout.ts only restores compact Windows pill metrics inside if (os === 'win'); macOS metrics remain 176x42.
lib.rs removes only the Windows capsule material/region path. The macOS main-window apply_vibrancy(... NSVisualEffectMaterial::HudWindow ...) path is unchanged.
Windows HITL screenshot + pixel gate above, triggered via OPENLESS_HOTKEY_INJECTION_DRY_RUN=1 and openless.exe --toggle-dictation without keyboard injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Summary
Why this is not a rollback
PR #496 proved that removing capsule Acrylic makes the gray rectangle disappear, but that also gives up the original material fallback. This PR fixes the actual layer violation instead: Acrylic is still used for capsule, but the HWND region is clipped to the real visual shapes before Acrylic is applied. Transparent shadow/badge host margins stay outside the native region, so they cannot be painted gray.
Validation
node ./scripts/windows-capsule-acrylic-contract.test.mjsnode ./src/lib/capsuleLayout.test.tsnpm run buildcargo check --manifest-path openless-all/app/src-tauri/Cargo.toml --bin openlessNote:
cargo checkstill emits existing unused/dead_code warnings unrelated to this change.PR Type
Bug fix, Tests
Description
Remove Windows capsule Acrylic
Preserve QA Acrylic fallback
Keep capsule host transparent
Add Acrylic contract tests
Diagram Walkthrough
File Walkthrough
lib.rs
Remove capsule Acrylic on Windowsopenless-all/app/src-tauri/src/lib.rs
apply_acrylic(...)call forcapsuleCapsule.tsx
Make Windows pill more opaqueopenless-all/app/src/components/Capsule.tsx
backdrop-filterfor Windows capsule renderingcapsuleLayout.ts
Separate compact pill from hostopenless-all/app/src/lib/capsuleLayout.ts
180x44220capsuleLayout.test.ts
Update capsule metric expectationsopenless-all/app/src/lib/capsuleLayout.test.ts
220windows-capsule-acrylic-contract.test.mjs
Add capsule Acrylic regression checksopenless-all/app/scripts/windows-capsule-acrylic-contract.test.mjs
windows-ui-config.test.mjs
Adjust Windows UI config assertionsopenless-all/app/scripts/windows-ui-config.test.mjs