Conversation
…tations, and subscriptions
- Add `documentDB.experimental.enableAIQueryGeneration` setting in package.json with experimental tag, disabled by default - Add settings key to ext.settingsKeys in extensionVariables.ts - Pass enableAIQueryGeneration through webview configuration to collection view - Replace hardcoded ENABLE_AI_QUERY_GENERATION constant with configuration-based setting in ToolbarMainView.tsx and QueryEditor.tsx - Remove unused constants.ts file - Add experimentalFeaturesStatus telemetry event on activation Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
…on for query and mutation cancellation
…on router creation and AbortSignal support
… mutation cancellation
…al handling and telemetry integration
…registration guidance
After updating credentials, the wizard now asks the user whether they want to reconnect with the updated credentials. If the user selects "Yes", the cached client and credentials are cleared and the view is refreshed to trigger a reconnection. If the user selects "No", the credentials are saved without reconnecting. New files: - PromptReconnectStep.ts: Wizard prompt step with Yes/No QuickPick - ReconnectStep.ts: Execute step that clears cached connections - PromptReconnectStep.test.ts: Tests for the prompt step - ReconnectStep.test.ts: Tests for the reconnect execute step Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
…ervices and components
…ion and Copilot service
…o prevent DataCloneError
…e operations and subscriptions
Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
…d note on absolute paths
Extract showQuickPick mock into a local variable to avoid accessing it as context.ui.showQuickPick in expect() assertions, which triggers the @typescript-eslint/unbound-method rule. Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
Add a mandatory checklist that agents must follow before finishing work on a PR: run l10n (if user-facing strings changed), run prettier-fix for formatting, and run lint to confirm correctness. Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
…ripping in sendSafe
…cture after signal stripping
Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
- Use `detail` instead of `description` in QuickPick items - Only show reconnect prompt when there's an active session (ClustersClient.exists), not for simple credential updates - Restore always-run cache cleanup + view refresh (ReconnectStep now always executes to clear stale cached connections, matching original behavior that was a deliberate fix) - Add hasActiveSession to UpdateCredentialsWizardContext - Update tests to cover new conditional behavior Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Release 0.7.1 aggregates several user-facing improvements and infrastructure updates across the VS Code extension (commands, storage, webviews/tRPC, connection-string validation, telemetry, and documentation) to ship the patch release.
Changes:
- Improve webview tRPC transport/controller with AbortSignal-based cancellation, plus related AI-query/Query Insights cancellation plumbing.
- Enhance connection-string handling (defensive trimming, simplified credential validation) and harden storage against corrupt/invalid stored connections.
- Improve data migration discoverability (announced providers + always-visible menu) and ship release notes/docs/dep updates for
0.7.1.
Reviewed changes
Copilot reviewed 60 out of 63 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/webviews/index.tsx | Uses WebviewName type for safer webview registry keys. |
| src/webviews/documentdb/documentView/documentsViewController.ts | Updates controller construction for refactored WebviewController + renamed webview key. |
| src/webviews/documentdb/collectionView/constants.ts | Removes hard-coded AI feature flag constant. |
| src/webviews/documentdb/collectionView/components/toolbar/ToolbarMainView.tsx | Switches AI feature gating to config-driven setting via useConfiguration. |
| src/webviews/documentdb/collectionView/components/queryInsightsTab/QueryInsightsTab.tsx | Adds client-side AbortController wiring for Stage 3 AI request cancellation. |
| src/webviews/documentdb/collectionView/components/queryEditor/QueryEditor.tsx | Switches AI row gating to config-driven setting via useConfiguration. |
| src/webviews/documentdb/collectionView/collectionViewRouter.ts | Passes AbortSignal into AI service call to support server-side cancellation. |
| src/webviews/documentdb/collectionView/collectionViewController.ts | Reads experimental setting and passes enableAIQueryGeneration into webview config; updates controller construction. |
| src/webviews/api/webview-client/vscodeLink.ts | Adds AbortSignal handling and strips non-cloneable op.signal before postMessage; introduces 'abort' op type. |
| src/webviews/api/webview-client/vscodeLink.test.ts | Adds Jest coverage for vscodeLink send/receive, cleanup, concurrency, and abort behavior. |
| src/webviews/api/extension-server/trpc.ts | Adjusts telemetry middleware and records abort/canceled status for operations. |
| src/webviews/api/extension-server/WebviewController.ts | Refactors controller to own panel + CSP template and adds per-operation AbortController tracking/abort handling. |
| src/webviews/api/extension-server/WebviewBaseController.ts | Removes now-obsolete base controller after refactor. |
| src/webviews/api/configuration/appRouter.ts | Documents and formalizes ctx.signal?: AbortSignal semantics for procedures. |
| src/webviews/api/configuration/WebviewRegistry.ts | Renames registry keys and exports WebviewName union type. |
| src/tree/BaseExtendedTreeDataProvider.ts | Adds hasNodeErrorState() helper used by credential update reconnect flow. |
| src/services/migrationServices.ts | Adds announced provider support via x-announcedMigrationProviders read from package.json. |
| src/services/migrationServices.packageJson.test.ts | Adds build-time test to validate x-announcedMigrationProviders structure. |
| src/services/copilotService.ts | Adds AbortSignal→CancellationToken bridging for LLM streaming cancellation + cancellation error handling. |
| src/services/connectionStorageService.ts | Adds invalid connection-string cleanup; improves resilience/logging and avoids corrupt items breaking enumeration. |
| src/services/connectionStorageService.test.ts | Updates ext.outputChannel mocks for new logging calls. |
| src/services/connectionStorageService.orphans.test.ts | Updates ext.outputChannel mocks for new logging calls. |
| src/services/connectionStorageService.contract.test.ts | Updates ext.outputChannel mocks for new logging calls. |
| src/services/connectionStorageService.cleanup.test.ts | Updates ext.outputChannel mocks for new logging calls. |
| src/services/ai/QueryInsightsAIService.ts | Adds AbortSignal passthrough and cancellation-aware error handling. |
| src/extensionVariables.ts | Adds settings key constant for experimental AI query generation. |
| src/extension.ts | Emits activation telemetry for experimental setting status. |
| src/documentdb/utils/connectionStringHelpers.ts | Adds redactCredentialsFromConnectionString() helper and uses it in new/updated logging paths. |
| src/documentdb/utils/DocumentDBConnectionString.ts | Adds constructor-level defensive trimming before parsing. |
| src/documentdb/utils/DocumentDBConnectionString.test.ts | Adds tests for trimming behavior and validatePassword. |
| src/documentdb/ClustersExtension.ts | Registers renamed data migration command handler. |
| src/commands/updateCredentials/updateCredentials.ts | Adds reconnect prompt for error nodes and clears error state conditionally after credential update. |
| src/commands/updateCredentials/UpdateCredentialsWizardContext.ts | Extends wizard context with error-state + reconnect intent flags. |
| src/commands/updateCredentials/PromptReconnectStepForErrorNodes.ts | New prompt step offering reconnect choice when invoked from an error node. |
| src/commands/updateCredentials/PromptReconnectStepForErrorNodes.test.ts | Unit tests for reconnect prompt step behavior. |
| src/commands/updateCredentials/ExecuteStep.ts | Adds documentation clarifying the step’s responsibilities. |
| src/commands/updateConnectionString/updateConnectionString.ts | Adds documentation clarifying reconnect behavior is out of scope for this flow. |
| src/commands/updateConnectionString/ExecuteStep.ts | Trims before save and ensures confirmation isn’t shown on failure. |
| src/commands/updateConnectionString/ConnectionStringStep.ts | Uses DocumentDBConnectionString for validation; adds immediate prefix validation. |
| src/commands/newLocalConnection/mongo-ru/PromptMongoRUEmulatorConnectionStringStep.ts | Makes trimming explicit after input box per established pattern. |
| src/commands/newLocalConnection/ExecuteStep.ts | Trims before parsing; skips invalid stored connections during duplicate checking with redacted logging. |
| src/commands/newConnection/PromptUsernameStep.ts | Simplifies validation to validateUsername() without parse/serialize round-trips. |
| src/commands/newConnection/PromptPasswordStep.ts | Simplifies validation to validatePassword() without parse/serialize round-trips. |
| src/commands/newConnection/PromptConnectionStringStep.ts | Makes trimming explicit and ensures parsing uses trimmed value. |
| src/commands/newConnection/ExecuteStep.ts | Trims before parsing and hardens duplicate-check loop against corrupt stored connections with redacted logging. |
| src/commands/llmEnhancedCommands/indexAdvisorCommands.ts | Threads AbortSignal through optimization flow and preserves cancellation errors. |
| src/commands/chooseDataMigrationExtension/chooseDataMigrationExtension.ts | Removes legacy migration command implementation. |
| src/commands/accessDataMigrationServices/accessDataMigrationServices.ts | New migration command that shows installed + announced providers and opens Marketplace links. |
| package.json | Bumps version to 0.7.1; updates tRPC deps; adds experimental setting; announces migration providers; updates command/menu wiring. |
| package-lock.json | Updates lockfile for version bump and dependency updates. |
| l10n/bundle.l10n.json | Regenerated localization bundle for new/changed strings. |
| jest.config.js | Limits Jest worker count to reduce OOM risk on high-core machines. |
| docs/release-notes/0.7.md | Adds patch release notes section for v0.7.1. |
| docs/index.md | Adds link to v0.7.1 section in release notes index. |
| README.md | Documents feedback collection behavior and its relation to VS Code telemetry level. |
| CHANGELOG.md | Adds 0.7.1 changelog entry and includes connection string deduplication note in 0.7.0 fixes list. |
| .gitignore | Ignores docs/analysis and docs/plan directories. |
| .github/skills/writing-release-notes/SKILL.md | Adds explicit step to update docs/index.md for patch releases. |
| .github/skills/webview-trpc-messaging/SKILL.md | Adds repo-specific skill doc for webview↔tRPC messaging and abort semantics. |
| .github/skills/skill-creator/SKILL.md | Adds skill-creation guidance for repository Copilot skills. |
| .github/skills/react-webview-architecture/references/REACT_ARCHITECTURE_GUIDELINES.md | Updates React webview architecture reference to reflect current structure/features. |
| .github/skills/react-webview-architecture/SKILL.md | Adds summarized React webview architecture skill content. |
| .github/copilot-instructions.md | Adds PR completion checklist (l10n → prettier → lint). |
src/webviews/documentdb/collectionView/components/queryInsightsTab/QueryInsightsTab.tsx
Show resolved
Hide resolved
…tring regex Address Copilot review comment about the regex potentially leaking password fragments when passwords contain unescaped '@'. The regex is correct for spec-compliant URIs — per RFC 3986, '@' in credentials MUST be percent-encoded as '%40'. Added an explicit comment documenting this assumption.
Address Copilot review comment about the setTimeout timer in handleGetAISuggestions never being cleared. The returned cleanup function was ignored since this is an event handler, not a React effect. Fix: Store the timer ID in a useRef (stage3TipsTimerRef), clear it at the start of handleGetAISuggestions (re-trigger) and in handleCancelAI (cancel), and remove the dead return statement. This prevents stale tips/error cards from flashing when the user cancels within 1 second or rapidly re-triggers the AI request.
src/webviews/documentdb/collectionView/components/queryInsightsTab/QueryInsightsTab.tsx
Show resolved
Hide resolved
src/webviews/documentdb/collectionView/components/queryInsightsTab/QueryInsightsTab.tsx
Show resolved
Hide resolved
Dispose _onDisposed EventEmitter after firing to prevent listener leaks across webview lifecycles.
Abort stage3AbortControllerRef in the useEffect cleanup to stop server-side work and prevent stale state updates after unmount.
Abort the existing AbortController before overwriting it with a new one in handleGetAISuggestions, preventing orphaned server-side requests.
Use 'GitHub' (capital H) instead of 'Github' per branding guidelines.
Replace stale mongoClustersCollectionView/mongoClustersDocumentView references with the current collectionView/documentView keys. Update the Important note to reflect that the registry key and telemetry label may now be the same string.
Replace non-existent 'detecting-accessibility-issues' with the actual skill folder name 'accessibility-aria-expert' in both the frontmatter and the related-skills list.
tnaum-ms
added a commit
that referenced
this pull request
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improvements
documentDB.experimental.enableAIQueryGenerationsetting to control the AI query generation feature, disabled by default. Reports experimental feature status via activation telemetry. #503@trpc/clientand@trpc/serverto v11.10.0 and addsAbortSignal-based cancellation for webview operations. #320, #502Security
minimatch(3.1.2 → 3.1.4),qs, andbody-parserto address security vulnerabilities. #505, #514