Skip to content

Conversation

@andyjakubowski
Copy link
Contributor

@andyjakubowski andyjakubowski commented Oct 7, 2025

Sets up a custom content provider in the frontend extension. Now we can stop converting Deepnote files with custom Python on the backend (a jupyterserver extension), and we can rely on the @deepnote/blocks package (https://github.com/deepnote/deepnote) instead.

The PR sets up the custom content provider, the conversion logic, and a React component for rendering a list of notebooks in a Deepnote file.

Populating the dropdown will come in a separate PR.

Signed-off-by: Andy Jakubowski hello@andyjakubowski.com

Summary by CodeRabbit

  • New Features

    • Open .deepnote files directly; content is converted into Jupyter notebooks (code/markdown).
    • Added a Notebook Picker toolbar for .deepnote files.
    • Graceful fallback to a blank notebook if content is invalid or missing.
  • Documentation

    • Added instructions for configuring access to Deepnote packages and updated installation steps.
  • Chores

    • Updated CI workflows with Node setup and authenticated package access.
    • Added runtime dependencies and npm scope/registry configuration with token support.

Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
We’ll do conversion in TypeScript on the frontend

Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
@linear
Copy link

linear bot commented Oct 7, 2025

GRN-4809 Extend Jupyter Server API endpoint to serve .deepnote files

We can’t just completely overwrite the contents manager in jupyter_server, because other extensions might need to extend the default one, too. Find whatever solution is idiomatic and plays nicely with other extensions.

server_app.contents_manager = DeepnoteContentsManager(parent=server_app)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

📝 Walkthrough

Walkthrough

This PR moves Deepnote YAML-to-notebook transformation to the frontend and adds a Deepnote-aware JupyterLab extension. It introduces a DeepnoteContentProvider that validates .deepnote IModel content with zod and replaces notebook content by transforming Deepnote YAML into Jupyter cells. New TS types, converters, fallback data, and a plugin entry (src/index.ts) register the provider, file type, and a NotebookPicker toolbar. Python-side YAML-to-ipynb helpers were removed. CI and package config were updated to fetch @deepnote/blocks from GitHub Packages via GITHUB_TOKEN.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant JL as JupyterLab App
  participant CM as ContentsManager
  participant RCP as RestContentProvider (default)
  participant DCP as DeepnoteContentProvider
  participant TR as Transformer (YAML -> Notebook)
  participant NB as Notebook UI

  Note over JL,CM: Activation
  JL->>CM: Get default drive provider
  JL->>DCP: Create & register DeepnoteContentProvider
  JL->>JL: Register ".deepnote" file type + default widget
  JL->>JL: Register NotebookPicker toolbar factory
Loading
sequenceDiagram
  autonumber
  participant NB as Notebook UI
  participant CM as ContentsManager
  participant DCP as DeepnoteContentProvider
  participant RCP as RestContentProvider (base)
  participant Z as zod schema
  participant TR as transformDeepnoteYamlToNotebookContent

  NB->>CM: Open "/path/file.deepnote"
  CM->>DCP: get(localPath, options)
  DCP->>RCP: super.get(localPath, options)
  RCP-->>DCP: IModel { content, metadata }
  alt path endsWith(".deepnote") and type == "notebook"
    DCP->>Z: validate content shape
    alt validation ok
      DCP->>TR: transform(rawYamlString)
      TR-->>DCP: IDeepnoteNotebookContent
      DCP-->>CM: IModel with transformed content
    else validation fails
      DCP-->>CM: IModel with content.cells = []
    end
  else not a .deepnote file
    DCP-->>CM: Original IModel
  end
  CM-->>NB: Final IModel
Loading
sequenceDiagram
  autonumber
  participant T as transformDeepnoteYamlToNotebookContent
  participant DBT as convertDeepnoteBlockTypeToJupyter
  participant B2C as convertDeepnoteBlockToJupyterCell

  Note over T: transformDeepnoteYamlToNotebookContent
  T->>T: deserializeDeepnoteFile(yaml)
  alt notebooks exist
    loop for each Deepnote block
      T->>DBT: map block.type -> "code"|"markdown"
      T->>B2C: build Jupyter cell (sanitize outputs, build source)
    end
    T->>T: assemble IDeepnoteNotebookContent
  else none
    T->>T: return blank notebook with warning cell
  end
Loading

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the primary new feature of converting Deepnote files to Jupyter format on the frontend, aligning with the PR’s objectives.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe7c9f0 and 09a1e0a.

📒 Files selected for processing (1)
  • .github/workflows/check-release.yml (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/** : Deepnote integration code resides under src/notebooks/deepnote/
📚 Learning: 2025-08-08T09:53:42.683Z
Learnt from: jamesbhobbs
PR: deepnote/deepnote#0
File: :0-0
Timestamp: 2025-08-08T09:53:42.683Z
Learning: In deepnote/deepnote, disallow using branches: "*" (e.g., branches: ['*'] or branches: ["*"]) in GitHub Actions under on: push/pull_request/pull_request_target because it can block CI for PR-to-PR/base PR scenarios. Prefer omitting branches entirely or using explicit branch lists when truly needed.

Applied to files:

  • .github/workflows/check-release.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: check_release

Comment @coderabbitai help to get the list of available commands and usage tips.

@andyjakubowski andyjakubowski requested a review from Artmann October 7, 2025 15:04
@andyjakubowski andyjakubowski marked this pull request as draft October 7, 2025 15:05
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
jupyterlab_deepnote/contents.py (2)

10-11: Use a truthy check for content.

content is a bool; comparing to 1 is brittle.

-        if path.endswith(".deepnote") and (content == 1):
+        if path.endswith(".deepnote") and bool(content):

29-35: Fix hashing: _read_file(..., "byte") is invalid; read base64 and decode.

Current code risks incorrect hashes or crashes.

-            if require_hash:
+            if require_hash:
                 # Accept 2- or 3-tuple; we only need the bytes
-                bytes_content, *_ = self._read_file(os_path, "byte")  # type: ignore[misc]
-                if isinstance(bytes_content, str):
-                    bytes_content = bytes_content.encode("utf-8", errors="replace")
-                model.update(**self._get_hash(bytes_content))  # type: ignore[arg-type]
+                b64_content, *_ = self._read_file(os_path, "base64")  # type: ignore[misc]
+                if isinstance(b64_content, bytes):
+                    raw_bytes = b64_content
+                else:
+                    import base64
+                    raw_bytes = base64.b64decode(b64_content)
+                model.update(**self._get_hash(raw_bytes))  # type: ignore[arg-type]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e0156a9 and cb26de0.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (13)
  • .yarnrc.yml (1 hunks)
  • deepnote-file-request-examples.txt (1 hunks)
  • jupyterlab_deepnote/contents.py (2 hunks)
  • package.json (1 hunks)
  • src/components/NotebookPicker.tsx (2 hunks)
  • src/convert-deepnote-block-to-jupyter-cell.ts (1 hunks)
  • src/convert-deepnote-block-type-to-jupyter.ts (1 hunks)
  • src/deepnote-content-provider.ts (1 hunks)
  • src/fallback-data.ts (1 hunks)
  • src/index.ts (1 hunks)
  • src/transform-deepnote-yaml-to-notebook-content.ts (1 hunks)
  • src/types.ts (1 hunks)
  • tsconfig.json (2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/** : Deepnote integration code resides under src/notebooks/deepnote/
📚 Learning: 2025-09-12T12:52:09.726Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/deepnoteTypes.ts : deepnoteTypes.ts should contain only type definitions

Applied to files:

  • src/types.ts
  • src/convert-deepnote-block-type-to-jupyter.ts
📚 Learning: 2025-09-12T12:52:09.726Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/** : Deepnote integration code resides under src/notebooks/deepnote/

Applied to files:

  • src/types.ts
📚 Learning: 2025-09-12T12:52:09.726Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs data transformations

Applied to files:

  • src/transform-deepnote-yaml-to-notebook-content.ts
  • src/convert-deepnote-block-type-to-jupyter.ts
  • src/convert-deepnote-block-to-jupyter-cell.ts
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : Update FileConverter to handle the new export format

Applied to files:

  • src/convert-deepnote-block-type-to-jupyter.ts
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : Add UI elements for the new format to the export quick pick

Applied to files:

  • src/components/NotebookPicker.tsx
📚 Learning: 2025-09-12T12:52:09.726Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/deepnoteNotebookSelector.ts : deepnoteNotebookSelector.ts implements UI selection logic

Applied to files:

  • src/components/NotebookPicker.tsx
🧬 Code graph analysis (5)
src/transform-deepnote-yaml-to-notebook-content.ts (3)
src/types.ts (1)
  • IDeepnoteNotebookContent (11-14)
src/fallback-data.ts (2)
  • blankDeepnoteNotebookContent (12-30)
  • blankCodeCell (4-10)
src/convert-deepnote-block-to-jupyter-cell.ts (1)
  • convertDeepnoteBlockToJupyterCell (10-47)
src/convert-deepnote-block-to-jupyter-cell.ts (1)
src/convert-deepnote-block-type-to-jupyter.ts (1)
  • convertDeepnoteBlockTypeToJupyter (1-32)
src/index.ts (2)
src/deepnote-content-provider.ts (2)
  • DeepnoteContentProvider (18-58)
  • deepnoteContentProviderName (5-5)
src/components/NotebookPicker.tsx (1)
  • NotebookPicker (6-92)
src/deepnote-content-provider.ts (1)
src/transform-deepnote-yaml-to-notebook-content.ts (1)
  • transformDeepnoteYamlToNotebookContent (6-38)
src/fallback-data.ts (1)
src/types.ts (1)
  • IDeepnoteNotebookContent (11-14)
🔇 Additional comments (9)
tsconfig.json (1)

9-9: Align TS lib/target to avoid runtime gaps.

lib is ES2022 but target is ES2018; TS may allow newer APIs without downleveling. Either raise target or lower lib.

Suggested:

-    "lib": ["ES2022", "DOM"],
+    "lib": ["ES2022", "DOM"],
@@
-    "target": "ES2018",
+    "target": "ES2022",

If you must keep ES2018, change lib to ["ES2018","DOM"] and ensure polyfills.

Also applies to: 22-22

package.json (1)

62-67: Verify JupyterLab package version compatibility.

Mixing minors (e.g., application ^4.0.0 with notebook ^4.4.7) is usually OK within 4.x, but ensure the builder resolves a consistent set.

If issues arise, align the 4.x packages to the same minor series used by your target JupyterLab.

src/fallback-data.ts (1)

28-29: Consider using the current nbformat minor.

Hard-coding 0 is conservative; many clients default to 4.5.

If feasible, set nbformat_minor to the current value used by your JupyterLab target.

src/types.ts (2)

4-9: LGTM!

Type definition is clear and appropriately uses nullable types for optional Deepnote metadata.


11-14: LGTM!

Clean use of Omit to narrow the metadata type.

src/convert-deepnote-block-to-jupyter-cell.ts (1)

10-13: LGTM!

Deep clone prevents mutations, and cell_id correctly maps from block.id.

src/components/NotebookPicker.tsx (1)

6-6: LGTM!

Export aligns with the plugin refactoring in src/index.ts.

src/index.ts (1)

19-46: LGTM!

Provider registration and error handling are correct. Early return at line 37 gracefully handles missing registry.

src/deepnote-content-provider.ts (1)

46-56: LGTM!

Transformation logic correctly extracts YAML, transforms to notebook content, and returns new model object.

Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/convert-deepnote-block-type-to-jupyter.ts (1)

1-1: Constrain return type.

Return type should be 'code' | 'markdown' for compile-time safety.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 017e92f and 08c2d1b.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • src/convert-deepnote-block-type-to-jupyter.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/** : Deepnote integration code resides under src/notebooks/deepnote/
📚 Learning: 2025-09-12T12:52:09.726Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs data transformations

Applied to files:

  • src/convert-deepnote-block-type-to-jupyter.ts
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : Update FileConverter to handle the new export format

Applied to files:

  • src/convert-deepnote-block-type-to-jupyter.ts
🪛 markdownlint-cli2 (0.18.1)
README.md

75-75: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


80-80: Bare URL used

(MD034, no-bare-urls)


86-86: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


88-88: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🔇 Additional comments (1)
src/convert-deepnote-block-type-to-jupyter.ts (1)

29-30: Verify block type coverage against official Deepnote definitions. Default fallback maps unknown types to markdown; manually confirm no block types are missing.

Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/convert-deepnote-block-to-jupyter-cell.ts (1)

34-43: Markdown cells still discard metadata.

Line 39 uses metadata: {}, losing block-level metadata including cell_id. This was flagged in a previous review but remains unfixed.

Apply this diff to preserve metadata:

     const source = createMarkdown(blockCopy);
     const jupyterCell: IMarkdownCell = {
       cell_type: 'markdown',
-      metadata: {},
+      metadata: jupyterCellMetadata,
       source
     };
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 08c2d1b and d7d8256.

📒 Files selected for processing (3)
  • .github/workflows/build.yml (1 hunks)
  • package.json (1 hunks)
  • src/convert-deepnote-block-to-jupyter-cell.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/** : Deepnote integration code resides under src/notebooks/deepnote/
📚 Learning: 2025-09-12T12:52:09.726Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs data transformations

Applied to files:

  • src/convert-deepnote-block-to-jupyter-cell.ts
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : Update FileConverter to handle the new export format

Applied to files:

  • src/convert-deepnote-block-to-jupyter-cell.ts
🧬 Code graph analysis (1)
src/convert-deepnote-block-to-jupyter-cell.ts (1)
src/convert-deepnote-block-type-to-jupyter.ts (1)
  • convertDeepnoteBlockTypeToJupyter (1-32)
🔇 Additional comments (2)
src/convert-deepnote-block-to-jupyter-cell.ts (2)

1-8: LGTM!

Imports are appropriate and properly scoped.


15-33: LGTM!

Code cell conversion is correct, and the execution_count fix from the previous review is applied.

Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
@andyjakubowski andyjakubowski marked this pull request as ready for review October 8, 2025 10:44
@andyjakubowski
Copy link
Contributor Author

Actionable comments posted: 2

@coderabbitai can you have another look, please?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

@andyjakubowski: I'll review the changes now.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- name: Configure npm registry for GitHub Packages
run: |
echo "@deepnote:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing the token to a file feels scary. If you specify NODE_AUTH_TOKEN, that should be usable by npm.

- name: Install dependencies
        run: npm ci
        env:
          NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copy link
Contributor Author

@andyjakubowski andyjakubowski Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced it with actions/setup-node@v5 to make it less scary. After some fun digging I found out that actions/setup-node@v5 does the exact same thing of writing the token out to the file 😀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha okay

andyjakubowski and others added 2 commits October 9, 2025 11:10
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Co-authored-by: Christoffer Artmann <Artgaard@gmail.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
@andyjakubowski andyjakubowski force-pushed the andy/oss-88-extend-jupyter-server-api-endpoint-to-serve-deepnote-files branch from d6b2594 to 0caae37 Compare October 9, 2025 09:10
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (2)
src/transform-deepnote-yaml-to-notebook-content.ts (2)

15-23: Propagate Deepnote metadata when no notebooks exist.

Keep raw YAML and parsed file for downstream features.

       return {
         ...blankDeepnoteNotebookContent,
+        metadata: {
+          deepnote: {
+            rawYamlString: yamlString,
+            deepnoteFile
+          }
+        },
         cells: [
           {
             ...blankCodeCell,
             source: '# No notebooks found in the Deepnote file.\n'
           }
         ]
       };

30-33: Propagate Deepnote metadata on successful transform.

Carry rawYamlString and deepnoteFile in notebook metadata.

     return {
       ...blankDeepnoteNotebookContent,
+      metadata: {
+        deepnote: {
+          rawYamlString: yamlString,
+          deepnoteFile
+        }
+      },
       cells
     };
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eac52df and 0caae37.

📒 Files selected for processing (3)
  • .github/workflows/check-release.yml (2 hunks)
  • .npmrc (1 hunks)
  • src/transform-deepnote-yaml-to-notebook-content.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/** : Deepnote integration code resides under src/notebooks/deepnote/
📚 Learning: 2025-08-08T09:53:42.683Z
Learnt from: jamesbhobbs
PR: deepnote/deepnote#0
File: :0-0
Timestamp: 2025-08-08T09:53:42.683Z
Learning: In deepnote/deepnote, disallow using branches: "*" (e.g., branches: ['*'] or branches: ["*"]) in GitHub Actions under on: push/pull_request/pull_request_target because it can block CI for PR-to-PR/base PR scenarios. Prefer omitting branches entirely or using explicit branch lists when truly needed.

Applied to files:

  • .github/workflows/check-release.yml
📚 Learning: 2025-09-12T12:52:09.726Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs data transformations

Applied to files:

  • src/transform-deepnote-yaml-to-notebook-content.ts
🧬 Code graph analysis (1)
src/transform-deepnote-yaml-to-notebook-content.ts (3)
src/types.ts (1)
  • IDeepnoteNotebookContent (11-14)
src/fallback-data.ts (2)
  • blankDeepnoteNotebookContent (12-30)
  • blankCodeCell (4-10)
src/convert-deepnote-block-to-jupyter-cell.ts (1)
  • convertDeepnoteBlockToJupyterCell (10-44)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: check_release
🔇 Additional comments (3)
src/transform-deepnote-yaml-to-notebook-content.ts (3)

1-5: LGTM!

Imports are appropriate and complete.


6-8: LGTM!

Function signature is correct for the async deserialization workflow.


34-37: LGTM!

Error handling logs for debugging and rethrows with a user-facing message.

Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
Signed-off-by: Andy Jakubowski <hello@andyjakubowski.com>
coderabbitai[bot]
coderabbitai bot previously requested changes Oct 9, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
.github/workflows/check-release.yml (1)

6-6: Drop the wildcard branch filter on pull_request.

Blocks CI for fork PRs. Remove the filter to use GitHub’s default (all branches).

   pull_request:
-    branches: ['*']
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0caae37 and fe7c9f0.

📒 Files selected for processing (1)
  • .github/workflows/check-release.yml (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-12T12:52:09.726Z
Learning: Applies to src/notebooks/deepnote/** : Deepnote integration code resides under src/notebooks/deepnote/
📚 Learning: 2025-08-08T09:53:42.683Z
Learnt from: jamesbhobbs
PR: deepnote/deepnote#0
File: :0-0
Timestamp: 2025-08-08T09:53:42.683Z
Learning: In deepnote/deepnote, disallow using branches: "*" (e.g., branches: ['*'] or branches: ["*"]) in GitHub Actions under on: push/pull_request/pull_request_target because it can block CI for PR-to-PR/base PR scenarios. Prefer omitting branches entirely or using explicit branch lists when truly needed.

Applied to files:

  • .github/workflows/check-release.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: check_release
  • GitHub Check: build
🔇 Additional comments (1)
.github/workflows/check-release.yml (1)

8-9: Verify Node 22.x compatibility.

Confirm JupyterLab build/releaser steps support Node 22.x; many Jupyter workflows still pin 18/20. Adjust if needed.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@andyjakubowski andyjakubowski requested a review from Artmann October 9, 2025 10:05
@andyjakubowski andyjakubowski force-pushed the andy/oss-88-extend-jupyter-server-api-endpoint-to-serve-deepnote-files branch from 4b7c044 to 09a1e0a Compare October 9, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants