Skip to content

feat(docs): Add version warning for old docs subdomains#11495

Merged
anthonyshew merged 2 commits intomainfrom
docs/version-warning
Jan 17, 2026
Merged

feat(docs): Add version warning for old docs subdomains#11495
anthonyshew merged 2 commits intomainfrom
docs/version-warning

Conversation

@anthonyshew
Copy link
Contributor

Summary

  • Adds a warning banner at the top of the docs sidebar when viewing old version subdomains (e.g., v2-3-1.turborepo.dev)
  • Fetches the latest version from npm registry and compares it to the subdomain version
  • Only shows warning if subdomain version is older than latest npm version
  • Only appears on *.turborepo.dev subdomains, not on preview deployments or production

The warning includes a link to the latest docs at turborepo.dev.

The clear chat button (trash icon) now calls stop() before clearing
messages, preventing stream chunks from continuing to appear after
the chat is cleared.

Also adds onStop prop to PromptInputSubmit so the stop button works.
@anthonyshew anthonyshew requested a review from a team as a code owner January 17, 2026 01:45
@anthonyshew anthonyshew requested a review from tknickman January 17, 2026 01:45
@turbo-orchestrator turbo-orchestrator bot added the area: site Issues and improvements related to Turborepo's documentation website label Jan 17, 2026
@vercel
Copy link
Contributor

vercel bot commented Jan 17, 2026

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

Project Deployment Review Updated (UTC)
examples-basic-web Ready Ready Preview, Comment Jan 17, 2026 1:47am
examples-designsystem-docs Ready Ready Preview, Comment Jan 17, 2026 1:47am
examples-gatsby-web Ready Ready Preview, Comment Jan 17, 2026 1:47am
examples-kitchensink-blog Ready Ready Preview, Comment Jan 17, 2026 1:47am
examples-nonmonorepo Ready Ready Preview, Comment Jan 17, 2026 1:47am
examples-svelte-web Ready Ready Preview, Comment Jan 17, 2026 1:47am
examples-tailwind-web Ready Ready Preview, Comment Jan 17, 2026 1:47am
examples-vite-web Ready Ready Preview, Comment Jan 17, 2026 1:47am
turbo-site Ready Ready Preview, Comment Jan 17, 2026 1:47am

const [subdomainVersion, setSubdomainVersion] = useState("");

useEffect(() => {
const host = window.location.host;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const host = window.location.host;
const host = window.location.hostname;

Version warning fails to detect versioned subdomains when accessed with a port number (e.g., v2-3-1.turborepo.dev:3000)

Fix on Vercel

@anthonyshew anthonyshew merged commit 80d1f3a into main Jan 17, 2026
36 checks passed
@anthonyshew anthonyshew deleted the docs/version-warning branch January 17, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: site Issues and improvements related to Turborepo's documentation website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant