Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Oct 7, 2025

What do these changes do?

This PR refactors the message model in the frontend by introducing a proper osparc.data.model.Message class to replace plain JavaScript objects. The refactoring improves type safety and encapsulation by using getter methods instead of direct property access.

  • Introduced a new Message model class with proper properties and methods
  • Updated all message handling code to use the new model class methods

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this Oct 7, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Oct 7, 2025
@odeimaiz odeimaiz added this to the Cheops milestone Oct 7, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 7, 2025

🧪 CI Insights

Here's what we observed from your CI run for 4df1c5f.

✅ Passed Jobs With Interesting Signals

Pipeline Job Signal Health on master Retries 🔍 CI Insights 📄 Logs
CI system-tests Base branch is broken, but the job passed. Looks like this might be a real fix 💪 Broken 0 View View

@odeimaiz odeimaiz requested a review from Copilot October 7, 2025 13:37
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 refactors the message model in the frontend by introducing a proper osparc.data.model.Message class to replace plain JavaScript objects. The refactoring improves type safety and encapsulation by using getter methods instead of direct property access.

  • Introduced a new Message model class with proper properties and methods
  • Updated all message handling code to use the new model class methods
  • Refactored conversation classes to extend MessageList instead of Conversation

Reviewed Changes

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

Show a summary per file
File Description
osparc/data/model/Message.js New Message model class with properties and getter methods
osparc/data/model/Conversation.js Updated to use Message model instances and proper type checking
osparc/conversation/MessageList.js Renamed from Conversation class and simplified message handling
osparc/conversation/MessageUI.js Updated to use Message model getter methods and data binding
osparc/conversation/NotificationUI.js Updated parameter types and method calls for Message model
osparc/conversation/AddMessage.js Updated to use Message model and improved UI focus handling
osparc/support/ConversationListItem.js Updated to use Message model getter methods
osparc/support/Conversation.js Updated to extend MessageList instead of Conversation
osparc/study/Conversation.js Updated to extend MessageList and added override comment
Comments suppressed due to low confidence (1)

services/static-webserver/client/source/class/osparc/conversation/AddMessage.js:1

  • This line excludes a UI control but there's no corresponding logic to show it when needed. Consider adding a comment explaining when this control should be visible or ensure proper visibility management.
/* ************************************************************************

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@odeimaiz odeimaiz requested a review from bisgaard-itis October 7, 2025 13:42
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

@odeimaiz odeimaiz enabled auto-merge (squash) October 7, 2025 16:04
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2025

@odeimaiz odeimaiz merged commit 83bfca1 into ITISFoundation:master Oct 7, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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