Skip to content

Conversation

@saltenasl
Copy link
Member

@saltenasl saltenasl commented Oct 29, 2025

Contact me for testing details, the corresponding functionality in deepnote.com is currently only on our staging which requires special config.

Summary by CodeRabbit

  • New Features

    • Added "Open in Deepnote" command to upload .deepnote files from VS Code, with progress UI and file-size checks.
    • New Deepnote settings: configurable domain and option to disable SSL verification (for development).
  • Tests

    • Unit tests for import client error handling and MAX_FILE_SIZE; lightweight instantiation test for the handler (integration tests planned).
  • Refactor

    • Project/block defaults updated: use unique block IDs, explicit executionCount default, and string version/createdAt metadata.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.
📝 Walkthrough

Walkthrough

Adds a new public command deepnote.openInDeepnote and a corresponding command constant. Registers a new OpenInDeepnoteHandler activation service that validates a saved .deepnote editor file, enforces a 100 MB size limit, reads the file, calls a two-step import flow (initImport → uploadFile) and opens the resulting Deepnote URL. Introduces ImportClient with initImport, uploadFile, getErrorMessage, getDeepnoteDomain, and MAX_FILE_SIZE (100 MB). Adds VS Code configuration properties deepnote.domain and deepnote.disableSSLVerification. Includes unit tests for ImportClient error handling and a basic instantiation test for the handler. Updates deepnote block fallback to use UUIDs and adjusts project/block metadata defaults.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant VSCode
    participant Handler as OpenInDeepnoteHandler
    participant Client as ImportClient
    participant API as Deepnote API
    participant Browser

    User->>VSCode: Trigger "Open in Deepnote" on .deepnote
    VSCode->>Handler: Execute command
    Handler->>Handler: Validate active editor, ensure saved, check MAX_FILE_SIZE
    Handler->>Handler: Read file into Buffer

    rect #D2E6FF
      Note over Handler,Client: Init import (domain-resolved)
      Handler->>Client: initImport(fileName, fileSize)
      Client->>API: POST https://api.<domain>/v1/import/init
      API-->>Client: { importId, uploadUrl, expiresAt } / error
      Client-->>Handler: InitImportResponse or ApiError
    end

    rect #E6FFEA
      Note over Handler,Client: Upload file (presigned URL)
      Handler->>Client: uploadFile(uploadUrl, buffer, onProgress)
      Client->>API: PUT uploadUrl (application/octet-stream)
      API-->>Client: 200 OK / error
      Client-->>Handler: progress callbacks (50%,100%) or ApiError
    end

    Handler->>VSCode: env.openExternal(import URL)
    VSCode->>Browser: Open Deepnote import page
Loading

Possibly related PRs

Suggested reviewers

  • andyjakubowski
  • Artmann
  • jamesbhobbs

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: open in Deepnote command" directly and clearly describes the core change across the pull request. The changeset implements a new command that enables users to open files in Deepnote, comprising the command registration, API client, handler logic, and service wiring visible throughout the files. While secondary changes exist (UUID-based block groups, versioning adjustments), the title appropriately focuses on the primary objective. The phrasing is specific, concise, and avoids vagueness.

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

@saltenasl
Copy link
Member Author

@coderabbitai ignore

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 60.10929% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 72%. Comparing base (c1b5526) to head (605536b).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...c/notebooks/deepnote/openInDeepnoteHandler.node.ts 16% 47 Missing ⚠️
src/notebooks/deepnote/importClient.node.ts 45% 25 Missing and 1 partial ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main    #132    +/-   ##
======================================
- Coverage     72%     72%    -1%     
======================================
  Files        541     545     +4     
  Lines      41595   41776   +181     
  Branches    5031    5047    +16     
======================================
+ Hits       30322   30430   +108     
- Misses      9593    9665    +72     
- Partials    1680    1681     +1     
Files with missing lines Coverage Δ
src/notebooks/deepnote/deepnoteDataConverter.ts 60% <100%> (+<1%) ⬆️
src/notebooks/deepnote/deepnoteExplorerView.ts 71% <ø> (ø)
...tebooks/deepnote/deepnoteExplorerView.unit.test.ts 95% <100%> (+<1%) ⬆️
src/notebooks/deepnote/importClient.unit.test.ts 100% <100%> (ø)
...s/deepnote/openInDeepnoteHandler.node.unit.test.ts 100% <100%> (ø)
src/platform/deepnote/pocket.ts 100% <100%> (ø)
src/notebooks/deepnote/importClient.node.ts 45% <45%> (ø)
...c/notebooks/deepnote/openInDeepnoteHandler.node.ts 16% <16%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e683e42 and aa755bd.

