- Notifications
You must be signed in to change notification settings - Fork1.1k
Issue 20846 planning#21311
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 ourterms of service andprivacy 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?
Issue 20846 planning#21311
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Introduce a reusable hook for dynamic parameter websocket connections. This hook manages connection state, automatic reconnection, and inactivity timeouts. It also centralizes the websocket logic, making it easier to manage and test.Co-authored-by: jaayden.halko <jaayden.halko@gmail.com>
Cursor Agent can help with this pull request. Just |
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commentingrecheck in this Pull Request.Posted by theCLA Assistant Lite bot. |
Fixes#20846
This PR addresses the poor user experience caused by the 30-minute hardcoded timeout on dynamic parameter WebSockets, which previously required users to refresh the page.
Key Changes:
Backend (
coderd/parameters.go):quartz.Clockfor testability of the timeout mechanism.Frontend (
site/src/hooks/useDynamicParametersWebSocket.ts):useDynamicParametersWebSockethook for managing dynamic parameter connections.websocket-tsfor automatic reconnection with exponential backoff (1-6 seconds).CreateWorkspacePage.tsx,WorkspaceParametersPageExperimental.tsx, andTemplateEmbedPageExperimental.tsxto standardize WebSocket handling.Why these changes?
This significantly improves the user experience by:
quartz.Clockensures the backend timeout logic is reliably testable.