Skip to content

fix(desktop): pass clicks through transparent dead zones of the shell and notch windows - #11552

Merged
kodjima33 merged 1 commit into
mainfrom
kodjima33/notch-deadzone-fix
Aug 14, 2026
Merged

kodjima33 merged 1 commit into
mainfrom
kodjima33/notch-deadzone-fix

Conversation

@kodjima33

@kodjima33 kodjima33 commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Clicking "somewhere else" while the Omi shell or notch surfaces are up hit an invisible dead zone: the click landed on Omi instead of the app the user aimed at, and that app never came forward.

Two windows had transparent regions that swallowed clicks:

  1. Main chat-first shell — deliberately a transparent window noticeably larger than its floating panels (ShellWindowChrome). The window server routes clicks by window frame, so the reserved title-bar band, the lane margins, and the gaps between the pills bar / search bar / response card were all invisible click sinks.
  2. Notch panel — in its response and notification states the whole fixed frame accepted hits, including the transparent glow ring around the visible surface.

Fix

  • Shell: ignoresMouseEvents is synced to the pointer (same mechanism as PR feat(desktop): chat-first Chat tab with always-on search, Activity tab in Memories, hide-on-unfocus, notch click-through fix #11372's notch fix). Visible content is answered by InkGlassHitRegions: both InkGlass primitives (inkGlassPanel, InkGlassView) register their live extent, so every page is covered through the one-glass seam with no per-page wiring; the ShellModalScrim barrier registers its host so dialogs stay modal; an 8 pt rim along the frame edge stays interactive so edge-resize survives. Deliberate trade-off: dragging from the invisible title-bar band no longer works — the visible top bar still drags (ShellWindowDragHandle).
  • Notch panel: response/notification states now own only the visible surface (frame minus glow outsets) via notchSurfaceContentContainsLocal; the resize grip sits inside the surface, so response resizing is unaffected.
  • debug_hit_probe now reports the shell policy verdict (shellAccepts=) for non-bar windows.

Product invariants

  • INV-CHAT-1 — chat surfaces touched (FloatingControlBarWindow/Geometry, QueryShell-hosting shell chrome). Chat behavior itself is unchanged: only pointer ownership of transparent margins changed; the invariant's guarded flows (ask → answer in the shell) were exercised live (ask_main_chat produced a streamed answer in the response card).

Failure-Class: FC-transparent-top-level-window-occlusion

Verification

  • Built and ran the omi-deadzone dev bundle (run.sh --yolo, bridge on 47805).
  • Exercised the real chat path (ask_main_chat → streamed answer rendered in the response card; window capture attached to the review).
  • debug_hit_probe sweeps: title-bar band, side margins, panel gaps, and the notch glow ring report accepts=false (clicks pass through); pills bar, search bar, response card, input field, resize rim, and notch response panel report accepts=true.
  • swift test --filter "ShellClickThroughPolicyTests|FloatingBarGeometryTests": 32/32 pass (new: testSurfaceFillingContentDoesNotOwnTheTransparentGlowRing, ShellClickThroughPolicyTests).
  • User-confirmed on the running build: clicks beside/between the panels now reach the app behind and bring it forward.

Line-Count-Exception: desktop/macos/Desktop/Sources/DesktopAutomationBridge.swift | 4565 -> 4575 | debug_hit_probe gains the shell click-through verdict; splitting the bridge is out of scope for this fix
Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarWindow.swift | 5209 -> 5219 | acceptsMouseHit surface-rect branch for the glow-ring fix; splitting the window class is out of scope for this fix

Review in cubic

… and notch windows

The chat-first shell is a transparent window noticeably larger than its
floating panels; the window server routes clicks by window frame, so the
title-bar band, lane margins, and inter-panel gaps swallowed clicks
aimed at other apps — the click landed nowhere and the other app never
activated. The notch panel had the same defect in its response and
notification states, whose whole-window hit region included the
transparent glow ring.

Shell: sync ignoresMouseEvents to the pointer (the PR #11372 mechanism).
Every glass surface registers its live extent through the InkGlass
primitives (InkGlassHitRegions), the modal scrim barrier registers its
host so dialogs stay modal, and an 8pt rim along the frame edge stays
interactive so edge-resize survives. Notch: response/notification states
now own only the visible surface (frame minus glow outsets).

Verification: built and ran the omi-deadzone bundle; debug_hit_probe
confirms dead air (title band, margins, gaps, glow ring) passes through
while pills bar, search bar, response card, input field, resize rim and
notch response panel stay interactive; 32/32 geometry+policy tests pass;
user confirmed clicks reach the app behind the window.

Failure-Class: FC-transparent-top-level-window-occlusion
@kodjima33
kodjima33 merged commit e28d4e2 into main Aug 14, 2026
31 of 32 checks passed
@kodjima33
kodjima33 deleted the kodjima33/notch-deadzone-fix branch August 14, 2026 06:19
Git-on-my-level added a commit that referenced this pull request Aug 14, 2026
## What changed and why

The summoned macOS shell is a transparent window. The 900 pt
readable-lane cap inside that window left empty wallpaper that still
belonged to the frame, so clicks beside the glass went nowhere
(recurrence of #11552 / `FC-transparent-top-level-window-occlusion`).
The lane now fills the window, and the window itself is capped at the
readable lane.

The first hug still left a gutter that clipped the ambient shadow into a
thick black halo, and AppKit's resize rim sat on that outer frame. The 8
pt inset and the unused title-bar clearance were the remaining invisible
distance between the grab handle and the visible glass. Both are gone:
`windowInset` is 0, the top bar occupies the hidden title-bar band
(`titlebarClearance` is 0), and the page sits on the window's bottom
edge. Grabbing the visible panel edge resizes. Remembered pre-hug frames
are clamped so the border cannot restore.

Height stays display-limited (`visibleFrame`); Retina scale is not
multiplied. Click-through still covers leftover air (rounded-corner
triangles, gaps between stacked panels).

## Product invariants affected

- INV-AUTH-1 — comment-only on `OmiApp.swift` window chrome; session
contract unchanged
- INV-UI-1 — existing Ink glass tokens; no new brand colour

## How it was verified

- Focused Swift tests: `xcrun swift test --package-path Desktop --filter
'PageGlassLaneTests|ShellModalScrimTests|ShellWindowChromeTests|ShellGlassChromeTests|ShellClickThroughPolicyTests|TopNavigationBarLayoutTests|ChatSurfaceBoundsTests|FloatingGlassChromeTests|ShellSummonTests|DesktopWindowLayoutPolicyTests|QueryShellTests'`
— 0 failures.
- Named QA bundle `/Applications/omi-hug-glass.app`
(`com.omi.omi-hug-glass`). The titled main window should measure **900
pt** wide. Production Omi / Omi Beta / Omi Dev were not overwritten.

## Tests

-
`TopNavigationBarLayoutTests.testNavigationLaneMatchesFullChatWidthAndPageInsets`
— the 900 pt cap is on the window; the lane fills the window.
-
`ShellClickThroughPolicyTests.testResizableWindowKeepsAnInteractiveEdgeRim`
— window inset is 0 so the resize rim is on the glass.
-
`ShellGlassChromeTests.testTitlebarClearanceIsZeroBecauseTheTopBarOccupiesTheBand`
— no extra band above the nav bar.
-
`PageGlassLaneTests.testTheLanesGlassFillsTheWindowWidthAndKeepsVerticalGaps`
— horizontal flush; page sits on the window bottom.
- `ShellSummonTests.testARememberedPreHugFrameIsHuggedToTheReadableLane`
— a 1400 pt remembered frame on a large display becomes the hug max.

## Failure class (fixes)

Failure-Class: FC-transparent-top-level-window-occlusion

Line-Count-Exception:
desktop/macos/Desktop/Sources/MainWindow/DesktopHomeView.swift | 1594 ->
1614 | pin max window width next to the existing min-size pin; splitting
DesktopHomeView is out of scope for this hug fix
kodjima33 added a commit that referenced this pull request Aug 15, 2026
…eporter (#11602)

## Problem


`GlassSurfaceReviewRegressionTests.testInkGlassPanelClipsReturnedContentButNotAnOuterOverlay`
fails on `main`, so `Desktop Swift Build & Tests` — a required exact-SHA
check for the desktop release planner — is red and holds candidates
back.

I introduced it in #11552: to let the shell decide where it may pass
clicks through, each glass panel registered its extent by adding an
`InkGlassHitRegionReporter` (an `NSViewRepresentable`) to
`InkGlassPanelModifier`'s background. An AppKit view inside that subtree
changes how `ImageRenderer` rasterizes it, and the panel stopped
clipping returned content to its rounded corner.

Controlled experiment on current `main`: with both reporters removed,
the clipping test passes (the neighbouring `ShellModalScrimDismissTests`
failure persists — that one is pre-existing and not addressed here).

## Fix

Register from `InkGlassBackdrop`'s own `NSVisualEffectView` (now
`InkGlassBackdropView`) — a view the panel already mounts — so the
registry adds nothing to any render tree. Reduce Transparency mounts no
backdrop, so `hasSurfaces(in:)` now keeps a window with no registered
surface fully interactive instead of turning it into a pass-through
hole. `debug_hit_probe` reports `glassSurfaces=<n>` so a pass-through
verdict can be told apart from that fallback.

Failure-Class: none

## Verification

- `swift test --filter GlassSurfaceReviewRegressionTests` → **3 passed**
(fails on `main` without this change).
- Built and ran the `omi-glassfix` bundle: panels render with their
rounded clip (screenshot in review), and `debug_hit_probe` reports
`glassSurfaces=3` with the title band still passing clicks through
(`shellAccepts=false`) while panel content stays interactive
(`shellAccepts=true`) — the #11552 behaviour is intact.

Line-Count-Exception:
desktop/macos/Desktop/Sources/DesktopAutomationBridge.swift | 4575 ->
4577 | debug_hit_probe reports the registered surface count so a
pass-through verdict is distinguishable from the empty-registry fallback


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/11602?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
pull Bot pushed a commit to Mu-L/omi that referenced this pull request Aug 15, 2026
…eporter

BasedHardware#11552 registered each glass panel's extent by adding an
InkGlassHitRegionReporter (an NSViewRepresentable) to the panel
modifier's background. An AppKit view inside that subtree changes how
ImageRenderer rasterizes it, and the panel stopped clipping returned
content to its rounded corner:
GlassSurfaceReviewRegressionTests.testInkGlassPanelClipsReturnedContentButNotAnOuterOverlay
has been failing on main ever since. Desktop Swift Build & Tests is a
required check for the release planner, so this also held candidates back.

Register from InkGlassBackdrop's own NSVisualEffectView instead — a view
the panel already mounts — so the registry adds nothing to any render
tree. Reduce Transparency mounts no backdrop, so a window with no
registered surface now stays fully interactive rather than becoming a
pass-through hole. debug_hit_probe reports the surface count so a
pass-through verdict can be told apart from that fallback.

Verification: swift test --filter GlassSurfaceReviewRegressionTests — 3
passed (the clipping test fails on main without this change; confirmed by
removing only the reporter). Built and ran omi-glassfix: panels render
with their rounded clip, debug_hit_probe reports glassSurfaces=3 with the
title band still passing clicks through (accepts=false) and panel content
interactive (accepts=true).

Failure-Class: none
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.

1 participant