Repository navigation
fix(browser): honor renderer zoom for native viewport and input - #165
Merged
howdeploy merged 1 commit intoOct 26, 2026
Merged
Conversation
howdeploy
added a commit
that referenced
this pull request
Oct 26, 2026
Integrate #163 by @BIackFIame, #164 by @CLOSETTTY, and #165/#166 by @teo-nex, with separate maintainer integration fixes. Preserve original contributor commits and authorship. Include the already-merged #158 contribution by @pepechka-kun in the release credits. PRs #159 and #160 remain excluded.
BIackFIame
added a commit
to BIackFIame/CanvasTTY
that referenced
this pull request
Oct 26, 2026
Upstream main 3d50657 (howdeploy#168): howdeploy#163 auto-sort (already in edge, one copy), howdeploy#164 animated terminal backgrounds and F8 quick hide, howdeploy#165 browser zoom, howdeploy#166 CanvasLink for Android, maintainer follow-ups, version 1.8.3. Conflicts kept both sides: changelogs (1.8.3 above edge's 1.8.2 notes), renderer define for the build commit plus the es worker format, version 1.8.3 with the Edge desktop name, upstream's lockfile (no Edge-only deps), the Claude/Codex editor keys next to the F8 background toggle (F8 clashes with every other key, as upstream), plugin names next to the background types in App, and the Settings keyboard labels.
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.
A non-default View > Zoom leaves the browser's native page shifted and larger than its React card. The renderer reports CSS pixels, but Electron child Views use device-independent pixels. With a persisted zoom level of -0.5 (91.3%), the native page is about 9.5% too large, exposing a detached page over the canvas.
Convert viewport and clip edges using the trusted IPC sender's zoom factor before rounding, and combine renderer zoom with canvas scale for page rendering. Convert native pointer, pan and wheel-anchor coordinates back to renderer CSS pixels; convert renderer wheel origins to native coordinates before hit testing.
The existing Electron smoke now exercises the real sandboxed preload/IPC path at renderer zoom 91.3%, 80%, 100% and 125%, combined with canvas scales 0.5, 1 and 1.4. It checks native bounds, page zoom, pointer coordinates, wheel handoff and the actual React BrowserCard. Before the fix, this regression fails with expected 193×119 bounds versus actual 211×131 at 91.3% renderer zoom and 0.5 canvas scale; it passes after the fix.
Validation on macOS:
npm ciwith the repository's node-pty patch applied.npm run build.npm run smoke:browser, includingCANVASTTY_BROWSER_ZOOM_SMOKE_READY.CANVASTTY_*variables removed and a 30-second per-test timeout (node --test --test-concurrency=1 --test-timeout=30000 --test-reporter=tap tests/*.test.mjs).npm run audit:secretsandgit diff --check.