Skip to content

Fix: websocket app#13

Merged
AxiosLeo merged 17 commits intomainfrom
fix/websocket-app
Apr 11, 2026
Merged

Fix: websocket app#13
AxiosLeo merged 17 commits intomainfrom
fix/websocket-app

Conversation

@AxiosLeo
Copy link
Copy Markdown
Owner

@AxiosLeo AxiosLeo commented Apr 6, 2026

Note

Medium Risk
Touches core SocketApplication/WebSocketApplication runtime behavior (connection lifecycle, ping, and URL parsing), which could affect existing socket clients. Added tests reduce risk but changes are in a central request/response path.

Overview
WebSocket server is refactored to extend SocketApplication so it reuses shared connection tracking, ping configuration (pingConfig), and newly added connection management helpers.

Socket and WebSocket request dispatch now populate context.connection_id, and the WebSocket URL parsing is updated to respect Host and x-forwarded-proto headers for correct ws/wss handling.

TypeScript declarations are updated to reflect the new class hierarchy and APIs (new PingConfig, send/close/getConnection/sendByConnectionId), CI now tests Node 22/24, ESLint targets ES2020, and a comprehensive test suite is added alongside updated websocket example/docs.

Reviewed by Cursor Bugbot for commit b47da55. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread src/apps/websocket.js
Comment thread src/apps/websocket.js Outdated
Comment thread src/apps/socket.js
Comment thread src/apps/websocket.js Outdated
…g connections tracking and reorganizing sendByConnectionId method
…ketApplication and WebSocketApplication, including class hierarchy, setup examples, and connection management methods
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1d64ee9. Configure here.

Comment thread src/apps/websocket.js
…functions, Model, response handling, Router, SSE middleware, utility functions, and workflow management
…nnecessary properties for cleaner configuration
@AxiosLeo AxiosLeo merged commit 5073d6b into main Apr 11, 2026
11 checks passed
@AxiosLeo AxiosLeo deleted the fix/websocket-app branch April 11, 2026 02:34
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.

1 participant