diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aae55b8f..28af165ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 0.3.1 + +### Fixes + +- **Tree View Stability**: Improved the stability of the Connections View when adding or removing databases and collections. This change prevents internal warnings that could occur when displaying temporary items in the tree. [#233](https://github.com/microsoft/vscode-documentdb/pull/233) + ## 0.3.0 ### New Features & Improvements diff --git a/docs/index.md b/docs/index.md index f284c0e38..3fcac2fbf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -62,7 +62,7 @@ This section contains detailed documentation for specific features and concepts Explore the history of updates and improvements to the DocumentDB for VS Code extension. Each release brings new features, enhancements, and fixes to improve your experience. -- [0.3.0](./release-notes/0.3.0.md) +- [0.3](./release-notes/0.3.md) - [0.2.4](./release-notes/0.2.4.md) - [0.2.3](./release-notes/0.2.3.md) - [0.2.2](./release-notes/0.2.2.md) diff --git a/docs/release-notes/0.3.0.md b/docs/release-notes/0.3.md similarity index 71% rename from docs/release-notes/0.3.0.md rename to docs/release-notes/0.3.md index fa9032155..bde2492a1 100644 --- a/docs/release-notes/0.3.0.md +++ b/docs/release-notes/0.3.md @@ -1,14 +1,14 @@ -> **Release Notes** — [Back to Release Notes Index](./index) +> **Release Notes** — [Back to Home](../index.md) --- -# DocumentDB for VS Code Extension v0.3.0 +# DocumentDB for VS Code Extension v0.3 -We are excited to announce the release of **DocumentDB for VS Code Extension v0.3.0**. This release introduces a major new feature: support for **Microsoft Entra ID** authentication with **Azure Cosmos DB for MongoDB (vCore)** clusters. This enhances security for enterprise scenarios and aligns with modern identity management practices. +We are excited to announce the release of **DocumentDB for VS Code Extension v0.3**. This release introduces a major new feature: support for **Microsoft Entra ID** authentication with **Azure Cosmos DB for MongoDB (vCore)** clusters. This enhances security for enterprise scenarios and aligns with modern identity management practices. -## What's New in v0.3.0 +## What's New in v0.3 ### ⭐ **Support for Entra ID for Azure Cosmos DB for MongoDB (vCore)** ([#123](https://github.com/microsoft/vscode-documentdb/issues/123)) @@ -44,3 +44,20 @@ To help guide you, if the provided hostname is not recognized as an Azure Cosmos See the full changelog entry for this release: ➡️ [CHANGELOG.md#030](https://github.com/microsoft/vscode-documentdb/blob/main/CHANGELOG.md#030) + +--- + +## Patch Release v0.3.1 + +This patch release includes a fix to improve the stability of the extension. + +### What's Fixed in v0.3.1 + +#### 🐛 **Tree View Stability** ([#233](https://github.com/microsoft/vscode-documentdb/pull/233)) + +We've improved the stability of the **Connections View** when adding or removing databases and collections. This change prevents internal warnings that could occur when displaying temporary items in the tree, ensuring a smoother experience when managing your connections. + +### Changelog + +See the full changelog entry for this release: +➡️ [CHANGELOG.md#031](https://github.com/microsoft/vscode-documentdb/blob/main/CHANGELOG.md#031) diff --git a/package-lock.json b/package-lock.json index 5e8772967..ffef3bfc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-documentdb", - "version": "0.3.0", + "version": "0.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-documentdb", - "version": "0.3.0", + "version": "0.3.1", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@azure/arm-compute": "^22.4.0", diff --git a/package.json b/package.json index efdf7921d..32a727d80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vscode-documentdb", - "version": "0.3.0", + "version": "0.3.1", "aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255", "publisher": "ms-azuretools", "displayName": "DocumentDB for VS Code", diff --git a/src/tree/discovery-view/DiscoveryBranchDataProvider.ts b/src/tree/discovery-view/DiscoveryBranchDataProvider.ts index 1f8e62b71..3128dd6ce 100644 --- a/src/tree/discovery-view/DiscoveryBranchDataProvider.ts +++ b/src/tree/discovery-view/DiscoveryBranchDataProvider.ts @@ -260,7 +260,9 @@ export class DiscoveryBranchDataProvider extends vscode.Disposable implements Ex ) as TreeElement; // Register parent-child relationship in the cache - if (element.id && wrappedChild.id) { + // Note: The check for `typeof wrappedChild.id === 'string'` is necessary because `wrapItemInStateHandling` + // can process temporary nodes that don't have an `id` property, which would otherwise cause a runtime error. + if (element.id && typeof wrappedChild.id === 'string') { this.parentCache.registerRelationship(element, wrappedChild); } diff --git a/src/tree/documentdb/ClusterItemBase.ts b/src/tree/documentdb/ClusterItemBase.ts index 5e36cb301..b26959b62 100644 --- a/src/tree/documentdb/ClusterItemBase.ts +++ b/src/tree/documentdb/ClusterItemBase.ts @@ -165,7 +165,13 @@ export abstract class ClusterItemBase * @returns True if any child in the array is an error node, false otherwise. */ public hasRetryNode(children: TreeElement[] | null | undefined): boolean { - return !!(children && children.length > 0 && children.some((child) => child.id.endsWith('/reconnect'))); + // Note: The check for `typeof child.id === 'string'` is necessary because `showCreatingChild` + // can add temporary nodes that don't have an `id` property, which would otherwise cause a runtime error. + return !!( + children && + children.length > 0 && + children.some((child) => typeof child.id === 'string' && child.id.endsWith('/reconnect')) + ); } /**