OR-264 feat: "Restart now" button on the update banner - #285
Merged
Conversation
The banner (and Settings → Updates) now offer "Restart now". The server exposes POST /api/update/restart, which answers and then relaunches into the copy the updater installed: a terminal `orx up` execs itself on the same port with --no-browser, and the macOS app exits and reopens the bundle with the previous port handed over so the open tab reconnects. The dashboard polls until a different server instance answers, then reloads so the UI is the new build too. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
The "Updated to X. Restart to use it." banner (and the Settings → Updates card) now have a Restart now button that relaunches OpenResearch into the installed version.
POST /api/update/restart(409 unless a newer copy is installed) answers, then signals the serve loop; after the usual harness shutdown the process relaunches.orx upexecs itself: same PID, terminal, and port, with--no-browseradded so the reloading tab is the only one.open -n --env ORX_APP_RELAUNCH_PORT=<port>the bundle; the app reuses that port (if free) and skips opening a browser./api/updateuntil a different serverinstanceanswers, then reloads so the UI is the new build. Timeout after 60s shows a by-hand message.UpdateStatusgainscanRestart(platform support) andinstance(per-process id). The route is on the remote-workspace forbidden list like the other update routes.Testing
cargo fmt --all --check,cargo clippy --all-targets -D warnings,cargo build --locked,cargo test --locked(723 passed)tsc --noEmit, style lint,vite build;ui/distregenerated(deleted)path)🤖 Generated with Claude Code