Uh oh!
There was an error while loading. Please reload this page.
fix(conn-status): remove unused connection status inside user avatar stack - #1800
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
Removed redundant connection status indicator from the UserAvatarStack component. The connection status was already being displayed by the ControlBar component via renderDisconnectionNotice() (control-bar.tsx:1216-1241), which shows a prominent red banner with WifiOff icon when userPermissions.isOfflineMode is true.
Key changes:
- Deleted the entire
ConnectionStatuscomponent file (65 lines) - Removed unused imports:
ConnectionStatuscomponent anduseCollaborativeWorkflowhook - Removed unused state variables:
isConnectedandhasOperationError - Cleaned up UI spacing by removing
gap-2from the wrapper div
Analysis:
The ControlBar component already handles connection status display at the top-right of the screen, making the connection status inside the user avatar stack redundant. This PR eliminates duplicate functionality and simplifies the component tree.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The changes are straightforward cleanup that removes redundant functionality. The connection status is still properly displayed by the ControlBar component's renderDisconnectionNotice() function, ensuring no loss of functionality. The PR only removes duplicate code, cleans up unused imports/state, and makes minor spacing adjustments.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/components/user-avatar-stack/components/connection-status/connection-status.tsx | 5/5 | Removed entire file containing redundant connection status indicator component |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/components/user-avatar-stack/user-avatar-stack.tsx | 5/5 | Removed unused imports and ConnectionStatus component rendering, cleaned up gap-2 spacing |
Sequence Diagram
sequenceDiagram
participant User
participant Workflow
participant ControlBar
participant UserAvatarStack
participant usePresence
User->>Workflow: Loads workflow page
Workflow->>ControlBar: Renders control bar
Note over ControlBar: renderDisconnectionNotice()<br/>displays connection status
Workflow->>UserAvatarStack: Renders user avatar stack
UserAvatarStack->>usePresence: Get presence users
usePresence-->>UserAvatarStack: Returns user list
UserAvatarStack->>UserAvatarStack: Display user avatars
Note over UserAvatarStack: Previously displayed<br/>redundant ConnectionStatus<br/>(now removed)
2 files reviewed, no comments
Uh oh!
There was an error while loading. Please reload this page.
Summary
Redundant indicator to indicate sockets failures. Showed up since we re-enabled user avatar stack recently.
Type of Change
Testing
Tested Manually
Checklist