You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(desktop): keep release notes from managed update mirrors with custom release names - #47131
When an administrator points T3 Code at a managed update mirror, an offered update loses its release notes if the mirror's releaseName doesn't contain the version (for example "December rollout"). The title/version check that guards against GitHub's Atom-feed fallback also runs on the generic provider, which reads both fields from the offered version's own manifest.
Deterministic repro on origin/main (63f7006a050d6d6a4f127397403b0604bc65f5f1):
Set the desktop update policy's feedUrl to that server and check for updates from an older stable build (1.2.3).
Path: DesktopUpdates calls setFeedURL({ provider: "generic", url: policy.feedUrl }). electron-updater's GenericProvider returns { version: "1.2.4", releaseName: "December rollout", releaseNotes: "- Fix startup" }. The update-available handler passes it through releaseNotesOfOfferedVersion, which drops the notes because the name doesn't contain 1.2.4.
Observed: the update popover offers 1.2.4 with no notes ({ releaseNotes: [], omittedReleaseCount: 0 }).
Expected: 1.2.4 is offered with Fix startup.
Change
When the policy configures a mirror (policy.feedUrl), the update-available handler now uses the manifest's releaseNotes directly. The GitHub feed keeps the existing release-name check, so stale notes from the wrong release are still hidden. This is shared code for the Electron updater on Windows, macOS and Linux. It doesn't touch web, mobile or the server.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
New case DesktopUpdates under a managed policy > shows the mirror's notes for a release name without its version in apps/desktop/src/updates/DesktopUpdates.test.ts:
Not shown: a packaged-app check or download/install against a real mirror, and screenshots of the update popover (the popover renders releaseNotes from state unchanged).
Authored by Claude Opus 5.5 (Model Hub); reviewed by GPT-6.2 Sol (Codex).
Not shown
apps/web/src/components/sidebar/SidebarUpdatePill.tsx:559 — No packaged-app before/after was captured. Clarify in the repro that base shows the ordinary update tooltip without a notes popover, and head opens the notes popover with ‘Fix startup’.
apps/desktop/src/updates/DesktopUpdates.test.ts:1464 — The GenericProvider transcript and regression test are reproducible evidence, but no automated scenarios:prove fixture was run; keep that distinction explicit in Not shown.
scripts/check-changed.ts:328 — The supplied summary reports a passing check:changed on head, but the linked transcript does not include SHA-stamped command output and the read-only review did not independently rerun it.
Macroscope's review found this PR approvable — Managed update mirrors retain release notes even when their custom release names do not contain the version. Existing normalization remains in place, and update selection and installation behavior are unchanged.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between bcd3d0c and e6f15db.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Walkthrough
When an administrator configures policy.feedUrl, the update handler uses release notes from the updater event. Otherwise, it continues to load notes from the offered version’s manifest. A test checks the managed-feed update state and parsed notes.
Changes: Managed update release notes
Layer / File(s)
Summary
Select and verify release notes apps/desktop/src/updates/DesktopUpdates.ts, apps/desktop/src/updates/DesktopUpdates.test.ts
When policy.feedUrl is defined, the handler uses info.releaseNotes. A test verifies the offered version and parsed note for a managed-feed update.
Managed-mirror update notes now show up when the release name lacks the version. The only open point is a minor test-timing concern, so the change is mergeable with owner awareness.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the desktop component and the specific fix: release notes from managed update mirrors that use custom release names. The change adds a mirror-specific path in the update-available hand…
Description check
The description follows the template's main sections: Problem, Change, Scope, and Verification. It gives a deterministic reproduction, a clear explanation of the cause, the test name and base/head res…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the desktop component and the specific fix: release notes from managed update mirrors that use custom release names. The change adds a mirror-specific path in the update-available handler that uses the manifest's releaseNotes when policy.feedUrl is set. The title is specific and matches the changeset. It is slightly long at 86 characters, but it stays within a readable scope.
Full details: Description check
Explanation
The description follows the template's main sections: Problem, Change, Scope, and Verification. It gives a deterministic reproduction, a clear explanation of the cause, the test name and base/head results, and the scope rationale. It also lists what was not shown. The Problem section states expected and observed behavior. The Verification section names the focused test and the results. The template's agent-attribution line is present as an authored-by note. The description contains a stray review-generated 'Not shown' block with three findings that read as bot-written notes, and it does not give a commit SHA-stamped check output. These gaps are non-critical, so the check passes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
1479-1479: Minor · Stability & Availability · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Wait for the update state publication.
flushCallbacks is Effect.yieldNow; it does not guarantee that the handler has published its state. If the handler suspends, the assertion can read the previous state. Subscribe before emitting and await the publication, as nextPublishedState does elsewhere in this file. (raw.githubusercontent.com)
As per coding guidelines, tests must “await the specific persisted event or Deferred that marks the milestone.”
Reviewing files that changed from the base of the PR and between e9143bf and bcd3d0c.
Files selected for processing: 2
apps/desktop/src/updates/DesktopUpdates.test.ts
apps/desktop/src/updates/DesktopUpdates.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Thanks @coderabbitai. On the unverified DesktopUpdates.test.ts:1479 note (flushCallbacks vs nextPublishedState): this test uses the same emit → flushCallbacks → getState pattern as the other update-available tests in this file. With a managed feedUrl, the handler reads info.releaseNotes directly and does no manifest I/O before it publishes, so it has no suspension point that would leave getState stale. The test passes consistently, so I'm leaving it as is to keep this PR small. Happy to switch it to nextPublishedState if a maintainer would like that.
@saphid Thanks for the explanation. The managed-feed path reads the event’s notes without manifest I/O, and the test follows the existing pattern. I withdraw the timing concern for this test; a switch to nextPublishedState is not needed.
I inspected the code but did not rerun the test.
📝 Learnings were not changed: only organization members or users with write access to this repository can add or remove learnings.
On each commit, built a production Linux x64 AppImage with version 1.2.3. Served latest-linux.yml over HTTPS at 127.0.0.1:8443 offering version 1.2.4, releaseName 'December rollout', releaseNotes '- Fix startup', and the reported AppImage files entry (sha512 AAAA, size 1). Installed the reported Example Corp auto-update policy with that feedUrl. Launched with fresh T3 and XDG state, allowed the local self-signed certificate identically on both sides, waited for the automatic update offer, clicked Start, and hovered the sidebar update control. Captured the same hover interaction and stable screenshots (two identical screenshots 500 ms apart).
Environment for both captures: real Linux x64 production AppImage, light theme, fresh empty state, 1100×780 app viewport under Xvfb. Recordings show the same hover and are cropped to the app window.
Base offered 1.2.4 with releaseNotes: [], logged releaseNoteGroups: 0, and had no release-notes popover. Head offered the same version with one note group, logged releaseNoteGroups: 1, and displayed “What's changed” / “Fix startup.”
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
size:XS0-9 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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.
Problem
When an administrator points T3 Code at a managed update mirror, an offered update loses its release notes if the mirror's
releaseNamedoesn't contain the version (for example "December rollout"). The title/version check that guards against GitHub's Atom-feed fallback also runs on the generic provider, which reads both fields from the offered version's own manifest.Deterministic repro on
origin/main(63f7006a050d6d6a4f127397403b0604bc65f5f1):latest-linux.ymlfrom a local HTTP server:feedUrlto that server and check for updates from an older stable build (1.2.3).DesktopUpdatescallssetFeedURL({ provider: "generic", url: policy.feedUrl }). electron-updater'sGenericProviderreturns{ version: "1.2.4", releaseName: "December rollout", releaseNotes: "- Fix startup" }. Theupdate-availablehandler passes it throughreleaseNotesOfOfferedVersion, which drops the notes because the name doesn't contain1.2.4.{ releaseNotes: [], omittedReleaseCount: 0 }).Fix startup.Change
When the policy configures a mirror (
policy.feedUrl), theupdate-availablehandler now uses the manifest'sreleaseNotesdirectly. The GitHub feed keeps the existing release-name check, so stale notes from the wrong release are still hidden. This is shared code for the Electron updater on Windows, macOS and Linux. It doesn't touch web, mobile or the server.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
DesktopUpdates under a managed policy > shows the mirror's notes for a release name without its versioninapps/desktop/src/updates/DesktopUpdates.test.ts:AssertionError: expected [] to deeply equal [ { version: '1.2.4', … } ]vp run check:changedexited 0 (format, lint, knip, typecheck, tests).GenericProviderfetches a locallatest-linux.yml, and its result goes through main's and head's notes path: https://gist.github.com/saphid/7d56a7e16164931d48bd64d12a6a4805Not shown: a packaged-app check or download/install against a real mirror, and screenshots of the update popover (the popover renders
releaseNotesfrom state unchanged).Authored by Claude Opus 5.5 (Model Hub); reviewed by GPT-6.2 Sol (Codex).
Not shown