Copilot commented on code in PR #7738:
URL: https://github.com/apache/texera/pull/7738#discussion_r3798744156


##########
frontend/src/app/workspace/service/jupyter-panel/jupyter-panel.service.ts:
##########
@@ -139,7 +143,11 @@ export class JupyterPanelService {
         if (response.exists) {
           
this.notebookMigrationService.setMapping(notebookMappingKey(workflowID), 
response.mapping);
 
-          if ((await 
this.notebookMigrationService.sendNotebookToJupyter(response.notebook)) == 1) {
+          const sent = await 
this.notebookMigrationService.sendNotebookToJupyter(
+            response.notebook,
+            this.currentNotebookFileName()

Review Comment:
   `fetchNotebookAndMapping` captures the requested workflow in `workflowID`, 
but this filename is read from mutable current workflow state only after the 
HTTP response arrives. If workflow A's request resolves after the user switches 
to B, A's notebook is uploaded as `notebook_B.ipynb`, overwriting B's file—the 
collision this PR is intended to prevent. Derive the upload name from the 
captured `workflowID` (and ideally cancel stale fetch subscriptions on workflow 
changes).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to