📒 Files selected for processing (8)
  • package.json (3 hunks)
  • src/commands.ts (1 hunks)
  • src/notebooks/deepnote/importClient.node.ts (1 hunks)
  • src/notebooks/deepnote/importClient.unit.test.ts (1 hunks)
  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts (1 hunks)
  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts (1 hunks)
  • src/notebooks/serviceRegistry.node.ts (2 hunks)
  • src/platform/common/constants.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/!(*.node|*.web).ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place shared cross-platform logic in common .ts files (not suffixed with .node or .web)

Files:

  • src/commands.ts
  • src/platform/common/constants.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Use l10n.t() for user-facing strings
Use typed error classes from src/platform/errors/ when throwing or handling errors
Use the ILogger service instead of console.log
Preserve error details while scrubbing PII in messages and telemetry
Include the Microsoft copyright header in source files
Prefer async/await and handle cancellation with CancellationToken

**/*.{ts,tsx}: Order class members (methods, fields, properties) first by accessibility (public/protected/private) and then alphabetically
Do not add the Microsoft copyright header to new files
Use Uri.joinPath() to construct file paths instead of manual string concatenation
Add a blank line after groups of const declarations and before return statements for readability
Separate third-party imports from local file imports

Files:

  • src/commands.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts
  • src/platform/common/constants.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.node.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
  • src/notebooks/serviceRegistry.node.ts
**/*.node.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use *.node.ts for Desktop-specific implementations that require full file system access and Python environments

Files:

  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts
  • src/notebooks/deepnote/importClient.node.ts
  • src/notebooks/serviceRegistry.node.ts
src/notebooks/deepnote/**

📄 CodeRabbit inference engine (CLAUDE.md)

Deepnote integration code resides under src/notebooks/deepnote/

Files:

  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.node.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
src/platform/**/*.ts

📄 CodeRabbit inference engine (.github/instructions/platform.instructions.md)

src/platform/**/*.ts: Use Inversify decorators for DI: annotate classes with @Injectable() and inject dependencies with @Inject(Token)
Use the centralized logger (import { logger } from '../platform/logging') instead of console.log for application logging

Files:

  • src/platform/common/constants.ts
**/*.unit.test.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place unit tests in files matching *.unit.test.ts

**/*.unit.test.ts: Unit tests must use Mocha/Chai and have the .unit.test.ts extension
Place unit test files alongside the source files they test
Use assert.deepStrictEqual() for object comparisons in tests instead of checking individual properties

Files:

  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
**/*.{test,spec}.ts

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

In unit tests, when a mock is returned from a promise, ensure the mocked instance has an undefined then property to avoid hanging tests

Files:

  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
🧬 Code graph analysis (3)
src/notebooks/deepnote/openInDeepnoteHandler.node.ts (2)
src/platform/logging/index.ts (1)
  • logger (35-48)
src/notebooks/deepnote/importClient.node.ts (4)
  • MAX_FILE_SIZE (29-29)
  • initImport (75-143)
  • uploadFile (154-187)
  • getErrorMessage (196-227)
src/notebooks/deepnote/importClient.node.ts (1)
src/platform/logging/index.ts (1)
  • logger (35-48)
src/notebooks/deepnote/importClient.unit.test.ts (1)
src/notebooks/deepnote/importClient.node.ts (3)
  • ApiError (21-24)
  • getErrorMessage (196-227)
  • MAX_FILE_SIZE (29-29)
⏰ 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). (3)
  • GitHub Check: Build & Package Extension
  • GitHub Check: Build & Test
  • GitHub Check: Lint & Format
🔇 Additional comments (7)
src/platform/common/constants.ts (1)

239-239: LGTM.

Command id constant matches package.json and is scoped under Commands.

src/commands.ts (1)

200-201: LGTM.

Accurate no-args mapping for OpenInDeepnote.

src/notebooks/deepnote/importClient.unit.test.ts (1)

7-164: LGTM (coverage for error messages and size).

Solid checks for getErrorMessage and MAX_FILE_SIZE.

If logger noise is problematic, stub logger in tests to keep output clean.

src/notebooks/deepnote/openInDeepnoteHandler.node.ts (1)

25-29: LGTM (command registration).

Registers once via DI; good.

src/notebooks/serviceRegistry.node.ts (2)

73-73: Import placement LGTM.

Consistent with Deepnote imports cluster.


167-170: DI wiring and interface conformance verified; activation idempotency guaranteed by framework.

OpenInDeepnoteHandler correctly implements IExtensionSyncActivationService. The framework calls each service's activate() exactly once: ExtensionActivationManager injects all IExtensionSyncActivationService implementations via multiInject and calls item.activate() for each, and the manager itself is invoked once during extension startup. The singleton registration ensures no duplicate instances. Command registration side-effects are safe.

src/notebooks/deepnote/importClient.node.ts (1)

29-29: MAX_FILE_SIZE enforcement already in place—review comment invalid.

The handler in openInDeepnoteHandler.node.ts (lines 66–71) already rejects files exceeding MAX_FILE_SIZE before calling initImport at line 89. The size check occurs, and execution returns early if the limit is exceeded. No changes needed.

Likely an incorrect or invalid review comment.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

✅ Actions performed

Reviews paused.

@saltenasl
Copy link
Member Author

@coderabbitai full review only critical issues please

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

@saltenasl: I'll perform a full review focusing only on critical issues.

User feedback: Only flag critical issues. Skip minor issues, suggestions, and non-critical concerns.

✅ Actions performed

Full review triggered.

@saltenasl
Copy link
Member Author

@coderabbitai are you still reviewing? its been 16min

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if there are any review comments by coderabbitai on PR #132
gh pr view 132 --json reviews,comments --jq '.reviews[], .comments[]' | head -50

Length of output: 39499


🏁 Script executed:

#!/bin/bash
# Check GitHub workflow/action runs for this PR to see if there's anything pending
gh run list --repo deepnote/vscode-deepnote --branch ls/open-in-deepnote --limit 10 --json status,conclusion,name,createdAt,updatedAt,databaseId

Length of output: 613


@saltenasl: Apologies for the delay. The review appears to have stalled. Re-triggering now with focus on critical issues only.

✅ Actions performed

Full review triggered.

@saltenasl
Copy link
Member Author

@coderabbitai please can you review this?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

@saltenasl: Reviewing now, focusing on critical issues only.

User feedback: Only flag critical issues. Skip minor issues, suggestions, and non-critical concerns.

✅ Actions performed

Full review triggered.

@saltenasl
Copy link
Member Author

@coderabbitai full review critical issues only

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

@saltenasl: Triggering full review now. Will flag critical issues only.

User feedback: Only flag critical issues. Skip minor issues, suggestions, and non-critical concerns.

✅ Actions performed

Full review triggered.

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 (2)
src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts (2)

1-2: Remove MS copyright header from new files.


7-15: Minimal test coverage noted.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e683e42 and 27cf287.

📒 Files selected for processing (12)
  • package.json (3 hunks)
  • src/commands.ts (1 hunks)
  • src/notebooks/deepnote/blocks.md (4 hunks)
  • src/notebooks/deepnote/deepnoteDataConverter.ts (2 hunks)
  • src/notebooks/deepnote/deepnoteExplorerView.ts (2 hunks)
  • src/notebooks/deepnote/importClient.node.ts (1 hunks)
  • src/notebooks/deepnote/importClient.unit.test.ts (1 hunks)
  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts (1 hunks)
  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts (1 hunks)
  • src/notebooks/serviceRegistry.node.ts (2 hunks)
  • src/platform/common/constants.ts (1 hunks)
  • src/platform/deepnote/pocket.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/!(*.node|*.web).ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place shared cross-platform logic in common .ts files (not suffixed with .node or .web)

Files:

  • src/commands.ts
  • src/platform/deepnote/pocket.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
  • src/platform/common/constants.ts
  • src/notebooks/deepnote/deepnoteDataConverter.ts
  • src/notebooks/deepnote/deepnoteExplorerView.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Use l10n.t() for user-facing strings
Use typed error classes from src/platform/errors/ when throwing or handling errors
Use the ILogger service instead of console.log
Preserve error details while scrubbing PII in messages and telemetry
Include the Microsoft copyright header in source files
Prefer async/await and handle cancellation with CancellationToken

**/*.{ts,tsx}: Order class members (methods, fields, properties) first by accessibility (public/protected/private) and then alphabetically
Do not add the Microsoft copyright header to new files
Use Uri.joinPath() to construct file paths instead of manual string concatenation
Add a blank line after groups of const declarations and before return statements for readability
Separate third-party imports from local file imports

