Repository navigation
Add in-app rebuild and restart from a local macOS workspace - #1
Conversation
There was a problem hiding this comment.
Adds a "Rebuild app" sidebar/palette action that builds a local workspace with pnpm tauri build, ad-hoc signs the result, swaps the running macOS bundle through a detached installer script and relaunches, with rollback.
Findings: 0 blockers, 4 should-fix, 1 nit.
Docs checked: the docs researcher found no linked ticket, spec, wiki or team conventions for this repo, so I judged the PR against its own description. I read rebuild.rs, rebuild-install.sh and RebuildDialog.tsx in full. I did not review RebuildDialog.css, App.tsx, the test fixture or rebuild.spec.ts in detail, and the PR diff was truncated for rebuild.rs. I did not run anything. The PR notes that a full live self-restart was not exercised manually.
|
I submitted one review on PR #1 as a The findings:
The docs researcher found no linked ticket, spec, wiki or conventions, so I judged the PR against its own description. I read |
|
starting review... |
There was a problem hiding this comment.
This PR adds a "Rebuild app" action that builds a local workspace, ad-hoc signs it, swaps the running macOS bundle through a detached installer, and relaunches with rollback.
Findings: 0 blockers, 0 should-fix, 0 nits. I checked the update (e6bd68b) against each point from my earlier review:
- Stale failed state: the installer now writes a one-shot marker file that is consumed on first read. Old build logs no longer set the phase to failed on later launches.
- Stuck
buildingphase: the worker runs undercatch_unwindwith poison-tolerant locking, andpanicis nowunwind. A panic or a failure to spawn the worker ends in a retryablefailedstatus.begin_rebuildalso clears the previous log, so the dialog no longer shows it for the new run. - Arbitrary workspace path:
rebuild_appno longer takes a path from the webview. The workspace comes from the native folder picker and is saved in the app config directory. It is validated at pick time and again at build time. The rebuild commands are restricted to themainwindow by a native label check and by a Tauri ACL. I confirmed intauri-buildthatsrc-tauri/permissions/*.tomlis picked up without changes tobuild.rs, and thatvalidate_capabilitiesfails the build if a permission name is wrong. - Build
PATHbaked in: removed. Tools are now found at runtime byrebuild-build.sh. - Sticky poll error: poll errors are now kept in separate state and cleared on the next successful poll.
Docs checked: none applied. The docs researcher found no ticket, spec, wiki or team conventions for this repo. I read rebuild.rs, both shell scripts, the ACL and capability files and RebuildDialog.tsx. I did not run the build or tests. The Playwright mocks can't exercise the real ACL or the live self-restart, as the PR already notes. I'd run the packaged app once and confirm that opening a journal and the Rebuild dialog both work under the new permissions.
|
I approved PR #1 at head
I did not review the CSS, |
Adds a Rebuild app action in the sidebar and command palette so a packaged macOS app can build a selected local workspace, update itself, and restart. The native folder picker remembers the workspace; the dialog shows build progress and logs while reading remains available.
Builds use a separate Cargo cache, then stage, ad-hoc sign, and verify the new app before exiting. Build failures leave the running app unchanged; the detached installer restores the previous bundle when replacement or the launch command fails. Installer errors are consumed once after relaunch, and worker panics recover to a retryable state.
Custom commands are restricted to the local main window. The rebuild command accepts no caller-supplied workspace path; it uses the native picker's saved selection. Tool discovery uses the current user's environment instead of embedding the build-machine PATH. An older installed app needs this version installed once to gain the control; setup and prerequisites are documented in the README.
Validation
Full live self-restart was not manually exercised. Rollback handles launch-command failure, not crashes after macOS accepts the launch request.