Fix native tab window replacement - #2206
Open
trentkm wants to merge 2 commits into
Open
Conversation
Ghostty and Fork expose each macOS native tab as a distinct AXWindow. Hidden tabs retain valid window IDs, so the containing-window liveness check keeps them in AeroSpace's model and the newly selected tab is placed through MRU as if it were a new window. This makes tab switching move or resize the visible window. For these known bundle IDs, reconcile tracked AX windows with the app's AXWindows list after registering the focused window. Skip that reconciliation while the mouse button is down and while the lock screen is frontmost, preserving the existing safeguards around tab detaching and lock-screen notifications. Replace a stale tab synchronously in the layout tree. Prefer the app's previous native-focused window ID, fall back only when one stale candidate exists, and preserve its exact parent, index, adaptive weight, floating size, fullscreen state, and cached layout geometry. Replacement tabs bypass on-window-detected because they are the same logical window rather than newly opened app windows. Add regression coverage for nested slot and weight preservation, previous-focus selection, ambiguous stale candidates, and the affected bundle-ID allowlist. Fixes nikitabobko#68 Builds on the AXWindows reconciliation explored in nikitabobko#2092
Orientation uses the h/v enum cases. Use .h when asserting that the replacement retained its horizontal-container adaptive weight so the regression test compiles on the CI matrix.
6 tasks
vitorebatista
added a commit
to vitorebatista/AeroSpace-edge
that referenced
this pull request
Aug 27, 2026
…te sync state Sync state moves to upstream main @ c548c7f / 59 open PRs, reviewed 2026-08-27. Adds the newly ported upstream PRs (2244, 2232, 2211, 2228, 2225) to the already-backported list, and records this cycle's skips: focus-follows-mouse PRs (nikitabobko#2238/nikitabobko#2245, feature absent in the fork), nikitabobko#2220 (duplicate of the already-ported nikitabobko#2024), nikitabobko#2213 (deletes lastNativeFocusedWindowId, which fork PR #59 depends on), nikitabobko#2206 (competing implementation of nikitabobko#2225), and six deferred feature PRs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WBcwRe3CktWZGGcHJHP4ds
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #68
Builds on the AXWindows reconciliation explored in #2092.
PR checklist
./test.shexits with zero exit code.