Repository navigation
Open Azure resources and the dashboard or shell from deep links (/connect/azure, open=) - #1067
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…WI6) Co-authored-by: Copilot <[email protected]>
…pen= (WI2) Co-authored-by: Copilot <[email protected]>
…WI4) Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…ion (WI7) Co-authored-by: Copilot <[email protected]>
…a /connect link (WI9) Co-authored-by: Copilot <[email protected]>
…(WI11) Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…e README Co-authored-by: Copilot <[email protected]>
…ough the expansion (WI8, D0015)
reveal(..., { expand: true }) awaits the node's children, so the expansion runs the
connect flow once and the node stays expanded after a failure or cancel.
Co-authored-by: Copilot <[email protected]>
…ource ID values Backs the encoding rules in the public URL guide. Co-authored-by: Copilot <[email protected]>
…th examples Database and collection names with spaces, &, + or non-ASCII letters break when encoded once; the guide now says so and shows how to build links in code. Co-authored-by: Copilot <[email protected]>
…pdate WI8 notes Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
✅ CI passed: standard tier (ready PR)Commit
Full run: add the Code quality
Build sizeNo page, activation, VSIX or other bundle size changed by 5% or 50 KiB or more against Artifacts: VSIX | Bundle-reports-42905838326 | L1-manifest-report-42905838326 All graphs (exact bytes)
Packaged bytes. Shared chunks count in every graph that loads them, so rows do not add up. Updated in place on every run. |
…n lookup The confirmation waited for Azure sign-in, the subscription listing across all accounts and the ARM read, so it appeared long after the click. It now shows right after the link is parsed, with what the link carries. Filter changes, known only after the lookup, keep their own confirmation before they apply. Co-authored-by: Copilot <[email protected]>
One info line per link names the action, the source and the parameters present; trace lines follow each step. Parameter values, connection strings and Azure IDs are never logged. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…e detail
Every deep-link confirmation had a full sentence as its title. Titles now name the
decision ("Sign in", "Add connection?", "Open Azure resource?"), and the
explanation is the first line of the detail. Buttons and flow are unchanged.
Co-authored-by: Copilot <[email protected]>
…otification After the user confirmed an Azure link, nothing was visible while the extension checked sign-in, listed subscriptions, read the resource and found the cluster. One notification now names each step, replaces the reveal helper's own notification, and can be cancelled between steps. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
The notification shows title and step on one line, and a long cluster name appeared in both. The title is now "Opening from Azure" and steps name no resource, database or collection. Co-authored-by: Copilot <[email protected]>
A new connection with a collection asked to add it, to open it, and to open the Collection View, each repeating the same target. One always-shown "Add and open connection?" now names the target and what opens; a saved connection gets one "Open connection?" when confirmations are on. The TLS question is unchanged. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Add optional source tags and correlate arrivals, connection attempts, destination sessions, cancellations, failures, phase timings and filter changes so published links can be measured end to end. Document the telemetry contract and cover it with regression tests. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Overlapping dashboard links can release shared suppression before all owners finish, allowing an automatic dashboard to open during another link’s expansion.
8 open issues
Reference-count overlapping cluster suppression acquisitions · New Reset connection outcome before each connection attempt · New Treat canceled tenant sign-in as deep-link cancellation · New Verify the effective subscription filter before reporting success · New Remove resource-name logging or revise the privacy promise · New Stop descendant reveals after a canceled connection · New Avoid logging database and collection parameter values · New Use exact matching when resolving collection names · New
What changed in this PR
Adds Azure resource-ID deep links for Azure DocumentDB and Azure Cosmos DB for MongoDB (RU), plus explicit dashboard/shell destinations and publisher-attributed telemetry across connection and destination sessions.
Changes:
- Adds Azure resource validation, sign-in and subscription resolution, visibility updates, and Discovery navigation.
- Propagates link correlation, connection outcomes, and attribution through commands, shells, webviews, and Local setup.
- Centralizes connection-failure diagnostics and expands tests and deep-link documentation.
This pull request requires changes. Unresolved findings affect dashboard suppression, cancellation, navigation, filter persistence, attribution, logging, and test coverage. Live Azure/workbench validation also remains pending.
| File | Description |
|---|---|
src/webviews/documentdb/localQuickStart/wizardTelemetry.ts |
Adds link attribution to wizard step and close events. |
src/webviews/documentdb/localQuickStart/localQuickStartController.ts |
Passes attribution into wizard sessions and RPC context. |
src/webviews/documentdb/collectionView/collectionViewController.ts |
Adds attribution to Collection View context. |
src/webviews/documentdb/clusterDashboard/clusterDashboardController.ts |
Stores originating attribution for dashboard sessions. |
src/webviews/documentdb/clusterDashboard/clusterDashboardController.test.ts |
Tests attribution preservation during panel reuse. |
src/webviews/_integration/trpc.ts |
Adds link attribution to RPC telemetry. |
src/webviews/_integration/trpc.test.ts |
Tests RPC attribution on success and failure. |
src/webviews/_integration/appRouter.ts |
Attributes webview-reported events and errors. |
src/tree/TreeParentCache.ts |
Adds cached direct-child enumeration. |
src/tree/TreeParentCache.test.ts |
Tests child enumeration and cache pruning. |
src/tree/documentdb/ClusterItemBase.ts |
Tracks connection outcomes and startup IDs; checks dashboard suppression. |
src/tree/documentdb/ClusterItemBase.test.ts |
Tests suppression and startup callback wiring. |
src/tree/documentdb/autoOpenDashboardSuppression.ts |
Adds cluster-scoped automatic-dashboard suppression. |
src/tree/documentdb/autoOpenDashboardSuppression.test.ts |
Tests suppression lifecycle and cluster isolation. |
src/tree/discovery-view/discoveryViewHelpers.ts |
Reveals Azure clusters and navigates to requested databases or collections. |
src/tree/connections-view/LocalQuickStart/LocalQuickStartItem.credentials.test.ts |
Updates startup callback expectations. |
src/tree/connections-view/DocumentDBClusterItem.ts |
Records cancellation and uses shared failure diagnostics. |
src/tree/connections-view/connectionsViewHelpers.ts |
Adds folder-aware navigation and connection-attempt tracking. |
src/tree/connections-view/connectionsViewHelpers.test.ts |
Tests nested paths and failed-node recovery. |
src/tree/BaseExtendedTreeDataProvider.ts |
Exposes cached children without fetching. |
src/tree/azure-resources-view/mongo-ru/RUCoreResourceItem.ts |
Uses shared first-connect failure diagnostics. |
src/tree/azure-resources-view/documentdb/VCoreResourceItem.ts |
Uses shared first-connect failure diagnostics. |
src/plugins/service-kubernetes/discovery-tree/documentdb/KubernetesResourceItem.ts |
Routes connection failures through shared diagnostics before cleanup. |
src/plugins/service-azure-vm/discovery-tree/vm/AzureVMResourceItem.ts |
Uses shared diagnostics with VM-specific fallback wording. |
src/plugins/service-azure-mongo-vcore/discovery-tree/documentdb/DocumentDBResourceItem.ts |
Records prompt cancellation and translates connection failures. |
src/plugins/service-azure-mongo-ru/discovery-tree/documentdb/MongoRUResourceItem.ts |
Records cancellation and uses shared failure diagnostics. |
src/plugins/service-atlas-mongodb/discovery-tree/AtlasClusterItem.ts |
Uses shared diagnostics for generic connection failures. |
src/documentdb/srv/SrvDnsDiagnosticsProvider.ts |
Adjusts quotation formatting in DNS guidance. |
src/documentdb/showClusterConnectFailure.ts |
Centralizes diagnostic-aware first-connect failure dialogs. |
src/documentdb/showClusterConnectFailure.test.ts |
Tests diagnoses, fallback text, buttons, and sequencing. |
src/documentdb/shell/DocumentDBShellPty.ts |
Attributes shell lifecycle events and instruments startup outcomes. |
src/documentdb/shell/DocumentDBShellPty.test.ts |
Tests link attribution during shell startup. |
src/documentdb/ClustersClient.ts |
Exposes startup correlation IDs through a callback. |
src/documentdb/ClustersClient.test.ts |
Tests startup correlation delivery on failure. |
src/documentdb/auth/urlEncodedPassword.ts |
Integrates shared diagnostics into decoded-password retry prompts. |
src/documentdb/auth/urlEncodedPassword.test.ts |
Tests diagnostics alongside password-retry guidance. |
src/documentdb/auth/entraErrors/entraErrorRules.ts |
Clarifies authentication workaround wording. |
src/documentdb/auth/entraErrors/EntraDiagnosticsProvider.test.ts |
Updates authentication guidance assertions. |
src/deepLinks/handleAzureResourceLink.ts |
Orchestrates Azure confirmations, progress, lookup, filters, and reveal. |
src/deepLinks/deepLinkTelemetry.ts |
Defines attribution, outcomes, correlation, and phase timing. |
src/deepLinks/deepLinkTelemetry.test.ts |
Tests source validation and telemetry helpers. |
src/deepLinks/azureVisibility.ts |
Computes and applies persistent visibility changes. |
src/deepLinks/azureVisibility.test.ts |
Tests filter preservation and applied-change tracking. |
src/deepLinks/azureSubscription.ts |
Resolves subscriptions and manages sign-in prompts. |
src/deepLinks/azureSubscription.test.ts |
Tests account resolution and sign-in branches. |
src/deepLinks/azureResourceLink.ts |
Parses and validates supported ARM resource IDs and tenant hints. |
src/deepLinks/azureResourceLink.test.ts |
Tests resource types, casing, and malformed IDs. |
src/deepLinks/azureResource.ts |
Reads Azure resources and translates ARM failures. |
src/deepLinks/azureResource.test.ts |
Tests resource reads, API validation, and error mapping. |
src/commands/openInteractiveShell/openInteractiveShell.ts |
Accepts link attribution and returns shell-opening/session results. |
src/commands/openInteractiveShell/openInteractiveShell.test.ts |
Tests attributed shell opens and returned session IDs. |
src/commands/openCollectionView/openCollectionView.ts |
Records collection-session identity and forwards attribution. |
src/commands/openCollectionView/openCollectionView.test.ts |
Tests session correlation and attribution forwarding. |
src/commands/openClusterDashboard/openClusterDashboard.ts |
Returns opening outcomes and dashboard-session joins. |
src/commands/localQuickStart/openLocalQuickStart.ts |
Forwards link attribution to Local setup. |
src/commands/localQuickStart/openLocalQuickStart.test.ts |
Updates webview invocation assertions. |
docs/user-manual/how-to-construct-url.md |
Documents Azure links, destinations, attribution, and encoding. |
docs/ai-and-plans/README.md |
Adds the deep-links feature index entry. |
docs/ai-and-plans/features/deep-links/README.md |
Records architecture, telemetry contracts, and verification gaps. |
docs/ai-and-plans/features/deep-links/iterations/03-azure-resource-links-research.md |
Documents reference implementations and design research. |
docs/ai-and-plans/features/deep-links/decisions.md |
Records Azure routing, visibility, confirmation, and destination decisions. |
.github/skills/error-translation/SKILL.md |
Documents first-connect diagnostics and cleanup ordering. |
Review effort: Max
Co-authored-by: Copilot <[email protected]>
|
Preserved the eight Copilot threads and the operator-approved verification/recommendations in commit 36abe5e. The supplement uses CP-F IDs to distinguish this pass from the earlier review. Following the recommended five fixes and two explicit out-of-scope dispositions; automated verification will include both Case 1 and Case 2. |
Addresses CP-F5; regression coverage verifies no descendant lookup after cancel. Co-authored-by: Copilot <[email protected]>
Addresses CP-F2 without retrying subscription lookup or showing a not-found error. Co-authored-by: Copilot <[email protected]>
Addresses CP-F1 with idempotent releases across overlapping links and reacquisition. Co-authored-by: Copilot <[email protected]>
Addresses CP-F8 by clearing stale outcome and correlation before either connection path. Co-authored-by: Copilot <[email protected]>
Addresses CP-F4 and CP-F6 while retaining category and navigation-step diagnostics. Co-authored-by: Copilot <[email protected]>
Record each published fix, both accepted out-of-scope findings, Case 1 and Case 2 results, and apply required formatting. Co-authored-by: Copilot <[email protected]>
|
Review remediation complete; final verification/evidence commit: 89e150b. Five fixes cover six Copilot threads; CP-F3 and CP-F7 retain the approved out-of-scope dispositions. All eight threads have replies and are resolved. Case 1 passed: build plus 17 test files / 271 tests. Case 2 passed: prettier-fix, l10n:check, lint, build, typecheck:tests, full Vitest (336 files / 5,912 passed / one skipped), and package (8.55 MB VSIX). Localization generation was unnecessary because no localized product strings changed. The committed review log links every fix and records known limitations. Existing cross-vendor pre-review evidence is committed; no live cloud/workbench verification is claimed. |
Co-authored-by: Copilot <[email protected]>
Preserve dashboard suppression and diagnostic credential imports, combine RPC attribution and cancellation tests, regenerate localization, and use the renamed error explanation service. Co-authored-by: Copilot <[email protected]>


