Skip to content

fix: avoid degrading panel hosts for CSS page zoom - #1110

Merged
Menghuan1918 merged 1 commit into
omdsh-dev:devfrom
HootRock:fix/panel-host-css-zoom
Nov 4, 2026
Merged

Menghuan1918 merged 1 commit into
omdsh-dev:devfrom
HootRock:fix/panel-host-css-zoom

Conversation

@HootRock

@HootRock HootRock commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

CSS page zoom is currently treated as a page-level transform by the panel-host geometry check. With body { zoom: 1.15 }, the fixed host has an expected visual height of roughly 932.6px in an 811px viewport. The check switches it to absolute positioning, creating document overflow and allowing focus/scroll actions to move the entire shell.

Account for cumulative ancestor CSS zoom when comparing the viewport-height declaration. Keep the inset-derived width and origin checks unchanged, so actual ancestor transforms still trigger compensation. Apply the same expected-height comparison when checking whether degraded mode can exit.

Adds real-browser regressions exercising production geometry and host CSS: no zoom, body zoom at 115% and 85%, html zoom, nested zoom, and a real ancestor translation that stays compensated until removal.

Refs #1102.

Local validation:

  • Before: 4 browser failures / 2 controls passed; after: all 6 passed in desktop Edge.
  • Related CSS/theme/native-surface/steady-state tests: 82 passed in 4 files.
  • Asset generation, typecheck, declaration build and tsdown bundling passed; changed-file ESLint and diff whitespace checks passed.
  • Independent AI review found no blocking issues and independently reran all 6 browser tests; extra zoom/transform probes passed.

Real-host validation used the npm-packed plugin installed through official dsh plugin --profile web add into a scratch profile with exact @deepseek-ai/dsh@0.2.1-rc.1, without API credentials. The final desktop Edge run passed all 12 selected tests: 5 real-host mount tests, the in-page native entry replacement, and the 6 geometry regressions. The geometry regressions themselves exercise extracted production code and actual host CSS. The Windows scratch host needed the genuine node-addon-require-builtin-win32-x64-msvc@0.1.9 dependency plus NODE_PATH; no official DSH source was changed.

The broader browser run was 17 passed / 6 skipped / 3 failed. Native reload initially lacked DSH_HOME in my manual test invocation and passed after that environment was supplied. The other two failures (Git Graph stays at 50 rather than 52 history rows; folder expansion requests the absolute workspace root rather than big) reproduced with the untouched dev client at bd6cfa5 in the same scratch host. They remain outside this fix. Search-engine assertions passed for installed rg; fd checks skipped because fd is unavailable. No macOS, mobile, Firefox or WebKit validation is claimed.

AI-assisted implementation, tests and independent review; reviewed and tested locally.

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