Skip to content

fix(updater): confirm the Installing update notice is on screen before the handoff - #211

Merged
JG2547 merged 3 commits into
mainfrom
fix/install-notice-before-handoff
Sep 5, 2026
Merged

fix(updater): confirm the Installing update notice is on screen before the handoff#211
JG2547 merged 3 commits into
mainfrom
fix/install-notice-before-handoff

Conversation

@JG2547

@JG2547 JG2547 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Problem

After Restart now the app sent the Installing update state to the window and immediately started the NSIS installer. Starting the 118 MB unsigned installer blocks the main process for several seconds while Windows scans it in CreateProcess. The packaged acceptance's independent window sampler (title + captures from a separate elevated process) showed the notice was never painted before the app exited: the window simply went quiet and closed.

Fix

  • src/main/updater.js: after entering installing, await confirmNotice(1500) and log install.notice {shown, ms} before touching the registry or spawning the installer. Timeout or error never block the update.
  • main.js: confirmInstallNoticeShown polls the renderer read-only (executeJavaScript, 50 ms) until #updateInstallOverlay is visible, then waits one frame.
  • tools/updater-lifecycle-smoke.js 5b: ordering (notice before spawn), log line, timeout path, error path.
  • Docs: updater-channel step 6, CHANGELOG.

Acceptance driver (tools/packaged-update-acceptance.js)

Handoff evidence via the app's install.notice event plus a window-title marker sampled from a separate process (immune to the busy main process); Restart now dispatched through the DOM; click provenance log (driver clicks vs. any other click reaching the window); 66 s idle window; Exit-control graceful close ×3; window-owning pid for capture and close. Runs #10#13 on the 6.4.0 release candidate: 39/40 passing, only this notice check red. New tools/packaged-legacy-update-acceptance.js for the post-publish real-feed test from a published older installer.

🤖 Generated with Claude Code

…ore starting the installer

After Restart now the app sent the installing state to the window and at
once started the installer. Starting the 118 MB unsigned installer blocks
the main process for several seconds (Windows scans it in CreateProcess),
so the notice was often never painted before the app exited. The main
process now polls the renderer (read-only executeJavaScript, up to 1.5 s)
until the notice is visible, logs install.notice {shown, ms}, and only then
starts the installer. A renderer that cannot confirm never blocks the
update (timeout or error are logged and the install proceeds).

Tests: updater-lifecycle-smoke 5b (ordering, log, timeout, error).

Acceptance driver: reads install.notice as the handoff-notice evidence,
marks the window title when the notice shows, samples title and captures
the window from a separate process (immune to a busy main process),
dispatches Restart now through the DOM, records click provenance, 66 s
idle window, Exit-control graceful close x3, window-owning pid for
capture/close. New tools/packaged-legacy-update-acceptance.js drives a
published older installer through the real feed after a release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread tools/packaged-legacy-update-acceptance.js Fixed
high-texas and others added 2 commits September 5, 2026 02:38
…s/incomplete-sanitization)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ndoff confirmation

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@JG2547
JG2547 merged commit 3828ac4 into main Sep 5, 2026
8 checks passed
@JG2547
JG2547 deleted the fix/install-notice-before-handoff branch September 5, 2026 07:47
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.

3 participants