Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jul 23, 2025

What do these changes do?

This PR enhances the frontend to show collaborative user activity through avatar groups in both the Navigation Bar and Project Cards. The changes implement real-time updates via WebSocket events to display who is currently collaborating on projects.

  • Reuses the avatar group component on the Navigation Bar when the Project is open
  • Implements WebSocket listener for real-time projectStateUpdated
  • Uses WEBSERVER_REALTIME_COLLABORATION env_var
  • Refactors code to use utility functions for project state management

Note @sanderegg: there might be a missing message when a user exits the project without closing it.

Group Avatar on Project Card and Navigation Bar
Collaborating

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this Jul 23, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Jul 23, 2025
@odeimaiz odeimaiz added this to the Engage milestone Jul 23, 2025
@odeimaiz odeimaiz requested a review from Copilot July 23, 2025 14:14
@odeimaiz odeimaiz marked this pull request as ready for review July 23, 2025 14:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the frontend to show collaborative user activity through avatar groups in both the navigation bar and study cards. The changes implement real-time updates via WebSocket events to display who is currently collaborating on studies.

  • Adds avatar group components to show active collaborators
  • Implements WebSocket listener for real-time project state updates
  • Refactors code to use utility functions for state management
  • Updates navigation bar button styling for consistency

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
AvatarGroup.js Changed to accept user group IDs instead of user objects and fetch user data asynchronously
NavigationBar.js Added avatar group control and WebSocket listener for project state updates
Utils.js Refactored project state handling into reusable utility functions
CardBase.js Updated to use new state utility functions and show current collaborators
TasksButton.js Removed hardcoded styling properties
NotificationsButton.js Removed hardcoded styling properties
JobsButton.js Removed hardcoded styling properties and adjusted layout
CreditsIndicatorButton.js Removed hardcoded styling properties
StudyEditor.js Removed manual timeout logic for project state updates
Comments suppressed due to low confidence (1)

services/static-webserver/client/source/class/osparc/dashboard/CardBase.js:894

  • [nitpick] The function name '__showCurrentUserGroupIds' is misleading as it doesn't actually show the user group IDs directly, but passes them to the avatar group component. Consider renaming to '__updateAvatarGroup' or '__setAvatarGroupUsers'.
    __showCurrentUserGroupIds: function(currentUserGroupIds) {

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@sonarqubecloud
Copy link

@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label Jul 23, 2025
@odeimaiz
Copy link
Member Author

odeimaiz commented Jul 23, 2025

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Jul 23, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 57bf22a

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!

@mergify mergify bot merged commit 57bf22a into ITISFoundation:master Jul 23, 2025
60 checks passed
@odeimaiz odeimaiz deleted the enh/group-avatars branch July 23, 2025 20:30
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants