Repository navigation
VC-851: Report the effective release channel and honour Stable on canary builds - #933
Merged
hussainph merged 2 commits intoOct 19, 2026
Conversation
…ry builds (VC-851)
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…te, restore scrollIntoView stub (VC-851)
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.
Fixes VC-851 (split from VC-705; the VC-684 item that was folded into it).
Problem
readAllowPrereleaseread an absentvolli:update-allow-prereleaserow asfalse, andreadUpdateChannelmapped that to"stable". electron-updater's own default on a prerelease version isallowPrerelease = true, so on a fresh canary install Settings → Updates and the support report said Stable while the install was following the canary feed.startAutoUpdateonly ever assignedallowPrerelease = true. Choosing Stable on a canary build wrotefalseand the select showed Stable, but thatfalsewas never applied. The canary build's updater kepttrueand, because electron-updater's GitHub provider only pickscanary-tagged releases for a-canarycurrent version, kept taking canaries indefinitely.Fix
readAllowPrereleasereturnstrue,falseornull(never chosen). An absent row, or anything other than an exact JSON boolean ("1", malformed JSON), reads asnull.readUpdateChannel(db, buildKind)returns the effective line: the explicit choice if there is one, otherwise the running build's line (runningBuildKind). A canary build reads Canary; stable and dev builds read Stable.volli:update-channel-getand the support report both read it, so they agree.SupportInfoDepsgainsbuildKind.startAutoUpdateapplies an explicit choice either way (updater.allowPrerelease = choice).nullleaves electron-updater's version-derived default alone, as before. The startup log line saystoggle=unsetfor that case.Unchanged: the updater's phases, download and install flow (VC-24/VC-59/VC-111), the feed, and the IPC contract.
Decisions
update-not-availableand drop the pane'sdownloadedphase, which is the phase logic this ticket must not touch. So the storedfalseis assigned at the next startup, and the pane says that's when it takes effect. Entering Canary still widens the running updater straight away, as before.falseon a canary build is safe now. The old one-way rule existed because the stable-only feed (releases/latest) 404'd while only prereleases existed. Full releases ship now (v0.2.2is Latest). A canary build told Stable readsreleases/latest, sees an older stable, stays put (allowDowngradeis false), and moves onto the first stable release newer than it. I checked this against electron-updater 6.8'sGitHubProvider.getLatestVersionandAppUpdater.isUpdateAvailable.false. On stable builds the result is the same as before (the default isfalse, so a corrupt row still can't widen anything). On canary builds it matches what the updater was already doing.trueuntil relaunch. Reading it would snap the select back to Canary, and the notice already explains the gap.Tests
src/main/auto-update.test.ts: coversreadAllowPrereleasein three states,readUpdateChannelfor a never-chosen canary/stable/dev build, an explicit choice overriding the build, a malformed row, exact JSONtrue/falsewrites, and startup honouring an explicit Stable on a canary build while leaving the default alone when nothing was chosen. 8 of these fail on main (run against the unchanged source): the fresh-canary case getsexpected 'stable' to be 'canary', and explicit-Stable-on-canary getsexpected true to be false.src/main/support-info.test.ts: the report sayscanaryfor a never-chosen canary build,stablefor a stable build, andstablefor an explicit Stable on a canary build.src/renderer/.../updates-pane.test.tsx: switching from Canary to Stable shows the next-launch notice.--maxWorkers=1: auto-update 49/49, support-info 15/15, updates-pane 9/9.vp checkpasses on the 8 touched files.git merge-treeis clean against origin/main and the heads of VC-834: background Change Set/rail/venue/diff reads run read-only git (stacked on #885 — merge after it) #909, VC-838: refuse one-click commit over unmerged index entries #919, VC-796: host-owned project.remove stops a project's live work before its delete #920, VC-807: confirm a minted harness launch before it moves the resume seed; skip announce for --version/--help/housekeeping and nested runs #921 and VC-831: release page-scoped sign-ins and file/dir/worktree watches when the renderer page reloads or crashes #922.Follow-ups (from review, not fixed here)
stablebetween choosing Stable and the relaunch, while the live updater is still taking canaries (by design here, since leaving is applied at the next launch).CI note
First run:
Smoke (shard 3/3)failed only inbrowser-page-navigation-smoke.mjs(enter/button:generation=1->1), which is the known flake VC-779. Every other check passed. I reran the failed jobs once (run 39242197547).