Skip to content

macOS 27 support: instant switching is back - #2

Closed
Ozdotdotdot wants to merge 6 commits into
rileycx:mainfrom
Ozdotdotdot:macos-27-support
Closed

Ozdotdotdot wants to merge 6 commits into
rileycx:mainfrom
Ozdotdotdot:macos-27-support

Conversation

@Ozdotdotdot

@Ozdotdotdot Ozdotdotdot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Hey Riley! Been using Strafe since you open sourced it :)

macOS 27 completely broke it (synthetic swipes get swallowed, nothing moves), so I dug in and got it working again on 27.0 arm64. Hotkeys, swipes, both edges, Mission Control passthrough all verified live.

What's in here:

  • Augmented gesture output for 27 (embedded IOHID payload, paced phases), auto-selected with STRAFE_EVENT_PROFILE to force legacy/macos27. Pre-27 defaults are untouched.
  • Engine confirms the real neighboring Space instead of assuming, and only pauses interception after 3 delivery failures in a row (plus overlay grace). I tend to mash strafe during a mission control animation so this was necessary lmao.
  • Your speed presets ride the same pipeline now, so they compose with both profiles instead of only the legacy one.
  • Interception narrowed to horizontal swipes; MC/Exposé pass through via Dock AX notifications plus a window-layer snapshot (27 moved MC to a lone layer-20 window, AX went silent — strafe mc-probe diagnoses this live).
  • Env knobs for direction mapping if anyone's hardware disagrees with mine.

Two apologies: I know you love the line count, so I'm sorry about all the tests. Totally fine if you want them trimmed or dropped. And I couldn't check anything pre-27 here, so a 26 sanity look would be great. bench/ still drives the synchronous poster.

Happy to split this up or rework anything. Thanks for strafe!

Ozair Khan added 6 commits September 14, 2026 22:15
Wed Riley's Transition-speed presets, install.sh, Preferences and bench sweep into the macOS 27 engine instead of keeping two engines. Ramps now build on the same event creators as instant (strafe_create_ramp_event, both profiles) and run through the observe-and-confirm pipeline, so speed and profile compose. The fire-and-forget ramp poster and waitForPendingSwitch have no callers left and are gone; the CLI waits on the real completion instead. Also in this merge: single-transient-read tolerance in the poll loop, a one-second overlay grace that never disables interception over Mission Control's close animation, and a strafe mc-probe diagnostic (AX notifications plus Dock layer census) after overlay detection proved silent on 27.
Mashing swipes through Mission Control's close animation could pause trackpad interception after a single failed request: the failure breaker fired on the first unexpectedChange, and overlay detection is silent on some systems so no grace applied. Now a changing anomaly polls on until the deadline, only a stable wrong destination fails fast, and pausing takes three delivery failures in a row (any success resets). A failure within a second of an overlay is still neither counted nor reported.
mc-probe showed Dock's AX overlay notifications never arrive on 27, while Mission Control presents exactly one Dock window at layer 20 (closed desktop shows none). The snapshot heuristic required a layer-18 window, so it never fired and synthetic switches went into Mission Control. A lone layer-20 Dock window is now an overlay signal, and the engine consults the snapshot at request admission in addition to the AX flag. Interceptor behavior is unchanged: Began already passed through on the snapshot.
@rileycx

rileycx commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Thank you Oz! I saw this after making an update for mac 27 earlier. Is there anything particular here that you feel is worth still pulling in compared to the latest update?

rileycx added a commit that referenced this pull request Sep 17, 2026
Adopt the reviewed Mission Control detection check from PR #2, with a macOS 27 availability guard, regression tests, contributor acknowledgment, and the scoped contribution-security review. Preserve the individual commits so Ozair retains authorship of the adapted fix.
rileycx added a commit to thecolormaroun/strafe that referenced this pull request Sep 17, 2026
Adapt the Dock layer-20 check from PR rileycx#2, commit 2b75106. Restrict the new rule to macOS 27 and later to preserve existing behavior on older systems.

Co-authored-by: rileycx <riley@oratory.co>
@Ozdotdotdot

Copy link
Copy Markdown
Contributor Author

All good man! Looks like you made more changes otherwise, just happy to be of service anyhow.

Gonna close this one bossman. Cheers!

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