Skip to content

feat: add full WebSocket testing and history support - #10

Merged
bajrangCoder merged 2 commits into
mainfrom
feat/websocket-integration
Aug 10, 2026
Merged

feat: add full WebSocket testing and history support#10
bajrangCoder merged 2 commits into
mainfrom
feat/websocket-integration

Conversation

@bajrangCoder

Copy link
Copy Markdown
Owner

Summary

Add complete WebSocket testing support to Setu, including connection configuration, message exchange, collections, and persistent history.

What changed

  • Added ws:// and wss:// connection support.
  • Added connection cancellation, disconnect handling, timeouts, and stale-session protection.
  • Added query parameters, headers, authentication, environment variables, and subprotocols.
  • Added text, JSON, and binary message sending.
  • Added incoming, outgoing, system, ping, pong, close, and error timeline entries.
  • Added a virtualized message timeline with bounded memory usage.
  • Added a minimal, vertically resizable message composer.
  • Added WebSocket request save/load support for collections.
  • Added WebSocket History entries with bounded message transcripts.
  • Restored saved messages and counters when reopening History entries.
  • Added message counts and WebSocket badges to the History sidebar.
  • Added migration-safe serialization for existing HTTP collections and History.

@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds end-to-end WebSocket request support, including connection configuration, messaging, persistence, and history.

  • Resolves WebSocket URLs, headers, parameters, authentication, and subprotocols against the active environment before connecting.
  • Adds text, JSON, and binary message composition with a bounded timeline.
  • Adds collection and history serialization for WebSocket requests and transcripts.
  • Adds WebSocket-specific status, protocol, composer, timeline, and sidebar UI.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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
Loading

Reviews (2): Last reviewed commit: "fix" | Re-trigger Greptile

Comment thread src/views/websocket_view.rs Outdated
@bajrangCoder

This comment was marked as outdated.

@bajrangCoder
bajrangCoder merged commit 2dcd0ac into main Aug 10, 2026
4 checks passed
@bajrangCoder
bajrangCoder deleted the feat/websocket-integration branch August 10, 2026 03:12
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