Skip to content

[Bug]: Check for updates silently ignores every release when the saved update channel differs from the build's track, and still says "Up to date" #38473

Description

@cpAtor

Before submitting

  • I searched open and closed issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop — desktop updater channel state

Summary

When the saved update channel differs from the running build's track, "Check for updates" silently discards every release it finds — including releases on the saved track and releases on the build's own track — and the UI keeps reporting "Up to date".

Steps to reproduce

  1. Run a Stable build (0.1.5 here).
  2. Settings → About → Update track → Nightly, in a way that saves the track but does not complete the reinstall (dialog closed, no qualifying build found, or the app quit before installing). The track is saved eagerly: ~/.t3/userdata/desktop-settings.json ends up with
    {"updateChannel":"nightly","updateChannelConfiguredByUser":true}
    while the binary is still Stable 0.1.5.
  3. Restart T3 Code and use Check for updates, or let the 4-minute poll run.

Expected behavior

One of:

  • The saved Nightly track is offered, since crossing Stable → Nightly is a version upgrade; or
  • The app states that it is running a different track from the saved one and offers to switch back, instead of claiming it is up to date.

Actual behavior

Every release found is discarded and the state stays up-to-date. With the track saved as Nightly, the feed's Nightly release is rejected, and (by the same predicate) the current Stable release is rejected too. The app is pinned to 0.1.5 indefinitely while 0.1.10 is available, and nothing in the UI says why. The only recovery is guessing that the update track must be changed back.

~/.t3/userdata/logs/desktop.trace.ndjson, repeated on every check (the version changes as nightlies are published):

desktop.updates.applyUpdateAvailable
  "ignoring update outside the selected channel or its floor"
  version="0.1.11-nightly.20261118.4864" channel="nightly"

Cause

In apps/desktop/src/updates/DesktopUpdates.ts, offerable() is:

const offerable = (version: string, state: DesktopUpdateState) =>
  Ref.get(releaseFloorRef).pipe(
    Effect.map(
      (floor) =>
        desktopUpdateChannelOf(version) === state.channel &&
        (Option.isSome(floor)
          ? compareSemverVersions(version, floor.value) >= 0
          : desktopUpdateChannelOf(environment.appVersion) === state.channel),
    ),
  );

releaseFloorRef is only populated by an in-app track switch and only lives for that process, so after a restart it is None. A saved channel that differs from the build's track then fails the second condition for every candidate, on either track. reduceDesktopUpdateStateOnNoUpdate publishes up-to-date and getDesktopUpdateButtonTooltip returns "Up to date", so the discarded releases are invisible.

DesktopUpdates.test.ts covers the non-crossing half intentionally ("keeps a saved Nightly track across a restart without crossing on its own", "A Stable build whose switch to Nightly was refused before the app quit; its floor is gone"), but a stable build with a saved Nightly track never offers anything at all, so there is no path back without editing the track. The same code is on main today, not only on 0.1.5.

Suggested fix

When the floor is None and the saved channel differs from the running build's track, still offer a candidate on the saved track if it is a semver upgrade over the running build — the migration guard matters for the Nightly → Stable direction, not for Stable → Nightly. Alternatively, keep the current non-crossing behavior but publish a distinct state (for example "this app runs the Stable build; the saved track is Nightly") instead of up-to-date, and never report "Up to date" while candidates are being discarded by the channel filter.

Impact

Major degradation or frequent failure. Users who end up in this state stop receiving updates permanently, including security fixes, with no error and no indication.

Version or commit

0.1.5 (stable), desktop and server. main still contains the same offerable() logic.

Environment

Linux x64 (Pop!_OS, Wayland). Desktop build at ~/.local/opt/t3code (deb unpacked into a user directory, not package-managed). ~/.t3/userdata/desktop-settings.json contained the updateChannel: "nightly" value quoted above. The updater had also downloaded T3-Code-0.1.7-nightly.20261102.4066-amd64.deb into ~/.cache/t3code-updater/pending/ without ever applying it.

Logs or stack traces

$ grep -h "ignoring update outside" ~/.t3/userdata/logs/desktop.trace.ndjson | tail -1
{"type":"effect-span","name":"desktop.updates.applyUpdateAvailable",...,"events":[{"name":"ignoring update outside the selected channel or its floor","timeUnixNano":"...","attributes":{"scope":"desktop","component":"desktop-updater","version":"0.1.11-nightly.20261118.4864","channel":"nightly","effect.logLevel":"INFO"}}],...}

$ cat ~/.t3/userdata/desktop-settings.json
{"mainWindowBounds":{...},"updateChannel":"nightly","updateChannelConfiguredByUser":true}

$ cat ~/.t3/userdata/desktop-last-started-version
0.1.5
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions