Skip to content

Fix empty Teams meeting titles by waking Electron a11y tree#31

Merged
execsumo merged 1 commit into
mainfrom
fix/teams-title-a11y-wake
Jun 25, 2026
Merged

Fix empty Teams meeting titles by waking Electron a11y tree#31
execsumo merged 1 commit into
mainfrom
fix/teams-title-a11y-wake

Conversation

@execsumo

Copy link
Copy Markdown
Owner

Problem

Teams meeting titles were never captured, so transcripts fell back to the generic Meeting filename. The logged error was extractMeetingTitle: 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

  • Set AXManualAccessibility=true on the Teams app element at detection (enableMeetingAppAccessibility) to wake the tree.
  • The build is async 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.
  • The late-captured title is pushed 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 the next real meeting validates the title fix and yields 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 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 build clean; swift run HeardTests185/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.

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>
@execsumo
execsumo merged commit 441a862 into main Jun 25, 2026
4 checks passed
@execsumo
execsumo deleted the fix/teams-title-a11y-wake branch June 25, 2026 06:52
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