feat: add an independent foundation for a future reliable WebSocket connection [WPB-23826]#20620
Open
screendriver wants to merge 16 commits intodevfrom
Open
feat: add an independent foundation for a future reliable WebSocket connection [WPB-23826]#20620screendriver wants to merge 16 commits intodevfrom
screendriver wants to merge 16 commits intodevfrom
Conversation
Introduce an effectful wrapper around the existing WebSocket connection state machine. This adds a concrete boundary for connection lifecycle, state observation, message sending, and cleanup without yet wiring it into bootstrap or React.
Introduce a WebSocket lifecycle state machine that owns transport creation, message forwarding, and cleanup through an invoked callback actor. This is the first step toward moving WebSocket lifecycle authority from the imperative wrapper into the state machine itself.
Contributor
|
🔗 Download Full Report Artifact 🧪 Playwright Test Summary
|
Subscribe to the managed WebSocket connection in AppMain and expose the current connection state through the application context. This gives React components a reactive connection-state snapshot while keeping connection ownership at the bootstrap boundary.
…esting in the developer menu
apps/webapp/src/script/webSocketConnection/createManagedWebSocketConnection.ts
Outdated
Show resolved
Hide resolved
apps/webapp/src/script/webSocketConnection/createManagedWebSocketConnection.ts
Outdated
Show resolved
Hide resolved
apps/webapp/src/script/webSocketConnection/managedWebSocketConnectionStateMachine.ts
Show resolved
Hide resolved
|
e-maad
reviewed
Mar 10, 2026
apps/webapp/src/script/webSocketConnection/managedWebSocketConnectionStateMachine.ts
Show resolved
Hide resolved
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.



Pull Request
Summary
We want a new WebSocket connection path that can be developed, tested, and observed independently from the existing application flow. The intent of this pull request is to create a safe, isolated starting point for a future reliable WebSocket connection without affecting the current production path.
This change introduces a separate, feature-flagged WebSocket connection foundation with clear ownership at the application boundary. This pull request does not replace the existing production WebSocket/event flow. It does not integrate the new connection path with the legacy event repository or Knockout-based implementation.
It also makes the connection state visible for manual verification when the feature is enabled. The new path is only enabled when the application is started with:
?enabled-features=reliable-websocket-connectionUnfortunately the previous one #20618 was closed accidentally.
Security Checklist (required)
Accessibility (required)
Standards Acknowledgement (required)
Screenshots or demo (if the user interface changed)
Notes for reviewers