Repository navigation
fix: ensure initial download route is normalized - #9247
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9247 +/- ##
==========================================
+ Coverage 86.14% 86.16% +0.01%
==========================================
Files 87 87
Lines 6149 6164 +15
Branches 369 369
==========================================
+ Hits 5297 5311 +14
- Misses 848 849 +1
Partials 4 4 ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the changes aligning download URLs with the displayed release.
No open issues 🎉
What changed in this PR
This PR keeps download URLs consistent with the displayed release on initial load. When no Current release is available, visiting /download/current redirects to /download rather than showing an LTS release at the Current URL.
Changes:
- Shares release-status routing logic between initial rendering and version selection.
- Adds tests for initial route normalization and stateful version changes.
| File | Description |
|---|---|
apps/site/components/Downloads/Release/VersionDropdown.tsx |
Normalizes the initial route and reuses redirect logic for version selection. |
apps/site/components/Downloads/Release/__tests__/VersionDropdown.test.jsx |
Tests initial redirects and verifies selection behavior with state updates. |
Review effort: Balanced
|
Lol what, codecov is angry that the tests don't cover a type import?? |
📦 Build Size ComparisonSummary
Changes🔄 Modified Routes (4)
|
26401b6 to
ae000f3
Compare
ovflowd
left a comment
There was a problem hiding this comment.
Wrote my last nit, just to make the code a bit easier to read. After that LGTM!
|
Happy to fast-track this as well, as another bug fix? |

Description
While investigating #9244, I realised the current logic allowed for direct navigation to
/download/currentwhere it'd show an LTS release, rather than a Current release, at the wrong path. This logic change now ensures that the path is normalized one first load, so that navigating to/download/currentredirects the user to/downloadas there is no Current release available currently.Validation
Access
/download/current, redirected to/download. Access/download/alpha, no redirect.Related Issues
cc #9223
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.