Repository navigation
Check the update feed from the desktop app - #3215
Merged
Merged
Conversation
Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
Contributor
|
End-to-end check on Linux (Ubuntu 24.04, x86_64), run on 4db61e4. The later commits change only the ownership of the daemon PID file; the update flow itself is unchanged. What I ran:
Afterwards I removed the package, deleted the throwaway key, and stopped the server. Nothing from the proof run is in the branch. |
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.

The desktop app registered
tauri-plugin-updaterbut nothing called it:useAutoUpdaterhad no callers, so thelatest.jsonthat #3210 publishes was never read. With this change, beta.1 can be offered beta.2 in the app.Check and prompt. The main window checks the feed at startup and every six hours. A new version shows a sonner toast from
@spacedrive/primitivesthat stays until you act, with Install and restart and Later. The same version is offered once per session. A failed or offline check only writesconsole.debug. Nothing downloads before you choose Install and restart. That step downloads and verifies the update against the pubkey intauri.conf.json, installs it, then relaunches. A failure after you click shows an error toast.Release builds only.
Platform.checkForUpdateis optional. The Tauri platform defines it only whenimport.meta.env.PRODis true andVITE_SD_UPDATER === 'true', so the web app, dev builds, and localtauri buildruns never check.release.ymlsetsVITE_SD_UPDATER: 'true'on the tauri-action step, and that is the only workflow change. The nightly workflow builds no desktop app. Windows is unchanged:latest.jsonhas no Windows entry, so a Windows check finds nothing and stays silent.Restart. A new
restart_after_updatecommand replacestauri-plugin-process, so no crate is added. The daemon the app spawned outlives the app, and a relaunched app attaches to whichever daemon answers. Without this step, the new build would keep running against the old daemon. The command finds the daemon the app spawned, either this launch's child or the PID recorded indesktop-daemon.pidby an earlier launch, checked by name and liveness. It sends that daemonShutdown(assd updatedoes), waits up to 30 s, kills it if it is still running, then callsapp.restart(). The record is deleted whenever the app hands the daemon to a service or stops it, so a daemon running as a service, or one started by the CLI, is never touched.updater:defaultwas already in the capabilities, and a custom app command needs no permission entry.Shape. The hook now runs on
usePlatform(), not a@ts-expect-errordynamic import, andAvailableUpdateis exported from@sd/interface.@tauri-apps/plugin-updateris pinned to~2.9.0to match the crate inCargo.lock. The unusedupdater.example.tsis removed.docs/core/releases.mdxdescribes the flow, andPROJECT_STATUS.mdhas a register row.Tests.
bun test src/hooks/useAutoUpdater.test.tscovers the check schedule: it checks immediately and on each interval, offers each version once, keeps going silently after a failure, and does not prompt after stop.bun run typecheckandcargo checkon the Tauri crate pass. A local end-to-end run is described in a PR comment: a 2.0.0-beta.0 .deb, a local feed signed with a throwaway key, the prompt, then install, daemon stop and relaunch.