Skip to content

Conversation

@ntatoud
Copy link
Member

@ntatoud ntatoud commented Nov 11, 2025

Description

When building new components and using Storybook as your playground, it's important to have StrictMode enabled (as in the rest of the app) to catch unexpected issues early in developpement.

Summary by CodeRabbit

  • Chores
    • Enhanced development environment configuration to enforce stricter code quality checks during development.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

React StrictMode is imported and applied to wrap the DocumentationWrapper component in Storybook's preview configuration, enabling stricter runtime development checks without modifying the component's logic or public API surface.

Changes

Cohort / File(s) Summary
Storybook Configuration Update
\.storybook/preview\.tsx
Added React StrictMode import and wrapped DocumentationWrapper with StrictMode boundary to enforce strict development-time checks

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding StrictMode around stories in the Storybook preview configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/storybook-strict-mode

📜 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 513986d and e98020f.

📒 Files selected for processing (1)
  • .storybook/preview.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-09-30T11:07:14.833Z
Learnt from: ivan-dalmet
Repo: BearStudio/start-ui-web PR: 532
File: src/features/auth/PageOAuthCallback.tsx:43-45
Timestamp: 2024-09-30T11:07:14.833Z
Learning: When suggesting changes to `useEffect` dependencies in React components, ensure that removing dependencies doesn't cause React Hook errors about missing dependencies.

Applied to files:

  • .storybook/preview.tsx
🧬 Code graph analysis (1)
.storybook/preview.tsx (1)
src/providers.tsx (1)
  • props (17-32)
⏰ 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: Playwright E2E Tests
  • GitHub Check: 🔬 Tests (lts/*)
🔇 Additional comments (2)
.storybook/preview.tsx (2)

4-4: LGTM! StrictMode import is correct.

The import statement properly adds StrictMode from React, which is needed for the changes below.


89-96: The review comment is incorrect.

The main app does not use StrictMode. The src/providers.tsx file contains ThemeProvider, QueryClientProvider, and other providers, but no StrictMode. The codebase has zero matches for StrictMode anywhere except in the .storybook/preview.tsx change being reviewed.

The PR's claim to "match the rest of the app" is false—this change actually introduces StrictMode behavior that the main app doesn't have. However, wrapping Storybook stories with StrictMode is a reasonable development practice (it catches side effects and deprecation warnings), just not because it matches the app.

Likely an incorrect or invalid review comment.


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.

❤️ Share

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

@sonarqubecloud
Copy link

@ivan-dalmet ivan-dalmet merged commit cb6585c into main Nov 12, 2025
12 checks passed
@ivan-dalmet ivan-dalmet deleted the docs/storybook-strict-mode branch November 12, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants