fix(app): webview zoom via in-document CSS capture (amicode#266) - #161
Open
gennadiryan wants to merge 9 commits into
Open
fix(app): webview zoom via in-document CSS capture (amicode#266)#161gennadiryan wants to merge 9 commits into
gennadiryan wants to merge 9 commits into
Conversation
added 8 commits
August 8, 2026 02:37
This reverts commit 8c59fd0.
gennadiryan
marked this pull request as ready for review
August 9, 2026 22:22
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.
What / why
amicode#266 — Cmd/Ctrl
+/-/0zoom keybindings did nothing while focus was inside the amicode webview. Root cause: the chords were registered with the command registry, whose exact (normalized-key, modifier-mask) matching is layout-sensitive (Ctrl+Plus on US IS Ctrl+Shift+"=" → arrives as key "+" with the shift bit; the numpad "+" arrives unshifted; on DE/FR/Nordic layouts "=" itself is shifted), and inside the webview the workbench can never see in-iframe keydowns to forward them.Fix (V1): every app document — the main frame and each split pane — captures the chords itself with a raw capture-phase keydown listener (Ctrl/Cmd +
=/+/-/_/0, matched by the key the layout produces, shift-insensitive) and applies the existing per-window persisted CSS zoom (web-zoom.ts). Zoom is in-app and self-contained; the extension needs no zoom machinery at all (companion PR in harmoniqs/amicode removes it).web-zoom.ts— raw chord capture →setWebZoomin all hosts; deleted the bridge envelope, pane relay, diag relay, andinWebview()routing.layout.tsx— deleted theview.zoomIn/Out/Resetregistry entries and their layout-sensitive chord sets.web-zoom.test.ts+zoom-keybind.test.tsaround the raw listener (chord matrix + negatives).Verification
bun run typecheckclean except the pre-existingsession-header.tsxerror.References harmoniqs/amicode#266.