Skip to content

Docs: Improve error statement on empty stories configuration#32945

Merged
jonniebigodes merged 2 commits into
storybookjs:nextfrom
achesin:somehowRemoval
Nov 17, 2025
Merged

Docs: Improve error statement on empty stories configuration#32945
jonniebigodes merged 2 commits into
storybookjs:nextfrom
achesin:somehowRemoval

Conversation

@achesin
Copy link
Copy Markdown
Contributor

@achesin achesin commented Nov 4, 2025

What I did

When running Storybook in my project I got the error "Your main configuration somehow does not contain a 'stories' field, or it resolved to an empty array." I found the use of the word 'somehow' to be passing unneeded judgement when it could just state the fact. Removing the word still gets the point across and can be more friendly to someone who is struggling.

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

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

  • Bug Fixes
    • Refined the wording of an error message shown when the app’s main story configuration is missing or resolves to an empty array, improving clarity and readability for users.

@valentinpalkovic valentinpalkovic added core ci:docs Run the CI jobs for documentation checks only. documentation labels Nov 10, 2025
@valentinpalkovic valentinpalkovic changed the title cleanup: unnecessary wording of error message Documentation: unnecessary wording of error message Nov 10, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 10, 2025

📝 Walkthrough

Walkthrough

A wording change removes the word "somehow" from a stories-configuration error message in the source and updates the test snapshot; no functional behavior or control flow changed.

Changes

Cohort / File(s) Summary
Error message text correction
code/core/src/server-errors.ts
Removed the word "somehow" from the stories configuration error message: now reads "Your main configuration does not contain a 'stories' field, or it resolved to an empty array."
Test snapshot update
code/core/src/core-server/utils/__tests__/remove-mdx-stories.test.ts
Updated inline test snapshot to match the corrected error message text.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Files to spot-check: code/core/src/server-errors.ts and the updated test snapshot for exact string match and formatting.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa3d7c6 and 20d9031.

📒 Files selected for processing (2)
  • code/core/src/core-server/utils/__tests__/remove-mdx-stories.test.ts (1 hunks)
  • code/core/src/server-errors.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • code/core/src/core-server/utils/tests/remove-mdx-stories.test.ts
  • code/core/src/server-errors.ts

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining why this PR is needed, why this solution was chosen, and what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jonniebigodes jonniebigodes changed the title Documentation: unnecessary wording of error message Docs: Improve error statement on empty stories configuration Nov 17, 2025
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Nov 17, 2025

View your CI Pipeline Execution ↗ for commit 20d9031

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 54s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-17 19:56:49 UTC

@jonniebigodes jonniebigodes merged commit 0611f9b into storybookjs:next Nov 17, 2025
10 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 18, 2025
17 tasks
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. core documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants