feat: add full WebSocket testing and history support - #10
Merged
Conversation
Greptile SummaryThe PR adds end-to-end WebSocket request support, including connection configuration, messaging, persistence, and history.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/views/websocket_view.rs | Coordinates WebSocket request resolution, connection lifecycle, event handling, message sending, and history updates; the prior subprotocol-placeholder defect is fixed by resolving templates before transport validation. |
| src/websocket/client.rs | Implements asynchronous WebSocket connection, handshake preparation, protocol validation, message transport, cancellation, and timeout handling. |
| src/entities/websocket.rs | Defines persisted WebSocket request, session, timeline, and bounded-history data models. |
| src/components/websocket_composer.rs | Adds text, JSON, and binary payload composition and file selection. |
| src/components/websocket_message_list.rs | Adds the virtualized WebSocket event timeline and binary payload saving interface. |
| src/entities/history.rs | Extends history persistence and migration-compatible serialization for WebSocket sessions. |
| src/entities/collections.rs | Extends saved collection requests to support both HTTP and WebSocket data. |
Sequence Diagram
sequenceDiagram
participant U as User
participant V as WebSocketView
participant E as Environment Resolver
participant C as WebSocket Client
participant S as WebSocket Server
U->>V: Connect request
V->>E: Resolve URL, headers, params, auth, subprotocols
E-->>V: Resolved request or interpolation error
alt Resolution succeeds
V->>C: Connect with resolved configuration
C->>S: WebSocket handshake
S-->>C: Connection and selected subprotocol
C-->>V: Session events
else Resolution fails
V-->>U: Display error and abort connection
end
Reviews (2): Last reviewed commit: "fix" | Re-trigger Greptile
This comment was marked as outdated.
This comment was marked as outdated.
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.
Summary
Add complete WebSocket testing support to Setu, including connection configuration, message exchange, collections, and persistent history.
What changed
ws://andwss://connection support.