Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jun 10, 2025

What do these changes do?

reported by @sanderegg , thanks!

Similar issue as in #7828, but this time in the node level

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this Jun 10, 2025
@odeimaiz odeimaiz added bug buggy, it does not work as expected a:frontend issue affecting the front-end (area group) release Preparation for pre-release/release labels Jun 10, 2025
@odeimaiz odeimaiz changed the title 🐛 [Frontend] 🐛 [Frontend] Incomplete node data in the backend Jun 10, 2025
@odeimaiz odeimaiz marked this pull request as ready for review June 10, 2025 13:18
@odeimaiz odeimaiz requested a review from Copilot June 10, 2025 13:20
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 fixes an issue where node data was incomplete in the backend by ensuring that the correct source objects are used when calculating and applying diffs across studies and workbenches.

  • Refactored __getStudyDiffs to use a consolidated object (studyDiffs) for both the source study and its diffs.
  • Updated patchWorkbenchDelayed to accept and use workbenchSource for node data.
  • Renamed parameters in patchStudyDelayed for consistency, passing studySource to the workbench patch.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js Refactored the diff generation to return a unified studyDiffs object.
services/static-webserver/client/source/class/osparc/data/model/Workbench.js Updated patchWorkbenchDelayed to use workbenchSource instead of node.serialize().
services/static-webserver/client/source/class/osparc/data/model/Study.js Renamed parameter and updated calls to use studySource consistently.
Comments suppressed due to low confidence (2)

services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js:861

  • [nitpick] Consider computing the diff value before constructing the studyDiffs object so that you can build and return the object in a single step, reducing the re-assignment of properties.
const studyDiffs = { sourceStudy, delta: {} }

services/static-webserver/client/source/class/osparc/data/model/Study.js:699

  • Verify that the renaming from sourceStudy to studySource is consistently applied in both the function signature and the documentation to prevent any confusion.
/* updated doc comment with studySource */

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

@odeimaiz
Copy link
Member Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 10, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 8d96382

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

thanks!

@mergify mergify bot merged commit 8d96382 into ITISFoundation:master Jun 10, 2025
59 checks passed
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 20, 2025
92 tasks
@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) bug buggy, it does not work as expected release Preparation for pre-release/release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some times the links are missing

4 participants