Adding nitro server layer support for vite apps#3251
Conversation
|
@BugBot run |
π Dyadbot Code Review SummaryVerdict: π€ NOT SURE - Potential issues Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
π’ Low Priority Notes (6 items)
π« Dropped False Positives (4 items)
Generated by Dyadbot multi-agent code review |
|
@BugBot run |
π Dyadbot Code Review SummaryVerdict: π€ NOT SURE - Potential issues Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
π’ Low Priority Notes (6 items)
π« Dropped False Positives (6 items)
Generated by Dyadbot multi-agent code review |
|
@BugBot run |
Claude Code Review SummaryPR Confidence: 4/5All unresolved review threads from trusted authors have been addressed with code changes and resolved; tests, lint, and type-check pass locally. Unresolved ThreadsNo unresolved threads Resolved Threads
Product Principle SuggestionsNo suggestions Generated by Claude Code |
π Dyadbot Code Review SummaryVerdict: π€ NOT SURE - Potential issues Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
π’ Low Priority Notes (0 new items)All LOW-severity findings were either already covered by existing review comments or were dropped as false positives during validation. π« Dropped False Positives (12 items)
Generated by Dyadbot multi-agent code review |
|
@BugBot run |
|
@BugBot run |
|
@BugBot run |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@BugBot run |
π Dyadbot Code Review SummaryVerdict: β YES - Ready to merge Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
π’ Low Priority Notes (0 items)No low-priority issues found after deduplication with existing comments. π« Dropped False Positives (13 items)
Generated by Dyadbot multi-agent code review |
| */ | ||
| export function getNeonClientCode( | ||
| frameworkType: "nextjs" | "vite" | "other" | null, | ||
| frameworkType: AppFrameworkType | null, |
There was a problem hiding this comment.
π‘ MEDIUM | missing-branch
getNeonClientCode missing vite-nitro branch β server-side warning absent
Widening to AppFrameworkType means "vite-nitro" now silently falls through to the generic fallback (line 408+) which lacks the // IMPORTANT: Only use this in server-side code warning that "nextjs" gets.
For a Neon-connected Vite+Nitro app, the AI will get Neon client code that uses process.env.DATABASE_URL without guidance that it must go in a Nitro server route (server/routes/api/), potentially leading the model to place database imports in client-side React components where process.env.DATABASE_URL is unavailable.
Note: The PR plan defers Neon-specific integration to a follow-up, so this could be addressed there. But the type widening here opens the gap now.
π‘ Suggestion: At minimum, update the comment on line 408 to mention "vite-nitro". Ideally, add "vite-nitro" to the "nextjs" branch so it gets the server-side-only warning too.
|
@BugBot run |
π Dyadbot Code Review SummaryVerdict: β YES - Ready to merge Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
π’ Low Priority Notes (4 items)
π« Dropped False Positives (12 items)
Generated by Dyadbot multi-agent code review |
| <DyadStateIndicator state={state} abortedLabel="Did not finish" /> | ||
| )} | ||
| </DyadCardHeader> | ||
| {!isPending && !isAborted && ( |
There was a problem hiding this comment.
π‘ MEDIUM | error-states
No body copy on aborted state β user has no actionable next step
When the Nitro setup is aborted mid-run, the card shows only the headline βNitro server layer setup abortedβ and a βDid not finishβ indicator. The user has no idea whether partial changes were made, whether they should retry, or what went wrong.
Since Nitro setup touches the filesystem (writes a config, installs a package), a partial failure could leave the project in an inconsistent state β the rollback logic handles this internally, but the user has no visibility.
π‘ Suggestion: Add a short aborted-state body with guidance like βSetup did not complete. Re-send your request to try again.β
π Playwright Test Resultsβ Some tests failed
Summary: 264 passed, 27 failed, 5 flaky, 6 skipped Failed Testsπ macOSShow all 27 failures
π Re-run Failing Tests (macOS)Copy and paste to re-run all failing spec files locally: npm run e2e \
e2e-tests/capacitor.spec.ts \
e2e-tests/chat_tabs.spec.ts \
e2e-tests/copy_app.spec.ts \
e2e-tests/custom_apps_folder.spec.ts \
e2e-tests/engine.spec.ts \
e2e-tests/local_agent_advanced.spec.ts \
e2e-tests/local_agent_auto.spec.ts \
e2e-tests/local_agent_basic.spec.ts \
e2e-tests/mention_app.spec.ts \
e2e-tests/per_chat_input.spec.ts \
e2e-tests/select_component.spec.ts \
e2e-tests/setup_flow.spec.ts \
e2e-tests/smart_context_balanced.spec.ts \
e2e-tests/smart_context_deep.spec.ts \
e2e-tests/thinking_budget.spec.ts \
e2e-tests/turbo_edits_v2.spec.ts
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@BugBot run |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54ccc12f45
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const result = await installPackages({ | ||
| packages: ["nitro"], | ||
| appPath: ctx.appPath, | ||
| }); |
There was a problem hiding this comment.
Install Nitro as a development dependency
enable_nitro currently installs nitro without dev: true, so package managers persist it under dependencies instead of devDependencies. In this repo, Vite/tooling packages are treated as dev-time tooling, and adding Nitro to production deps can unnecessarily inflate packaged app size and production install footprint for every project that enables this tool. Since this commit added explicit dev plumbing in installPackages/buildAddDependencyCommand, this call site should use it to avoid persisting Nitro in runtime dependencies.
Useful? React with πΒ / π.
π Dyadbot Code Review SummaryVerdict: β YES - Ready to merge Reviewed by 3 independent agents: Correctness Expert, Code Health Expert, UX Wizard. Issues Summary
π’ Low Priority Notes (1 item)
π« Dropped False Positives (16 items)
Generated by Dyadbot multi-agent code review |
π Playwright Test Resultsβ Some tests failed
Summary: 286 passed, 5 failed, 8 flaky, 6 skipped Failed Testsπ macOS
π Re-run Failing Tests (macOS)Copy and paste to re-run all failing spec files locally: npm run e2e \
e2e-tests/chat_tabs.spec.ts \
e2e-tests/custom_apps_folder.spec.ts \
e2e-tests/per_chat_input.spec.ts \
e2e-tests/setup_flow.spec.ts
|
π Playwright Test Resultsβ Some tests failed
Summary: 869 passed, 14 failed, 11 flaky, 280 skipped Failed Testsπ macOS
πͺ Windows
π Re-run Failing Tests (macOS)Copy and paste to re-run all failing spec files locally: npm run e2e \
e2e-tests/queued_message.spec.ts \
e2e-tests/setup_flow.spec.ts \
e2e-tests/visual_editing.spec.ts
|
HI @wwwillchen , should we still show supabase in add_integration when a nitro server layer was already added to the app or maybe just warn the user that choosing supabase may confuse the AI whether to use supabase edge functions vs. nitro? |
No description provided.