Skip to content

Manifest: Rename experimentalComponentsManifestcomponentsManifest, default to true#33974

Merged
JReinhold merged 8 commits intonextfrom
copilot/rename-experimental-components-flag
Mar 11, 2026
Merged

Manifest: Rename experimentalComponentsManifestcomponentsManifest, default to true#33974
JReinhold merged 8 commits intonextfrom
copilot/rename-experimental-components-flag

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

Closes #

What I did

Graduates experimentalComponentsManifest out of experimental status. The flag is renamed to componentsManifest and now defaults to true — no backwards compatibility for the old name.

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

  1. Create a react-vite sandbox
  2. Build it
  3. See that it has /manifests/components.json in its output
  4. Disable manifests in main.ts: { features: { componentsManifest: false }
  5. Build it again
  6. See that it does not have the manifest files anymore.

Caution

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

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

  • 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>

Original prompt

Task

Rename the feature flag experimentalComponentsManifest to componentsManifest and make it default to true.

This is a clean break — no backwards compatibility for the old name.

Key principle: Since the default is now true, remove all places where experimentalComponentsManifest: true is set, rather than renaming them. Only keep/rename if the value is false (opt-out).

Files to change

1. code/core/src/types/modules/core-common.ts — Type definition

  • Find experimentalComponentsManifest?: boolean in the StorybookConfigRaw['features'] type
  • Rename it to componentsManifest?: boolean

2. code/core/src/core-server/dev-server.ts — Runtime check

  • Change features?.experimentalComponentsManifestfeatures?.componentsManifest
  • Since the feature now defaults to true, change the conditional from:
    if (features?.experimentalComponentsManifest) {
    to:
    if (features?.componentsManifest !== false) {

3. code/.storybook/main.ts — Internal Storybook config

  • Remove experimentalComponentsManifest: true from the features object entirely (it's now the default — don't rename, just delete)

4. code/lib/cli-storybook/src/sandbox-templates.ts — Sandbox templates

  • Remove any experimentalComponentsManifest: true settings entirely (rely on default). Do NOT rename — just delete them.

5. Full repo search

  • Grep the entire codebase for experimentalComponentsManifest and update ALL remaining occurrences:
    • If set to true → remove the line entirely
    • If set to false → rename to componentsManifest: false
    • If referenced in logic/conditions → rename to componentsManifest
    • If referenced in comments/docs → rename to componentsManifest

Validation

After making changes:

  1. Run cd code && yarn tsc --noEmit to ensure no TypeScript errors
  2. Run cd code && yarn test in core to ensure no test failures
  3. Run grep -r "experimentalComponentsManifest" code/ to confirm zero remaining references

Summary by CodeRabbit

  • Configuration Changes

    • Renamed config option from experimentalComponentsManifest to componentsManifest.
    • Component manifest generation is enabled by default and templates/configs updated to match.
  • Improvements

    • Component manifest feature graduated from experimental to stable; manifest generation and registration now follow the new setting.

…to true

Co-authored-by: JReinhold <5678122+JReinhold@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename feature flag experimentalComponentsManifest to componentsManifest Rename experimentalComponentsManifestcomponentsManifest, default to true Mar 2, 2026
@JReinhold JReinhold self-requested a review March 2, 2026 15:20
@JReinhold JReinhold marked this pull request as ready for review March 2, 2026 15:21
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

Renamed Storybook config flag experimentalComponentsManifestcomponentsManifest, updated the type, removed the old flag from templates, and switched runtime checks to gate manifest write/registration on features.componentsManifest instead of the experimental flag.

Changes

Cohort / File(s) Summary
Storybook config template
code/.storybook/main.ts
Removed experimentalComponentsManifest feature flag from the sample main config.
Type definitions
code/core/src/types/modules/core-common.ts
Renamed StorybookConfigRaw.experimentalComponentsManifest?: booleanStorybookConfigRaw.componentsManifest?: boolean and added JSDoc with default.
Core server runtime
code/core/src/core-server/build-static.ts, code/core/src/core-server/dev-server.ts, code/core/src/core-server/presets/common-preset.ts
Switched gating from features.experimentalComponentsManifest to features.componentsManifest (preset now enables componentsManifest: true), causing manifest write/register to run based on componentsManifest.
CLI sandbox template
code/lib/cli-storybook/src/sandbox-templates.ts
Removed experimentalComponentsManifest: true from sandbox template feature set.

Sequence Diagram(s)

sequenceDiagram
    participant DevServer as DevServer
    participant Build as BuildStatic
    participant Manifests as ManifestWriter
    participant Telemetry as Telemetry

    DevServer->>DevServer: start
    alt features.componentsManifest !== false
        DevServer->>Manifests: registerManifests()
        Manifests-->>DevServer: registration complete
    end
    DevServer->>Telemetry: doTelemetry()

    Build->>Build: run static build
    alt features.componentsManifest !== false
        Build->>Manifests: writeManifests()
        Manifests-->>Build: manifests written
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
code/core/src/types/modules/core-common.ts (1)

504-504: Consider adding JSDoc documentation for the componentsManifest feature flag.

Other feature flags in this interface include JSDoc comments describing their purpose and default values (e.g., viewport, highlight, experimentalCodeExamples). Since this flag is graduating from experimental status, adding documentation would improve discoverability and help users understand when/why to opt out.

+    /**
+     * Enable generation of the components manifest file containing component metadata.
+     *
+     * `@default` true
+     */
     componentsManifest?: boolean;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@code/core/src/types/modules/core-common.ts` at line 504, Add a JSDoc comment
for the componentsManifest feature flag above the componentsManifest?: boolean;
declaration in the core-common.ts interface: briefly describe what
enabling/disabling the components manifest does, note that it has graduated from
experimental, and document the default behavior/value and any
compatibility/opt-out implications so users can discover and understand when to
enable or disable it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@code/core/src/types/modules/core-common.ts`:
- Line 504: Add a JSDoc comment for the componentsManifest feature flag above
the componentsManifest?: boolean; declaration in the core-common.ts interface:
briefly describe what enabling/disabling the components manifest does, note that
it has graduated from experimental, and document the default behavior/value and
any compatibility/opt-out implications so users can discover and understand when
to enable or disable it.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52873a9 and 6ac4b22.

📒 Files selected for processing (5)
  • code/.storybook/main.ts
  • code/core/src/core-server/build-static.ts
  • code/core/src/core-server/dev-server.ts
  • code/core/src/types/modules/core-common.ts
  • code/lib/cli-storybook/src/sandbox-templates.ts
💤 Files with no reviewable changes (2)
  • code/lib/cli-storybook/src/sandbox-templates.ts
  • code/.storybook/main.ts

@JReinhold JReinhold changed the title Rename experimentalComponentsManifestcomponentsManifest, default to true Manifest: Rename experimentalComponentsManifestcomponentsManifest, default to true Mar 2, 2026
@JReinhold JReinhold added maintenance User-facing maintenance tasks ci:normal manifest Component manifest generation labels Mar 2, 2026
@JReinhold JReinhold requested a review from kasperpeulen March 2, 2026 16:01
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 2, 2026

View your CI Pipeline Execution ↗ for commit 75082e9

Command Status Duration Result
nx run-many -t compile -c production --parallel=1 ✅ Succeeded 5m 57s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-11 12:46:53 UTC

Copy link
Copy Markdown
Member

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

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

@JReinhold The PR description is not following the PR template

@kylegach kylegach mentioned this pull request Mar 5, 2026
4 tasks
@kylegach
Copy link
Copy Markdown
Contributor

kylegach commented Mar 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal maintenance User-facing maintenance tasks manifest Component manifest generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants