Skip to content

OR-264 feat: "Restart now" button on the update banner - #285

Merged
myles332 merged 3 commits into
mainfrom
myles/restart-button-update
Sep 4, 2026
Merged

OR-264 feat: "Restart now" button on the update banner#285
myles332 merged 3 commits into
mainfrom
myles/restart-button-update

Conversation

@myles332

@myles332 myles332 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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.
  • Terminal orx up execs itself: same PID, terminal, and port, with --no-browser added so the reloading tab is the only one.
  • macOS app: a detached shell waits for the old process to exit, then open -n --env ORX_APP_RELAUNCH_PORT=<port> the bundle; the app reuses that port (if free) and skips opening a browser.
  • The dashboard polls /api/update until a different server instance answers, then reloads so the UI is the new build. Timeout after 60s shows a by-hand message.
  • The banner now also renders on the zero-projects Projects screen, which previously omitted it.
  • UpdateStatus gains canRestart (platform support) and instance (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)
  • UI: i18n lint, paraglide compile, tsc --noEmit, style lint, vite build; ui/dist regenerated
  • Terminal path end to end on an isolated dev slot with a simulated installed version: POST answered, same PID came back on the same port, log shows the restart line and a fresh startup
  • Real installer-channel update on macOS: click Restart now, tab reloads on the new version, no second tab
  • Real installer-channel update on Linux (binary replaced, (deleted) path)
  • macOS app bundle: click Restart now, app relaunches on the same port, existing tab reloads, no second tab
  • Banner and Settings card rendered and the button exercised in the browser on a dev slot (restart, reload, new server instance)
  • Settings → Updates card button behaves the same and locks the other controls while restarting

🤖 Generated with Claude Code

myles332 and others added 3 commits September 4, 2026 16:25
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>
@myles332 myles332 changed the title feat: "Restart now" button on the update banner OR-264 feat: "Restart now" button on the update banner Sep 4, 2026
@myles332
myles332 merged commit fa6d825 into main Sep 4, 2026
9 checks passed
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.

1 participant