Repository navigation
fix(desktop-gpui): ask to restart for an update once, however often it is requested - #3938
Merged
Merged
Conversation
Member
Author
|
@greptileai review |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Member
Author
|
@greptileai review |
richiemcilroy
marked this pull request as ready for review
November 8, 2026 01:13
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · 1 credit · Review details |
This branch was previously deployed
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.

Every call to
prompt_restartmade while Cap is busy started its own 5-minute retry loop, and every loop re-armed itself until Cap went idle. A user who picked "Restart to update" a few times during a recording got that many "Restart now?" dialogs, one after another, once the recording ended (audit #7).stateDiagram-v2 [*] --> None None --> Waiting: busy None --> Showing: idle Waiting --> Waiting: busy request (ignored) Waiting --> Showing: idle request Waiting --> None: its own timer fires, then re-asks Showing --> None: dialog closedUpdateSchedulerholds oneRestartPrompt(apps/desktop-gpui/src/updates.rs):None,Waiting(epoch)orShowing.Waitingwith its own epoch.RestartPromptStateholds the transitions (request,wait_elapsed,dialog_closed).restart_requests_share_one_wait_and_one_dialogwalks a wait, an idle request that shows the dialog, the first wait's timer firing late, and a second wait that the first timer cannot consume. It fails with the old behaviour (every busy request arms another wait) and without the epoch check.

Confidence Score: 5/5
The PR appears safe to merge.Summary
The PR makes repeated restart requests share one wait or one dialog.
Reviews (7) · Last reviewed commit: "test(desktop-gpui): cover the restart pr..." · Reviewed by Greptile