Skip to content

Defer updates while quarantine, restore, or purge is running #118

Description

@Muawiya-contact

The updater promises to wait for active work, but only scans set appState.busy. Quarantine, restore, and purge leave it false, so the app can offer an update and restart while one of those actions is still running.

app/src/updater.js relies on this flag:

await update.download();
if (appState.busy) return;
// User confirms, then install() and relaunch().

In app/src/App.jsx, doQuarantine(), restore(), and purge() never update the flag. A mocked run of the actual updater with that idle state reaches download -> confirm -> install -> relaunch.

Expected: updating must wait until all scan and file operations finish, including failures. Prevent new operations once installation/restart starts.

Use a shared operation counter or equivalent ownership mechanism: a boolean set to false by the first finishing action is not enough when two rows are working at once.

Done when: tests keep each action pending and verify that install/relaunch are deferred; overlapping actions stay busy until both finish; rejected actions release their busy state. Test with mocked updater calls, without actually restarting the app.

Confirmed on 8abd5cb. This report establishes the missing coordination; it does not claim observed file loss.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appThe Tauri desktop apparchitectureWorkspace layout and engine designbugSomething isn't workinghelp wantedExtra attention is neededlevel: advancedCross-cutting or safety-critical design workpriority: highCorrectness or safety — should land soonsafetyTouches the read-only / quarantine guarantees

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions