fix(updater): confirm the Installing update notice is on screen before the handoff - #211
Merged
Merged
Conversation
…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>
…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>
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.
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 enteringinstalling, awaitconfirmNotice(1500)and loginstall.notice {shown, ms}before touching the registry or spawning the installer. Timeout or error never block the update.main.js:confirmInstallNoticeShownpolls the renderer read-only (executeJavaScript, 50 ms) until#updateInstallOverlayis visible, then waits one frame.tools/updater-lifecycle-smoke.js5b: ordering (notice before spawn), log line, timeout path, error path.Acceptance driver (
tools/packaged-update-acceptance.js)Handoff evidence via the app's
install.noticeevent 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. Newtools/packaged-legacy-update-acceptance.jsfor the post-publish real-feed test from a published older installer.🤖 Generated with Claude Code