You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(storybook): exclude internal patterns from production - #6930
Exclude pattern .internal.stories.ts and .internal.mdx files from the production gen2 Storybook build, using the same globs as components and icons. Development, CI accessibility, and VRT modes are unchanged.
Expected outcomes:
Given a production build, when pattern stories and docs are indexed, internal files are excluded and public files remain included.
Given development or CI accessibility mode, when pattern files are indexed, internal stories and docs remain available.
Motivation and context
Reviewing #6925 exposed that production pattern globs still included internal-only files, such as Pixel Loader, despite the build's documented exclusion policy. This is a separate, two-line configuration fix; it does not change the documentation PR.
Validation:
node --test /Users/ruben/.copilot/session-state/cdaf386e-885d-49b8-a2e9-7150f962d50b/files/storybook-pattern-globs.test.mjs (Node 24.22.1): passed all four checks against the actual configuration declarations and pattern files. Checks cover production internal exclusion, retention of all public stories/docs, and unchanged internal discovery in development and CI accessibility modes. The production checks failed before the fix. This is a local verification script, not a committed regression test.
yarn lint:ai: blocked because this worktree has no installed dependency state. Running the validator directly was also blocked by the missing prettier dependency.
Full Storybook build, ESLint, and browser/accessibility checks: not run; workspace dependencies are not installed.
N/A. Story discovery configuration only; no component rendering changes.
Author's checklist
I have read the CONTRIBUTING and PULL_REQUESTS documents.
I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
I have added automated tests to cover my changes.
I have included a well-written changeset if my change needs to be published.
I have included updated documentation if my change required it.
No published-package change or changeset is needed. The configuration now matches its existing comment. Validation used a local script rather than adding a test harness for this two-line config change. The linked PULL_REQUESTS.md does not exist in this checkout.
Reviewer's checklist
Includes a Github Issue with appropriate flag or Jira ticket number without a link
Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
Automated tests cover all use cases and follow best practices for writing
Validated on all supported browsers
All VRTs are approved before the author can update Golden Hash
Manual review test cases
Production excludes internal patterns but retains public patterns
Run the gen2 production Storybook build and open it.
Inspect Patterns / AI toolkit.
Expect Pixel Loader's internal stories and docs to be absent, while public patterns such as Prompt Field remain available.
Development still includes internal patterns
Start the gen2 development Storybook.
Open Patterns / AI toolkit.
Expect Pixel Loader's internal stories and docs to remain available.
Device review
Did it pass in Desktop?
Did it pass in (emulated) Mobile?
Did it pass in (emulated) iPad?
Accessibility testing checklist
Required: Complete each applicable item and document your testing steps (replace the placeholders with your component-specific instructions).
No component semantics, keyboard handling, or focus behavior changed. The following are optional surrounding-Storybook smoke checks and have not been performed.
Keyboard (required — document steps below) — What to test for: Focus order is logical; Tab reaches the component and all interactive descendants; Enter/Space activate where appropriate; arrow keys work for tabs, menus, sliders, etc.; no focus traps; Escape dismisses when applicable; focus indicator is visible.
Open the production Storybook and navigate its Patterns sidebar with the keyboard.
Open a retained public pattern such as Prompt Field.
Expect normal keyboard navigation and visible focus, with no internal Pixel Loader entry.
Screen reader (required — document steps below) — What to test for: Role and name are announced correctly; state changes (e.g. expanded, selected) are announced; labels and relationships are clear; no unnecessary or duplicate announcements.
Open the production Storybook with VoiceOver.
Navigate the Patterns sidebar and open a retained public pattern.
Expect public pattern names to be announced normally and internal Pixel Loader entries to be absent.
Cross-model review
Claude Opus 5.5: OK to merge; no blockers or major issues.
Gemini 4 Argon: approve; no findings.
Deferred minor findings: the public AI toolkit overview and Pixel Loader dev-warning URL currently link to Pixel Loader's internal docs. Those destinations will no longer be published after this fix. Updating the Pixel Loader documentation references is separate from the requested production-discovery correction.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Exclude pattern
.internal.stories.tsand.internal.mdxfiles from the production gen2 Storybook build, using the same globs as components and icons. Development, CI accessibility, and VRT modes are unchanged.Expected outcomes:
Motivation and context
Reviewing #6925 exposed that production pattern globs still included internal-only files, such as Pixel Loader, despite the build's documented exclusion policy. This is a separate, two-line configuration fix; it does not change the documentation PR.
Validation:
node --test /Users/ruben/.copilot/session-state/cdaf386e-885d-49b8-a2e9-7150f962d50b/files/storybook-pattern-globs.test.mjs(Node 24.22.1): passed all four checks against the actual configuration declarations and pattern files. Checks cover production internal exclusion, retention of all public stories/docs, and unchanged internal discovery in development and CI accessibility modes. The production checks failed before the fix. This is a local verification script, not a committed regression test.npx --yes prettier@3.8.1 --check gen2/packages/swc/.storybook/main.ts: passed.git diff --cached --check: passed.yarn lint:ai: blocked because this worktree has no installed dependency state. Running the validator directly was also blocked by the missingprettierdependency.Related issue(s)
Screenshots (if appropriate)
N/A. Story discovery configuration only; no component rendering changes.
Author's checklist
No published-package change or changeset is needed. The configuration now matches its existing comment. Validation used a local script rather than adding a test harness for this two-line config change. The linked
PULL_REQUESTS.mddoes not exist in this checkout.Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Production excludes internal patterns but retains public patterns
Development still includes internal patterns
Device review
Accessibility testing checklist
Required: Complete each applicable item and document your testing steps (replace the placeholders with your component-specific instructions).
No component semantics, keyboard handling, or focus behavior changed. The following are optional surrounding-Storybook smoke checks and have not been performed.
Keyboard (required — document steps below) — What to test for: Focus order is logical; Tab reaches the component and all interactive descendants; Enter/Space activate where appropriate; arrow keys work for tabs, menus, sliders, etc.; no focus traps; Escape dismisses when applicable; focus indicator is visible.
Screen reader (required — document steps below) — What to test for: Role and name are announced correctly; state changes (e.g. expanded, selected) are announced; labels and relationships are clear; no unnecessary or duplicate announcements.
Cross-model review