Skip to content

Release 0.7.1#517

Merged
tnaum-ms merged 102 commits intomainfrom
next
Mar 9, 2026
Merged

Release 0.7.1#517
tnaum-ms merged 102 commits intomainfrom
next

Conversation

@tnaum-ms
Copy link
Collaborator

Improvements

  • Data Migration Discoverability: The "Data Migration…" menu is now always visible on cluster nodes and introduces announced providers infrastructure to help users discover and install migration extensions from the Marketplace. #515
  • Reconnect Prompt After Credential Update: Offers a reconnect prompt when updating credentials from an error recovery node, so users no longer need to manually retry the connection. #504
  • Experimental AI Query Generation Setting: Adds documentDB.experimental.enableAIQueryGeneration setting to control the AI query generation feature, disabled by default. Reports experimental feature status via activation telemetry. #503
  • tRPC Upgrade and Abort Signal Support: Upgrades @trpc/client and @trpc/server to v11.10.0 and adds AbortSignal-based cancellation for webview operations. #320, #502
  • Connection String Validation: Adds defensive trimming (including BOM, NBSP) at all input entry points and simplifies credential validation to avoid unnecessary parse/serialize round-trips. #511
  • Feedback Collection Documentation: Documents how the extension collects user feedback and its relation to VS Code's global telemetry setting in the README. #509

Security

  • Dependency Updates: Updates minimatch (3.1.2 → 3.1.4), qs, and body-parser to address security vulnerabilities. #505, #514

tnaum-ms and others added 30 commits February 10, 2026 12:50
- 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>
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>
Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
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>
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>
@tnaum-ms tnaum-ms marked this pull request as ready for review February 25, 2026 16:32
@tnaum-ms tnaum-ms requested a review from a team as a code owner February 25, 2026 16:32
Copilot AI review requested due to automatic review settings February 25, 2026 16:32
@tnaum-ms tnaum-ms changed the title Release 0.7.1 [WIP] Release 0.7.1 Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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).

…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.
@tnaum-ms tnaum-ms changed the title [WIP] Release 0.7.1 Release 0.7.1 Mar 9, 2026
@tnaum-ms tnaum-ms requested a review from Copilot March 9, 2026 11:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 60 out of 63 changed files in this pull request and generated 8 comments.

tnaum-ms added 7 commits March 9, 2026 12:31
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 tnaum-ms merged commit 66878dc into main Mar 9, 2026
16 of 18 checks passed
tnaum-ms added a commit that referenced this pull request Mar 9, 2026
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