Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jun 17, 2025

What do these changes do?

This PR implements the Notifications between users within Project Conversations.

When User A notifies UserB:

  • the frontend checks whether the project is shared, if not it proposes sharing it
  • it posts a "NOTIFICATION" type message into the /conversations containing the recipients' group id in its content
  • it posts a "CONVERSATION_NOTIFICATION" category message into the Redis DB that the recipient will receive in the navbar's bell

User B:

  • when tapping on the notification, the study card will open in the conversations section
  • in the conversation widget, the notification is shown as an entry saying: "🔔 ${username} notified ${username}"

User A:
Notify

User B:
Notify2

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz changed the title Feature/notify in conversations ✨ [Frontend] Conversations: notify users Jun 17, 2025
@odeimaiz odeimaiz self-assigned this Jun 17, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Jun 17, 2025
@odeimaiz odeimaiz added this to the Engage milestone Jun 17, 2025
@odeimaiz odeimaiz marked this pull request as ready for review June 20, 2025 13:38
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.

👍 nice

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 adds support for in-conversation user notifications by introducing a new notification category, enhancing backend enums and OpenAPI specs, and extending the frontend to post, display, and navigate to conversation notifications.

  • Adds CONVERSATION_NOTIFICATION to backend enums and OpenAPI definitions
  • Implements new client methods for sending and rendering conversation notifications
  • Refactors conversation components (AddMessage, MessageUI, NotificationUI, Conversation) to handle notification entries

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
services/web/server/src/simcore_service_webserver/users/_notifications.py Added CONVERSATION_NOTIFICATION enum and example payload
services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml Updated NotificationCategory enum to include new category
services/static-webserver/client/source/class/osparc/notification/Notifications.js Created helpers for conversation notifications
services/static-webserver/client/source/class/osparc/notification/NotificationUI.js Extended UI rendering to support new category
services/static-webserver/client/source/class/osparc/notification/Notification.js Added CONVERSATION_NOTIFICATION enum value
services/static-webserver/client/source/class/osparc/conversation/NotificationUI.js New widget for inline conversation notification messages
services/static-webserver/client/source/class/osparc/conversation/MessageUI.js Generalized from comments to messages and adjusted layout
services/static-webserver/client/source/class/osparc/conversation/Conversation.js Unified handling of messages & notifications in conversation
services/static-webserver/client/source/class/osparc/conversation/AddMessage.js Combined “add comment” and “notify user” into one component
services/static-webserver/client/source/class/osparc/study/Conversations.js Added notifyUser API call and switched to new component refs
services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js Added single-selection mode for recipient picker
services/static-webserver/client/source/class/osparc/share/CollaboratorsStudy.js Renamed notification method to pushStudyShared
services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js Added “Conversations” page to resource details
services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js Updated method call to new annotation-note API
services/static-webserver/client/source/class/osparc/ui/window/Confirmation.js Refactored appearance logic binding for confirm buttons
services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js Simplified recipient selection flow
services/static-webserver/client/source/class/osparc/info/CommentAdd.js Removed legacy comment component in favor of new UI
Comments suppressed due to low confidence (2)

services/static-webserver/client/source/class/osparc/notification/Notifications.js:154

  • [nitpick] For consistency with other methods (pushNewAnnotationNote, pushStudyShared), consider renaming to pushNewConversationNotification.
    pushConversationNotification: function(userId, studyId) {

services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js:181

  • The variable collaboratorsManager is not defined in this scope; it should refer to the usersManager (or the correct manager instance) to properly close the dialog.
              .finally(() => collaboratorsManager.close());

@sonarqubecloud
Copy link

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

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Jun 20, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 6903354

@mergify mergify bot merged commit 6903354 into ITISFoundation:master Jun 20, 2025
94 of 96 checks passed
@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.

4 participants