The GitHub Actions job "Required Checks" on texera.git/main has succeeded.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
8420565e66fd226bb9158fd41aed894d41da70a1 / Ryan Zhang 
<[email protected]>
feat(notebook-migration): add r notebooks to the import modal (#8912)

### What changes were proposed in this PR?

This PR lets users convert R Jupyter notebooks, using the R conversion
from #8911. It is the first of the UI PRs for R support (#8009). R files
follow in #8963 and R folders in a later PR, each as a new tab beside
the Python ones.

**Import modal.** The Jupyter Notebook tab gets a "Python Notebook | R
Notebook" switch, centered above the diagram. It defaults to Python. The
diagram, the description and the upload label follow it, and changing it
clears the staged file. The switch is a `FormControl`, so it keeps its
value when the tab re-renders. `requestImport` now receives a
`language`.

**Disabled, not hidden.** When `rNotebookMigrationEnabled` is off, the R
Notebook option stays visible but disabled, with the tooltip "R is not
enabled on this deployment." Users can see that R exists without being
able to pick it on a deployment that cannot run it. The guard from #8911
still refuses R in that case, before any model call.

**Tab descriptors.** A small `IMPORT_TABS` list replaces the index
checks that decided the folder tab and the language. The R file and
folder tabs each add one entry.

**Dispatch.** The dashboard passes the language to the notebook
conversion. For R, only `.ipynb` is accepted in this PR. A notebook
uploaded as R whose `kernelspec.language` is set and is not R is
rejected before any model call: "This notebook uses a python kernel, not
R. Switch the notebook type to Python Notebook." A notebook without a
kernelspec is accepted. Other language mismatches are tracked in #8929.

**Assets.** A new R notebook diagram, at the same size and border as the
others. `frontend/LICENSE-binary` adds it to the Project Jupyter logo
and Material Symbols entries.

#### Demo video (wait time cut out)


https://github.com/user-attachments/assets/9769bdd8-5e2d-4994-8a5a-be216908b09f

#### R disabled on a deployment without R

<img width="420" height="159" alt="Screenshot 2026-10-12 at 1 51 42 PM"
src="https://github.com/user-attachments/assets/2c45ea97-9fe2-4b3c-a8ec-4fc2a8875d22";
/>

### Any related issues, documentation, discussions?

Closes #9384
Part of #8009
Parent-issue #4301

The plan is in https://github.com/apache/texera/discussions/8866. R
notebooks open in the Jupyter panel without a kernel, since the Jupyter
image has no R kernel. #8909 removed the "Kernel not found" dialog that
otherwise appears and keeps the cells read only.

### How was this PR tested?

* `notebook-import-modal.component.spec.ts`, seven new tests: Python is
the default; the R option is disabled with its tooltip while the R flag
is off and enabled without one while it is on; switching to R changes
the diagram and label and drops the staged notebook; R stays selected
across a re-render; the file and folder tabs keep their own language;
and submit passes `"r"`. Existing assertions now expect `"python"`.
* `user-workflow.component.spec.ts`, five new tests: a Python notebook
converts as Python by default, an R notebook converts as R with or
without a kernelspec, a Python kernel notebook is rejected as R, and a
non notebook file is rejected as R.

The full frontend suite passes.

Checked by hand against a local stack. With the R flag on, the switch
changes the diagram, description and label, clears a staged file, and
survives leaving and returning to the tab. With it off, the R option is
disabled and shows its tooltip. The tab fits the modal without scrolling
in every state. An R notebook 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/42778657822

With regards,
GitHub Actions via GitBox

Reply via email to