chore: websocket fixes for cursor example#3973
Conversation
|
🚅 Deployed to the rivet-pr-3973 environment in rivet-frontend
|
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. |
PR Review: WebSocket Fixes for Cursor ExampleSummaryThis PR makes two key changes to fix WebSocket connections in the cursors-raw-websocket example:
Code Quality ✅Positive aspects:
Changes Analysis1. Frontend URL Separation (App.tsx)The change splits the HTTP and WebSocket URLs due to vite-plugin-srvx limitations. Concerns:
Suggestion: Make the WebSocket URL configurable via environment variables or derive it from the HTTP URL with appropriate protocol switching. 2. Default Encoding (router-websocket-endpoints.ts:388)Defaults to "json" encoding for raw WebSocket connections without subprotocols. Analysis:
Security Considerations 🔒
Performance Considerations ⚡
Test Coverage 🧪Missing tests:
Recommendation: Add test cases to verify raw WebSocket connections work without explicit encoding subprotocol. Potential Bugs 🐛
Recommendations 📝High Priority
Medium Priority
Low Priority
Alignment with CLAUDE.md ✅
ConclusionThe changes solve the immediate problem but introduce environment-specific hardcoding that will cause issues outside of local development. The default encoding change is sound and well-justified. Recommendation: Request changes to make the WebSocket URL configurable before merging. Review generated by Claude Code |
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
502ec0c to
80fe3e8
Compare
Merge activity
|

No description provided.