Skip to content

fix(docs): separate main docs from versioned releases - #488

Merged
chance-coleman merged 13 commits into
mainfrom
chance/core-665
Aug 21, 2026
Merged

fix(docs): separate main docs from versioned releases#488
chance-coleman merged 13 commits into
mainfrom
chance/core-665

Conversation

@chance-coleman

@chance-coleman chance-coleman commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes CORE-665 and CORE-668.

This updates the docs site to separate unreleased main documentation from versioned releases and preserve navigation when switching between product versions.

Changes

  • Display unreleased documentation as Latest (main).
  • Include the current release in the version picker when latest content comes from main.
  • Prevent duplicate version entries and respect archiveCount: 0.
  • Preserve the current page path when switching versions, including Backup and Restore pages.
  • Resolve renamed directory slugs such as backup-and-restore correctly.
  • Make release banners preserve the current page path.
  • Make product navigation and redirects release-aware.
  • Remove duplicate product, version, and channel entries from the product dropdown.
  • Fix Core and CLI search filters when product links point directly to versioned releases.
  • Preserve canonical links when directories are renamed during the build.
  • Add regression coverage for version discovery, navigation, redirects, banners, and search filtering.

No changes are required in uds-core or uds-cli.

Validation

  • npm test
  • npm run test:unit

@chance-coleman chance-coleman self-assigned this Aug 10, 2026
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for uds-product-docs ready!

Name Link
🔨 Latest commit 0b41480
🔍 Latest deploy log https://app.netlify.com/projects/uds-product-docs/deploys/6a88864e47bdba0008558044
😎 Deploy Preview https://deploy-preview-488--uds-product-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chance-coleman

Copy link
Copy Markdown
Contributor Author

@greptileai

@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown

Greptile Summary

The PR separates main-branch documentation from pinned releases while retaining the current release in version-aware navigation.

  • Stores main content under an explicit /main/ channel and generates redirects to the latest pinned release.
  • Updates version discovery, route metadata, link rewriting, search, sidebars, and the version picker for the new channel model.
  • Adds unit and browser regression coverage for release inclusion, deduplication, zero-archive configurations, and navigation behavior.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/build/versions.ts Updates release discovery to include the current release, deduplicate matching release sources, and honor zero archived versions.
src/build/integration.ts Moves main-branch content into an explicit channel and generates product-root and legacy-path redirects.
astro.config.mjs Configures latest-release and main topics, generated redirects, link prefixes, and client-side version metadata.
src/components/VersionPicker.astro Distinguishes Latest and Main options and routes users between explicit documentation channels.
src/routeData.ts Derives version-aware route metadata, source links, search metadata, and latest-release navigation.
src/plugins/remark-link-rewrite.ts Rewrites internal links according to main, latest-release, and archived-version context.

Reviews (4): Last reviewed commit: "fix(docs): make latest release navigatio..." | Re-trigger Greptile

@chance-coleman
chance-coleman marked this pull request as ready for review August 10, 2026 17:16
@chance-coleman
chance-coleman requested a review from a team as a code owner August 10, 2026 17:16

@mjnagel mjnagel 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.

Wondering if there should be a change to how the version banner is managed?

Image

I would expect it to not show up when I'm on the latest release, and then probably also when on older releases would expect to be linked to the latest release (1.10 rather than main). Potentially also could/should have a banner for main also to note that it's unreleased docs/code?

I tend to like how Velero does this:

Two related things:

  • I think latest should be released version, not main
  • The default version should also be the latest released version

@chance-coleman
chance-coleman marked this pull request as draft August 10, 2026 18:07
@chance-coleman
chance-coleman marked this pull request as ready for review August 10, 2026 22:15
@chance-coleman
chance-coleman requested a review from mjnagel August 10, 2026 23:39
Comment thread src/build/integration.ts
Comment thread src/components/VersionPicker.astro Outdated
Comment thread src/content/docs/404.md Outdated
@chance-coleman

Copy link
Copy Markdown
Contributor Author

Updated this PR to include the fixes for CORE-665 and CORE-668. This covers separating the latest and versioned docs, and keeping users on the same page when switching between versions, as well as some additional enhancements around the redirects to avoid white page flashes.

@briantwatson briantwatson 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.

Finding the e2e tests failing I believe due to new core release.

I was doing some testing/changes locally to familiarize myself with docs dev and thought I'd share what I had working in PR to this branch here: #490. Feel free to use/discard as you wish.

Also made changes there in 404 docs home link behavior. Seeing the 'white flash' of full reload there. My preference would be to maintain the version a user is on rather root, but that's more of a nit.

briantwatson
briantwatson previously approved these changes Aug 20, 2026
mjnagel
mjnagel previously approved these changes Aug 21, 2026
@chance-coleman
chance-coleman dismissed stale reviews from briantwatson and mjnagel via 0b41480 August 21, 2026 17:09
@chance-coleman
chance-coleman merged commit fc37022 into main Aug 21, 2026
8 checks passed
@chance-coleman
chance-coleman deleted the chance/core-665 branch August 21, 2026 17:32
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.

3 participants