Feature: Teams Collaborative Mode (Cloud/Enterprise)#5694
Feature: Teams Collaborative Mode (Cloud/Enterprise)#5694prd-hoang-doan wants to merge 1 commit intoFlowiseAI:mainfrom
Conversation
- Adds WebSocket server infrastructure with Redis-based pub/sub for horizontal scaling. - Implements real-time collaboration features including cursor tracking, node presence, and live editing. - Adds comprehensive health monitoring, rate limiting, and connection pooling for WebSocket connections. - Implemented CanvasWithNodePresence component for node presence synchronization. - Added ConnectionStatusNotification and ConnectionStatusIndicator for real-time connection status. - Introduced CursorOverlay to display user cursors in collaborative mode. - Created NodePresenceOverlay to indicate users hovering or editing nodes. - Developed WebSocketStatusBanner to show server health and connection issues. - Enhanced Canvas component to manage collaborative state and user presence. - Integrated throttling for cursor movement based on server health. - Updated Vite configuration to support WebSocket connections.
Summary of ChangesHello @prd-hoang-doan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a significant new feature: real-time collaborative editing for the Flowise canvas. It establishes a dedicated WebSocket backend, leveraging Redis for scalable message broadcasting, and integrates a suite of frontend components to provide a rich, interactive collaborative environment. Users can now see each other's cursors, active presence on nodes, and live updates to the chatflow, all while ensuring secure and performant communication. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a major feature: real-time collaborative editing for the Flowise canvas. The implementation is extensive, covering both backend WebSocket infrastructure with Redis for scaling and a rich frontend experience with presence indicators, cursor tracking, and live state synchronization. The architecture is well-designed, with clear separation of concerns for connection management, room management, presence, and state synchronization. The code demonstrates good practices for security and scalability, such as rate limiting, connection pooling, and using Redis for pub/sub.
My review focuses on potential race conditions, performance bottlenecks, and security considerations. I've identified a few areas for improvement:
- A synchronous file operation that could block the event loop under load.
- A potential for silent data loss if a chatflow update lacks user information.
- A bug in handling duplicate WebSocket sessions that could lead to inconsistent client state.
- A client-side health check logic that might be too permissive.
All original comments have been retained as they do not contradict or align with the provided rules in a way that requires modification or dropping. Addressing these points will further enhance its robustness and reliability.
|
This is crazy good!! We're in the middle of refractoring/rewriting the Canvas component, so there'll be some delay before this goes in. |
|
@HenryHengZJ It's great to hear that the feature will be on the roadmap. |
Ticket:
Flowise Roadmap
Overview:
This pull request implements real-time collaborative editing functionality for the Flowise canvas, enabling multiple users to work on the same chatflow simultaneously. The implementation includes WebSocket infrastructure on both frontend and backend, with features like cursor tracking, node presence indicators, user avatars, and live state synchronization.
Changes:
Collaborative mode includes three layers:
Layer 1: Active users' presence
Layer 2: Live cursors
Layer 3: Node-level presence
Demo Recording
collaborative.mode.demo.mp4
Security
Deployment