Restore team picker opening animation

Merged
AU
2mo ago
+102-8

Summary

Closes #13308.

The team-picker change moved the account menu and nested picker onto the shared grouped ArrowlessPopoverAnchor path. Grouped popovers were made immediate to keep child-first dismissal safe, which also removed the individual team picker’s opening transition.

This PR adds an explicit shared opening policy to ArrowlessPopoverAnchor:

  • the nested team picker opts into AppKit’s native opening transition;
  • the existing grouped default remains immediate for other grouped callers;
  • Reduce Motion is sampled for every presentation, including repeated opens;
  • grouped dismissal still disables animation before closing children and parents;
  • stale close notifications are ignored so rapid close/reopen cannot clear a newer presentation.

The parent profile-menu restoration in #13295 remains a separate change; this PR composes with that lifecycle work and targets the nested team-picker regression.

Impact map

SurfaceEffect
Account menuExisting grouped dismissal and placement remain unchanged
Nested team pickerNative opening transition restored; selection/hover/keyboard paths use the same anchor
Other grouped popoversImmediate opening remains the default
Ungrouped popoversExisting native opening behavior remains the default
Reduce MotionOpening animation is disabled on every presentation

Testing

  • Test-only commit 1785dee0ed5 was pushed first. Hosted macOS compile admission failed as expected because CmuxPopoverPresentationAnimation did not exist yet.
  • Fix commit e4c0d959478 adds the policy and anchor integration.
  • Follow-up 667b8dff13c keeps the policy implementation private to the public anchor.
  • Follow-up 2afe3b8f88c ignores stale close callbacks so rapid close/reopen cannot tear down the new picker.
  • Follow-up eb68b34cb6b retained delayed closing popovers and cleared teardown state safely when AppKit delivered callbacks after the coordinator dropped its active reference.
  • Final lifecycle follow-up 01f0a503b97 follows the shared teardown contract: explicit dismissals reset the presentation binding synchronously, while anchor dismantling preserves the owner binding.
  • Local non-build checks passed: git diff --check, python3 scripts/swift_file_length_budget.py, ./scripts/lint-pbxproj-test-wiring.sh --repo-root ., and ./scripts/localize-changes --base origin/main (six catalogs, nine locales; no new user-facing strings).
  • Hosted focused unit run 35566264766 executed cmuxTests/CmuxPopoverGroupTests: 10 Swift Testing cases passed, including the grouped animation, submenu default, Reduce Motion, click-away, hover, group lifecycle, and reopening coverage.
  • The normal PR CI compile admission and tests job also pass for the prior implementation head; the new lifecycle commit is running through a fresh PR CI run now.
  • The canonical autoreview initially found one Aziz DocC issue for an unnecessarily public stored property and later found a delayed-close teardown edge case; both were fixed in follow-up commits and the clean rerun is pending this final lifecycle commit.

Demo Video

  • Video URL or attachment: pending Austin’s explicitly authorized tagged build.

Visual verification

Pending Austin’s explicit request for the tagged developer build issue-13308-team-picker-animation. A static screenshot or source assertion cannot prove a transition; the isolated visual pass still needs first/repeated opens, rapid open-close, keyboard activation, team selection, outside click/Escape, nested placement, and Reduce Motion off/on. No developer build was submitted in this first pass.

Checklist

  • I added or updated tests for behavior changes
  • I updated docs/changelog if needed
  • I tested the change locally (local app build intentionally deferred by issue instructions)
  • I requested bot reviews after my latest commit
  • All code review bot comments are resolved
  • All human review comments are resolved