feat(python-notebook-migration, frontend): add AI-generate-workflow modal, panel host, and LLM loading spinner#5273
Open
zyratlo wants to merge 1 commit into
Open
feat(python-notebook-migration, frontend): add AI-generate-workflow modal, panel host, and LLM loading spinner#5273zyratlo wants to merge 1 commit into
zyratlo wants to merge 1 commit into
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Introduces the user-facing entry point for the Python-notebook to Texera-workflow migration tool: an "AI Generate Workflow from Python Notebook" modal in the workspace menu, a workspace-level loading overlay with an elapsed-time stopwatch that shows while the LLM is converting, and the
<texera-jupyter-notebook-panel>host that places the iframe panel landed inmigration-tool-jupyter-panelinto the workspace.menu.component.{ts,html}public get pythonNotebookMigrationEnabled(): booleangetter onMenuComponentthat returnsconfig.env.pythonNotebookMigrationEnabled@Output() setWaitingForLLM = new EventEmitter<boolean>()that the workspace component consumes to gate the loading overlay.importForm: FormGroup(description,filewith required validator,model,apiKey) and aViewChildreference to#importNotebookModal.openImportNotebookModal()opens anNzModalServicemodal; loads the model dropdown vianotebookMigrationService.getAvailableModels().beforeUpload(file)patches the chosen file into the form without triggering an auto-upload.onClickImportNotebook(file, model, apiKey)is the main action..ipynbextensionsetWaitingForLLM(true)metadata.uuidsendNotebookToJupyter(...)(so the user can see the notebook in the embedded JupyterLabsendToAIGenerateWorkflow(...)workflowPersistService.persistWorkflow(...)notebookMigrationService.storeNotebookAndMapping(...)to persist the mapping in PostgresworkflowActionService.reloadWorkflow(...)jupyterPanelService.openPanel("JupyterNotebookPanel")setWaitingForLLM(false)infinally.*ngIf="pythonNotebookMigrationEnabled")#importNotebookModalpopup diagram imageworkspace.component.{ts,html,scss}— panel host + loading overlay:isWaitingForLLM: boolean,timerInterval,startTime, theonWaitingForLLMChanged(isWaiting)handler bound to the menu's output,startTimer/stopTimer/updateElapsedTimehelpers, and aformattedElapsedTimegetter that returnsmm:ss.<texera-jupyter-notebook-panel>host (which subscribes to the visibility surface added inmigration-tool-panel-controlsto know when to render) and the loading overlay (*ngIf="isWaitingForLLM")Image asset:
frontend/src/assets/notebook_migration_tool/tool_popup_diagram.pngAny related issues, documentation, discussions?
Closes #4427
Parent issue #4301
How was this PR tested?
Manual end-to-end on a branch where all the dep PRs were merged: enabled the flag, opened the workspace menu, clicked AI Generate Workflow, picked a sample
.ipynb, picked a LiteLLM model, entered an API key, and watched the spinner tick up while the conversion ran. After ~30s the workflow appeared in the editor withPythonUDFV2operators in place, the panel auto-opened with the notebook visible in the embedded JupyterLab, and clicking an operator scrolled the corresponding notebook cell into view. Clicking a cell highlighted its corresponding operators.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.7)