codeant-ai-for-open-source[bot] commented on PR #38308:
URL: https://github.com/apache/superset/pull/38308#issuecomment-4029918428

   ## **Sequence Diagram**
   
   This PR migrates websocket tests from Jest to Vitest and tightens assertions 
around how the server validates JWTs, registers client sockets, and optionally 
replays events from Redis on reconnect. The diagram summarizes that core 
connection and replay flow which the updated tests exercise.
   
   ```mermaid
   sequenceDiagram
       participant Client
       participant HTTPServer
       participant WebSocketServer
       participant Redis
   
       Client->>HTTPServer: HTTP upgrade request with JWT and optional last id
       HTTPServer->>HTTPServer: Validate JWT and extract channel id
   
       alt Invalid or missing channel in JWT
           HTTPServer-->>Client: Close socket (no upgrade)
       else Valid JWT with channel
           HTTPServer->>WebSocketServer: Upgrade to WebSocket
           WebSocketServer->>WebSocketServer: Register socket for channel
           opt last id present
               WebSocketServer->>Redis: Read events from channel stream range
               Redis-->>WebSocketServer: Stream results
               WebSocketServer-->>Client: Send replayed events over WebSocket
           end
       end
   ```
   
   ---
   *Generated by [CodeAnt AI](https://codeant.ai)*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to