fix(desktop): add listTargets() to MacosAxapiBackend (main broken) - #20
Merged
Conversation
PRs #18 (MacosAxapiBackend) and #19 (listTargets interface change) merged in conflicting order: #19 made listTargets() required on the DesktopCaptureBackend interface, but #18 was written before #19 so the macOS implementation doesn't implement it. Main is currently broken with two TS2420/TS2741 errors: src/desktop/macos-axapi-backend.ts:78 Class 'MacosAxapiBackend' incorrectly implements interface 'DesktopCaptureBackend'. Property 'listTargets' is missing. src/mcp/dispatcher.ts:374 Property 'listTargets' is missing in type 'MacosAxapiBackend'. Fix: mirror the WindowsUiaBackend.listTargets() implementation in MacosAxapiBackend. Same JSON-RPC call (list_windows on the bridge), same camelCase->snake_case field mapping. No behaviour change to existing methods. Tests: new listTargets test on MacosAxapiBackend mirrors the Windows test. Full suite: 317 passed, 10 skipped, 0 failed. This was foreseen in PR #19's description ("PR #18 will need the same listTargets() implementation. Will update that PR as a follow-up commit on the feat/desktop-macos-axapi-backend branch after #18 merges"). Now landing it. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Main is currently broken. Hotfix. Two PRs landed in conflicting order:
Result: `npm run build` fails with:
```
src/desktop/macos-axapi-backend.ts(78,14): error TS2420
Class 'MacosAxapiBackend' incorrectly implements interface
'DesktopCaptureBackend'. Property 'listTargets' is missing.
src/mcp/dispatcher.ts(374,17): error TS2741
Property 'listTargets' is missing in type 'MacosAxapiBackend'.
```
Fix
Mirror the `WindowsUiaBackend.listTargets()` implementation in `MacosAxapiBackend`:
No behaviour change to existing methods. The macOS Swift bridge already supports `list_windows` — this just wires it through the Node side to match the interface contract.
Tests
After this merges
Main builds clean again. The macOS path is feature-complete: scaffold, capture/execute, Node backend, list_targets all working.
🤖 Generated with Claude Code