Repository navigation
feat(hub): add bounded WebSocket broadcasts - #156
Merged
Merged
Conversation
Co-authored-by: Nishiki <1121087+nshki@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge app coverage into index.test.ts and keep the WebSocket happy path and critical failure cases. Move reusable test helpers into function directories. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep protocol schemas and shared types outside entry points. Extract connection, delivery, and shutdown helpers into function directories without changing behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
alliscode
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The client app and Copilot plugin need live updates as features move to the TypeScript Hub. This adds the connection layer before commenting is ported, without storing or replaying notifications. Closes #155.
What changes
The
wsintegration attaches to the existing HTTP server. Clients can subscribe to channels, and feature code can broadcast to their connected subscribers.createAppand route registration accept an optional broadcast function, so HTTP features can run without WebSocket setup. Vite forwards development upgrades, and API shutdown closes connections.Connection and message limits bound memory use, including pending access checks, channel memberships, fragmented messages, and outgoing data. Heartbeats remove dead connections, and repeated rejected upgrades are summarized in logs.
Authentication remains separate work. The endpoint rejects connections until application access checks are supplied. This foundation serves one API process only; comment events, client reconnection, and communication between processes are not included. The new guide documents the protocol, limits, and responsibilities for future features.
Created from a Slack conversation.