-
Notifications
You must be signed in to change notification settings - Fork 525
fix(ui): add missing zod production dependency #730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(ui): add missing zod production dependency #730
Conversation
The terminal route uses zod for search parameter validation, but zod was only listed as a devDependency (via other packages). This causes the production build to fail with: Rollup failed to resolve import "zod" from "src/routes/terminal.tsx" Adding zod as a direct production dependency in apps/ui/package.json ensures it's available during the production build.
Summary of ChangesHello @itsmylife44, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical production build failure in the UI package by correctly declaring Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
📝 WalkthroughWalkthroughThis PR adds the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly identifies and fixes a production build failure by adding the missing zod dependency to the UI package. My review includes two main points: first, I've noted a discrepancy in zod versions across the monorepo and suggested aligning them to prevent potential conflicts. Second, the PR includes undocumented version bumps for several packages, and I've recommended either documenting this change or handling it in a separate PR to maintain a clear commit history. Overall, the core fix is sound, and these suggestions aim to improve the project's long-term maintainability.
| "sonner": "2.0.7", | ||
| "tailwind-merge": "3.4.0", | ||
| "usehooks-ts": "3.1.1", | ||
| "zod": "^3.24.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change introduces zod@^3.24.1. However, other parts of the monorepo appear to be using zod@4.x (version 4.2.1 is present in the lockfile, likely for the @modelcontextprotocol/sdk dependency). Using two different major versions of zod (v3 and v4) can lead to hard-to-debug type incompatibilities, especially if Zod schemas or inferred types are shared between packages like the UI and the server.
To ensure consistency and prevent future issues, it's highly recommended to use a single version of zod across the project. Please consider aligning on a single version, preferably by upgrading this dependency to v4 to match what's already in use elsewhere in the repository.
| "zod": "^3.24.1", | |
| "zod": "^4.2.1", |
| { | ||
| "name": "automaker", | ||
| "version": "0.12.0rc", | ||
| "version": "0.13.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR includes version bumps for several packages (e.g., from 0.12.0rc to 0.13.0), which seems to go beyond the scope of the fix(ui) commit message. To keep the commit history clean and understandable, it's better to separate dependency fixes from version bumps.
Could you please consider either:
- Updating the PR title and description to reflect the version bump (e.g.,
release: v0.13.0). - Reverting the version bumps and handling them in a separate release PR.
Summary
Fixes production build failure caused by missing
zoddependency in UI package.Problem
The terminal route (
src/routes/terminal.tsx) uses zod for search parameter validation:However, zod was not listed as a direct dependency in
apps/ui/package.json. During development, it was available as a transitive dependency, but the production build fails:Solution
Add
zodas an explicit production dependency inapps/ui/package.json.Changes
apps/ui/package.json: Add"zod": "^3.24.1"to dependenciespackage-lock.json: Updated accordinglyTesting
npm run build) completes successfullySummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.