-
Notifications
You must be signed in to change notification settings - Fork 4
Fix: Unable to deselect tenants when filtering for all available tenants #415
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
Fix: Unable to deselect tenants when filtering for all available tenants #415
Conversation
…to sign in on 0 subscriptions found
…ing a new connecdtion [wip]
…enant / subscription filterin
… flow when user attempts to use service discovery
…eature improvements
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.
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
getTenantFilteredSubscriptionsand added proper handling for empty tenant selection inExecuteStepto 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 (
discoveryProviderIdinstead ofdiscoveryProvider)
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 |
src/plugins/api-shared/azure/subscriptionFiltering/configureAzureSubscriptionFilter.ts
Show resolved
Hide resolved
…-when-filtering-for-100-of-available-tenants
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:
Wizard implementation guidance:
.github/copilot-instructions.mdexplaining 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: