zyratlo opened a new pull request, #7314:
URL: https://github.com/apache/texera/pull/7314

   ### What changes were proposed in this PR?
   Adds `NotebookImportModalComponent`, the modal that starts a conversion in 
the Python notebook to Texera workflow migration tool. This PR is the modal on 
its own, as a standalone component with its own tests; #5273 wires it into the 
workspace menu.
   
   **Modal component (`notebook-import-modal.component.{ts,html,scss}`)**
   - Standalone component supplied as `nzContent` and opened with 
`NzModalService`. It reads its inputs from the modal data and reports back 
through the injected `NzModalRef`, matching the other modals opened from the 
workspace menu (`ResultExportationComponent`, `ShareAccessComponent`, 
`MarkdownDescriptionComponent`).
   - Presents the upload form: a `.ipynb` file picker and a LiteLLM model 
dropdown, with a diagram and a short explanation at the top.
   - Loads the model list via `notebookMigrationService.getAvailableModels()`, 
with three dropdown states: a loading state while the list is fetched, the 
selectable list once it arrives, and a disabled "no models available" 
placeholder when the list is empty.
   - Both the file and the model are required before submit.
   - On submit it hands the selected file and model back to the opener and 
closes only when the opener approves the import; on cancel it closes without 
doing anything. The overwrite confirmation and the generation flow stay with 
the opener, so the modal holds no workflow state.
   
   **Assets and licensing**
   - `tool_popup_diagram.png`: the diagram shown at the top of the modal. It 
uses only openly licensed artwork, the Project Jupyter logo (BSD 3-Clause) and 
Google Material Symbols icons (`psychology` and `smart_toy`, Apache 2.0) to 
represent the LLM. It contains no company or vendor logos.
   - `frontend/LICENSE-binary`: adds attributions for the Material Symbols 
icons (Apache 2.0) and the Project Jupyter logo (BSD 3-Clause) covering the 
diagram.
   
   The modal is not opened from anywhere yet. The toolbar button that opens it, 
the generation pipeline, and the loading overlay shown during conversion are in 
a later PR.
   
   ### Demo
   
   <img width="1512" height="838" alt="image" 
src="https://github.com/user-attachments/assets/bc7c1e5a-f90f-431b-91e9-076b7002fc8a";
 />
   
   Import notebook popup
   
   ### Any related issues, documentation, discussions?
   Closes #7313
   Parent issue #4301 
   
   ### How was this PR tested?
   - Added unit spec `notebook-import-modal.component.spec.ts`.
   
   #### Manual testing
   `npx ng test` for the modal spec (10 tests, all pass). The spec covers the 
three model dropdown states (loading, populated, empty), the selected file 
display, the upload guard, and the submit and cancel paths, including that 
submit closes the modal only when the opener approves and otherwise leaves it 
open. The modal is not wired into the UI in this PR, so it was verified through 
its unit spec rather than end to end.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   Generated-by: Claude Code (Claude Opus 4.8)


-- 
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