Skip to content

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Jan 17, 2026

No description provided.

@railway-app
Copy link

railway-app bot commented Jan 17, 2026

🚅 Deployed to the rivet-pr-3967 environment in rivet-frontend

Service Status Web Updated (UTC)
website ❌ Build Failed (View Logs) Web Jan 17, 2026 at 5:49 am
frontend-inspector ❌ Build Failed (View Logs) Web Jan 17, 2026 at 5:49 am
frontend-cloud ❌ Build Failed (View Logs) Web Jan 17, 2026 at 5:49 am

@jog1t jog1t self-assigned this Jan 17, 2026
@jog1t jog1t requested a review from NathanFlurry January 17, 2026 05:48
@jog1t jog1t marked this pull request as ready for review January 17, 2026 05:48
Copy link
Contributor Author

jog1t commented Jan 17, 2026


How to use the Graphite Merge Queue

Add 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.

@claude
Copy link

claude bot commented Jan 17, 2026

Code Review

Summary

This PR improves Vercel deployment support for the hello-world example by restructuring the project to align with Vercel's conventions. The changes move from a Hono-based structure to a Vite-based structure with proper API routing.

Key Changes

  • Moved src/actors.tsapi/actors.ts
  • Moved src/server.tsapi/index.ts with updated routing
  • Updated vercel.json to use Vite framework with proper function configuration
  • Updated vite.config.ts to reflect new entry point and API prefix
  • Added .vercel to .gitignore
  • Updated vite-plugin-srvx to use a pre-release version

Issues Found

🔴 Critical Issues

1. Using pkg.pr.new URL for Production Dependency

"vite-plugin-srvx": "https://pkg.pr.new/rivet-dev/vite-plugin-srvx@312eeb8"
  • Location: examples/hello-world/package.json:21
  • Issue: This uses a temporary preview deployment URL from pkg.pr.new, not a stable published version
  • Impact: This dependency will break when the preview deployment expires
  • Fix: Either:
    • Publish a new version of vite-plugin-srvx to npm and use that version
    • OR temporarily use a git dependency if the changes aren't ready for npm: "git+https://github.com/rivet-dev/vite-plugin-srvx.git#312eeb8"
    • Best practice: Merge the vite-plugin-srvx changes, publish to npm, then update this reference

2. Route Path Mismatch

// api/index.ts
app.all("/rivet/*", (c) => registry.handler(c.req.raw));

// vite.config.ts
plugins: [react(), ...srvx({ entry: "api/index.ts", prefix: "/api" })],

// vercel.json
"source": "/api/:path*",
"destination": "/api/"
  • Location: api/index.ts:8, vite.config.ts:6, vercel.json:12-13
  • Issue: The routing configuration is inconsistent
    • The app handles /rivet/* paths
    • The srvx plugin adds /api prefix
    • Vercel rewrites /api/* to /api/
    • Expected URL: /api/rivet/* (combining prefix + route)
    • Previous URL: /api/rivet/* (from old src/server.ts)
  • Impact: This changes the API endpoint URL from /api/rivet/* to either /api/rivet/* or just /rivet/* depending on environment. The behavior may differ between dev and production.
  • Fix: Clarify the intended URL structure. If you want to keep /api/rivet/*:
    app.all("/rivet/*", (c) => registry.handler(c.req.raw));
    This should work with the /api prefix from srvx. Verify the final URL is correct in both dev and production.

🟡 Medium Priority Issues

3. Missing Newline at End of File

  • Location: vercel.json:16
  • Issue: The file ends without a newline character
  • Impact: Minor - doesn't affect functionality but violates common convention
  • Fix: Add a newline at the end of the file

4. Inconsistent Import Ordering

  • Location: vite.config.ts:1-3
  • Before: defineConfig imported before react
  • After: react imported before defineConfig
  • Issue: While the change follows alphabetical ordering, it's inconsistent with potential project conventions
  • Impact: Low - this is mostly a style preference
  • Note: Check if the project has import ordering conventions (e.g., external imports before local imports, sorted alphabetically, etc.)

✅ Good Practices

  1. Proper .gitignore Update: Adding .vercel to ignore Vercel deployment artifacts is correct
  2. Vercel Configuration: The memory (2048MB) and maxDuration (30s) settings are reasonable for serverless functions
  3. URL Rewriting: The Vercel rewrite configuration properly handles API routing
  4. Framework Migration: Switching from "hono" to "vite" framework in vercel.json aligns with the project structure

Recommendations

Before Merging

  1. Fix the dependency issue: Replace the pkg.pr.new URL with a stable version

  2. Verify routing: Test that the API is accessible at the expected URL in both:

    • Local dev environment (npm run dev)
    • Vercel preview deployment
    • Confirm the URL is /api/rivet/* and matches client expectations
  3. Add documentation: Consider updating the example's README if it contains API endpoint URLs that need to be updated

Testing Checklist

  • Deploy to Vercel and verify the build succeeds
  • Test that /api/rivet/* endpoints work correctly
  • Verify the actor registry can be accessed from the frontend
  • Check that both dev and production environments work identically

Security & Performance

  • ✅ No security concerns identified
  • ✅ Performance settings (memory, duration) are appropriate
  • ✅ No blocking performance issues

Test Coverage

  • ⚠️ This PR doesn't include tests, but it's an example project focused on deployment configuration
  • Consider adding a simple E2E test that verifies the API endpoint works after deployment

Overall Assessment: The changes are well-structured and improve Vercel compatibility. The main blocking issue is the unstable dependency URL that needs to be resolved before merging.

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