Skip to content

Conversation

@tnaum-ms
Copy link
Collaborator

@tnaum-ms tnaum-ms commented Dec 5, 2025

This pull request updates documentation and localization to clarify and improve the user experience for managing Azure accounts, tenants, and resource filtering in the service discovery extension. The main themes are improved guidance for wizard context persistence, a more detailed and accurate account/tenant management flow, and better filtering explanations. Localization keys are also updated to match these changes.

Documentation improvements for Azure account and tenant management:

  • Expanded the "Managing Azure Accounts" section to cover tenant management, providing a step-by-step wizard flow for selecting accounts and signing in to tenants, with updated UI examples and clearer instructions.
  • Enhanced the filtering documentation to clarify how users select tenants and subscriptions, including updated multi-tenant and single-tenant flows, and detailed UI examples.
  • Improved the explanation of how filter persistence works in both the Service Discovery panel and the "Add New Connection" wizard, making the behavior more predictable for users.

Wizard implementation guidance:

  • Added a new section to .github/copilot-instructions.md explaining how the AzureWizard framework handles back navigation and context property persistence, with code examples and patterns for ensuring cached data survives navigation.

Localization updates for new flows and UI:

  • Updated and added localization keys to support new account/tenant selection UI, sign-in status, error messages, and management actions, ensuring the UI matches the revised documentation and flows. [1] [2] [3] [4] [5] [6] [7] [8] [9]

@tnaum-ms tnaum-ms added this to the 0.6.2 milestone Dec 10, 2025
@tnaum-ms tnaum-ms marked this pull request as ready for review December 10, 2025 15:35
@tnaum-ms tnaum-ms requested a review from a team as a code owner December 10, 2025 15:35
Copilot AI review requested due to automatic review settings December 10, 2025 15:35
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

This PR fixes a critical issue where users were unable to deselect all tenants in the tenant filtering wizard. The core problem was that getTenantFilteredSubscriptions would fall back to returning all subscriptions when filtering resulted in an empty list, making it impossible to filter out all tenants. The PR also refactors the credentials management workflow to support per-tenant sign-in and adds comprehensive telemetry tracking with journey correlation IDs.

Key Changes

  • Tenant Filtering Fix: Removed fallback logic in getTenantFilteredSubscriptions and added proper handling for empty tenant selection in ExecuteStep to clear all filtering
  • Credentials Management Refactor: Split account management into three steps (SelectAccountStep → AccountTenantsStep → TenantActionStep) to enable per-tenant authentication
  • Telemetry Enhancement: Added journey correlation ID tracking across discovery flows and standardized telemetry property names (discoveryProviderId instead of discoveryProvider)

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/commandTelemetry.ts New utility for tracking journey correlation IDs in telemetry
src/tree/documentdb/ClusterItemBase.ts Added journeyCorrelationId property for telemetry funnel analysis
src/plugins/service-azure-vm/discovery-tree/vm/AzureVMResourceItem.ts Added journey correlation tracking and standardized telemetry properties
src/plugins/service-azure-vm/discovery-tree/AzureSubscriptionItem.ts Pass journey correlation ID to child items and add enhanced telemetry
src/plugins/service-azure-vm/discovery-tree/AzureServiceRootItem.ts Generate journey correlation ID and support filter option in empty state
src/plugins/service-azure-vm/config.ts New config file centralizing provider constants
src/plugins/service-azure-vm/AzureVMDiscoveryProvider.ts Use centralized config constants
src/plugins/service-azure-mongo-vcore/discovery-tree/documentdb/DocumentDBResourceItem.ts Add journey correlation tracking and standardized telemetry
src/plugins/service-azure-mongo-vcore/discovery-tree/AzureSubscriptionItem.ts Pass journey correlation ID and add enhanced telemetry
src/plugins/service-azure-mongo-vcore/discovery-tree/AzureServiceRootItem.ts Generate journey correlation ID and support filter option
src/plugins/service-azure-mongo-vcore/config.ts New config file with provider constants
src/plugins/service-azure-mongo-vcore/AzureDiscoveryProvider.ts Use centralized config constants
src/plugins/service-azure-mongo-ru/discovery-wizard/AzureMongoRUExecuteStep.ts Standardize telemetry property name
src/plugins/service-azure-mongo-ru/discovery-tree/documentdb/MongoRUResourceItem.ts Add journey correlation tracking and standardized telemetry
src/plugins/service-azure-mongo-ru/discovery-tree/AzureMongoRUSubscriptionItem.ts Pass journey correlation ID and add telemetry
src/plugins/service-azure-mongo-ru/discovery-tree/AzureMongoRUServiceRootItem.ts Generate journey correlation ID and support filter option
src/plugins/service-azure-mongo-ru/config.ts New config file with provider constants
src/plugins/service-azure-mongo-ru/AzureMongoRUDiscoveryProvider.ts Use centralized config constants
src/plugins/api-shared/azure/wizard/SelectSubscriptionStep.ts Add filter option to empty state and improve UI labels
src/plugins/api-shared/azure/subscriptionFiltering/subscriptionFilteringHelpers.ts Core fix: Remove fallback logic that prevented deselecting all tenants
src/plugins/api-shared/azure/subscriptionFiltering/configureAzureSubscriptionFilter.ts Change error handling to log instead of throw
src/plugins/api-shared/azure/subscriptionFiltering/InitializeFilteringStep.ts Filter to authenticated tenants only and improve empty state handling
src/plugins/api-shared/azure/subscriptionFiltering/FilterTenantSubStep.ts Update UI text with clearer messaging
src/plugins/api-shared/azure/subscriptionFiltering/ExecuteStep.ts Core fix: Handle empty tenant selection to clear all filtering
src/plugins/api-shared/azure/credentialsManagement/index.ts Export AccountTenantsStep and TenantActionStep
src/plugins/api-shared/azure/credentialsManagement/configureAzureCredentials.ts Add AccountTenantsStep and TenantActionStep to wizard flow
src/plugins/api-shared/azure/credentialsManagement/TenantActionStep.ts Renamed from AccountActionsStep; shows navigation options for signed-in tenants
src/plugins/api-shared/azure/credentialsManagement/SelectAccountStep.ts Add tenant info caching and display tenant counts
src/plugins/api-shared/azure/credentialsManagement/CredentialsManagementWizardContext.ts Add types for tenant status tracking and initialize cache array
src/plugins/api-shared/azure/credentialsManagement/AccountTenantsStep.ts New step for selecting and signing in to specific tenants
src/plugins/api-shared/azure/askToConfigureCredentials.ts Add optional filter button to empty state dialog
src/documentdb/scrapbook/registerScrapbookCommands.ts Wrap scrapbook commands with correlation tracking
src/documentdb/ClustersExtension.ts Wrap all command registrations with correlation tracking
src/commands/openCollectionView/openCollectionView.ts Manually track journey correlation ID
src/commands/newConnection/PromptTenantStep.ts Update UI label for consistency
src/commands/addConnectionFromRegistry/addConnectionFromRegistry.ts Track journey correlation ID in telemetry
l10n/bundle.l10n.json Update localization strings for new UI text
.github/copilot-instructions.md Add wizard back navigation documentation

@tnaum-ms tnaum-ms merged commit 7693bf3 into next Dec 10, 2025
8 checks passed
@tnaum-ms tnaum-ms deleted the dev/tnaum/391-bug-unable-to-deselect-tenants-when-filtering-for-100-of-available-tenants branch December 10, 2025 16:35
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.

[BUG] Unable to deselect tenants when filtering for 100% of available tenants

3 participants