-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Copilot: Improve instructions, setup steps #33231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
|
View your CI Pipeline Execution ↗ for commit a75504b
☁️ Nx Cloud last updated this comment at |
📝 WalkthroughWalkthroughThe PR updates Copilot instructions to adopt NX as the primary task runner, revises the repository layout and sandboxing guidance, adds a new GitHub Actions workflow for Copilot setup steps, and removes three steering documentation files (.kiro/steering/*). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (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). (3)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/copilot-instructions.md (2)
175-175: Fix bare URL by wrapping in angle brackets for markdown compliance.Line 175 contains a bare URL that should be wrapped in angle brackets to comply with markdown linting standards (MD034).
Apply this diff to fix the bare URL:
- Access at http://localhost:6006/ + Access at <http://localhost:6006/>
263-263: Fix bare URL by wrapping in angle brackets for markdown compliance.Line 263 contains a bare URL that should be wrapped in angle brackets to comply with markdown linting standards (MD034).
Apply this diff to fix the bare URL:
- Access at http://localhost:6006/ to test your changes + Access at <http://localhost:6006/> to test your changes
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/copilot-instructions.md(9 hunks).github/workflows/copilot-setup-steps.yml(1 hunks).kiro/steering/product.md(0 hunks).kiro/steering/structure.md(0 hunks).kiro/steering/tech.md(0 hunks)
💤 Files with no reviewable changes (3)
- .kiro/steering/structure.md
- .kiro/steering/tech.md
- .kiro/steering/product.md
🧰 Additional context used
🧠 Learnings (24)
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to README.md : Update relevant README files for significant code changes
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Follow existing patterns and conventions in the Storybook codebase
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-10-02T09:22:13.215Z
Learnt from: JReinhold
Repo: storybookjs/storybook PR: 32607
File: code/package.json:243-243
Timestamp: 2025-10-02T09:22:13.215Z
Learning: The Storybook repository uses Yarn v^4 (any 4.x version) as the package manager, configured via .yarnrc.yml and package.json packageManager field. Specific patch versions within v4 can be upgraded as needed.
Applied to files:
.github/copilot-instructions.md
📚 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:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/**/*.{ts,tsx,js,jsx,mjs} : Use server-side logger from 'storybook/internal/node-logger' for Node.js code
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-24T17:49:31.838Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Tests are located in the `code/` directory with root directory for test execution at `./code/`
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-05T09:37:25.920Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/tooltip/WithTooltip.tsx:54-96
Timestamp: 2025-11-05T09:37:25.920Z
Learning: Repo: storybookjs/storybook — In code/core/src/components/components/tooltip/WithTooltip.tsx, the legacy WithTooltip implementation is intentionally reintroduced for backward compatibility and is deprecated; maintainers (per Sidnioulz) do not want maintenance or improvements on it. Prefer WithTooltipNew/Popover; avoid suggesting changes to WithTooltip.* going forward.
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/**/*.{ts,tsx,js,jsx,mjs} : Use client-side logger from 'storybook/internal/client-logger' for browser code
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-09-17T07:31:04.432Z
Learnt from: ndelangen
Repo: storybookjs/storybook PR: 32484
File: code/core/package.json:326-326
Timestamp: 2025-09-17T07:31:04.432Z
Learning: In Storybook's core package, dependencies like `open` are bundled into the final distribution during the build process, so they should remain in devDependencies rather than being moved to dependencies. End users don't need these packages as separate runtime dependencies since they're included in the bundled code.
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-09-29T13:20:23.346Z
Learnt from: mrginglymus
Repo: storybookjs/storybook PR: 32556
File: code/core/package.json:309-313
Timestamp: 2025-09-29T13:20:23.346Z
Learning: The `fast-printf` dependency in Storybook's core package is bundled into the final distribution during the build process, so it should remain in devDependencies rather than being moved to dependencies, following the same pattern as other bundled dependencies like `open`.
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-24T17:49:31.838Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Applies to code/vitest.workspace.ts : Vitest configuration is centralized in `code/vitest.workspace.ts` for workspace setup
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Use Yarn 4.9.1 as the package manager
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/**/*.{test,spec}.{ts,tsx,js,jsx} : Aim for high test coverage of business logic (75%+ for statements/lines) using coverage reports
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/**/*.{test,spec}.{ts,tsx,js,jsx} : Write meaningful unit tests that actually import and call the functions being tested
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Document complex mock behaviors in Vitest tests
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/**/*.{test,spec}.{ts,tsx,js,jsx} : Mock external dependencies using vi.mock() for file system, loggers, and other external dependencies in tests
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-24T17:49:31.838Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Follow the spy mocking rules defined in `.cursor/rules/spy-mocking.mdc` for consistent mocking patterns with Vitest
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Implement mock behaviors in `beforeEach` blocks in Vitest tests
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-24T17:49:31.838Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Test files should follow the naming pattern `*.test.ts`, `*.test.tsx`, `*.spec.ts`, or `*.spec.tsx`
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to **/*.{js,jsx,json,html,ts,tsx,mjs} : Use ESLint and Prettier configurations that are enforced in the codebase
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/**/*.{js,jsx,json,html,ts,tsx,mjs} : Run ESLint with yarn lint:js:cmd to check for linting issues and fix errors before committing
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/**/*.{js,jsx,json,html,ts,tsx,mjs} : Run Prettier with --write flag to format code before committing
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Applies to code/{addons,frameworks}/**/README.md : Include code examples in addon/framework documentation for significant changes
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2025-11-28T14:50:24.872Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.872Z
Learning: Ensure all builds and tests pass before submitting pull requests
Applied to files:
.github/copilot-instructions.md
🪛 LanguageTool
.github/copilot-instructions.md
[grammar] ~177-~177: Ensure spelling is correct
Context: ...cess at http://localhost:6006/ ### For Addon/Framework/Renderers Development 1. Nav...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
.github/copilot-instructions.md
175-175: Bare URL used
(MD034, no-bare-urls)
263-263: Bare URL used
(MD034, no-bare-urls)
⏰ 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: Core Unit Tests, windows-latest
- GitHub Check: copilot-setup-steps
🔇 Additional comments (8)
.github/workflows/copilot-setup-steps.yml (3)
30-31: Verify that the NX compile command includes the-c productionflag if required for setup steps.According to the copilot-instructions.md (line 123), the
-c productionflag is documented as "required" for sandbox-related commands. Confirm whether this flag should also be included in the setup-steps workflow's compile command, or if it's only required for sandbox generation tasks.
26-28: Verify that the custom action at./.github/actions/setup-node-and-installexists and is accessible.The workflow references a custom action that sets up Node.js and installs dependencies. Ensure this action is available in the repository at the referenced path.
14-31: Workflow structure aligns with Copilot agent requirements.The job is correctly named
copilot-setup-stepsto be picked up by Copilot, triggers are appropriately scoped to the workflow file itself (avoiding unnecessary runs), and the step sequence (checkout → setup → compile) follows best practices for CI workflows..github/copilot-instructions.md (5)
177-179: Verify spelling and wording in framework development section.Line 177 flags an orthography concern. Review the section heading for potential spelling or grammatical issues. The current text reads "### For Addon/Framework/Renderers Development" which appears correct, but ensure consistency with terminology used elsewhere in the document.
101-127: Comprehensive NX documentation provides excellent guidance.The NX Task Runner section clearly explains concepts, provides command equivalents, highlights the
-c productionrequirement, and demonstrates practical usage patterns. This section effectively bridges between legacyyarn taskcommands and modern NX equivalents.
7-8: Repository structure and NX guidance are clearly documented.The document effectively communicates the monorepo layout (git root as monorepo root with code/ and scripts/ split), updated NX-centric task orchestration, and the critical sandbox location change outside the repository. The progression from structure overview through detailed NX concepts to practical examples provides both clarity and actionable guidance.
Also applies to: 17-35, 101-127
375-399: Logger guidance accurately reflects Storybook conventions.The logging section comprehensively documents the distinction between server-side (
storybook/internal/node-logger) and client-side (storybook/internal/client-logger) loggers with clear examples. The explicit warning against directconsoleusage (line 399) is important for maintaining code quality.
208-264: Sandbox documentation is comprehensive and emphasizes important location changes.The repeated references to the
../storybook-sandboxes/location (lines 34, 137, 212, 252-253, 325-326) appropriately highlight this significant change. The explanation of the distinction between this external location, the internal./sandboxNX outputs directory, and the workaround for when sandbox generation fails provides practical guidance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Follow up to #33194
What I did
added copilot-setup-setps, see https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment#preinstalling-tools-or-dependencies-in-copilots-environment
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 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
✏️ Tip: You can customize this high-level summary in your review settings.