Skip to content

chore: disable default snapshots in chromatic - #4785

Open
tjuanitas wants to merge 1 commit into
masterfrom
chore-disable-default-snapshots
Open

chore: disable default snapshots in chromatic#4785
tjuanitas wants to merge 1 commit into
masterfrom
chore-disable-default-snapshots

Conversation

@tjuanitas

@tjuanitas tjuanitas commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Tests
    • Expanded visual regression coverage across Storybook stories by enabling Chromatic snapshots for key dialogs, explorers, previews, sidebars, uploaders, and feature views.
    • Standardized snapshot behavior by removing redundant per-story exclusions where snapshots are now enabled by default.
    • Updated visual test configurations to support more consistent automated UI comparisons.

@tjuanitas
tjuanitas marked this pull request as ready for review August 15, 2026 00:28
@tjuanitas
tjuanitas requested review from a team as code owners August 15, 2026 00:28
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f7f9c4a-6585-45be-a315-49794aff1078

📥 Commits

Reviewing files that changed from the base of the PR and between d9175a8 and b08aef1.

📒 Files selected for processing (24)
  • .storybook/preview.tsx
  • src/components/time/ReadableTime.stories.tsx
  • src/elements/common/stories/__tests__/PreviewDialog-visual.stories.tsx
  • src/elements/content-explorer/stories/tests/ContentExplorer-visual.stories.js
  • src/elements/content-explorer/stories/tests/DeleteConfirmationDialog-visual.stories.js
  • src/elements/content-explorer/stories/tests/MetadataView-visual.stories.tsx
  • src/elements/content-explorer/stories/tests/RenameDialog-visual.stories.tsx
  • src/elements/content-explorer/stories/tests/ShareDialog-visual.stories.tsx
  • src/elements/content-picker/stories/tests/ContentPicker-visual.stories.js
  • src/elements/content-preview/stories/ContentPreview.stories.js
  • src/elements/content-preview/stories/tests/ContentPreview-e2e.stories.tsx
  • src/elements/content-preview/stories/tests/ContentPreview-metadata-visual.stories.js
  • src/elements/content-preview/stories/tests/ContentPreview-visual.stories.js
  • src/elements/content-sharing/stories/ContentSharing.stories.js
  • src/elements/content-sharing/stories/ContentSharingV2.stories.tsx
  • src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx
  • src/elements/content-sidebar/stories/tests/BoxAISidebar-visual.stories.tsx
  • src/elements/content-sidebar/stories/tests/ContentSidebar-visual.stories.tsx
  • src/elements/content-sidebar/stories/tests/MetadataSidebarRedesign-visual.stories.tsx
  • src/elements/content-sidebar/stories/tests/TaskModalV2-visual.stories.tsx
  • src/elements/content-uploader/stories/tests/ContentUploader-visual.stories.js
  • src/features/content-insights/stories/tests/ContentInsightsSummary-visual.stories.tsx
  • src/features/metadata-instance-editor/stories/tests/CascadePolicy-visual.stories.js
  • src/features/security-cloud-game/stories/SecurityCloudGame.stories.js
💤 Files with no reviewable changes (6)
  • src/elements/content-sharing/stories/ContentSharing.stories.js
  • src/elements/content-preview/stories/ContentPreview.stories.js
  • src/elements/content-sharing/stories/ContentSharingV2.stories.tsx
  • src/components/time/ReadableTime.stories.tsx
  • src/elements/content-preview/stories/tests/ContentPreview-e2e.stories.tsx
  • src/features/security-cloud-game/stories/SecurityCloudGame.stories.js

Walkthrough

Chromatic snapshots are disabled in the global Storybook preview. Selected visual stories explicitly enable snapshots. Several story defaults remove local snapshot-disable settings, and two typed metadata declarations include the Chromatic setting.

Changes

Chromatic snapshot policy

Layer / File(s) Summary
Set default snapshot policy
.storybook/preview.tsx, src/components/time/ReadableTime.stories.tsx, src/elements/content-preview/stories/..., src/elements/content-sharing/stories/..., src/features/security-cloud-game/stories/SecurityCloudGame.stories.js
The global preview disables Chromatic snapshots. Several story defaults remove local settings that disabled snapshots.
Enable visual story snapshots
src/elements/common/stories/__tests__/PreviewDialog-visual.stories.tsx, src/elements/content-explorer/stories/tests/*, src/elements/content-picker/stories/tests/ContentPicker-visual.stories.js, src/elements/content-preview/stories/tests/*visual*, src/elements/content-sharing/stories/tests/ContentSharingV2-visual.stories.tsx, src/elements/content-sidebar/stories/tests/*, src/elements/content-uploader/stories/tests/ContentUploader-visual.stories.js, src/features/content-insights/stories/tests/ContentInsightsSummary-visual.stories.tsx, src/features/metadata-instance-editor/stories/tests/CascadePolicy-visual.stories.js
Selected visual stories set parameters.chromatic.disableSnapshot to false.
Type Chromatic metadata
src/elements/content-sidebar/stories/tests/BoxAISidebar-visual.stories.tsx, src/elements/content-sidebar/stories/tests/MetadataSidebarRedesign-visual.stories.tsx
Typed story metadata declares the Chromatic snapshot setting alongside existing MSW handler parameters.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to b08ae

This change disables default visual snapshots for selected stories without introducing a reported product or production risk; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: jpan-box, greg-in-a-box, jfox-box

Poem

A rabbit sets the snapshots bright,
With Chromatic flags aligned just right.
The preview rests, visual tales glow,
Typed metadata helps them show.
Hop, hop—the stories run tonight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request has no description, so it does not explain the snapshot configuration changes or testing scope. Add a concise description that explains the default snapshot change, story-specific opt-ins, and the validation performed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: disabling default Chromatic snapshots while individual visual stories opt in.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-disable-default-snapshots

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.6)
src/elements/content-preview/stories/tests/ContentPreview-visual.stories.js

File contains syntax errors that prevent linting: Line 226: Type annotations are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.


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.

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.

1 participant