From f4e1ec5ea34fbbc86b562797a5a8981d03c56d6c Mon Sep 17 00:00:00 2001 From: Odei Maiz <33152403+odeimaiz@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:41:12 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20[Frontend]=20Fix:=20Do=20not=20l?= =?UTF-8?q?isten=20to=20output=20related=20backend=20updates=20if=20the=20?= =?UTF-8?q?node=20is=20a=20frontend=20node=20(#6434)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dustin Kaiser <8209087+mrnicegyu11@users.noreply.github.com> --- .../client/source/class/osparc/data/model/Study.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/static-webserver/client/source/class/osparc/data/model/Study.js b/services/static-webserver/client/source/class/osparc/data/model/Study.js index 4b7c879bb53..c62549bcc63 100644 --- a/services/static-webserver/client/source/class/osparc/data/model/Study.js +++ b/services/static-webserver/client/source/class/osparc/data/model/Study.js @@ -435,6 +435,7 @@ qx.Class.define("osparc.data.model.Study", { }); }, + // Used for updating some node data through the "nodeUpdated" websocket event nodeUpdated: function(nodeUpdatedData) { const studyId = nodeUpdatedData["project_id"]; if (studyId !== this.getUuid()) { @@ -444,7 +445,10 @@ qx.Class.define("osparc.data.model.Study", { const nodeData = nodeUpdatedData["data"]; const workbench = this.getWorkbench(); const node = workbench.getNode(nodeId); - if (node && nodeData) { + // Do not listen to output related backend updates if the node is a frontend node. + // The frontend controls its output values, progress and states. + // If a File Picker is uploading a file, the backend could override the current state with some older state. + if (node && nodeData && !osparc.data.model.Node.isFrontend(node)) { node.setOutputData(nodeData.outputs); if ("progress" in nodeData) { const progress = Number.parseInt(nodeData["progress"]);