Skip to content

CLI: Avoid hanging of postinstall during init#34175

Merged
valentinpalkovic merged 1 commit into
nextfrom
valentin/fix-hanging-a11y-setup-during-init
Mar 17, 2026
Merged

CLI: Avoid hanging of postinstall during init#34175
valentinpalkovic merged 1 commit into
nextfrom
valentin/fix-hanging-a11y-setup-during-init

Conversation

@valentinpalkovic
Copy link
Copy Markdown
Contributor

@valentinpalkovic valentinpalkovic commented Mar 17, 2026

Closes #

What I did

The post-install script for the accessibility add-on ran the Vitest auto migration, prompting whether the auto migration should run. Therefore, I have added the --yes flag to all post-install scripts to avoid prompts.

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

  • Bug Fixes

    • Addon configuration prompts now auto-confirm during setup, streamlining addon installation and removing manual confirmation.
  • Tests

    • Test expectations updated to reflect the auto-confirm behavior in addon post-install flows.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 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 c3dcbf7

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 17, 2026

View your CI Pipeline Execution ↗ for commit c3dcbf7

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

☁️ Nx Cloud last updated this comment at 2026-03-17 10:16:17 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 17, 2026

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: 95850483-33db-41ee-8fbd-fe67645a770e

📥 Commits

Reviewing files that changed from the base of the PR and between b0e431e and c3dcbf7.

📒 Files selected for processing (2)
  • code/lib/create-storybook/src/commands/AddonConfigurationCommand.test.ts
  • code/lib/create-storybook/src/commands/AddonConfigurationCommand.ts

📝 Walkthrough

Walkthrough

Replaced the user-controlled yes flag with a hard-coded true when invoking per-addon postinstall in AddonConfigurationCommand; corresponding tests were updated to expect yes: true or removed explicit yes entries.

Changes

Cohort / File(s) Summary
Addon Configuration
code/lib/create-storybook/src/commands/AddonConfigurationCommand.ts
Replaced yes: this.commandOptions.yes with yes: true in the options passed to per-addon postinstall, making addon configuration auto-confirm prompts.
Tests
code/lib/create-storybook/src/commands/AddonConfigurationCommand.test.ts
Updated test expectations: changed postinstall calls to expect yes: true (and removed some explicit yes entries in options objects) to match the new hard-coded behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Telemetry: Add playwright-prompt #33229 — Related change touching AddonConfigurationCommand's handling of the yes flag and postinstall invocation patterns; likely overlaps in intent and affected call sites.
✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
📝 Coding Plan
  • Generate coding plan for human review comments

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

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-hanging-a11y-setup-during-init branch from b0e431e to c3dcbf7 Compare March 17, 2026 10:06
Copy link
Copy Markdown
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

I'm not 100% certain whether auto-accepting all prompts is the best idea (maybe in the future there are automigrations that do need user prompting) but I think for now this is fine!

@valentinpalkovic valentinpalkovic merged commit 5b317a9 into next Mar 17, 2026
124 of 127 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-hanging-a11y-setup-during-init branch March 17, 2026 11:29
@github-actions github-actions Bot mentioned this pull request Mar 17, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants