The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-8963-ad085e964c5f9e2062b7efe147054d928c146621 has succeeded. Run started by GitHub user mengw15 (triggered by mengw15).
Head commit for run: 22cc29dd7574c2d4e5473d8deb6f0085203794fb / Ryan Zhang <[email protected]> feat(notebook-migration): add r files to the import modal (#8963) ### What changes were proposed in this PR? This PR lets users convert R files, using the R script conversion from #8911. It is the second UI PR for R support (#8009), after R notebooks in #8912. R folders follow in #9386. **Import modal.** An "R File" tab after Python Folder, laid out like the Python File tab: its own diagram, a description, and an upload row that accepts `.R` and `.r`. It is one more entry in the `IMPORT_TABS` list from #8912, which is all the language and tab logic it needs. **Disabled, not hidden.** As with the R Notebook option in #8912, the tab is always shown. When `rNotebookMigrationEnabled` is off it is greyed out, cannot be selected, and its title shows the tooltip "R is not enabled on this deployment." **Dispatch.** A small per language table now holds each language's script extension and messages. For R, the dashboard accepts `.ipynb` or `.R` / `.r`, and anything else gets "Please upload an R Jupyter Notebook (.ipynb) or an R (.R) file." R files go through the R script conversion, and a file that cannot be read gets R wording. Python's messages are unchanged. **Assets.** A new R file diagram, at the same size and border as the others. `frontend/LICENSE-binary` adds it to the Material Symbols entry. #### Demo video (waiting time cut out) https://github.com/user-attachments/assets/fc1dc88a-452b-41ca-a972-22e4e9617e53 #### R File disabled on a deployment without R <img width="308" height="88" alt="image" src="https://github.com/user-attachments/assets/261f86ac-77a0-4a7f-99ff-6a15da1310f5" /> ### Any related issues, documentation, discussions? Closes #9385 Part of #8009 Parent-issue #4301 The plan is in https://github.com/apache/texera/discussions/8866. Language mismatches between the upload and the selected tab are tracked in #8929. ### How was this PR tested? * `notebook-import-modal.component.spec.ts`, four new tests: the tab is disabled with its tooltip while the R flag is off and a click does not select it; while the flag is on it shows its diagram, accepts `.R,.r` and reports the R language; and submit passes `"r"`. The tab count assertion now expects four tabs, and the tooltip lookup finds each tooltip by the element it is attached to, since the modal now has two. * `user-workflow.component.spec.ts`, three new tests: `.R` and `.r` convert as R scripts, and an unreadable R file gets R wording. The R test from #8912 now rejects a `.py`, since `.R` is accepted here, and the Python script assertion now expects `"python"`. The full frontend suite passes. Checked by hand against a local stack. With the R flag off, the R File tab is disabled, ignores clicks and shows its tooltip. With it on, the tab shows its diagram, description and `.R,.r` upload row, a staged file clears on changing tabs, and no tab scrolls. An R file converted end to end with a live model. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) Report URL: https://github.com/apache/texera/actions/runs/43336299856 With regards, GitHub Actions via GitBox
