Skip to content

feat(ax): detect native tab-group membership on WindowInfo - #563

Closed
honeyspoon wants to merge 1 commit into
acsandmann:mainfrom
honeyspoon:feat/ax-is-tabbed
Closed

honeyspoon wants to merge 1 commit into
acsandmann:mainfrom
honeyspoon:feat/ax-is-tabbed

Conversation

@honeyspoon

@honeyspoon honeyspoon commented Oct 5, 2026 •

Copy link
Copy Markdown

Summary

Expose a new WindowInfo.is_tabbed: bool so the rest of rift can tell whether a window sits in a macOS native tab group of ≥ 2 tabs.

Detection walks the window's AXChildren for an AXTabGroup whose AXTabs list holds two or more entries. macOS only materializes that child once a second tab is added, so the field flips on Cmd+T and clears when the user drags a tab back out.

Why

Standalone primitive. Native tab groups are the root cause behind a couple of long-standing weirdnesses (destroy path on space switch, tab siblings showing up in the layout tree). Landing the detection alone first keeps that follow-up work small and reviewable.

Compatibility

  • #[serde(default)] on the field, so old layout snapshots keep deserializing.
  • All existing WindowInfo struct literals updated with is_tabbed: false (production synthesis paths that never see an AX element, plus test fixtures).

Testing

  • cargo build --release clean.
  • cargo test --lib passes 801/802; the one failure (discovery_preserves_hidden_windows_on_their_original_same_display_space) is pre-existing on main and unrelated to this change.

Walk AXChildren for an AXTabGroup with an AXTabs list of >= 2 and
expose the result on WindowInfo as `is_tabbed`. macOS only populates
the tab group once a second tab is added, so detection flips on
Cmd+T and clears when the user drags a tab back out.

No behavior change. The field is populated once in from_ax_element
and surfaces in `rift query windows` JSON; `#[serde(default)]` keeps
old layout snapshots deserializable. Reactor keeps ignoring it until
a follow-up patch wires it into discovery and the destroy path.
@honeyspoon

Copy link
Copy Markdown
Author

Superseded by #560, which exposes the same primitive (as has_native_tabs) with cleaner detection and lands the full focus/layout fix on top. Closing in favor of that.

@honeyspoon honeyspoon closed this Oct 6, 2026
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