fix(site): skip docs links for features without reference pages#1394
Merged
Conversation
The preset API reference table auto-linked every feature in a bundle to
reference/feature-<kebab>. Adding a feature to a bundle without creating
its reference page (e.g. reference/feature-stream-type) broke the site
build because DocsLink threw when the slug was absent from the sidebar.
Move slug computation and existence detection into the api-docs-builder:
- preset-handler emits features as { name, slug, hasReference }
- PresetReference.astro renders DocsLink only when hasReference is true,
falling back to plain text otherwise
- Zod schema updated for the new feature shape
https://claude.ai/code/session_01RG1ij5xddj9jGW14tDtTT7
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (10)
Players (5)
Skins (30)
UI Components (39)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (9)
Skins (27)
UI Components (33)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (14)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (4)
ℹ️ How to interpretJS sizes are initial static graph totals (minified + brotli). Lazy dynamic chunks are shown separately when present.
Run |
…outputs - api-docs-builder logs a warning listing preset features that lack a reference page, so missing docs surface as a punch list during pnpm api-docs - Turbo outputs for the api-docs task now include the feature and preset generated directories (previously only component/util) so cache restores produce the full set of content collection files https://claude.ai/code/session_01RG1ij5xddj9jGW14tDtTT7
mihar-22
approved these changes
Jul 2, 2026
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.
So this list is a problem
When this list is generated, there's a possibility that the
reference/feature-<kebab>page doesn't exist yet. And we get build errors that are kinda annoying.This PR detects whether that page exists, first.
https://claude.ai/code/session_01RG1ij5xddj9jGW14tDtTT7
Note
Low Risk
Docs build and preset UI behavior only; no runtime product or auth changes, with clearer build-time visibility for missing feature pages.
Overview
Preset feature lists no longer assume every bundle member has a docs page. api-docs-builder now resolves each feature to
{ name, slug, hasReference }by computing thereference/feature-*slug (including thetextTrack→text-tracksoverride) and checking for a matching MDX undersite/src/content/docs/. Generated preset JSON and the Zod schema use this shape instead ofstring[].PresetReference.astro drops its local slug logic and only wraps features in
DocsLinkwhenhasReferenceis true; otherwise names render as plain text, avoidingresolveDocsLinkUrlfailures when a page is missing from the sidebar. The builder also warns after preset generation listing features without reference pages. E2E coverage and a fixturefeature-playback.mdxexercise the flag; turboapi-docsoutputs now include generated feature and preset reference paths.Reviewed by Cursor Bugbot for commit fb0158a. Bugbot is set up for automated code reviews on this repo. Configure here.