Files:

  • src/commands.ts
  • src/platform/deepnote/pocket.ts
  • src/notebooks/serviceRegistry.node.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
  • src/platform/common/constants.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts
  • src/notebooks/deepnote/deepnoteDataConverter.ts
  • src/notebooks/deepnote/importClient.node.ts
  • src/notebooks/deepnote/deepnoteExplorerView.ts
src/platform/**/*.ts

📄 CodeRabbit inference engine (.github/instructions/platform.instructions.md)

src/platform/**/*.ts: Use Inversify decorators for DI: annotate classes with @Injectable() and inject dependencies with @Inject(Token)
Use the centralized logger (import { logger } from '../platform/logging') instead of console.log for application logging

Files:

  • src/platform/deepnote/pocket.ts
  • src/platform/common/constants.ts
**/*.node.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use *.node.ts for Desktop-specific implementations that require full file system access and Python environments

Files:

  • src/notebooks/serviceRegistry.node.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts
  • src/notebooks/deepnote/importClient.node.ts
**/*.unit.test.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place unit tests in files matching *.unit.test.ts

**/*.unit.test.ts: Unit tests must use Mocha/Chai and have the .unit.test.ts extension
Place unit test files alongside the source files they test
Use assert.deepStrictEqual() for object comparisons in tests instead of checking individual properties

Files:

  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
**/*.{test,spec}.ts

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

In unit tests, when a mock is returned from a promise, ensure the mocked instance has an undefined then property to avoid hanging tests

Files:

  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
