Skip to content

fix(console): pass download channels through and alias stable to latest - #60778

Merged
thdxr merged 1 commit into
devfrom
download-latest
Oct 31, 2026
Merged

thdxr merged 1 commit into
devfrom
download-latest

Conversation

@thdxr

@thdxr thdxr commented Oct 31, 2026

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

/download/[channel]/[platform] only knew stable vs everything else, so /download/dev/<platform> (and any unknown channel) silently redirected to the beta build.

  • The route now passes the channel straight to the update API (/update/api/<channel>/desktop/opencode). The only mapping is stable → latest, kept as a permanent alias with a comment: stable is what the download page linked to for months and ~10% of its traffic (~45k requests/week) comes from outside opencode.ai (bookmarks, other sites, curl/wget scripts).
  • The two identical per-channel asset maps become one. Unknown platform → 404; unknown channel → whatever status the update API returns.
  • The download page now links to /download/latest/<platform>.

How did you verify your code works?

bun typecheck and bun run typecheck:tsc in packages/console/app, bun run check at the root. Checked that the update API serves latest, beta and dev. Will check the deployed redirects with curl after merge.

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" font-family="ui-monospace,monospace" font-size="12">
  <style>@keyframes d{0%,20%{transform:translateY(-6px);opacity:.3}50%,100%{transform:none;opacity:1}}.a{animation:d 2s ease-in-out infinite alternate}@media (prefers-reduced-motion:reduce){.a{animation:none}}</style>
  <text x="16" y="40" fill="currentColor" stroke="none" opacity=".5">stable</text>
  <path d="M70 36h40m-6-6 6 6-6 6" opacity=".5"/>
  <g class="a"><path d="M140 22v20m-7-7 7 7 7-7M131 50h18"/></g>
  <text x="160" y="40" fill="currentColor" stroke="none">latest</text>
</svg>

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I called the route handler directly with a fake update API on both checkouts. On the base, /download/dev/*, /download/latest/* and unknown channels all redirected to the beta build. With this PR each channel goes to its own build, stable still goes to latest, and an unknown channel returns the update API's 404. tsc --noEmit passes in packages/console/app.

Public API: no SDK, server, plugin, config or CLI surface changes. Only the behaviour of the public /download/<channel>/<platform> redirect URLs changes, and existing /download/stable/* links still work.

No concerns.

@thdxr
thdxr merged commit 5030a55 into dev Oct 31, 2026
14 checks passed
@thdxr
thdxr deleted the download-latest branch October 31, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant