Skip to content

fix(desktop): add listTargets() to MacosAxapiBackend (main broken) - #20

Merged
rrader26 merged 1 commit into
mainfrom
fix/macos-backend-list-targets
May 11, 2026
Merged

fix(desktop): add listTargets() to MacosAxapiBackend (main broken)#20
rrader26 merged 1 commit into
mainfrom
fix/macos-backend-list-targets

Conversation

@rrader26

Copy link
Copy Markdown
Contributor

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

  • New `listTargets` test on `MacosAxapiBackend` mirrors the Windows test, exercises the fake-bridge fixture
  • Full suite: 317 passed, 10 skipped, 0 failed

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

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>
@rrader26
rrader26 merged commit 86efb8c into main May 11, 2026
4 checks passed
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.

2 participants