Skip to content

test(appwin): assert actual DPI-scaled layout arguments - #121

Open
dwgx wants to merge 2 commits into
RoutineMiku:mainfrom
dwgx:test/appwin-layout-contract-20261121
Open

dwgx wants to merge 2 commits into
RoutineMiku:mainfrom
dwgx:test/appwin-layout-contract-20261121

Conversation

@dwgx

@dwgx dwgx commented Nov 21, 2026

Copy link
Copy Markdown

Scope

  • Test real AppWindow entrypoints using fake Electron/agent/store, guarded process/network/write operations, and exact numeric agent.layout assertions.
  • Cover openDetached, toggleMaximize, and openDetachedLayoutOnly at scale factors 1, 1.25, 1.5, including negative origin and restoring an already-physical probe rectangle.
  • Register the new test in npm test after display-scale-test.js.

No production source change. This strengthens the DPI regression test; it is not a live flicker fix or GUI validation.

Evidence

  • Syntax-valid _physical no-op M2: existing test 11/11 passes (exit 0); new behavior test detects 5 numeric mismatches (2/7, exit 1).
  • Restored source: new test 7/7 passes (exit 0).
  • Separate read-only GLM-labeled reviewer checked layout oracles, isolation and M2 reproduction. Provider-resolved child model was not independently observed.
  • Root independently reran new 7/7 and old 11/11 (exit 0), verified test registration, changed-file scope and git diff --check.

Limitations: fake display and agent, no Electron/GUI/Android emulator/installer execution; no mixed-DPI field proof. Existing optional external APK fixture remains skipped in the overall project tests.

dwgx added 2 commits November 21, 2026 18:06
- Load the complete src/core/appwin.js with Electron/store/pointer intercepted.
- Execute openDetached, toggleMaximize and openDetachedLayoutOnly against a fake
  agent and assert exact agent.layout coordinates at sf=1, 1.25, 1.5 and negative
  display origin; probe-provided physical rectangles restore without rescaling.
- Isolation blocks windows, child processes, network, file writes and unbounded timers.
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