Skip to content

Conversation

@RockChinQ
Copy link
Member

Replace Server-Sent Events (SSE) with WebSocket for pipeline debugging to support bidirectional real-time communication and resolve timeout limitations.

Backend Changes

  • Add WebSocketConnectionPool for managing client connections
  • Implement WebSocket route handler at /api/v1/pipelines//chat/ws
  • Modify WebChatAdapter to broadcast messages via WebSocket
  • Support both legacy SSE and new WebSocket simultaneously
  • Maintain person/group session isolation

Frontend Changes

  • Create PipelineWebSocketClient for WebSocket communication
  • Update DebugDialog to use WebSocket instead of SSE
  • Support auto-reconnection and connection status tracking
  • Remove streaming toggle (WebSocket always supports streaming)

Key Features

  • Eliminates 120-second timeout limitation
  • Supports multiple messages per request
  • Enables backend push notifications (plugins)
  • Maintains session isolation (person vs group)
  • Backward compatible with SSE during transition

🤖 Generated with Claude Code

概述 / Overview

请在此部分填写你实现/解决/优化的内容:
Summary of what you implemented/solved/optimized:

检查清单 / Checklist

PR 作者完成 / For PR author

请在方括号间写x以打勾 / Please tick the box with x

  • 阅读仓库贡献指引了吗? / Have you read the contribution guide?
  • 与项目所有者沟通过了吗? / Have you communicated with the project maintainer?
  • 我确定已自行测试所作的更改,确保功能符合预期。 / I have tested the changes and ensured they work as expected.

项目维护者完成 / For project maintainer

  • 相关 issues 链接了吗? / Have you linked the related issues?
  • 配置项写好了吗?迁移写好了吗?生效了吗? / Have you written the configuration items? Have you written the migration? Has it taken effect?
  • 依赖加到 pyproject.toml 和 core/bootutils/deps.py 了吗 / Have you added the dependencies to pyproject.toml and core/bootutils/deps.py?
  • 文档编写了吗? / Have you written the documentation?

Replace Server-Sent Events (SSE) with WebSocket for pipeline debugging
to support bidirectional real-time communication and resolve timeout
limitations.

## Backend Changes

- Add WebSocketConnectionPool for managing client connections
- Implement WebSocket route handler at /api/v1/pipelines/<uuid>/chat/ws
- Modify WebChatAdapter to broadcast messages via WebSocket
- Support both legacy SSE and new WebSocket simultaneously
- Maintain person/group session isolation

## Frontend Changes

- Create PipelineWebSocketClient for WebSocket communication
- Update DebugDialog to use WebSocket instead of SSE
- Support auto-reconnection and connection status tracking
- Remove streaming toggle (WebSocket always supports streaming)

## Key Features

- Eliminates 120-second timeout limitation
- Supports multiple messages per request
- Enables backend push notifications (plugins)
- Maintains session isolation (person vs group)
- Backward compatible with SSE during transition

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 20.00000% with 172 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../api/http/controller/groups/pipelines/websocket.py 11.00% 97 Missing ⚠️
pkg/api/http/service/websocket_pool.py 36.14% 53 Missing ⚠️
pkg/platform/sources/webchat.py 0.00% 17 Missing ⚠️
pkg/core/stages/build_app.py 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

2 participants