fix(docsite): default changelog to core, sync tab with URL, fill empty releases - #5362
Draft
HelloOjasMutreja wants to merge 1 commit into
Draft
Conversation
…empty releases The changelog page picked whichever package sorted first alphabetically (@astryxdesign/cli), so it never opened on the package most visitors come here for. It now prefers @astryxdesign/core, falling back to the first package only if core has no changelog. The active tab is now the URL's ?package= query param, following the same pattern ComponentDetailClient already uses for its own tab state: reading searchParams directly instead of useState, and updating it via router.replace(scroll: false) on tab change so it doesn't spam history. That also gives direct links to a specific package's changelog for free. A release with no notable changes still gets a version heading from the changeset tooling, with nothing between it and the next heading or the separator before it, which reads as a broken page. fillEmptyReleases() fills those bodies with an explicit "No changes in this release." line.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
August 23, 2026 16:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #5307, partially. Three of the four bullets are done; the fourth needed a decision I didn't want to guess at, so I left it out (details below).
Default to core, not whatever sorts first
ChangelogViewpickedchangelogs[0]?.pkgas the initial tab, andpackages(frompackageRegistry.ts) is built by scanning package directories, so the first entry is whatever sorts first alphabetically —@astryxdesign/cli, not@astryxdesign/core. Now it prefers@astryxdesign/core, falling back to the first entry only if core has no changelog.Direct links via
?package=activeTabis now derived straight fromsearchParams.get('package')(clamped to a package that actually has a changelog, so a stale or hand-edited value can't land on a blank panel), the same patternComponentDetailClientalready uses for its own tab state (searchParams.get('tab'),router.replace(..., {scroll: false})on change, no separateuseState). The URL only gets a?package=param when it differs from the default, so the common case stays a clean/changelog.Empty releases
A release with no notable changes still gets a version heading from the changeset tooling, with nothing between it and the next heading or the
---separator before it (confirmed against several realCHANGELOG.mdfiles, e.g.packages/themes/y2k/CHANGELOG.md's0.4.6/0.4.5/0.4.2entries).fillEmptyReleases()inchangelogLinkify.tsfills those bodies with "No changes in this release." Added unit tests covering: a mid-file empty version, the last version in the file (no trailing separator), a version with real content staying untouched, and the stripped package title not being mistaken for an empty version.What I left out: "keep theme packages out of primary tabs"
I didn't implement this one. Checked
ThemePackagePage.tsxfirst, since "keep out of primary tabs" implies they'd still be reachable somewhere else, and it turns out theme package changelogs aren't shown anywhere but this page today. Filtering them out ofChangelogView's tabs would delete the only place they're visible, not relocate them. That's a real UI decision (a secondary tab group, a dropdown, moving them onto the theme pages, or something else) rather than a one-line filter, so I'd rather it get scoped properly than have me guess. Happy to pick it up once there's a direction, or if it's more of a "just filter them, changelog visibility for themes isn't a requirement" call, say so and I'll do that instead.Verification
fillEmptyReleasesunit tests: 20/20 pass (pnpm -F @astryxdesign/docsite test src/__tests__/changelog-linkify.test.ts). Typecheck (tsc --noEmit) shows no new errors from these files (checked by grepping the full output for "changelog" — all pre-existing errors are elsewhere in the app, unrelated to this change). Lint is clean.Not verified: an actual browser render of the page.
next devhere needs a full data regeneration pass I didn't want to eat the time on, given the tab logic mirrors an already-shipped, working pattern (ComponentDetailClient) line-for-line and the markdown transform is covered by tests against real changelog content. If that's not enough for review, let me know and I'll get a real render.