Cli: Allow -p shorthand to --port for ai command#35390
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change adds a Changesai --port shorthand
Estimated code review effort: 1 (Trivial) | ~3 minutes PoemA rabbit hopped to port with glee, ✨ Finishing Touches📝 Generate docstrings
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. Comment |
Sidnioulz
left a comment
There was a problem hiding this comment.
Code LGTM. Can you please update the manual testing instructions to a command that actually passes through to MCP? ai -p 6006 throws as -p is not recognised by the AI cli itself.
|
@Sidnioulz done 👍 |
|
Why is this |
|
@shilman my bad, force of habits 😅 |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 188 | 188 | 0 |
| Self size | 79 KB | 79 KB | 0 B |
| Dependency size | 35.44 MB | 35.57 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/angular
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 185 | 185 | 0 |
| Self size | 160 KB | 160 KB | 🎉 -54 B 🎉 |
| Dependency size | 30.65 MB | 30.79 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/ember
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 187 | 187 | 0 |
| Self size | 15 KB | 15 KB | 0 B |
| Dependency size | 30.79 MB | 30.92 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/nextjs
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 533 | 533 | 0 |
| Self size | 663 KB | 663 KB | 0 B |
| Dependency size | 62.16 MB | 62.29 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/react-webpack5
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 274 | 274 | 0 |
| Self size | 23 KB | 23 KB | 🚨 +12 B 🚨 |
| Dependency size | 47.94 MB | 48.07 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/server-webpack5
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 200 | 200 | 0 |
| Self size | 16 KB | 16 KB | 0 B |
| Dependency size | 36.70 MB | 36.84 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 204 | 204 | 0 |
| Self size | 821 KB | 821 KB | 0 B |
| Dependency size | 91.80 MB | 91.94 MB | 🚨 +133 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 197 | 197 | 0 |
| Self size | 32 KB | 32 KB | 0 B |
| Dependency size | 90.28 MB | 90.42 MB | 🚨 +133 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/preset-create-react-app
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 68 | 68 | 0 |
| Self size | 32 KB | 32 KB | 🚨 +6 B 🚨 |
| Dependency size | 6.03 MB | 6.16 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/preset-react-webpack
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 163 | 163 | 0 |
| Self size | 19 KB | 19 KB | 0 B |
| Dependency size | 32.42 MB | 32.55 MB | 🚨 +135 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
|
Would need a canary to check but now I understand where the bug was, and Kasper already approved so lets merge :) |
Closes #
What I did
PR allow to use
-pas a shorthand to--portChecklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
run a command of
storybook ai ...with-pinstead of--port:STORYBOOK_FEATURE_AI_CLI=1 npx storybook ai get-storybook-story-instructions -p 6006Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake 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/coreteam 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
-pcan be used instead of--port.