Skip to content

[P1][bug] Update safety checks live in the button, and run before a download that can take minutes #570

Closed

Description

@EVWorth

What

The checks that stop an update destroying work are in StatusBar's onClick:

if (isExecuting) { ...refuse... }
if (hasDirtyTabs) { ...refuse... }
void installUpdate();

installUpdate itself has none. Two consequences.

The guard is in the view, not the action. There is one caller today, so it holds — but the store action is the boundary. The next caller (a menu item, a keyboard shortcut, a settings dialog) gets no protection and nothing signals that it should provide its own. This is the same shape as the grid's save path before #529.

The checks run before the download, and the restart happens after it. A download can take minutes. installUpdate ends with an unconditional relaunch(), so a query started or a tab edited during the download is destroyed by a restart that was authorised against a state that no longer exists.

Expected

The refusal lives with the action, so it cannot be bypassed by a new caller, and is re-checked after the download completes and before the process restarts. A restart that discards work should be something the user confirms at the moment it happens, not a consequence of a click made several minutes earlier.

Related: #344 (relaunch is unconditional), #353 (no preview before install).

Activity

  1. added
    severity/p1
    kind/bug
    area/theming
    on Sep 8, 2026
  2. EVWorth commented on Sep 11, 2026

    @EVWorth
    OwnerAuthor

    Already fixed, in 6ecba3b ("separate downloading from restarting, and put the refusal in the action", #573).

    Covered in settingsStore.test.ts, which cites this issue number at the relevant assertions.

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

    area/themingkind/bugseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions