Skip to content

feat(notebook): import ipynb sessions - #309

Open
imjszhang wants to merge 3 commits into
aipoch:mainfrom
imjszhang:feat/ipynb-import
Open

feat(notebook): import ipynb sessions#309
imjszhang wants to merge 3 commits into
aipoch:mainfrom
imjszhang:feat/ipynb-import

Conversation

@imjszhang

@imjszhang imjszhang commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • parse nbformat 4 code cells into durable imported notebook run records without changing the append-only storage model
  • expose imported Python/R cells for rerun, including after session rehydration, and add a typed import IPC/file-picker flow
  • add Session Notebook import UI plus supported-subset export/import round-trip coverage
  • align with current main patterns: wrap importIpynb in withDataRootWrite, use dialogSession for the import request, show import success in the footer, and badge imported runs
  • document boundaries: imported environment is historical annotation only (runCell still uses the session binding); import does not write artifact provenance / inputFiles; markdown/raw cells remain skipped
  • clarify imported-run semantics: return optional environmentNotice when recorded env differs from the bound runtime (footer), add re-run tooltip on Dialog/Preview imported badges

Part of #293

Test plan

  • npm run check:web-api-map
  • npm test -- src/main/notebook/ipynb-import.test.ts src/main/notebook/runtime-service.import.test.ts src/main/notebook/ipc.test.ts src/renderer/src/pages/workspace/SessionNotebookDialog.render.test.tsx src/renderer/src/pages/workspace/SessionNotebookDialog.interaction.test.tsx src/renderer/src/pages/workspace/NotebookPreview.cell.render.test.tsx
  • npm run typecheck (local env missing some deps / generated Prisma client; unrelated to this diff)

@github-actions github-actions Bot added the enhancement New feature or request label Jul 22, 2026
@imjszhang
imjszhang force-pushed the feat/ipynb-import branch 2 times, most recently from ee67446 to 3b8e10b Compare July 22, 2026 15:28
@cursor
cursor Bot force-pushed the feat/ipynb-import branch from 3b8e10b to 069a5ad Compare July 23, 2026 06:07
cursor Bot pushed a commit to imjszhang/open-science that referenced this pull request Jul 23, 2026
Rebased onto upstream main and stacked on import (aipoch#309). Ensures JupyterLab
is available in the session Python runtime, projects the session into its data
root, launches JupyterLab without a browser, and reaps process trees on shutdown.

Part of aipoch#293

Co-authored-by: JS <imjszhang@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@imjszhang
imjszhang force-pushed the feat/ipynb-import branch from 069a5ad to c594cb4 Compare July 30, 2026 16:03
imjszhang and others added 2 commits July 31, 2026 00:36
…erns

Wrap import in withDataRootWrite, use dialogSession for the picker flow, and surface import success plus an imported badge.

Co-authored-by: Cursor <cursoragent@cursor.com>
Return recorded-vs-bound env mismatches from importIpynb for the footer, and align Preview/Dialog imported badges with a re-run tooltip.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant