Skip to content

Fix Mission Control label mismapping across fullscreen Spaces - #69

Open
blsmth wants to merge 1 commit into
mainfrom
agent/go-engineer/issue-65
Open

blsmth wants to merge 1 commit into
mainfrom
agent/go-engineer/issue-65

Conversation

@blsmth

@blsmth blsmth commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Mission Control's Spaces Bar draws one button per Space including fullscreen ones, numbered by structural left-to-right position. Reconciler.resolve excludes fullscreen Spaces from userIndex, so the two diverge the moment a display has any fullscreen Space, mislabeling every button after it.
  • Reconciler already exposes stripIndex (added in Fix fullscreen switching, correct release docs, and enforce the CI lint gate #66 for SwitchPlanner's hop counting) — the 0-based strip position that does count fullscreen tiles, i.e. exactly the coordinate Mission Control's own button numbering uses.
  • MissionControlOverlayGeometry.spacesByDisplayAndIndex and MissionControlRowResolution.resolve now key their (display, structural-button-index) → ResolvedSpace lookup by stripIndex instead of userIndex. A structural button landing on a fullscreen tile itself now correctly misses the lookup instead of mislabeling the next nameable Space.
  • No live AX capture with a real fullscreen Space open was performed for this pass — see the spec's Deviations section for why that turned out to be unnecessary (the fix reuses stripIndex, an already-shipped, already-tested structural coordinate).

Closes #65

Test plan

  • swift build
  • swift test (243 tests, 0 failures)
  • xcrun swift-format lint -s -r Sources Tests (clean, matches CI's lint gate)
  • New regression tests pin the fix against a synthetic [Desktop 1, fullscreen, Desktop 2] fixture in both MissionControlOverlayGeometryTests and MissionControlRowResolutionTests

Mission Control's Spaces Bar draws one button per Space including fullscreen
ones, but Reconciler.resolve excludes fullscreen Spaces from userIndex. Since
desktop buttons are numbered by structural left-to-right position,
userIndex-keyed lookups drift out of sync the moment a display has any
fullscreen Space, mislabeling every subsequent button.

Reconciler already exposes stripIndex (added in #66 for SwitchPlanner's hop
counting) — the 0-based strip position that does count fullscreen tiles.
Switch MissionControlOverlayGeometry.spacesByDisplayAndIndex and
MissionControlRowResolution.resolve to key on stripIndex instead, so a
structural button number maps to the correct nameable Space (or correctly
misses, if it lands on a fullscreen tile itself).

Closes #65
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.

Fullscreen Spaces break the structural desktop-button index vs. userIndex assumption

1 participant