Skip to content

fix(extension): strip webview zoom bridge and diag lanes (amicode#266) - #321

Open
gennadiryan wants to merge 7 commits into
mainfrom
fix/xplatform-keybindings-v1
Open

fix(extension): strip webview zoom bridge and diag lanes (amicode#266)#321
gennadiryan wants to merge 7 commits into
mainfrom
fix/xplatform-keybindings-v1

Conversation

@gennadiryan

Copy link
Copy Markdown
Member

What / why

amicode#266 — Cmd/Ctrl +/-/0 zoom keybindings did nothing while focus was inside the chat webview. The fix moves zoom handling out of the extension entirely: the vendored fork now captures the chords in each app document and applies its in-app CSS zoom (companion PR in harmoniqs/opencode).

This PR removes the extension-side machinery built for the previous capture-and-forward approach:

  • chat_bridge.ts — deleted the zoom lane, the diag-log lane, the eager "Amicode — webview diag" output channel and its activation probe.
  • chat_panel.ts — deleted the host-page keydown listener and the zoom / diag-log allowlist entries.
  • tests + __mocks__/vscode.ts — removed the zoom/diag test blocks and the outputLines channel mock.

Why the previous approach could not work: keydowns inside the app iframe never reach the workbench keybinding service (cross-origin, frame-local event routing), so no extension-side capture point existed for panel focus; with the webview tab focused, host-page capture double-fired alongside the workbench's own native zoom (preventDefault cannot suppress the webview's keydown forwarding).

Verification

  • 17/17 chat_bridge tests; full fast suite green apart from environment-dependent runs/ledger tests (need amico / ~/.amico); tsc --noEmit clean.
  • Remote GUI: panel focus → single CSS zoom of the webview content; tab focus → single native window zoom; no doubles, no diag channel.

References #266.

Gennadi Ryan added 6 commits August 9, 2026 01:25
@gennadiryan
gennadiryan marked this pull request as ready for review August 9, 2026 22:21
@gennadiryan
gennadiryan requested a review from Rchari1 August 9, 2026 22:22
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