fix(macos): restore shell clicks after reopening - #12261
Conversation
Failure-Class: none
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Thanks @aryanorastar — this is a textbook small fix: correct root-cause diagnosis, a five-line production change, and a regression test that exercises the real AppKit lifecycle instead of a mock. Traced through all three files at head:
The desktop CI lanes are green on this head, including the Swift build & tests with the new lifecycle test. No blockers from my side — leaving the formal approval and merge sign-off to a maintainer. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Formatting and Hygiene were cancelled at 20:27:47 by the repo-checks concurrency group, and the run that followed was skipped rather than executed, so Formatting has no successful run on this head. No code change.
kodjima33
left a comment
There was a problem hiding this comment.
Small, well-scoped desktop bug fix (fixes #12249) with regression test; holding at approve-only because Desktop Swift Static & Test Contracts is currently red (RuntimeOwnerIdentityTests failure, unrelated to this diff's ShellClickThrough.swift change) — hard floor blocks merge on a failing required check.
|
No @kodjima33 @Git-on-my-level @undivisible — the implementation is complete and this PR is ready from the author side. The current red state is an unrelated CI flake in
I attempted to rerun the failed GitHub job directly, but GitHub restricts reruns to repository admins. A maintainer rerun of https://github.com/BasedHardware/omi/actions/runs/33064363595 is the remaining action; no product-code change is warranted for this failure. |
|
Follow-up on the current red CI, since the flake analysis above asked for a maintainer-side check — I verified it independently against the Actions history:
So no PR-side change is warranted for the red state. The one remaining step is operational: an admin rerun of run 33064363595 so the required checks can re-evaluate this unchanged tree. With the approval already on this head and the diff itself previously reviewed clean, nothing else is pending from my side. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
What changed and why
Fixes #12249.
The macOS shell reuses the same
NSWindowwhen it is dismissed and summoned again. While the window was hidden, mouse-interception reconciliation correctly switchedignoresMouseEventson, but the synchronizer then stopped polling because the window was no longer visible. Ordering that same window back on screen did not trigger another reconciliation, so the visible shell could remain click-through until an unrelated pointer event repaired it. That made visible controls intermittently ignore the first click—or every click if no local event could reach the window.This change observes AppKit's authoritative
NSWindow.isVisibletransition and immediately reruns the existing interception policy whenever visibility changes. It also releases that observation with the synchronizer's other lifecycle resources.The regression test mounts a real AppKit window and exercises the production sequence directly: visible → ordered out → reconciliation enables pass-through → ordered front. It proves the shell restores mouse interception before the first user click, without depending on pointer movement or test-only state.
Product invariants affected
none
How it was verified
ShellClickThroughPolicyTests,GlassPanelHitRegionTests,ShellSummonTests, andShellWindowChromeTests.com.omi.omi-12249-clicks), dismissed and summoned the production shell, then used a real native pointer click on Brain; the selected route changed from Chat to Brain on the first click.ChatTranscriptGestureHarnessTests,MemoryAtlasPerformanceHarnessTests, andRewindArtifactGauntletTests).Tests
Failure class (fixes)
Failure-Class: none