Repository navigation
fix(marketing): download page shows its Releases fallback when the GitHub API rejects the request - #28339
fix(marketing): download page shows its Releases fallback when the GitHub API rejects the request#28339only21mil wants to merge 1 commit into
Conversation
…tHub API rejects the request Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Unsuccessful GitHub API responses now trigger the existing Releases fallback instead of being treated as release data. Successful downloads and release-channel defaults remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
HTTP status checks and test apps/marketing/src/lib/releases.ts, apps/marketing/src/lib/releases.test.ts, apps/marketing/package.json |
A shared helper throws an error when a response is not OK and parses JSON otherwise. Both stable and nightly release fetches use the helper. A test checks the 403 error, and the package adds a test script that runs vp test run. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#24577: Adds the same marketing package test script, alongside a mobile store-routing change.
Suggested labels: bugfix, size:S
Suggested reviewers: t3dotgg, macroscopeapp
Merge Risk: 
Minimal · up to 55937
-
The change correctly routes failed release API responses to the existing Releases fallback and adds focused 403 coverage.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The pull request description includes all required sections. It clearly explains the problem, the implementation, scope justification, focused test coverage, manual verification, observed results, screenshots, and agent attribution.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Note Written by Verified in a real dev environmentverified unchanged head github returned real unauthenticated 403 rate-limit responses after real api requests exhausted the quota. no request interception, mocked fetch, synthetic responses, fixtures, or demo data were used.
Not verified429 specifically was not induced; the live failure check used github’s actual 403 response. native clients and downloaded installers were not exercised on this linux vm. codex turns and projects are outside this change: the affected marketing page fetches github releases directly in the browser and does not use the agent server or a provider. |



Problem
The download page reads the latest release from the GitHub API in the visitor's browser. Unauthenticated requests are limited per IP, so visitors behind a shared address can get a 403 or 429.
fetchStableinapps/marketing/src/lib/releases.tsparsed that error body as if it were a release and never checkedresponse.ok. The page's error branch, which shows "Releases", never ran. Instead the missingtag_namewas written into the version label, so the Stable tab showed a lone arrow with no text. The download cards still pointed at the releases page, so the only visible damage was the blank label.Change
A small
fetchJsonhelper throws when the response isn't OK, and both the Stable and Nightly fetches use it. The page's existingcatchthen shows "Releases", and the cards keep their releases-page links. Nightly already ended in that branch, because an error body isn't an array; it now just gets a clearer error. The homepage shares this loader and already falls back to the releases page, so it looks the same either way.apps/marketinghad no tests. The new test sits next toreleases.ts, and the package gets atestscript so CI runs it. Open #24577 adds the identical"test": "vp test run"line, so the two merge cleanly in either order.Scope and approval
There is no issue. This is a small, focused fix for an obvious bug: a failed request is now treated as a failure. Nothing else about the page changes.
Prior PRs
#4909 by @maria-rcks added the same
response.okcheck inside a full marketing redesign. It closed unmerged, as did the related redesign PRs #5296, #5452 and #5457, which carried the same check. This PR carries only that check.Verification
releases.test.tsstubsfetchwith a 403 rate-limit body. It fails onmain, where the body comes back as a release, and passes here.vp run check:changedpasses.mainand from this branch and captured/downloadin headless Chromium. Every request to the GitHub releases API returned a synthetic 403 rate-limit response.Before (
main, Stable): the version label under the channel toggle is blank, leaving only the arrow.After (Stable): the label reads "Releases" and links to the releases page.
The Nightly tab showed "Releases" before and after, and every download card kept its releases-page link in both builds.
Generated with Claude Opus 5.5 and GPT-6.1 Terra in T3 Code Nightly