Skip to content

[Notebook Migration] Upload notebooks under a per-workflow filename #7671

Description

@zyratlo

Feature Summary

The frontend uploads every workflow's notebook to a fixed path, work/notebook.ipynb. This is safe across users under the per-user-pod model, but not across one user's workflows: they all land on the same file, so switching workflows overwrites it. Two tabs open on different workflows collide on the same file while each keeps its own cell-to-operator highlight mapping.

Use a per-workflow filename so each workflow's notebook is distinct.

A related cleanup: the comment on the fixed filename in sendNotebookToJupyter still references the backend's process-global jupyterIframeURL, which was removed in #7602. It should be corrected as part of this change.

Proposed Solution or Design

Thread a per-workflow notebook name through both the upload and the iframe fetch, keyed by the workflow id (for example notebook_<wid>.ipynb, which already passes the backend's filename validation):

  • NotebookMigrationService.sendNotebookToJupyter takes an explicit notebook name instead of hardcoding notebook.ipynb.
  • NotebookMigrationService.getJupyterIframeURL passes the same name as the notebookName query parameter that the backend now accepts (added in feat(notebook-migration-service): compute jupyter iframe url per request #7602).
  • JupyterPanelService owns the name derivation from the current workflow id and passes it on both the upload and the iframe fetch, so the two always agree.
  • Update the consumer specs to cover the per-workflow name on both paths.

The backend already supports this: #7602 made get-jupyter-iframe-url accept an optional notebookName, and set-notebook accepts any valid .ipynb name. No backend change is required.

Affected Area

Workflow UI

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions