Fix empty Teams meeting titles by waking Electron a11y tree#31
Merged
Conversation
Teams is an Electron/Chromium app whose accessibility tree stays dormant until a client requests it, so AX reads of its windows/titles/roster failed (kAXErrorAPIDisabled, -25211) even though Heard is trusted (stable Developer ID signing + live AXIsProcessTrusted). The result: meeting titles were never captured and fell back to the "Meeting" filename. - Set AXManualAccessibility=true on the Teams app element at detection (MeetingDetector.enableMeetingAppAccessibility) to wake the tree. - The tree builds asynchronously and the join-time set can time out against a busy Teams, so the 15s roster poll re-nudges while the roster is empty and re-extracts the title until non-empty. - Propagate the late-captured title into the live session via RecordingManager.updateTitle in onMeetingEnded (parallel to updateRosterNames), before the filename is built at write time. RecordingSession.title is now var. Diagnostics (Developer Mode) so a real meeting validates the title fix and gives us data to retune the never-verified roster parser: - meeting-start anchor + per-poll timeline lines. - RosterReader.diagnosticTreeDump: bounded (depth<=9, <=500 nodes) outline of Teams' real AX tree, emitted up to 3x/meeting while roster is empty. Unit-tested for structure, truncation, node budget, and depth. Also fix 4 main-actor concurrency warnings (future Swift 6 errors) in the screen-capture permission observer via MainActor.assumeIsolated (the block already runs on queue: .main). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
Teams meeting titles were never captured, so transcripts fell back to the generic
Meetingfilename. The logged error wasextractMeetingTitle: windows query failed … axErr=-25211(kAXErrorAPIDisabled) at every meeting start.Root cause
Teams is an Electron/Chromium app whose accessibility tree stays dormant until a client requests it. AX reads of its windows/titles/roster failed even though Heard itself is trusted (stable Developer ID signing + live
AXIsProcessTrusted). The code only ever read the tree — it never sent the signal to build it.Fix
AXManualAccessibility=trueon the Teams app element at detection (enableMeetingAppAccessibility) to wake the tree.RecordingManager.updateTitleinonMeetingEnded(parallel toupdateRosterNames), before the filename is built at write time.RecordingSession.titleis nowvar.Diagnostics (Developer Mode)
So the next real meeting validates the title fix and yields data to retune the never-verified roster parser:
RosterReader.diagnosticTreeDump— bounded (depth ≤ 9, ≤ 500 nodes) outline of Teams' real AX tree, emitted up to 3×/meeting while the roster is empty. Unit-tested for structure, truncation, node budget, and depth.Also
Fixes 4 main-actor concurrency warnings (future Swift 6 errors) in the screen-capture permission observer via
MainActor.assumeIsolated.Testing
swift buildclean;swift run HeardTests→ 185/185 pass (+4 new dump tests).Title fix should resolve the filename issue immediately; roster reading is now unblocked but unverified pending a real-meeting tree dump.