Updater: 'Restart now' button after an update installs#85
Open
bryanroscoe wants to merge 1 commit into
Open
Conversation
After an update installs, the badge read 'Update installed — restart the app to apply' as dead text. Make it a button that relaunches the app via the process plugin (tauri-plugin-process + process:allow-restart), so the user can finish the update in one click. Falls back to a 'quit and reopen' message if relaunch fails.
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.
After an update downloads + installs, the header badge showed 'Update installed — restart the app to apply.' as static text — leaving the user to figure out they had to quit and reopen.
Now it's a 'Update installed — Restart now ↻' button that relaunches the app in one click via Tauri's process plugin, finishing the update.
tauri-plugin-process(Rust) +@tauri-apps/plugin-process(JS), registered inlib.rs, with theprocess:allow-restartcapability.relaunch()fails, falls back to a clear 'quit and reopen manually' message.This is the in-app half of the macOS update story; the bundle-swap itself still needs the app to not be quarantine-translocated (separate, signing-related limitation). No screenshot regen — the post-install state only appears after a real update, which the demo fixture never triggers.
cargo fmt/clippy/build green; npm run check 0/0; build green.