CLI: Update postAction hook to use command parameter for logfile retrieval#33137
Conversation
|
View your CI Pipeline Execution ↗ for commit 6939068
☁️ Nx Cloud last updated this comment at |
📝 WalkthroughWalkthroughTwo CLI runner scripts were changed to accept the full Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI Entrypoint
participant Commander as Commander (command)
participant Logger as Log Writer
CLI->>Commander: execute run command
Commander-->>CLI: invokes postAction(command)
alt logfile option set
CLI->>Commander: command.getOptionValue('logfile')
Commander-->>CLI: returns logfile path
CLI->>Logger: write logs to path
Logger-->>CLI: success/failure
else logfile not set
CLI-->>Logger: no-op
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
✨ Finishing touches
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-11-05T09:38:47.712ZApplied to files:
🧬 Code graph analysis (1)code/lib/create-storybook/src/bin/run.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
code/lib/cli-storybook/src/bin/run.ts(1 hunks)code/lib/create-storybook/src/bin/run.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-05T09:38:47.712Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/Select/Select.tsx:200-204
Timestamp: 2025-11-05T09:38:47.712Z
Learning: Repo: storybookjs/storybook — Guidance: Until Storybook 11 is released, do not suggest using React.useId anywhere (e.g., in code/core/src/components/components/Select/Select.tsx) to maintain compatibility with React 17 runtimes. Prefer advising: accept a caller-provided props.id and, if needed, generate a client-only fallback id to minimize SSR hydration issues — but avoid useId. Resume prompting for useId after Storybook 11.
Applied to files:
code/lib/create-storybook/src/bin/run.ts
📚 Learning: 2025-09-24T09:39:39.233Z
Learnt from: ndelangen
Repo: storybookjs/storybook PR: 32507
File: code/core/src/manager/globals/globals-module-info.ts:25-33
Timestamp: 2025-09-24T09:39:39.233Z
Learning: In Storybook, storybook/actions/decorator is a preview-only entrypoint and should not be included in manager globals configuration. The duplicatedKeys array in code/core/src/manager/globals/globals-module-info.ts is specifically for manager-side externalization, not preview entrypoints.
Applied to files:
code/lib/create-storybook/src/bin/run.ts
🧬 Code graph analysis (1)
code/lib/cli-storybook/src/bin/run.ts (2)
code/core/src/node-logger/logger/log-tracker.ts (1)
logTracker(95-95)code/core/src/node-logger/index.ts (1)
logTracker(8-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: normal
- GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (1)
code/lib/cli-storybook/src/bin/run.ts (1)
80-86: LGTM! Correct refactoring of postAction hook.The parameter change from destructured
{ getOptionValue }tocommandobject and the corresponding update tocommand.getOptionValue('logfile')is correct and aligns with Commander.js hook patterns.
586e333 to
6939068
Compare
Closes #
What I did
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
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.tsMake 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 pull request has been released as version
0.0.0-pr-33137-sha-586e3337. Try it out in a new sandbox by runningnpx storybook@0.0.0-pr-33137-sha-586e3337 sandboxor in an existing project withnpx storybook@0.0.0-pr-33137-sha-586e3337 upgrade.More information
0.0.0-pr-33137-sha-586e3337valentin/fix-commander-this-reference586e33371763981807)To request a new release of this pull request, mention the
@storybookjs/coreteam.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=33137Summary by CodeRabbit
Refactor
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.