Skip to content

Conversation

ivan-dalmet
Copy link
Member

@ivan-dalmet ivan-dalmet commented Oct 14, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Visiting /storybook now automatically loads the Storybook index without needing /index.html.
    • Eliminates intermittent 404s or blank pages when accessing the /storybook path.
    • Ensures consistent redirect behavior across environments for reliable Storybook access.
    • Provides a cleaner URL and a predictable entry point for Storybook.

Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Walkthrough

Removes Vercel-specific redirect configuration and adds an equivalent redirect in Vite/Nitro to route /storybook to /storybook/index.html. No other behavior or public APIs are changed.

Changes

Cohort / File(s) Summary
Remove Vercel redirect config
vercel.json
Deleted file content including JSON schema reference and redirects block for /storybook/storybook/index.html.
Add Nitro/Vite redirect rule
vite.config.ts
Added Nitro route rule to redirect /storybook to /storybook/index.html.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant B as Browser
    participant N as Nitro (Vite)
    participant S as Static Files

    Note over N: New routing ownership

    B->>N: GET /storybook
    N-->>B: 302 Redirect to /storybook/index.html
    B->>N: GET /storybook/index.html
    N->>S: Serve index.html
    S-->>N: 200 HTML
    N-->>B: 200 HTML
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • feat: update tanstack start #593 — Also adjusts the /storybook → /storybook/index.html redirect, moving responsibility between platform config and app config.

Suggested labels

v3

Suggested reviewers

  • ntatoud
  • DecampsRenan

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 concisely and accurately describes the primary change of migrating the storybook redirect to Nitro in a single clear sentence.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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 v3/redirect-with-nitro

📜 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 e130d2d and 2beace6.

📒 Files selected for processing (2)
  • vercel.json (0 hunks)
  • vite.config.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • vercel.json
⏰ 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). (3)
  • GitHub Check: 🔬 Tests (22)
  • GitHub Check: 🔬 Tests (24)
  • GitHub Check: Playwright E2E Tests
🔇 Additional comments (1)
vite.config.ts (1)

35-35: LGTM! Redirect configuration is correct.

The Nitro route rule syntax is correct and achieves the goal of migrating the Storybook redirect from Vercel to Nitro. The redirect from /storybook to /storybook/index.html is straightforward and should work as expected.


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.

Copy link

@yoannfleurydev yoannfleurydev merged commit bf2e2a4 into main Oct 14, 2025
12 checks passed
@yoannfleurydev yoannfleurydev deleted the v3/redirect-with-nitro branch October 14, 2025 13:53
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