src/notebooks/deepnote/**

📄 CodeRabbit inference engine (CLAUDE.md)

Deepnote integration code resides under src/notebooks/deepnote/

Files:

  • src/notebooks/deepnote/openInDeepnoteHandler.node.unit.test.ts
  • src/notebooks/deepnote/importClient.unit.test.ts
  • src/notebooks/deepnote/openInDeepnoteHandler.node.ts
  • src/notebooks/deepnote/deepnoteDataConverter.ts
  • src/notebooks/deepnote/importClient.node.ts
  • src/notebooks/deepnote/deepnoteExplorerView.ts
  • src/notebooks/deepnote/blocks.md
src/notebooks/deepnote/deepnoteDataConverter.ts

📄 CodeRabbit inference engine (CLAUDE.md)

deepnoteDataConverter.ts performs Deepnote data transformations

Files:

  • src/notebooks/deepnote/deepnoteDataConverter.ts
🪛 GitHub Actions: CI
package.json

[error] 1-1: Test suite failed: npm test encountered a failing unit test (DeepnoteExplorerView).

@saltenasl saltenasl marked this pull request as ready for review October 30, 2025 15:07
@saltenasl saltenasl requested a review from a team as a code owner October 30, 2025 15:07
Copy link
Member

@Artmann Artmann left a comment

Choose a reason for hiding this comment

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

Looks good to me. I think coderabbit addressed all the issues.

private createFallbackBlock(cell: NotebookCellData, index: number): DeepnoteBlock {
return {
blockGroup: 'default-group',
blockGroup: generateUuid(),
Copy link
Member

Choose a reason for hiding this comment

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

❤️

blockGroup: generateUuid(),
content: '',
executionCount: null,
executionCount: 0,
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be NULL to signify that the block has not been executed. At least I think that's the reason that the field is nullable.

/**
* Gets the API endpoint from configuration
*/
function getApiEndpoint(): string {
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: Is getApiUrl a better name than getApiEndpoint?

@saltenasl
Copy link
Member Author

@coderabbitai resolve i resolved your comment

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# List all review comments by coderabbitai on PR #132
gh api repos/deepnote/vscode-deepnote/pulls/132/comments --jq '.[] | select(.user.login == "coderabbitai" or .user.login == "coderabbitai[bot]") | {id: .id, body: .body, path: .path, line: .line}'

Length of output: 45405


🏁 Script executed:

#!/bin/bash
# Resolve all CodeRabbit review comments on PR #132
# Using GitHub's GraphQL API to resolve each comment thread

# List of comment IDs to resolve (excluding the thank you message)
comment_ids=(
  2473733676
  2473733718
  2473733736
  2473733764
  2473733780
  2473733797
  2473733817
  2473733836
  2473733849
  2473733867
  2473733888
  2473733899
  2473733929
  2473733955
  2473733981
  2473734000
  2473734015
  2473734034
  2473734048
  2478469664
)

# Resolve each comment
for comment_id in "${comment_ids[@]}"; do
  echo "Resolving comment ID: $comment_id"
  gh api graphql -f query="
    mutation {
      resolveReviewThread(input: {threadId: \"$(gh api repos/deepnote/vscode-deepnote/pulls/comments/$comment_id --jq '.pull_request_review_id' | base64)\"}) {
        thread {
          id
          isResolved
        }
      }
    }
  " 2>&1 || echo "Failed to resolve $comment_id, trying alternative method..."
done

# Alternative: Try using the review thread ID directly
echo "Attempting alternative resolution method..."
gh api -X PATCH repos/deepnote/vscode-deepnote/pulls/132/comments/2473733676 -f state=resolved 2>&1 || echo "Alternative method not supported"

# List remaining unresolved comments
echo "Checking remaining unresolved comments..."
gh api repos/deepnote/vscode-deepnote/pulls/132/comments --jq '.[] | select(.user.login == "coderabbitai" or .user.login == "coderabbitai[bot]") | {id: .id, resolved: .resolved}' 2>&1

Length of output: 8603


🏁 Script executed:

#!/bin/bash
# Get review thread information for each comment to find the proper thread IDs
echo "Fetching review thread details..."

# Get the pull request reviews and their threads
gh api graphql -f query='
query {
  repository(owner: "deepnote", name: "vscode-deepnote") {
    pullRequest(number: 132) {
      reviewThreads(first: 50) {
        nodes {
          id
          isResolved
          comments(first: 10) {
            nodes {
              databaseId
              author {
                login
              }
              body
            }
          }
        }
      }
    }
  }
}' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.comments.nodes[0].author.login == "coderabbitai" or .comments.nodes[0].author.login == "coderabbitai[bot]") | {threadId: .id, isResolved: .isResolved, commentId: .comments.nodes[0].databaseId}'

Length of output: 1609


🏁 Script executed:

#!/bin/bash
# Resolve unresolved CodeRabbit review threads using proper thread IDs

# Array of unresolved thread IDs
unresolved_threads=(
  "PRRT_kwDOPoaKoM5fydmF"
  "PRRT_kwDOPoaKoM5fydmk"
  "PRRT_kwDOPoaKoM5fydmw"
  "PRRT_kwDOPoaKoM5fydnM"
  "PRRT_kwDOPoaKoM5fydnY"
  "PRRT_kwDOPoaKoM5fydno"
  "PRRT_kwDOPoaKoM5fydoK"
  "PRRT_kwDOPoaKoM5fydo4"
  "PRRT_kwDOPoaKoM5fydpE"
  "PRRT_kwDOPoaKoM5fydpa"
  "PRRT_kwDOPoaKoM5fydpx"
  "PRRT_kwDOPoaKoM5fydqC"
  "PRRT_kwDOPoaKoM5fydqV"
  "PRRT_kwDOPoaKoM5fydqf"
  "PRRT_kwDOPoaKoM5fydqu"
  "PRRT_kwDOPoaKoM5fydq3"
)

echo "Resolving ${#unresolved_threads[@]} unresolved review threads..."

for thread_id in "${unresolved_threads[@]}"; do
  echo "Resolving thread: $thread_id"
  gh api graphql -f query="
    mutation {
      resolveReviewThread(input: {threadId: \"$thread_id\"}) {
        thread {
          id
          isResolved
        }
      }
    }
  "
done

echo ""
echo "All threads resolved! Verifying..."
echo ""

# Verify all threads are now resolved
gh api graphql -f query='
query {
  repository(owner: "deepnote", name: "vscode-deepnote") {
    pullRequest(number: 132) {
      reviewThreads(first: 50) {
        nodes {
          id
          isResolved
          comments(first: 1) {
            nodes {
              author {
                login
              }
            }
          }
        }
      }
    }
  }
}' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.comments.nodes[0].author.login == "coderabbitai" or .comments.nodes[0].author.login == "coderabbitai[bot]") | {threadId: .id, isResolved: .isResolved}'

Length of output: 3290


@saltenasl: Done! Successfully resolved all 20 review comment threads on PR #132. All issues flagged by CodeRabbit are now marked as resolved.

@saltenasl saltenasl merged commit 41a2a32 into main Oct 30, 2025
10 of 13 checks passed
@saltenasl saltenasl deleted the ls/open-in-deepnote branch October 30, 2025 15:45
dinohamzic pushed a commit that referenced this pull request Oct 30, 2025
* feat: open in Deepnote command

* feat: disable ssl checks settings option

* feat: rm disabling ssl checks option

* feat: tweak config

* feat: config name

* fix: create new deepnote file with the correct attributes

* fix: create new blocks in their own group instead of sharing a single one

* chore: fix test
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