Skip to content

fix(macos): resolve native menus and verify lifecycle transitions - #376

Open
lahfir wants to merge 6 commits into
mainfrom
laf/macos-native-lifecycle
Open

lahfir wants to merge 6 commits into
mainfrom
laf/macos-native-lifecycle

Conversation

@lahfir

@lahfir lahfir commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator
  1. Windowless apps and closing windows could break macOS menu actions and waits.
  2. Resolve menus by app identity, verify focus live, and observe transitions without repeating actions.
  3. Related: fix: harden native accessibility targeting and delivery #210.

Before

After the last TextEdit document closes, agent-desktop cannot reach About TextEdit.

before.mp4

After

The same menu action opens the real About TextEdit panel with no document window.

after.mp4

Give app-owned menus process identity without a document window. Verify
activation with fresh target AX focus and retain exact process generations.
Reconcile caller waits after uncertain delivery without repeating the action.

BREAKING CHANGE: JSON envelopes use 2.6; macOS app-owned menu snapshots omit data.window.
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-desktop Ready Ready Preview, v0 Oct 31, 2026 9:32am UTC

Comment thread crates/macos/src/tree/app_menu.rs Resolved
Avoid an extra ref resolution on Linux and Windows while preserving
strict native menu classification on macOS. Update the native inventory
test to pass the bridge's explicit full-inventory argument.
Reuse the stored window identity check so a renamed window cannot satisfy a disappearance wait. Keep process-generation checks and return the current title.
Observe window-owned refs through their original window so waits survive a closing sheet. Preserve partial Linux window reads until target lookup, and retry only transient macOS surface failures.
Keep successful Linux focus results when a later read is incomplete and retain child counts across macOS fallback reads. Share saved process identity validation, clarify surface recovery, and cover incomplete reads and renamed windows. Register the shared observer in the CLI helper inventory.

This branch has not been deployed

No deployments
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