Skip to content

Conversation

@JReinhold
Copy link
Contributor

@JReinhold JReinhold commented Jan 29, 2026

Closes #

What I did

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!

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>

Summary by CodeRabbit

  • Refactor

    • Improved story name resolution and display formatting.
    • Story names now render with proper spacing (e.g., "Logged In" instead of "LoggedIn").
    • Enhanced fallback logic for name resolution using runtime story information.
  • Tests

    • Updated test fixtures to reflect new story naming format.

✏️ Tip: You can customize this high-level summary in your review settings.

@JReinhold JReinhold self-assigned this Jan 29, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2026

Fails
🚫 The "#### Manual testing" section must be filled in. Please describe how to test the changes you've made, step by step, so that reviewers can confirm your PR works as intended.

Generated by 🚫 dangerJS against 97fd012

@JReinhold JReinhold added bug ci:normal manifest Component manifest generation labels Jan 29, 2026
@nx-cloud
Copy link

nx-cloud bot commented Jan 29, 2026

View your CI Pipeline Execution ↗ for commit 97fd012

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ✅ Succeeded 7m 44s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-29 13:36:55 UTC

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

The changes refactor how story names are resolved and code snippets are generated in the component manifest generator. Story iteration now uses both the export key and story object, with the story's runtime name taking precedence when available. Test expectations are updated to reflect the new naming format.

Changes

Cohort / File(s) Summary
Component Manifest Generator Refactor
code/renderers/react/src/componentManifest/generator.ts
Changed story iteration from using storyName alone to using [storyExport, story] pairs. Name resolution now prioritizes story.name with fallback to storyNameFromExport(storyExport). Updated getCodeSnippet and error handling calls to pass storyExport instead of storyName. Added import for storyNameFromExport function.
Generator Test Fixture Updates
code/renderers/react/src/componentManifest/generator.test.ts
Updated test fixture expectations to use space-separated story names ("Logged In", "Logged Out") instead of camelCase variants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings

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

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

Labels

bug ci:normal manifest Component manifest generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants