fix(desktop): guarantee the update feed resolves the newest release - #6827
Conversation
The stable channel reads a GitHub release list it shares with web-app releases, SDK tags, and legacy prereleases, but only ever looked at the first 30 entries. Once enough unrelated releases stack on top, the feed 404s and every stable shell silently stops updating. Walk pages (100 per page, up to 5) until one yields a release for the channel, and fail the feed rather than serving an older build when a page cannot be read. Also point the update gate's manual download at a new /api/desktop/update/download redirect, which resolves through the same channel selection. It previously opened GitHub's repository-wide latest release, which can be a tag carrying no desktop artifact at all.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Release resolution now walks GitHub release pages (100 per page, up to 5 pages) via shared The manifest route ( The blocking update gate’s “Get the latest version” action now opens the deployment’s download redirect on https origins (still falls back to GitHub releases/latest on plain http self-hosted). Reviewed by Cursor Bugbot for commit 24c8850. Configure here. |
Greptile SummaryThe PR makes the stable desktop update feed scan paginated GitHub releases and adds a channel-aware manual installer redirect.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified. The feed and manual-download paths consistently use the bounded channel resolver, fail closed when a release page is unreadable, and select artifacts compatible with the repository’s current universal macOS packaging.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/desktop/update-feed.ts | Adds bounded release pagination, shared GitHub URL construction, and installer-asset selection without an identified current defect. |
| apps/sim/app/api/desktop/update/latest-mac.yml/route.ts | Migrates the update manifest route to the paginated resolver and preserves fail-closed handling for upstream errors. |
| apps/sim/app/api/desktop/update/download/route.ts | Adds a public channel-aware redirect to the universal macOS installer selected from the resolved desktop release. |
| apps/sim/app/_shell/desktop-update-gate.tsx | Sends manual updates through the deployment-specific redirect on HTTPS origins while retaining the GitHub fallback for HTTP. |
| apps/sim/app/api/desktop/update/latest-mac.yml/route.test.ts | Covers page walking, short-page termination, and unreadable-page failure behavior. |
| apps/sim/app/api/desktop/update/download/route.test.ts | Covers stable and prerelease redirects, missing releases, and upstream failures. |
| scripts/check-api-validation-contracts.ts | Registers the input-less redirect route and updates the route-count baseline. |
Sequence Diagram
sequenceDiagram
participant Shell as Desktop update gate
participant Download as Download redirect API
participant Feed as Update manifest API
participant Resolver as Channel release resolver
participant GitHub as GitHub Releases
Shell->>Download: GET /api/desktop/update/download
Download->>Resolver: Resolve deployment channel
Feed->>Resolver: Resolve deployment channel
loop Up to five pages
Resolver->>GitHub: List releases (100/page)
GitHub-->>Resolver: Release candidates
end
Resolver-->>Download: Newest matching release
Download-->>Shell: 302 to installer asset
Resolver-->>Feed: Newest matching release
Feed->>GitHub: Fetch latest-mac.yml
Feed-->>Shell: Channel-specific update manifest
Reviews (1): Last reviewed commit: "fix(desktop): guarantee the update feed ..." | Re-trigger Greptile
Summary
/api/desktop/update/downloadredirect that resolves through the same channel selection, so the manual and auto paths always land on the identical build.Type of Change
Testing
bun run type-check,bun run lint,bun run check:audits(29/29) all passversion: 0.8.4, the newest stable releaseChecklist