Skip to content

Conversation

@yannbf
Copy link
Member

@yannbf yannbf commented Nov 4, 2025

Closes #

What I did

This PR enables Preact in the testing feature of Storybook

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

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Initialize Storybook in a Preact project, then make sure tests can be run using the testing widget.

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

  • New Features

    • Added support for Preact paired with Vite.
    • Preact+Vite project templates now include Vitest integration by default.
  • Documentation

    • Updated Vitest addon docs to list Preact as a supported renderer and framework option.
  • Chores

    • Increased parallelism for Vitest integration jobs in CI to speed up test runs.

@yannbf yannbf requested a review from ndelangen November 4, 2025 17:05
@yannbf yannbf self-assigned this Nov 4, 2025
@yannbf yannbf requested a review from kylegach as a code owner November 4, 2025 17:05
@yannbf yannbf requested a review from jonniebigodes as a code owner November 4, 2025 17:05
@yannbf yannbf added patch:yes Bugfix & documentation PR that need to be picked to main branch preact ci:merged Run the CI jobs that normally run when merged. labels Nov 4, 2025
@nx-cloud
Copy link

nx-cloud bot commented Nov 4, 2025

View your CI Pipeline Execution ↗ for commit f557f7f

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 44s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-05 16:09:16 UTC

@nx-cloud
Copy link

nx-cloud bot commented Nov 4, 2025

View your CI Pipeline Execution ↗ for commit 7785262

Command Status Duration Result
nx run-many -t build -c production --parallel=3 ✅ Succeeded 11s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-04 17:06:56 UTC

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

📝 Walkthrough

Walkthrough

Registered '@storybook/preact-vite' as a supported framework for the Vitest addon, removed vitest-integration from preact-vite sandbox template skip tasks, updated Vitest addon docs to list Preact, and increased vitest-integration CircleCI parallelism in workflow configs.

Changes

Cohort / File(s) Summary
Vitest addon framework registration
code/addons/vitest/src/constants.ts
Added @storybook/preact-vite to the SUPPORTED_FRAMEWORKS array.
Sandbox template configuration
code/lib/cli-storybook/src/sandbox-templates.ts
Removed vitest-integration from skipTasks for the preact-vite default-js and default-ts templates (now ['e2e-tests','bench']).
Vitest addon documentation
docs/writing-tests/integrations/vitest-addon.mdx
Added Preact to the renderer/support lists and included preact-vite in example framework lists.
CI parallelism adjustments
.circleci/config.yml, .circleci/src/workflows/daily.yml, .circleci/src/workflows/merged.yml
Increased vitest-integration job parallelism: daily workflow from 11→13, merged workflow from 6→7.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Notes for reviewer:

  • Verify constants update doesn't require downstream mapping elsewhere.
  • Confirm sandbox template change aligns with test coverage expectations for preact-vite.
  • Check docs formatting and example correctness.
  • Ensure CircleCI parallelism values comply with CI quota/policy.

Possibly related PRs

  • Nextjs: Add Next v16 support #32791 — Edits the same CircleCI vitest-integration parallelism entries in .circleci/src/workflows/*, likely related to CI concurrency adjustments.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7785262 and f557f7f.

📒 Files selected for processing (3)
  • .circleci/config.yml (2 hunks)
  • .circleci/src/workflows/daily.yml (1 hunks)
  • .circleci/src/workflows/merged.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-13T13:33:14.659Z
Learning: Applies to test-storybooks/** : Maintain test Storybook configurations under `test-storybooks/` for E2E and visual testing scenarios
📚 Learning: 2025-09-17T08:11:04.287Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-09-17T08:11:04.287Z
Learning: Use Vitest as the test runner for this repository

Applied to files:

  • .circleci/src/workflows/merged.yml
  • .circleci/src/workflows/daily.yml
  • .circleci/config.yml
📚 Learning: 2025-10-13T13:33:14.659Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-13T13:33:14.659Z
Learning: Applies to test-storybooks/** : Maintain test Storybook configurations under `test-storybooks/` for E2E and visual testing scenarios

Applied to files:

  • .circleci/src/workflows/merged.yml
  • .circleci/src/workflows/daily.yml
  • .circleci/config.yml
🔇 Additional comments (4)
.circleci/config.yml (2)

1014-1014: Parallelism increase for daily vitest-integration job is reasonable.

Increasing parallelism from 11 to 13 aligns with adding Preact support, which expands the test matrix. Ensure the CI runner has sufficient capacity for 13 parallel tasks.


1109-1109: Parallelism increase for merged vitest-integration job is reasonable.

Increasing parallelism from 6 to 7 for the post-merge validation workflow maintains proportional testing coverage. This change is consistent with the daily workflow update.

.circleci/src/workflows/merged.yml (1)

57-57: Parallelism increase aligns with Preact support expansion.

Increasing vitest-integration parallelism from 6 to 7 in the merged workflow accommodates the additional Preact template testing. This is consistent with the daily workflow update and supports the PR's Preact integration goal.

.circleci/src/workflows/daily.yml (1)

57-57: Parallelism increase supports comprehensive daily testing with Preact.

Increasing vitest-integration parallelism from 11 to 13 in the daily workflow accommodates expanded test coverage, including the new Preact framework. This is the most comprehensive testing cadence, so the increase is appropriate.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

Copy link
Contributor

@kylegach kylegach left a comment

Choose a reason for hiding this comment

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

Docs are good; thanks!

@yannbf yannbf merged commit 957bb1c into next Nov 7, 2025
75 checks passed
@yannbf yannbf deleted the yann/preact-testing-support branch November 7, 2025 10:21
yannbf added a commit that referenced this pull request Nov 7, 2025
Vitest Addon: Add support for Preact

(cherry picked from commit 957bb1c)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Nov 7, 2025
@yannbf yannbf added the empathy label Nov 11, 2025
@yannbf yannbf added needs qa Indicates that this needs manual QA during the upcoming minor/major release and removed needs qa Indicates that this needs manual QA during the upcoming minor/major release labels Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:merged Run the CI jobs that normally run when merged. empathy feature request patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch preact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants