Skip to content

fix(create): upgrade to Vite 8 and fix useStore selector in AI add-on#428

Merged
schiller-manuel merged 1 commit intomainfrom
fix/vite8-usestore-selector
Apr 11, 2026
Merged

fix(create): upgrade to Vite 8 and fix useStore selector in AI add-on#428
schiller-manuel merged 1 commit intomainfrom
fix/vite8-usestore-selector

Conversation

@jherr
Copy link
Copy Markdown
Collaborator

@jherr jherr commented Apr 11, 2026

Summary

  • Upgrade to Vite 8: Bumps vite from ^7.3.1 to ^8.0.0 and @vitejs/plugin-react from ^5.1.4 to ^6.0.1
  • Remove vite-tsconfig-paths: Replaced with Vite 8's native resolve: { tsconfigPaths: true } option, eliminating an extra dependency
  • Fix useStore crash in AI add-on: The useStore call in demo-AIAssistant.tsx was missing the required selector function, causing a TypeError: selector is not a function at runtime. Added (state) => state as the selector.

Test plan

  • pnpm build passes
  • pnpm test (unit + e2e) all green
  • Verified manually with node packages/cli/dist/index.js dev test-app --framework React --add-ons ai

Made with Cursor

Summary by CodeRabbit

  • Dependencies

    • Upgraded Vite from v7.3.1 to v8.0.0
    • Updated @vitejs/plugin-react from v5.1.4 to v6.0.1
    • Removed vite-tsconfig-paths dependency
  • Configuration Updates

    • Switched from the external vite-tsconfig-paths plugin to Vite's native built-in TypeScript path resolution configuration
  • Bug Fixes

    • Corrected the AI assistant component's store state selection to properly initialize component state

- Upgrade vite from ^7.3.1 to ^8.0.0 and @vitejs/plugin-react to ^6.0.1
- Replace vite-tsconfig-paths plugin with native resolve.tsconfigPaths
- Pass required selector function to useStore in AI assistant component

Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4f9aaedb-eaf8-4545-8c5b-39e4df8dd2a6

📥 Commits

Reviewing files that changed from the base of the PR and between 44ef1ad and b549f95.

📒 Files selected for processing (4)
  • .changeset/vite8-usestore-fix.md
  • packages/create/src/frameworks/react/add-ons/ai/assets/src/components/demo-AIAssistant.tsx
  • packages/create/src/frameworks/react/project/base/package.json
  • packages/create/src/frameworks/react/project/base/vite.config.ts.ejs

📝 Walkthrough

Walkthrough

Upgrades Vite from 7.3.1 to 8.0.0 and updates related React tooling. Migrates from the vite-tsconfig-paths plugin to Vite's native resolve.tsconfigPaths configuration option. Fixes AI assistant component's useStore hook to explicitly pass a selector function.

Changes

Cohort / File(s) Summary
Changeset Documentation
.changeset/vite8-usestore-fix.md
New changeset file documenting patch release: Vite 8 upgrade, vite-tsconfig-paths plugin replacement, and useStore usage correction in AI add-on.
Dependency & Configuration Updates
packages/create/src/frameworks/react/project/base/package.json, packages/create/src/frameworks/react/project/base/vite.config.ts.ejs
Updated vite to ^8.0.0 and @vitejs/plugin-react to ^6.0.1; removed vite-tsconfig-paths dependency; migrated from explicit plugin invocation to Vite's built-in resolve.tsconfigPaths configuration; reformatted pnpm.onlyBuiltDependencies array.
Component Hook Fix
packages/create/src/frameworks/react/add-ons/ai/assets/src/components/demo-AIAssistant.tsx
Updated useStore invocation to explicitly pass selector function: useStore(showAIAssistant, (state) => state) for correct state mapping.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop along, dear Vite takes flight,
Eight's the version, shining bright!
Plugin paths now native-bound,
useStore hooks sing a cleaner sound,
Updates smooth, the build's delight! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: upgrading to Vite 8 and fixing the useStore selector in the AI add-on.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/vite8-usestore-selector

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.

@schiller-manuel schiller-manuel merged commit c6bd449 into main Apr 11, 2026
4 checks passed
@schiller-manuel schiller-manuel deleted the fix/vite8-usestore-selector branch April 11, 2026 14:36
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