Skip to content

Keep legacy selectors connected to current versions - #1849

Open
HawkSE wants to merge 1 commit into
mainfrom
hawkse/fix-legacy-current-version-manifest
Open

Keep legacy selectors connected to current versions#1849
HawkSE wants to merge 1 commit into
mainfrom
hawkse/fix-legacy-current-version-manifest

Conversation

@HawkSE

@HawkSE HawkSE commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • read the canonical version manifest through the stable main Vercel origin, avoiding Cloudflare challenges on cross-subdomain browser requests
  • keep the full version list on current docs while arranging legacy menus as latest, selected, then older versions
  • document the manifest origin and legacy filtering behavior in the publishing skill

Test plan

  • npx --yes pnpm@10.25.0 run build
  • browser-verified the Vercel manifest returns CORS JSON from a legacy origin
  • browser-verified current docs retain the full list
Amp-Thread-ID: https://ampcode.com/threads/T-01a04534-2413-71c9-ac1f-51d83bd1fdbc
Co-authored-by: Scott Ellison II <scott.ellison@sourcegraph.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sourcegraph-docs Ready Ready Preview Aug 31, 2026 8:36pm

Request Review

const versionsUrl =
process.env.NEXT_PUBLIC_DOCS_VERSIONS_URL ??
'https://sourcegraph.com/docs/api/versions';
'https://sourcegraph-docs-git-main-sourcegraph-f8c71130.vercel.app/docs/api/versions';

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.

hmm is this URL safe to use? Will it always point to main?

Can we see if the Security team has any advice on how to accomplish this? If we must, I think a better URL would be https://sourcegraph-docs-v2.vercel.app/docs as that seems to be static to our main deployment but I'd prefer if we kept this to sourcegraph.com domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants