-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Use integration listing from project, not from blocks #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #109 +/- ##
======================================
Coverage 72% 72%
======================================
Files 536 536
Lines 40681 40829 +148
Branches 4982 4990 +8
======================================
+ Hits 29442 29588 +146
Misses 9578 9578
- Partials 1661 1663 +2
🚀 New features to boost your workflow:
|
📝 WalkthroughWalkthroughThis PR shifts Deepnote integrations to a project-scoped model and threads projectId through the integration UI and tooling. detectIntegrations now reads from project.project.integrations and returns IntegrationWithStatus entries including optional integrationName and integrationType. The integration webview show signature changed to show(projectId, ...); the webview calls IDeepnoteNotebookManager.updateProjectIntegrations after save/delete to persist project.integrations. New mappings convert between Deepnote type strings and internal IntegrationType. Localization keys for PostgreSQL and BigQuery were added and included in webview payloads. Sequence Diagram(s)sequenceDiagram
participant User
participant Webview
participant Provider as IntegrationWebviewProvider
participant NMgr as DeepnoteNotebookManager
participant Storage
rect rgb(220,240,220)
Note over User,Webview: User saves or deletes an integration
User->>Webview: submit save/delete
Webview->>Provider: postMessage(save/delete)
Provider->>Provider: updateProjectIntegrationsList()
Provider->>NMgr: updateProjectIntegrations(projectId, integrations)
NMgr->>Storage: persist project.integrations
Storage-->>NMgr: ack
Provider->>Webview: postMessage(updated integrations payload)
end
rect rgb(240,230,210)
Note over Provider,NMgr: UI discovery / listing
Provider->>NMgr: getOriginalProject(projectId)
NMgr-->>Provider: project (with project.integrations[])
Provider->>Provider: map -> IntegrationWithStatus (config/status/name/type)
Provider->>Webview: send integrations payload (includes localized labels)
end
Possibly related PRs
Suggested reviewers
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (5)**/!(*.node|*.web).ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.unit.test.ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{test,spec}.ts📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)
Files:
src/notebooks/deepnote/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-10-09T11:21:57.494ZApplied to files:
🧬 Code graph analysis (1)src/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.ts (2)
⏰ 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)
🔇 Additional comments (8)
Comment |
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (18)
src/messageTypes.ts(1 hunks)src/notebooks/deepnote/deepnoteNotebookManager.ts(1 hunks)src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts(1 hunks)src/notebooks/deepnote/integrations/integrationDetector.ts(3 hunks)src/notebooks/deepnote/integrations/integrationManager.ts(1 hunks)src/notebooks/deepnote/integrations/integrationWebview.ts(8 hunks)src/notebooks/deepnote/integrations/types.ts(1 hunks)src/notebooks/deepnote/sqlCellStatusBarProvider.ts(4 hunks)src/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.ts(13 hunks)src/notebooks/types.ts(1 hunks)src/platform/common/utils/localize.ts(1 hunks)src/platform/notebooks/deepnote/integrationTypes.ts(2 hunks)src/webviews/webview-side/integrations/BigQueryForm.tsx(1 hunks)src/webviews/webview-side/integrations/ConfigurationForm.tsx(3 hunks)src/webviews/webview-side/integrations/IntegrationItem.tsx(2 hunks)src/webviews/webview-side/integrations/IntegrationPanel.tsx(4 hunks)src/webviews/webview-side/integrations/PostgresForm.tsx(2 hunks)src/webviews/webview-side/integrations/types.ts(2 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
.tsfiles (not suffixed with.nodeor.web)
Files:
src/notebooks/deepnote/deepnoteNotebookManager.tssrc/platform/common/utils/localize.tssrc/messageTypes.tssrc/webviews/webview-side/integrations/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.tssrc/notebooks/types.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/integrations/types.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.tssrc/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/deepnote/integrations/integrationManager.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationWebview.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.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 withCancellationToken
**/*.{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/notebooks/deepnote/deepnoteNotebookManager.tssrc/platform/common/utils/localize.tssrc/messageTypes.tssrc/webviews/webview-side/integrations/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.tssrc/webviews/webview-side/integrations/IntegrationItem.tsxsrc/notebooks/types.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/integrations/types.tssrc/webviews/webview-side/integrations/BigQueryForm.tsxsrc/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.tssrc/webviews/webview-side/integrations/PostgresForm.tsxsrc/platform/notebooks/deepnote/integrationTypes.tssrc/webviews/webview-side/integrations/IntegrationPanel.tsxsrc/notebooks/deepnote/integrations/integrationManager.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/webviews/webview-side/integrations/ConfigurationForm.tsxsrc/notebooks/deepnote/integrations/integrationWebview.ts
src/notebooks/deepnote/**
📄 CodeRabbit inference engine (CLAUDE.md)
Deepnote integration code resides under src/notebooks/deepnote/
Files:
src/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/integrations/types.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.tssrc/notebooks/deepnote/integrations/integrationManager.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationWebview.ts
src/notebooks/deepnote/deepnoteNotebookManager.ts
📄 CodeRabbit inference engine (CLAUDE.md)
deepnoteNotebookManager.ts handles Deepnote notebook state management
Files:
src/notebooks/deepnote/deepnoteNotebookManager.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/utils/localize.tssrc/platform/notebooks/deepnote/integrationTypes.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/deepnoteNotebookManager.unit.test.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.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
thenproperty to avoid hanging tests
Files:
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.ts
🧠 Learnings (3)
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteActivationService.ts : deepnoteActivationService.ts manages VS Code activation for Deepnote
Applied to files:
src/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.ts
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteTypes.ts : deepnoteTypes.ts contains Deepnote-related type definitions
Applied to files:
src/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/deepnote/integrations/integrationWebview.ts
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteNotebookManager.ts : deepnoteNotebookManager.ts handles Deepnote notebook state management
Applied to files:
src/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationWebview.ts
🧬 Code graph analysis (12)
src/notebooks/deepnote/deepnoteNotebookManager.ts (2)
src/notebooks/deepnote/deepnoteSerializer.ts (1)
DeepnoteProject(10-10)src/notebooks/deepnote/deepnoteTypes.ts (1)
DeepnoteProject(12-12)
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts (2)
src/notebooks/deepnote/deepnoteSerializer.ts (1)
DeepnoteProject(10-10)src/notebooks/deepnote/deepnoteTypes.ts (1)
DeepnoteProject(12-12)
src/webviews/webview-side/integrations/IntegrationItem.tsx (2)
src/webviews/webview-side/integrations/types.ts (2)
IntegrationWithStatus(29-35)IntegrationType(1-1)src/webviews/webview-side/react-common/locReactSide.ts (1)
getLocString(11-17)
src/notebooks/deepnote/integrations/integrationDetector.ts (1)
src/platform/notebooks/deepnote/integrationTypes.ts (3)
IntegrationWithStatus(87-99)DATAFRAME_SQL_INTEGRATION_ID(5-5)mapDeepnoteIntegrationType(23-25)
src/notebooks/deepnote/integrations/types.ts (2)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
IntegrationWithStatus(87-99)src/webviews/webview-side/integrations/types.ts (1)
IntegrationWithStatus(29-35)
src/webviews/webview-side/integrations/BigQueryForm.tsx (2)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
BigQueryIntegrationConfig(64-68)src/webviews/webview-side/integrations/types.ts (1)
BigQueryIntegrationConfig(21-25)
src/webviews/webview-side/integrations/PostgresForm.tsx (2)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
PostgresIntegrationConfig(51-59)src/webviews/webview-side/integrations/types.ts (1)
PostgresIntegrationConfig(11-19)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
src/webviews/webview-side/integrations/types.ts (1)
IntegrationType(1-1)
src/webviews/webview-side/integrations/IntegrationPanel.tsx (1)
src/webviews/webview-side/integrations/types.ts (1)
IntegrationType(1-1)
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (2)
src/notebooks/types.ts (2)
IDeepnoteNotebookManager(28-28)IDeepnoteNotebookManager(29-39)src/platform/notebooks/deepnote/integrationTypes.ts (2)
DATAFRAME_SQL_INTEGRATION_ID(5-5)mapDeepnoteIntegrationType(23-25)
src/webviews/webview-side/integrations/ConfigurationForm.tsx (4)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
IntegrationConfig(73-73)src/webviews/webview-side/integrations/types.ts (2)
IntegrationConfig(27-27)IntegrationType(1-1)src/webviews/webview-side/integrations/PostgresForm.tsx (1)
PostgresForm(13-183)src/webviews/webview-side/integrations/BigQueryForm.tsx (1)
BigQueryForm(13-156)
src/notebooks/deepnote/integrations/integrationWebview.ts (4)
src/platform/notebooks/deepnote/types.ts (2)
IIntegrationStorage(6-6)IIntegrationStorage(7-42)src/notebooks/types.ts (2)
IDeepnoteNotebookManager(28-28)IDeepnoteNotebookManager(29-39)src/platform/notebooks/deepnote/integrationTypes.ts (2)
IntegrationWithStatus(87-99)mapToDeepnoteIntegrationType(35-37)src/webviews/webview-side/integrations/types.ts (1)
IntegrationWithStatus(29-35)
⏰ 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 & Test
- GitHub Check: Build & Package Extension
- GitHub Check: Lint & Format
🔇 Additional comments (46)
src/platform/common/utils/localize.ts (1)
834-836: LGTM!Localization constants follow existing patterns and provide clear integration type labels.
src/messageTypes.ts (1)
182-184: LGTM!Type additions align with new localization constants.
src/webviews/webview-side/integrations/BigQueryForm.tsx (1)
8-8: LGTM!Integration name pre-fill follows clean fallback pattern and correctly handles form reset on prop changes.
Also applies to: 13-19, 20-20, 25-38
src/webviews/webview-side/integrations/IntegrationItem.tsx (2)
11-20: Good type label mapping.The default case returns the raw type value. This provides a reasonable fallback if new integration types are added before UI labels are defined.
32-39: LGTM!Display name composition uses sensible fallback chain and cleanly integrates type labels.
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts (1)
186-261: LGTM!Test suite is comprehensive, covering update scenarios, edge cases, and property preservation. Correctly uses
assert.deepStrictEqual()per coding guidelines.src/webviews/webview-side/integrations/types.ts (1)
33-34: LGTM!Optional fields support project-level integration metadata propagation without breaking existing code.
Also applies to: 52-53
src/notebooks/deepnote/integrations/types.ts (1)
23-31: LGTM!API signature cleanly extended to accept projectId. Documentation is clear.
src/webviews/webview-side/integrations/PostgresForm.tsx (3)
8-8: LGTM!Optional integrationName prop added to support pre-filling from project-level integration metadata.
13-20: LGTM!Form initialization correctly prioritizes existingConfig.name, then integrationName, then empty string.
28-47: LGTM!Reset logic and useEffect dependencies correctly handle integrationName updates.
src/notebooks/deepnote/integrations/integrationManager.ts (1)
165-165: LGTM!Call site updated to match new show() signature with projectId.
src/notebooks/deepnote/integrations/integrationDetector.ts (2)
5-10: LGTM!Imports updated to support type mapping and filtering.
27-74: No changes needed. Unmapped integration types are handled correctly.The code properly handles undefined
integrationTypevalues:
- The field is correctly marked optional (
integrationType?: IntegrationType) inIntegrationWithStatus- All downstream consumers check for undefined before use:
IntegrationItemuses fallback patterns,ConfigurationFormchecks truthiness, andIntegrationWebviewlogs warnings when type is missing- Fallback strategies exist everywhere (config type, original Deepnote string, null handling)
src/webviews/webview-side/integrations/IntegrationPanel.tsx (4)
6-6: LGTM!IntegrationType import added to support type metadata.
17-20: LGTM!State tracking for integration metadata correctly initialized.
58-59: LGTM!Integration metadata captured from showForm message.
153-154: LGTM!Integration metadata properly forwarded to ConfigurationForm.
src/platform/notebooks/deepnote/integrationTypes.ts (2)
15-25: LGTM!Deepnote-to-internal type mapping correctly handles known types and returns undefined for unknown.
91-98: LGTM!Optional fields for pre-filling integration forms are well-documented.
src/notebooks/deepnote/sqlCellStatusBarProvider.unit.test.ts (5)
21-21: LGTM!IDeepnoteNotebookManager imported to support project-level integration access.
27-34: LGTM!Mock notebookManager correctly injected into provider.
530-557: LGTM!Test updated to use getOriginalProject for integration source.
705-724: LGTM!Good coverage for missing project ID error case.
726-769: LGTM!Excellent test coverage for DATAFRAME_SQL_INTEGRATION_ID filtering behavior.
src/webviews/webview-side/integrations/ConfigurationForm.tsx (4)
5-5: LGTM!IntegrationType imported for type detection.
10-11: LGTM!Props interface extended to support project-level integration metadata.
24-44: LGTM!Type detection correctly prioritizes integrationType prop over ID-based inference. Good use of selectedIntegrationType to avoid shadowing.
62-78: LGTM!integrationName properly forwarded to both PostgresForm and BigQueryForm.
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (7)
25-30: LGTM!Imports properly organized with third-party separated from local modules.
48-52: LGTM!Dependency injection follows guidelines—injecting interface, not concrete class.
294-306: LGTM!Proper null-checking with early returns and localized error messages.
349-372: LGTM!DuckDB item and configure option properly added with appropriate conditionals.
374-419: LGTM!Selection handling, metadata updates, and error handling all correct.
421-430: All IntegrationType values are handled.The enum contains only
PostgresandBigQuery. Both have localized labels in the method.
311-311: Add defensive check forproject.projectbefore accessing integrations.Line 311 accesses
project.project.integrationsbut only guards against falsyproject. Ifproject.projectis undefined, this throws. Add a check:project?.project?.integrations || []or verify that DeepnoteFile always has a non-nullprojectproperty (currently unverifiable—the type is from external package@deepnote/blocks).src/notebooks/deepnote/integrations/integrationWebview.ts (10)
8-8: LGTM!New imports properly added for project integration management.
Also applies to: 13-14
28-28: LGTM!Field properly typed as optional.
30-34: LGTM!Interface injection follows guidelines.
42-48: LGTM!Method signature updated to track projectId, properly stored before use.
131-132: LGTM!Type label localization strings properly added.
177-178: LGTM!Integration name and type properly included in webview payload.
228-229: LGTM!Form message enhanced with name and type for better UX.
249-250: LGTM!Project integrations list updated after save, properly awaited.
284-285: LGTM!Project integrations list updated after delete, consistent with save flow.
304-344: LGTM!Project sync logic properly handles missing types and unmappable values with warnings. Logging uses ILogger service as required.
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
cspell.json(2 hunks)src/notebooks/deepnote/integrations/integrationDetector.ts(3 hunks)src/notebooks/deepnote/integrations/integrationWebview.ts(8 hunks)src/notebooks/deepnote/sqlCellStatusBarProvider.ts(4 hunks)src/platform/notebooks/deepnote/integrationTypes.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/!(*.node|*.web).ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Place shared cross-platform logic in common
.tsfiles (not suffixed with.nodeor.web)
Files:
src/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationWebview.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.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 withCancellationToken
**/*.{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/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationWebview.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/notebooks/deepnote/integrationTypes.ts
src/notebooks/deepnote/**
📄 CodeRabbit inference engine (CLAUDE.md)
Deepnote integration code resides under src/notebooks/deepnote/
Files:
src/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationWebview.ts
🧠 Learnings (2)
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteTypes.ts : deepnoteTypes.ts contains Deepnote-related type definitions
Applied to files:
src/platform/notebooks/deepnote/integrationTypes.ts
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteNotebookManager.ts : deepnoteNotebookManager.ts handles Deepnote notebook state management
Applied to files:
src/notebooks/deepnote/integrations/integrationWebview.ts
🧬 Code graph analysis (4)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
src/webviews/webview-side/integrations/types.ts (1)
IntegrationType(1-1)
src/notebooks/deepnote/integrations/integrationDetector.ts (2)
src/platform/notebooks/deepnote/integrationTypes.ts (3)
IntegrationWithStatus(79-91)DATAFRAME_SQL_INTEGRATION_ID(5-5)DEEPNOTE_TO_INTEGRATION_TYPE(18-21)src/webviews/webview-side/integrations/types.ts (2)
IntegrationWithStatus(29-35)IntegrationStatus(3-3)
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (3)
src/platform/notebooks/deepnote/types.ts (2)
IIntegrationStorage(6-6)IIntegrationStorage(7-42)src/notebooks/types.ts (2)
IDeepnoteNotebookManager(28-28)IDeepnoteNotebookManager(29-39)src/platform/notebooks/deepnote/integrationTypes.ts (2)
DATAFRAME_SQL_INTEGRATION_ID(5-5)DEEPNOTE_TO_INTEGRATION_TYPE(18-21)
src/notebooks/deepnote/integrations/integrationWebview.ts (4)
src/platform/notebooks/deepnote/types.ts (2)
IIntegrationStorage(6-6)IIntegrationStorage(7-42)src/notebooks/types.ts (2)
IDeepnoteNotebookManager(28-28)IDeepnoteNotebookManager(29-39)src/platform/notebooks/deepnote/integrationTypes.ts (2)
IntegrationWithStatus(79-91)INTEGRATION_TYPE_TO_DEEPNOTE(26-29)src/webviews/webview-side/integrations/types.ts (1)
IntegrationWithStatus(29-35)
🪛 GitHub Check: TypeCheck
src/notebooks/deepnote/sqlCellStatusBarProvider.ts
[failure] 29-29:
'mapDeepnoteIntegrationType' is declared but its value is never read.
[failure] 29-29:
'"../../platform/notebooks/deepnote/integrationTypes"' has no exported member named 'mapDeepnoteIntegrationType'. Did you mean 'DEEPNOTE_TO_INTEGRATION_TYPE'?
⏰ 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 & Package Extension
- GitHub Check: Lint & Format
🔇 Additional comments (16)
cspell.json (1)
32-32: LGTM!Additions appropriately alphabetized and support the new DuckDB and PostgreSQL integrations.
Also applies to: 46-46
src/platform/notebooks/deepnote/integrationTypes.ts (2)
15-21: LGTM - Mapping supports Deepnote type translation.The mapping correctly translates Deepnote integration type strings to internal enum values. Callers should handle potentially undefined lookups for unknown types.
83-90: Well-documented optional fields for prefilling.The integrationName and integrationType fields are appropriately optional and clearly documented for their prefilling purpose.
src/notebooks/deepnote/integrations/integrationDetector.ts (1)
5-10: Imports correctly updated for project-level integration logic.src/notebooks/deepnote/sqlCellStatusBarProvider.ts (3)
52-52: Correct DI injection of notebook manager.
295-307: Proper project retrieval with error handling.
309-348: Project-level integration list correctly integrated.The quick pick now uses
project.project.integrationswith proper type mapping and fallback handling.src/notebooks/deepnote/integrations/integrationWebview.ts (9)
8-8: Correct import of notebook manager interface.
11-11: Correct import of type mapping.
28-28: Appropriate projectId field for tracking.
30-34: Correct DI injection of notebook manager.
42-48: Project ID correctly captured for integration updates.The show method now accepts and stores projectId, enabling project-level integration tracking.
131-132: Type labels added for UI display.
174-180: Integration metadata correctly propagated to webview.
225-231: Form prefill data correctly included.
304-344: Project integration list update correctly handles type mapping.The method properly maps internal types to Deepnote types with warnings for unmapped types, then updates the notebook manager.
ecb0a82 to
addaa7d
Compare
There was a problem hiding this 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/deepnoteNotebookManager.ts (1)
86-103: Consider safer cloning and logging.Current issues:
- JSON serialization (line 93) drops non-serializable properties
- Missing project returns false silently without logging
Recommendations:
- Use
structuredClone()or a safe deep-clone utility- Add
logger.warnwhen project not found for debuggingApply this diff:
updateProjectIntegrations(projectId: string, integrations: ProjectIntegration[]): boolean { const project = this.originalProjects.get(projectId); if (!project) { + logger.warn(`updateProjectIntegrations: Project ${projectId} not found`); return false; } - const updatedProject = JSON.parse(JSON.stringify(project)) as DeepnoteProject; + const updatedProject = structuredClone(project) as DeepnoteProject; updatedProject.project.integrations = integrations;src/notebooks/deepnote/integrations/integrationDetector.ts (1)
45-70: Handle unknown integration types.Line 59 maps the type but doesn't validate. Unknown types produce undefined
integrationType, silently added to results.Apply this diff:
for (const projectIntegration of projectIntegrations) { const integrationId = projectIntegration.id; // Skip the internal DuckDB integration if (integrationId === DATAFRAME_SQL_INTEGRATION_ID) { continue; } + // Map the Deepnote integration type to our IntegrationType + const integrationType = DEEPNOTE_TO_INTEGRATION_TYPE[projectIntegration.type]; + if (!integrationType) { + logger.warn( + `IntegrationDetector: Unknown integration type '${projectIntegration.type}' for ${integrationId}, skipping` + ); + continue; + } + logger.debug(`IntegrationDetector: Found integration: ${integrationId} (${projectIntegration.type})`); // Check if the integration is configured const config = await this.integrationStorage.getIntegrationConfig(integrationId); - // Map the Deepnote integration type to our IntegrationType - const integrationType = DEEPNOTE_TO_INTEGRATION_TYPE[projectIntegration.type]; - const status: IntegrationWithStatus = { config: config || null, status: config ? IntegrationStatus.Connected : IntegrationStatus.Disconnected, // Include integration metadata from project for prefilling when config is null integrationName: projectIntegration.name, - integrationType: integrationType + integrationType }; integrations.set(integrationId, status); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
src/notebooks/deepnote/deepnoteNotebookManager.ts(2 hunks)src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts(1 hunks)src/notebooks/deepnote/integrations/integrationDetector.ts(3 hunks)src/notebooks/deepnote/integrations/integrationWebview.ts(8 hunks)src/notebooks/deepnote/sqlCellStatusBarProvider.ts(4 hunks)src/notebooks/types.ts(2 hunks)src/platform/notebooks/deepnote/integrationTypes.ts(2 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
.tsfiles (not suffixed with.nodeor.web)
Files:
src/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/integrations/integrationWebview.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.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 withCancellationToken
**/*.{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/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/integrations/integrationWebview.tssrc/notebooks/deepnote/deepnoteNotebookManager.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/notebooks/deepnote/integrationTypes.ts
src/notebooks/deepnote/**
📄 CodeRabbit inference engine (CLAUDE.md)
Deepnote integration code resides under src/notebooks/deepnote/
Files:
src/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/integrations/integrationWebview.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts
src/notebooks/deepnote/deepnoteNotebookManager.ts
📄 CodeRabbit inference engine (CLAUDE.md)
deepnoteNotebookManager.ts handles Deepnote notebook state management
Files:
src/notebooks/deepnote/deepnoteNotebookManager.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/deepnoteNotebookManager.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
thenproperty to avoid hanging tests
Files:
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts
🧠 Learnings (2)
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteTypes.ts : deepnoteTypes.ts contains Deepnote-related type definitions
Applied to files:
src/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/types.ts
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteNotebookManager.ts : deepnoteNotebookManager.ts handles Deepnote notebook state management
Applied to files:
src/notebooks/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.ts
🧬 Code graph analysis (5)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
src/webviews/webview-side/integrations/types.ts (1)
IntegrationType(1-1)
src/notebooks/deepnote/deepnoteNotebookManager.ts (3)
src/notebooks/types.ts (1)
ProjectIntegration(31-35)src/notebooks/deepnote/deepnoteSerializer.ts (1)
DeepnoteProject(10-10)src/notebooks/deepnote/deepnoteTypes.ts (1)
DeepnoteProject(12-12)
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (3)
src/platform/notebooks/deepnote/types.ts (2)
IIntegrationStorage(6-6)IIntegrationStorage(7-42)src/notebooks/types.ts (2)
IDeepnoteNotebookManager(37-37)IDeepnoteNotebookManager(38-58)src/platform/notebooks/deepnote/integrationTypes.ts (1)
DEEPNOTE_TO_INTEGRATION_TYPE(18-21)
src/notebooks/deepnote/integrations/integrationWebview.ts (3)
src/notebooks/types.ts (3)
IDeepnoteNotebookManager(37-37)IDeepnoteNotebookManager(38-58)ProjectIntegration(31-35)src/platform/notebooks/deepnote/integrationTypes.ts (2)
IntegrationWithStatus(79-91)INTEGRATION_TYPE_TO_DEEPNOTE(26-29)src/webviews/webview-side/integrations/types.ts (1)
IntegrationWithStatus(29-35)
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts (2)
src/notebooks/deepnote/deepnoteSerializer.ts (1)
DeepnoteProject(10-10)src/notebooks/deepnote/deepnoteTypes.ts (1)
DeepnoteProject(12-12)
🔇 Additional comments (11)
src/notebooks/types.ts (2)
28-35: LGTM: Clean interface definition.The
ProjectIntegrationinterface is well-structured with clear field types.
46-54: LGTM: Proper error signaling.The boolean return value and comprehensive JSDoc address the previous review feedback effectively. Callers can now handle missing projects explicitly.
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts (1)
186-272: LGTM: Comprehensive test coverage.The test suite covers all critical paths: successful updates, replacements, empty arrays, unknown projects, and property preservation. Boolean assertions use
strictEqualas per guidelines.src/platform/notebooks/deepnote/integrationTypes.ts (2)
23-29: LGTM: Exhaustive mapping.The mapped type
{ [type in IntegrationType]: string }ensures all enum members are covered at compile time.
83-90: LGTM: Well-documented optional fields.The JSDoc clearly explains when these fields are used.
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (2)
25-29: LGTM: Clean imports.The imports are correct. Previous issue with
mapDeepnoteIntegrationTypehas been resolved.
294-347: LGTM: Robust project-based integration handling.The implementation properly:
- Validates project existence
- Uses project.project.integrations as source
- Handles unknown types with fallback to raw type string
- Skips internal DuckDB from project list
src/notebooks/deepnote/integrations/integrationWebview.ts (4)
28-28: LGTM: Property addition.The
projectIdproperty properly tracks the current project context.
42-48: LGTM: Updated signature with projectId.The method now accepts
projectIdas first parameter and stores it for later use. Signature aligns with the updated flow.
131-132: LGTM: Localization additions.Type labels for PostgreSQL and BigQuery properly added to localization payload.
304-353: LGTM: Comprehensive project integration sync.The method properly:
- Guards against missing projectId
- Filters out integrations without types
- Maps types via INTEGRATION_TYPE_TO_DEEPNOTE
- Uses type guard for null filtering
- Handles and logs update failures
- Shows user-facing error when project not found
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (1)
1-30: Group third-party imports together.Blank line on line 20 should be removed (vscode and inversify are both third-party), then add blank line after inversify before local imports.
Apply this diff:
} from 'vscode'; import { inject, injectable } from 'inversify'; - import { IExtensionSyncActivationService } from '../../platform/activation/types';As per coding guidelines
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
src/notebooks/deepnote/integrations/integrationDetector.ts(3 hunks)src/notebooks/deepnote/sqlCellStatusBarProvider.ts(4 hunks)src/platform/notebooks/deepnote/integrationTypes.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/!(*.node|*.web).ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Place shared cross-platform logic in common
.tsfiles (not suffixed with.nodeor.web)
Files:
src/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.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 withCancellationToken
**/*.{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/platform/notebooks/deepnote/integrationTypes.tssrc/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.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/notebooks/deepnote/integrationTypes.ts
src/notebooks/deepnote/**
📄 CodeRabbit inference engine (CLAUDE.md)
Deepnote integration code resides under src/notebooks/deepnote/
Files:
src/notebooks/deepnote/integrations/integrationDetector.tssrc/notebooks/deepnote/sqlCellStatusBarProvider.ts
🧠 Learnings (2)
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteTypes.ts : deepnoteTypes.ts contains Deepnote-related type definitions
Applied to files:
src/platform/notebooks/deepnote/integrationTypes.ts
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteNotebookManager.ts : deepnoteNotebookManager.ts handles Deepnote notebook state management
Applied to files:
src/notebooks/deepnote/sqlCellStatusBarProvider.ts
🧬 Code graph analysis (3)
src/platform/notebooks/deepnote/integrationTypes.ts (1)
src/webviews/webview-side/integrations/types.ts (1)
IntegrationType(1-1)
src/notebooks/deepnote/integrations/integrationDetector.ts (2)
src/platform/notebooks/deepnote/integrationTypes.ts (3)
IntegrationWithStatus(81-93)DATAFRAME_SQL_INTEGRATION_ID(5-5)DEEPNOTE_TO_INTEGRATION_TYPE(28-31)src/webviews/webview-side/integrations/types.ts (2)
IntegrationWithStatus(29-35)IntegrationStatus(3-3)
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (3)
src/platform/notebooks/deepnote/types.ts (2)
IIntegrationStorage(6-6)IIntegrationStorage(7-42)src/notebooks/types.ts (2)
IDeepnoteNotebookManager(37-37)IDeepnoteNotebookManager(38-58)src/platform/notebooks/deepnote/integrationTypes.ts (2)
DATAFRAME_SQL_INTEGRATION_ID(5-5)DEEPNOTE_TO_INTEGRATION_TYPE(28-31)
🔇 Additional comments (5)
src/platform/notebooks/deepnote/integrationTypes.ts (2)
15-31: Bidirectional mappings implemented correctly.The use of
satisfies { [type in IntegrationType]: string }ensures exhaustiveness, andRawIntegrationTypeprovides type-safe reverse lookup. Well done.
85-92: Extension of IntegrationWithStatus is clear and well-documented.Optional fields with explicit purpose for prefilling when config is absent.
src/notebooks/deepnote/integrations/integrationDetector.ts (1)
27-84: Project-level integration detection implemented correctly.Unknown types handled with explicit warning. Type assertion necessary for external data. Logic is defensive and clear.
src/notebooks/deepnote/sqlCellStatusBarProvider.ts (2)
48-52: Dependency injection for notebookManager added correctly.Proper use of @Inject decorator and IDeepnoteNotebookManager interface.
337-339: Type mapping and label resolution implemented correctly.Type assertion necessary for external data. Fallback to raw type if mapping not found is defensive.
There was a problem hiding this 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 (2)
src/notebooks/deepnote/deepnoteNotebookManager.ts (2)
93-93: Replace JSON serialization with structuredClone.
JSON.parse(JSON.stringify())drops non-serializable properties (functions, undefined, symbols). UsestructuredClonefor safer deep cloning.Apply this diff:
- const updatedProject = JSON.parse(JSON.stringify(project)) as DeepnoteProject; + const updatedProject = structuredClone(project) as DeepnoteProject;
89-91: Add logging for missing project.Returning
falsehandles the error, but logging helps debugging when projects aren't found.if (!project) { + // Consider: this.logger.warn(`Project not found: ${projectId}`); return false; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
src/notebooks/deepnote/deepnoteNotebookManager.ts(2 hunks)src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts(1 hunks)src/notebooks/types.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/!(*.node|*.web).ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Place shared cross-platform logic in common
.tsfiles (not suffixed with.nodeor.web)
Files:
src/notebooks/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Usel10n.t()for user-facing strings
Use typed error classes fromsrc/platform/errors/when throwing or handling errors
Use theILoggerservice instead ofconsole.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 withCancellationToken
**/*.{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/notebooks/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts
src/notebooks/deepnote/**
📄 CodeRabbit inference engine (CLAUDE.md)
Deepnote integration code resides under src/notebooks/deepnote/
Files:
src/notebooks/deepnote/deepnoteNotebookManager.tssrc/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts
src/notebooks/deepnote/deepnoteNotebookManager.ts
📄 CodeRabbit inference engine (CLAUDE.md)
deepnoteNotebookManager.ts handles Deepnote notebook state management
Files:
src/notebooks/deepnote/deepnoteNotebookManager.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/deepnoteNotebookManager.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
thenproperty to avoid hanging tests
Files:
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts
🧠 Learnings (2)
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteTypes.ts : deepnoteTypes.ts contains Deepnote-related type definitions
Applied to files:
src/notebooks/types.ts
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteNotebookManager.ts : deepnoteNotebookManager.ts handles Deepnote notebook state management
Applied to files:
src/notebooks/types.tssrc/notebooks/deepnote/deepnoteNotebookManager.ts
🧬 Code graph analysis (2)
src/notebooks/deepnote/deepnoteNotebookManager.ts (2)
src/notebooks/types.ts (1)
ProjectIntegration(31-35)src/platform/deepnote/deepnoteTypes.ts (1)
DeepnoteProject(12-12)
src/notebooks/deepnote/deepnoteNotebookManager.unit.test.ts (2)
src/kernels/execution/cellExecution.ts (1)
result(69-71)src/platform/deepnote/deepnoteTypes.ts (1)
DeepnoteProject(12-12)
⏰ 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). (1)
- GitHub Check: copilot-setup-steps
🔇 Additional comments (2)
src/notebooks/types.ts (2)
28-35: LGTM!The interface is well-defined with clear fields and documentation.
46-54: LGTM!The method signature properly returns a boolean for error handling and the JSDoc clearly documents the behavior when the project doesn't exist.
saltenasl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! working well
Also pre-fills name based on the project integration list
Summary by CodeRabbit
New Features
Refactor
Tests