fix(nightly-v2): offer Update server when a Fork Nightly server is behind the app - #90
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2 tasks done
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.
What Changed
Pin the Fork Nightly version skew fix into Fork Nightly. When the app and its server are both Fork Nightly (
nightly-v2) builds, the app now recognises a server built earlier than itself and offers Update server. Every other version combination is compared exactly as before.Fork
maincarries release configuration, not V2 source. This PR adds one source commit after the existing 15 patches.Why
On 2026-09-23 the desktop app updated itself from
0.0.42-nightly-v2.20260922.*to0.0.42-nightly-v2.20260923.1790125491283725. The background service stayed on0.0.42-nightly-v2.20260918.1789701374653468, and no update notice appeared in the conversation or in Settings → Connections.resolveVersionMismatchcompares two nightly builds in full only when the first prerelease identifier is exactlynightly. The shared semver parser splits onsplit("-", 2), so0.0.42-nightly-v2.20260918.1789701374653468parses with prerelease["nightly"]and loses its date and run. Running the real code,compareSemverVersions(server, client)returns0for the two versions above, so the app decided the server was current. Upstream versions (-nightly.20260923.12) are unaffected. The hyphenatednightly-v2train comes from this fork, and fork patch5564f3ataughtcliRelease.tsabout it but not the skew check.The fix gives the skew check its own ordering for
nightly-v2builds: core version, then build date, then run number (asBigInt), ignoring+metadata. It applies only when both versions arenightly-v2. The shared semver parser is unchanged, because provider version checks depend on it.The installed 0918 service already supports the fork's channel (
t3 update --channel nightly-v2, releases fromsaphid/t3code), so the offered Update server action can complete.Verification
379bd7ab3eand passes with the fix.vp test run apps/web/src/versionSkew.test.ts: 23 passed. The new tests cover ordering by date and run, metadata on either side, matching and newer servers, upstream nightly builds with metadata, and mixed trains.resolveVersionMismatchover 108 versions: upstream nightly, metadata, missing run, extra identifiers, preview, beta andnightly-v2, each with and without avprefix and surrounding whitespace. Across about 11,700 client/server pairs, results differed only where both sides werenightly-v2.vp exec tsc --noEmit -p apps/web/tsconfig.json, focusedvp lintandvp fmt: passed. The chat and settings component suites: 110 of 111 files passed.MessagesTimeline.test.tsxfailed only in the parallel run and passed alone (66 tests); it does not use version skew.t3code/codex-turn-mappingat060756de5adcda82fedace42d8c47b449bc1097bapplied cleanly. The resulting source matches the tested tree apart from 4 generatedpackage.jsonversions.node --test .github/scripts/downstream-nightly.test.mjs: 22 passed.481891d1dbthrough Codex CLI and requested changes. Routing upstream nightlies through the stricter channel regex dropped warnings for versions with build metadata, and mixed-train results changed. Head6f6ae98244limits the new path tonightly-v2pairs. The second review approved with no findings, after its own differential check of 46,656 pairs.ci.ymlrun since 2026-09-23 02:44Z.Checklist
Implementation: Claude Opus 5.5 in Claude Code. Independent review: GPT-6 Astra in Codex CLI, high effort.
🤖 Generated with Claude Code