Skip to content

chore: storybook fixes#3066

Merged
adityathebe merged 1 commit into
mainfrom
storybook-fixes
Jul 9, 2026
Merged

chore: storybook fixes#3066
adityathebe merged 1 commit into
mainfrom
storybook-fixes

Conversation

@yashmehrotra

@yashmehrotra yashmehrotra commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes

    • Improved Storybook startup and build behavior by updating the environment used for local webpack.
    • Disabled Storybook telemetry during builds for a smoother, quieter build process.
  • Chores

    • Simplified the Storybook addon setup by removing an unused addon from the configuration.

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aws-preview Ready Ready Preview Jul 9, 2026 10:30am
flanksource-ui Ready Ready Preview Jul 9, 2026 10:30am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Removed the "storybook-addon-mock/register" entry from the Storybook addons configuration and updated the "storybook" and "build-storybook" npm scripts to use cross-env for setting NEXT_PRIVATE_LOCAL_WEBPACK and STORYBOOK_DISABLE_TELEMETRY environment variables.

Changes

Storybook Config Updates

Layer / File(s) Summary
Addon removal and script environment variables
.storybook/main.ts, package.json
Removes the "storybook-addon-mock/register" addon entry and updates the "storybook" and "build-storybook" npm scripts to set NEXT_PRIVATE_LOCAL_WEBPACK and STORYBOOK_DISABLE_TELEMETRY via cross-env.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is broadly related to the Storybook changes but too generic to convey the main update. Use a more specific title that mentions the Storybook config and script changes, such as updating Storybook addons and build commands.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 storybook-fixes
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch storybook-fixes

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
package.json (1)

182-183: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding STORYBOOK_DISABLE_TELEMETRY=1 to the storybook dev script as well.

STORYBOOK_DISABLE_TELEMETRY=1 is only set on build-storybook but not on the storybook dev script. If the intent is to disable Storybook telemetry, it should be consistent across both scripts to avoid sending telemetry during local development.

♻️ Suggested fix
-    "storybook": "cross-env NEXT_PRIVATE_LOCAL_WEBPACK=true storybook dev -p 6006",
+    "storybook": "cross-env NEXT_PRIVATE_LOCAL_WEBPACK=true STORYBOOK_DISABLE_TELEMETRY=1 storybook dev -p 6006",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 182 - 183, The Storybook scripts are inconsistent
because only build-storybook disables telemetry; update the storybook dev script
to also include STORYBOOK_DISABLE_TELEMETRY=1 so both commands behave the same.
Make the change in the package.json script entries for storybook and
build-storybook, keeping NEXT_PRIVATE_LOCAL_WEBPACK=true intact while applying
the telemetry flag to the dev command as well.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@package.json`:
- Around line 182-183: The Storybook scripts are inconsistent because only
build-storybook disables telemetry; update the storybook dev script to also
include STORYBOOK_DISABLE_TELEMETRY=1 so both commands behave the same. Make the
change in the package.json script entries for storybook and build-storybook,
keeping NEXT_PRIVATE_LOCAL_WEBPACK=true intact while applying the telemetry flag
to the dev command as well.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 093b012c-3053-4ea4-b90d-dd8c4f912178

📥 Commits

Reviewing files that changed from the base of the PR and between 6abec13 and 894c387.

📒 Files selected for processing (2)
  • .storybook/main.ts
  • package.json
💤 Files with no reviewable changes (1)
  • .storybook/main.ts

@adityathebe
adityathebe merged commit a8515de into main Jul 9, 2026
16 of 18 checks passed
@adityathebe
adityathebe deleted the storybook-fixes branch July 9, 2026 10:33
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.

2 participants