What
Links can now open an Azure DocumentDB cluster or an Azure Cosmos DB for MongoDB (RU) account by its Azure resource ID, and any
/connectlink can ask for the Cluster Dashboard or the shell.This is what an Azure portal Open in VS Code button needs: the portal knows the resource ID, but often cannot hand over a connection string.
Telemetry and publisher attribution
Every route, including legacy links and
/local, accepts an optionalsourcepublisher tag, for examplesource=azure-portalorsource=docs-quickstart. Tags are normalized to lowercase and limited to 1-64 ASCII letters, digits, hyphens or underscores, starting with a letter or digit. Invalid or repeated tags are ignored with a diagnostic warning and never echoed. This attribution tag is independent of the connection source named by the path.Telemetry now records arrival and terminal outcomes with a unique link correlation ID, explicit cancellations and non-throwing failures, connection/startup and destination-session joins, phase timings, and filter changes actually applied rather than only needed. Shell, dashboard, Collection View and Local setup preserve URL attribution into destination activity. A completed link means navigation/opening completed; correlated shell startup and webview/RPC results establish readiness. Dashboard reuse keeps the original session attribution and records the join for the new link.
Why
/connectonly understood connection strings. A portal link has a resource ID instead, and the user may not be signed in to Azure, may be signed in to the wrong tenant, or may have the resource hidden by a filter. The link handles all of these instead of failing.How it behaves
/connect/azure, in order:Validates the resource ID (
Microsoft.DocumentDB/mongoClusters→ vCore,Microsoft.DocumentDB/databaseAccounts→ RU). Anything else, child resources included, is refused.Shows a confirmation right away (when URL handling confirmations are on), before any sign-in or lookup. It shows what the link names: resource, resource group, subscription ID, database, collection, and what will open.
Asks the user to sign in to Azure if needed. It then finds the subscription among all signed-in accounts. If none has it and the link carries
tenantId, it offers to sign in to that tenant; otherwise it shows an error with Manage Azure accounts.Reads the resource from Azure with the user's identity, so a missing resource, missing access, or an RU account that does not use the MongoDB API is reported before anything changes.
If the resource is hidden, changes the filters permanently: shows the hidden discovery provider, stops hiding the tenant, and adds the subscription to the subscription filter. That filter is the
azureResourceGroups.selectedSubscriptionssetting shared with the Azure Resources extension. A second confirmation lists these changes first; it appears only when a filter has to change.From the first confirmation until the cluster is revealed, one cancellable progress notification, "Opening Azure resource", names each step without repeating long resource names (checking sign-in, looking for the subscription, reading the resource, updating filters, finding the cluster, connecting).
Reveals the cluster in the Discovery view and expands it. The expansion is the normal connect flow (Entra ID or the credentials prompt). Nothing is saved to the Connections View.
Navigates to the database or collection and opens the Collection View, Cluster Dashboard or shell.
open=, on both/connectand/connect/azure:dashboardopens the Cluster Dashboard, scoped todatabasewhen given. It opens even when the automatic dashboard on connect is turned off, and reuses the panel if it already opened. Telemetry recordsactivationSource: 'deepLink'.shellopens the interactive shell, scoped todatabasewhen given. A link never passes anything to the shell as input.opentogether withcollectionis refused.Stricter validation. Each variant accepts only its own locator. A
connectionStringon/connect/azure, or aresourceId/tenantIdon/connect, is refused. Unknown sources such as/connect/awsare refused instead of falling back to the connection-string flow. Legacy links with no path keep working unchanged.Fewer questions on
/connect. A new connection now asks once, "Add and open connection?", which names the target and what opens (still shown even with confirmations off). A saved connection asks once, "Open connection?", only when confirmations are on. Before, a link with a collection asked up to three times. The TLS question is unchanged (D0017).Dialogs. Every deep-link confirmation, on both
/connectand/connect/azure, has a short title that names the decision ("Sign in", "Add and open connection?", "Open Azure resource?", "Change filters?"). The explanation is in the dialog body.After a failed or cancelled connection. If the expansion does not connect, the link stops after the node has shown what went wrong: no Collection View, dashboard or shell opens, on both
/connectand/connect/azure. Pressing Cancel on "Opening Azure resource" also stops anything from opening, although the tree may finish expanding.Logging. Each link writes one
infoline to the DocumentDB output channel with the action, the source, the names of the supported parameters present, and a count of any other parameters (their names are never logged, because a malformed link can put a password in a parameter name). This is followed bytracelines for every step (confirmations and choices, sign-in, subscription lookup, filter changes, reveal, connect result, what opened, failure stage). Parameter values, connection strings and Azure IDs are never logged.Encoding. The public guide now explains that every parameter value is decoded twice. It shows how database and collection names with spaces,
&,+or non-ASCII letters must be double-encoded, with JavaScript, Python and PowerShell snippets. Tests pin this behaviour.Scope
Not in this PR:
/connect/kubernetesor/connect/atlas, sovereign clouds (a link has no cloud hint), and suppressing the automatic dashboard when a link asks for something else.activationSource: 'deepLink'as "Other" (cluster-dashboard.cjs,feature-adoption.cjs,event-catalog.md); they live in the dashboards work.Validation
Unit tests for every new module and the handler: routing, argument refusals, masking, resource ID parsing, sign-in and tenant resolution, ARM error mapping, filter changes, confirmation content, Discovery view reveal, and opening each surface. The review fixes add tests for warm-tree lookups, provider-root recovery, log allow-listing, cancellation, masking and subscription casing.
Still needs a human: the manual table in the iteration 3 plan, against a real subscription with a vCore cluster and an RU account. It covers signed out, wrong tenant with and without
tenantId, hidden subscription, tenant or provider, confirmations off, Entra ID and native auth,open=dashboardwith the setting on and off,open=shell, and legacy links. From the review, also: click the same database or collection link twice (F1), and follow a link after expanding the Azure provider while signed out or with every subscription filtered out (F2).AI pre-review: iterations/03-azure-resource-links-review.md. Two models reviewed the PR independently and cross-checked each other's findings: 7 confirmed findings plus one unconfirmed candidate. The maintainer accepted a pragmatic fix for seven of them (F1, F2, F4–F8, one commit each) and won't fix F3, the unconfirmed multi-account case. Done notes with commit links are inline in that file.
Case 2 checks (2026-11-06, telemetry follow-up): passed
npm run prettier-fix,npm run l10n:check,npm run lint,npm run build,npm run typecheck:tests(reported separately from runtime tests),npx vitest run(336 files; 5,902 passed, 1 skipped), andnpm run package.npm run l10nwas not needed for this follow-up because no localized string changed; localization validation passed. Fixed lint import annotations and a test assertion for the new startup callback. Two terminal-width tests timed out while build/lint competed for CPU; the complete suite passed when rerun alone.Telemetry follow-up pre-review: the committed AI review above predates the new source/outcome/correlation instrumentation. A current committed review and author decisions for this follow-up remain a human-handoff requirement. Live telemetry ingestion/GDPR classification is not established by these local checks.
Links