Skip to content

fix(desktop): externalize WebView2 release smoke / 将 WebView2 发版烟测移出生产 EXE - #8333

Open
SivanCola wants to merge 4 commits into
esengine:main-v2from
SivanCola:fix/windows-webview2-external-smoke
Open

fix(desktop): externalize WebView2 release smoke / 将 WebView2 发版烟测移出生产 EXE#8333
SivanCola wants to merge 4 commits into
esengine:main-v2from
SivanCola:fix/windows-webview2-external-smoke

Conversation

@SivanCola

@SivanCola SivanCola commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove the test-only REASONIX_WEBVIEW2_APPROVAL_SMOKE lifecycle, HTML injection, Wails bridge, and automated approval driver from the shipped Desktop executable
  • move approval and WAAPI interaction coverage to a real Chromium browser gate
  • smoke-test the exact Windows release executable externally by requiring a native window, descendant WebView2 renderer, WebView2 document, editable composer, five consecutive healthy seconds, and graceful shutdown before signing
  • treat transient renderer/window/page handoffs as a health-window reset instead of an immediate failure, with a deterministic PowerShell state-machine self-test in Windows CI

Issues

No linked issue.

Verification

  • pnpm --dir desktop/frontend test:workspace
  • pnpm --dir desktop/frontend test:motion
  • pnpm --dir desktop/frontend build
  • pnpm --dir desktop/frontend test:motion-browser
  • focused Windows signing/packaging and WebView2 smoke contract tests
  • go test ./... from desktop/
  • bash scripts/release-workflows.test.sh
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 -ignore 'label "windows-11-arm" is unknown' .github/workflows/ci.yml .github/workflows/release-desktop.yml

The approval animation keeps the production CSS easing contract cubic-bezier(0.8, 0, 0.8, 0.28). Browser coverage asserts that the native Web Animations API is called once and approval submits after completion. Existing unit coverage retains cancellation, synchronous rejection, and one-shot submission fallbacks. The exact production EXE remains free of test-only bridge or remote-debug switches; its rendered page is observed externally through Windows UI Automation.

Documentation impact

Documentation-impact: none - this changes internal release validation and removes test-only production instrumentation; user-facing Desktop behavior and embedded help remain unchanged.

Cache impact

Cache-impact: none - no provider-visible prompts, memory prefixes, tool schemas, serialization, or ordering changed.
Cache-guard: N/A - no cache-sensitive surface changed.
System-prompt-review: N/A

Problem:
The Windows approval smoke compiled test-only environment triggers, HTML injection, a Wails bridge, and automated interaction code into the customer Desktop executable. That expanded the signed binary surface and could affect heuristic antivirus classification.

Root cause:
The release gate used the production executable as both the shipped application and the approval-test harness.

Fix:
Move approval interaction coverage to a real Chromium browser gate, replace the Windows check with an external exact-binary startup/renderer/health/graceful-close smoke, remove all embedded smoke instrumentation, and lock the split with workflow contracts.

Verification:
- pnpm --dir desktop/frontend test:motion
- pnpm --dir desktop/frontend test:motion-browser
- pnpm --dir desktop/frontend build
- cd desktop && go test ./...
- bash scripts/release-workflows.test.sh
- actionlint for ci.yml and release-desktop.yml
@SivanCola
SivanCola requested a review from esengine as a code owner August 11, 2026 05:24
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) updater Auto-update / installer / release packaging labels Aug 11, 2026
Sync the published PR branch with the latest protected base without rewriting fork history. This incorporates the current task-budget and completion-receipt changes before the Windows smoke follow-up.
Problem:
The Windows native smoke failed immediately during a transient WebView2 renderer handoff, while its browser gate still exercised Vite preview instead of proving that the exact production executable rendered its UI.

Root cause:
The health loop treated one unhealthy sample as terminal and only checked the native window plus renderer process. It had no deterministic state-machine coverage and no external page-readiness signal for the built executable.

Fix:
Require a consecutive healthy interval that resets on transient samples, inspect the production window accessibility tree for a WebView2 document and editable composer, and add a PowerShell self-test plus CI/release contract coverage.

Verification:
- go test focused Windows release contracts
- pnpm test:motion and test:motion-browser
- pnpm frontend production build and bundle budgets
- release workflow contract tests
- repolint and git diff --check
- transient updater test repeated five times
Problem:
The external WebView2 smoke treated any UI Automation Edit control as the desktop composer, so the first-run API key input could satisfy the readiness gate.

Root cause:
The smoke queried only ControlType.Edit and did not bind the result to the composer's DOM automation identity.

Fix:
Require both ControlType.Edit and AutomationId composer-input, and extend the source-level release contract test to preserve the exact selector.

Verification:
- focused Windows WebView2 smoke contract test
- release workflow contract suite
- desktop motion suite
- repolint and git diff --check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) updater Auto-update / installer / release packaging v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant