-
Notifications
You must be signed in to change notification settings - Fork 142
refactor: vite × hono dev server #3717
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?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
1341b79 to
f5a26c8
Compare
Pull Request ReviewThis PR refactors the actor-actions example to use a unified Vite + Hono dev server instead of the previous split setup with concurrently running frontend and backend servers. 🎯 SummaryChanges:
❌ Critical Issues1. Missing HTML file and broken dev server setup (src/server.tsx:14)The server references {import.meta.env.PROD ? (
<script type='module' src='/static/client.js'></script> // ❌ Wrong filenameThe vite.config.ts specifies: entryFileNames: 'static/main.js', // Should be main.js, not client.jsFix: Change 2. Inconsistent indentation (src/server.tsx:10)Line 10 uses spaces instead of hard tabs, violating the project's rustfmt.toml style: app.get("/", async (c) => {
return c.html( // ❌ Space indentation hereFix: Use hard tabs consistently throughout the file (see CLAUDE.md: "Hard tabs for Rust formatting") 3. Missing newline at EOF (frontend/index.css:124)The CSS file is missing a trailing newline, which violates common coding standards.
|
PR Review: Vite × Hono Dev Server RefactorSummaryThis PR refactors the actor-actions example to use a unified Vite + Hono development setup, eliminating the need for running separate backend and frontend processes. The changes consolidate the development experience into a single server. Positive Changes
Issues & Concerns1. Hardcoded API URL in Frontend (Critical)File: frontend/App.tsx:9 The frontend is hardcoded to http://localhost:6420 but the new dev server runs on Vite's default port (likely 5173) and the API is mounted at /api/rivet. Fix Required: Use relative URLs instead: /api/rivet 2. Incorrect Output Path in Build Config (Critical)File: vite.config.ts:13 outputs static/main.js but src/server.tsx:14 references static/client.js. This will cause a 404 in production builds. Fix Required: Either change build output to client.js OR update server to reference main.js 3. Indentation Inconsistency (Minor)File: src/server.tsx:10 - Line 10 uses space instead of tab, inconsistent with the project's hard tabs convention (CLAUDE.md). 4. Missing Newline at End of File (Minor)File: frontend/index.css:124 - Missing newline at EOF 5. FIXME Comment (Low Priority)File: src/server.tsx:26 - Consider resolving before merge or adding context about why registry.serve() cannot be used yet. Recommendations SummaryMust Fix Before Merge:
Should Fix: Overall AssessmentSolid refactor that improves DX, but 2-3 critical issues must be fixed before merge. The client.js/main.js mismatch will break production and the hardcoded API URL will prevent the app from working. Recommendation: Request changes for critical issues, then approve once resolved. |
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |

No description provided.