feat(python-notebook-migration, frontend): add AI-generate-workflow modal, panel host, and LLM loading spinner - #5273
Open
zyratlo wants to merge 38 commits into
Open
feat(python-notebook-migration, frontend): add AI-generate-workflow modal, panel host, and LLM loading spinner#5273zyratlo wants to merge 38 commits into
zyratlo wants to merge 38 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5273 +/- ##
============================================
- Coverage 80.47% 80.37% -0.10%
Complexity 3875 3875
============================================
Files 1162 1162
Lines 46264 46447 +183
Branches 5153 5170 +17
============================================
+ Hits 37230 37334 +104
- Misses 7375 7448 +73
- Partials 1659 1665 +6
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
zyratlo
marked this pull request as draft
June 5, 2026 21:28
# Conflicts: # frontend/src/app/workspace/component/menu/menu.component.ts # frontend/src/app/workspace/component/workspace.component.ts
Contributor
Automated Reviewer SuggestionsBased on the
|
# Conflicts: # frontend/src/app/workspace/component/workspace.component.ts
zyratlo
added a commit
to zyratlo/texera
that referenced
this pull request
Jul 23, 2026
adopt main's reviewed versions for the already merged migration slices: backend notebook-migration-service, frontend migration service, config, build, and sql. pull the reviewed open PR content from its branches: jupyter panel visibility surface and mini-map button (apache#5265), jupyter notebook iframe panel (apache#5271), and the AI generate workflow modal and panel host (apache#5273). reconcile app.module.ts by keeping main's JupyterPanelService bootstrap listener and registering JupyterNotebookPanelComponent.
aglinxinyuan
pushed a commit
to aglinxinyuan/texera
that referenced
this pull request
Jul 25, 2026
…(visibility surface and notebook-exists signal) (apache#5265) ### What changes were proposed in this PR? Extends `JupyterPanelService` with the panel-visibility surface (a `BehaviorSubject` plus four open/close/minimize methods) and a reactive `jupyterNotebookExists$` signal. This PR is the service layer only. The button that consumes it lives in the workspace top menu bar via apache#5273; apache#5265 provides the service, apache#5273 consumes it. **`jupyter-panel.service.ts`:** - Restores `BehaviorSubject` to the `rxjs` import and re-adds the `NotificationService` injection. - Panel-visibility stream: `private jupyterNotebookPanelVisible = new BehaviorSubject<boolean>(false)` with public `jupyterNotebookPanelVisible$ = this.jupyterNotebookPanelVisible.asObservable()`. - Notebook-exists signal: `private jupyterNotebookExists = new BehaviorSubject<boolean>(false)` with public `jupyterNotebookExists$`. `init()` resets it to `false` on every workflow change and sets it to `true` in the `fetchNotebookAndMapping` success branch (`result === 1`). It stays `true` through minimize and resets when switching workflows. The menu button in apache#5273 binds to this to decide whether to show. - Four `if (!this.enabled) return;`-gated methods: - `openPanel(panelName: string)` — flips visibility to `true` when `panelName === "JupyterNotebookPanel"` (the existing workspace panel-system convention). - `closeJupyterNotebookPanel()` — flips visibility to `false`, then `notebookMigrationService.deleteMapping("mapping_wid_" + workflowActionService.getWorkflow().wid)`. - `minimizeJupyterNotebookPanel()` — flips visibility to `false`. - `openJupyterNotebookPanel()` — checks `notebookMigrationService.hasMapping(...)`; warns via `notificationService.warning("No Jupyter notebook associated with this workflow.")` and returns if there is no cached mapping, otherwise flips visibility to `true`. - `init()`'s subscribe handler: on every workflow change it calls `closeJupyterNotebookPanel()` (which also does the stale-mapping cleanup), clears the highlight index, and resets `jupyterNotebookExists` to `false`; on a successful fetch it sets `jupyterNotebookExists` to `true`, precomputes the highlight index, and auto-opens via `openJupyterNotebookPanel()`. No mini-map changes: the expand control moved out of the mini-map and into the top menu bar (see apache#5273), so `mini-map.component.*` is back to its `main` version here. ### Any related issues, documentation, discussions? Closes apache#5264 Parent issue apache#4301 Builds on apache#5263 (`migration-tool-mapping-highlighting`), merged. The consuming menu button lives in apache#5273 (`migration-tool-modal`): apache#5265 provides `openJupyterNotebookPanel` and `jupyterNotebookExists$`, apache#5273 consumes them. ### How was this PR tested? `jupyter-panel.service.spec.ts` adds visibility coverage (enabled-flag cases for open/close, minimize, and the warn-vs-open branch of `openJupyterNotebookPanel`; disabled-flag short-circuit cases per method) and a `jupyterNotebookExists$` case (starts `false`, flips `true` after a successful fetch). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.8) --------- Co-authored-by: Meng Wang <mengw15@uci.edu>
# Conflicts: # frontend/src/app/workspace/component/workspace.component.ts
…ate panel element
zyratlo
marked this pull request as ready for review
July 31, 2026 22:50
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?
Adds the user facing entry point for the Python notebook to Texera workflow migration tool: an "AI generate workflow" modal in the workspace menu, a workspace loading overlay with an elapsed time stopwatch shown while the LLM converts, auto layout of the generated workflow, and the
<texera-jupyter-notebook-panel>host that embeds the iframe panel component from #5271.Menu toolbar (
menu.component.{ts,html,scss})pythonNotebookMigrationEnabledconfig flag:jupyterNotebookExists$), reopens the panel.openImportNotebookModal()opens anNzModalServicemodal to upload a.ipynband pick a LiteLLM model.notebookMigrationService.getAvailableModels(), with a loading state and a "no models available" state on fetch failure.onClickImportNotebook(file, model)runs the generation:.ipynbextension, then emitssetWaitingForLLM(true)to show the overlaymetadata.uuidsendToAIGenerateWorkflow(...)to get the generated workflow content and the cell to operator mappingpersistWorkflow(...)updates that row in place (a never saved workflow becomes a new row), which avoids leaving a duplicate "Untitled workflow"storeNotebookAndMapping(...)JupyterPanelService.init()sends the notebook and opens the panel (avoids a double "sent to Jupyter" toast)Workspace (
workspace.component.{ts,html,scss})<texera-jupyter-notebook-panel>(component landed in feat(python-notebook-migration, frontend): add Jupyter notebook iframe panel component #5271, now on main).setWaitingForLLMoutput, with anmm:sselapsed time stopwatch. The interval is cleared on component destroy.Assets
jupyter-logo.svg: icon for the expand button.tool_popup_diagram.png: diagram shown at the top of the modal.Tests
Any related issues, documentation, discussions?
Closes #4427
Parent issue #4301
How was this PR tested?
npx ng testfor the menu and workspace specs. Manual end to end on a branch with the dependency PRs present: enabled the flag, opened the workspace menu, clicked AI generate workflow, picked a sample.ipynband a LiteLLM model (auth is via the user's Texera JWT, no API key input), confirmed the overwrite prompt, and watched the stopwatch while the conversion ran. The generated workflow appeared in the editor withPythonUDFV2operators auto laid out, the panel opened with the notebook in the embedded JupyterLab, clicking an operator scrolled its notebook cell into view, and clicking a cell highlighted its operators.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)