Skip to content

Docs: Document experimentalDocgenServer feature flag - #35326

Merged
kylegach merged 4 commits into
nextfrom
docs/experimental-docgen-server-feature-flag
Jun 30, 2026
Merged

kylegach merged 4 commits into
nextfrom
docs/experimental-docgen-server-feature-flag

Conversation

@JReinhold

@JReinhold JReinhold commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #

What I did

Document the experimentalDocgenServer feature flag in the main config features API reference.

  • Add the flag to the React-only features type block and a new section covering server-side docgen, static snippets, manifest/MCP benefits, and tradeoffs
  • Add config snippets (main-config-features-experimental-docgen-server.md) for CSF 3 and CSF Next
  • Cross-link from componentsManifest, experimentalCodeExamples, and the manifests guide
  • Link to the Docgen Server RFC

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

  1. Open the docs preview for this branch (or run the docs site locally if needed).
  2. Navigate to Configure → main.js|ts → features with the React renderer selected (?renderer=react).
  3. Confirm a new experimentalDocgenServer section appears before experimentalCodeExamples, with the Experimental badge, default false, and a working code snippet.
  4. Confirm the componentsManifest section mentions the ref-based manifest format when combined with docgen server.
  5. Confirm experimentalCodeExamples recommends experimentalDocgenServer instead.
  6. Open AI → Manifests with the React renderer and confirm the one-line note about server-side React Component Meta extraction.
  7. Spot-check that the RFC feedback link is present as a placeholder (discussions/TODO) for a follow-up once the GitHub Discussion is opened.

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Made with Cursor

Summary by CodeRabbit

  • Documentation
    • Added new guidance for enabling the docgen server in Storybook configuration examples, including common setup variants.
    • Expanded API docs to describe the new React-only feature option and how it affects component metadata and manifest output.
    • Updated related docs to point users toward the server-based docgen approach and clarify when extra code examples are unnecessary.

Add API reference, config snippets, and cross-links so users can opt into server-side React docgen and understand how it relates to manifests and code examples.

Co-authored-by: Cursor <cursoragent@cursor.com>
@JReinhold JReinhold added documentation ci:docs Run the CI jobs for documentation checks only. qa:skip Pull Requests that do not need any QA. (e.g. documentation) labels Jun 29, 2026
@JReinhold JReinhold self-assigned this Jun 30, 2026
Comment thread docs/api/main-config/main-config-features.mdx Outdated
@kylegach
kylegach marked this pull request as ready for review June 30, 2026 21:08
@coderabbitai

coderabbitai Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9f45459-c85f-40c2-a671-9d9344ba31fa

📥 Commits

Reviewing files that changed from the base of the PR and between 2734397 and 14060ac.

📒 Files selected for processing (3)
  • docs/_snippets/main-config-features-experimental-docgen-server.md
  • docs/ai/manifests.mdx
  • docs/api/main-config/main-config-features.mdx

📝 Walkthrough

Walkthrough

This PR adds documentation for a new experimentalDocgenServer feature flag. It introduces example config snippets for enabling the feature, updates the AI manifests doc to describe its ref-based, per-component JSON snapshot output, and adds a corresponding type field and reference section in the main-config features documentation.

Changes

experimentalDocgenServer documentation

Layer / File(s) Summary
Main config feature reference updates
docs/api/main-config/main-config-features.mdx
Adds the optional experimentalDocgenServer boolean field to the React features type, updates componentsManifest docs to describe the ref-based per-component JSON snapshot format, and adds a new experimentalDocgenServer section directing users away from experimentalCodeExamples.
Config snippets and manifest behavior notes
docs/_snippets/main-config-features-experimental-docgen-server.md, docs/ai/manifests.mdx
Adds CSF 3 and CSF Next config snippets (JS/TS) enabling features.experimentalDocgenServer, and updates the AI manifests doc to describe the resulting ref-based manifest format.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes


Comment @coderabbitai help to get the list of available commands.

@kylegach
kylegach merged commit 5c7180d into next Jun 30, 2026
20 checks passed
@kylegach
kylegach deleted the docs/experimental-docgen-server-feature-flag branch June 30, 2026 21:24
@github-actions github-actions Bot mentioned this pull request Jun 30, 2026
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:docs Run the CI jobs for documentation checks only. documentation qa:skip Pull Requests that do not need any QA. (e.g. documentation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants