-
Notifications
You must be signed in to change notification settings - Fork 6
perf: cache ws connections #768
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
PR Type
Enhancement
Description
Introduce global WS connection cache
Centralize WebSocket reconnection logic
Store prompts and submission state in cache
Refactor hook to use subscribers
Changes walkthrough 📝
usePromptQueue.ts
Cache WebSocket connections in hook
apps/app/app/hooks/usePromptQueue.ts
CacheEntry
interface andpromptQueueCache
mapgetCacheEntry
,notifySubscribers
helpersusePromptQueue
to use cached state and subscribers