Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bac3828
docs: record CP-4 teardown checkpoint before WI-7
tnaum-ms Nov 24, 2026
d9c00de
feat: protect active transfers with task leases (WI-7 A5)
tnaum-ms Nov 24, 2026
bc791b6
feat: disconnect clusters with an explicit teardown choice (WI-7)
tnaum-ms Nov 24, 2026
4bbeb43
feat: apply shared teardown to connection and folder removal (WI-7)
tnaum-ms Nov 24, 2026
6261dc1
feat: lock existing views after saved connection edits (WI-7)
tnaum-ms Nov 24, 2026
9bfbe05
fix: stop Dashboard health polls while the connection is unavailable …
tnaum-ms Nov 24, 2026
f44c05c
Merge the verified PR5 into PR6
tnaum-ms Nov 24, 2026
0933652
chore: clean up PR6 verification after syncing PR5
tnaum-ms Nov 24, 2026
71c646b
chore: version the PR6 operator VSIX as 1.1.1-alpha.4
tnaum-ms Nov 24, 2026
9744b24
fix: polish the Disconnect recovery dialog after OP-5 (WI-7)
tnaum-ms Nov 25, 2026
0037a23
fix: resume the Dashboard after tree reconnect (WI-8)
tnaum-ms Nov 25, 2026
762f49e
chore: regenerate localization and format PR6 OP-5 follow-ups
tnaum-ms Nov 25, 2026
b315acc
fix: scope Disconnect to connected DocumentDB cluster nodes
tnaum-ms Nov 25, 2026
c731703
fix: keep Playground results when teardown stops a worker
tnaum-ms Nov 25, 2026
931e7c9
docs: record the PR6 Close all review decision
tnaum-ms Nov 25, 2026
9ec3b7e
fix: recover rejected credentials after an unchanged save
tnaum-ms Nov 25, 2026
41ee7a7
fix: preserve cancellation through removal telemetry
tnaum-ms Nov 25, 2026
de79774
fix: let retained views retry after a failed removal
tnaum-ms Nov 25, 2026
952e94b
fix: suppress disconnected shell worker errors
tnaum-ms Nov 25, 2026
fcdf301
fix: discard shell paste after disconnect
tnaum-ms Nov 25, 2026
03e9099
fix: reset rejected disconnected shell input
tnaum-ms Nov 25, 2026
e08e33f
fix: clear tree failure state on disconnect
tnaum-ms Nov 25, 2026
416cb5c
test: use an allowed type for the Playground mock
tnaum-ms Nov 25, 2026
efd3cf2
style: format the Disconnect tree regression test
tnaum-ms Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion build/verification/browser/scenarios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ const saveDocumentPath = 'mongoClusters.documentView.saveDocument';
const disconnectedDocument = {
reason: 'userDisconnected',
title: 'Disconnected',
detail: 'Connect from the connection tree, then click Retry.',
detail: 'Reconnect from the connection tree, then click Retry.',
action: 'retry',
} as const;
const documentEditorName = 'Document Editor: Edit the document in JSON format';
Expand Down Expand Up @@ -2544,9 +2544,14 @@ const clusterDashboardScenarios = {
default: clusterDashboardBase,
disconnected: {
...clusterDashboardBase,
config: { ...fixtures.clusterDashboard.config, refreshIntervalMs: 2000 },
readiness: { ...clusterDashboardBase.readiness, content: ['stage0_inventory'] },
rpc: {
...clusterDashboardBase.rpc,
'clusterDashboard.measureRtt': {
...fixtures.clusterDashboard.rpc['clusterDashboard.measureRtt'],
holdReply: true,
},
'clusterDashboard.recoverUnavailable': {
type: 'mutation',
results: [{ recovered: { text: 'Reconnected' } }],
Expand Down Expand Up @@ -2575,6 +2580,11 @@ const clusterDashboardScenarios = {
},
},
{ action: 'waitFor', name: 'disconnected overlay', selector: '.disconnectedOverlay' },
{
action: 'releaseReply',
name: 'deliver the old health poll',
path: 'clusterDashboard.measureRtt',
},
],
},
{
Expand All @@ -2591,6 +2601,26 @@ const clusterDashboardScenarios = {
attribute: 'value',
expected: 'stage0',
},
{
kind: 'calls',
name: 'tree reconnect resumes the retained Dashboard through Retry',
path: 'clusterDashboard.recoverUnavailable',
count: 1,
checkInput: true,
input: { action: 'retry' },
steps: [
{
action: 'post',
name: 'reveal the Dashboard after reconnecting in the tree',
message: { type: 'clusterDashboard.retryAfterReconnect' },
},
{
action: 'waitFor',
name: 'Dashboard is enabled again',
selector: '.disconnectedOverlayBackground:not([inert])',
},
],
},
],
},
} as const satisfies Readonly<Record<string, Scenario<'clusterDashboard'>>>;
Expand Down
3 changes: 3 additions & 0 deletions docs/ai-and-plans/features/connection-lifecycle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Evidence, telemetry and source pointers: [research-findings.md](./research-findi
the available credentials. Credential repair stays in the tree. Dismissing the dialog with
its **X** exposes the existing contents for copying without resuming database operations.
Trying another operation shows the dialog again. **Close view** asks for confirmation.
- After an explicit Disconnect, the tree offers **Reconnect**. If reconnecting automatically
opens the existing Dashboard for the same identity, it retries that view without replaying
an operation. Other retained views still require **Retry**.
- A pending Dashboard delete confirmation does not survive Disconnect, even when the
user reconnects as the same identity. Dashboard **Copy Collection** keeps a tree reference;
**Paste Collection** stays in the tree and uses the current connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1581,8 +1581,9 @@ behave as today.

**Outcome:**

- One teardown serves Disconnect, Remove and identity-changing credential updates.
- It is guarded by task conflicts and dirty editors.
- Disconnect and Remove share teardown. Saved edits share the task fence and resource cleanup,
but keep old views locked without asking to close them (decision 0018).
- Task conflicts block teardown or saving an edit. Dirty editors are checked before Close all.
- It covers every per-cluster resource.
- **What it guarantees** (F-22: closing a client cancels nothing already sent):
- no **new** submission under the old binding after the latch is set;
Expand Down Expand Up @@ -1636,9 +1637,8 @@ behave as today.
the teardown.
- **`latchForTeardown(clusterId, reason)`**, synchronous: recheck conflicts with `getConflictingTasks`,
because a copy, export or import may have started while a prompt was open; on a conflict return
`false` and change nothing. Otherwise set the latch (C-6) and call `ClustersClient.invalidate`, which
increases the epoch, with no `await` in between, and return `true`. From here on no new task, lease or
client can start.
`false` and change nothing. Otherwise set the latch (C-6), which already increases the epoch,
with no `await` in between, and return `true`. From here on no new task, lease or client can start.
- **`commitTeardown(clusterId, { reason, choice, dropCredentials })`**, which has no prompts:
1. Call `latchForTeardown` unless the caller already did (step 5). On a conflict, stop and inform the
user; nothing has changed.
Expand All @@ -1648,7 +1648,7 @@ behave as today.
worker. **Playground:** stop the worker. The latch keeps both from respawning (F-15).
4. Close the client (`deleteClient`). Clear the Entra failure registry and `SchemaStore.clearCluster`.
Clear the `CredentialCache` entry and `lastVerifiedIdentity` **only** when `dropCredentials` is
set (Remove). Disconnect keeps both (A3, decision 0011), so tree Connect and then tab Retry
set (Remove). Disconnect keeps both (A3, decision 0011), so tree Reconnect and then tab Retry
can reuse the same identity.
5. Refresh the tree (T-2).
- **Never touched:** VS Code auth sessions, the managed identity cache, the ARM cache.
Expand All @@ -1675,7 +1675,9 @@ behave as today.
- The setting never skips the unsaved-edits confirmation: when Close all is chosen and an editor is
dirty, that confirmation still appears.
- Skip the modal when no surfaces are registered.
- Add a disconnected cluster node child action, "Connect" (T-2). It clears the latch and connects.
- Add a disconnected cluster node child action, "Reconnect" (T-2). Check the `userDisconnected`
latch before reusing cached credentials when building the children. The action clears only
that latch and refreshes the node without changing its ID; normal expansion connects.
4. **Remove Connection and folder deletion.**
- Remove Connection: teardown with reason `connectionRemoved` and `dropCredentials: true`, then delete
the stored connection and clear the schema, as today. Keep the existing confirmation.
Expand Down Expand Up @@ -1711,7 +1713,7 @@ behave as today.
cluster is not blocked; Disconnect succeeds once the task is done or stopped;
- a token response that arrives after Disconnect is ignored;
- Reconnect uses the current credentials and cloud settings;
- after Disconnect, tree Connect followed by tab Retry succeeds without the tree reloading
- after Disconnect, tree Reconnect followed by tab Retry succeeds without the tree reloading
credentials and without a prompt (native, Entra and discovery with a typed password); after Remove,
the `CredentialCache` entry and `lastVerifiedIdentity` are gone;
- Remove reuses the same teardown;
Expand All @@ -1737,6 +1739,42 @@ behave as today.

**Progress:**

- **CP-4 verdict:** Opus 5.5 approved the teardown order, T-2 and A5 at about 85% confidence.
Register tasks and acquire export/import leases synchronously against the latch. Take a lease
before client resolution, release it in `finally`, and include it in folder-delete conflict
queries. Recheck conflicts immediately before latching; use the epoch bump already in
`ClustersClient.latch`. For saved edits, keep the fence through persistence and retirement,
then restore only the applicable prior hold. Enforce retirement on the host as well as in the
dialog: a password-only edit does not change the fingerprint. The proposed per-cluster
generation watermark is an implementation candidate to validate in the saved-edit slice,
not a new public contract. No operator decision is needed for the lease slice.
- **WI-7 S1:** Import and export hold a collection lease from client resolution through
completion. Task admission checks the same latch as client startup. Existing conflict queries
see leases, including the folder-delete check. The task, transfer and Dashboard-bound command
test suites passed together (18 tests).
- **WI-7 S2a:** Disconnect now checks task conflicts and dirty views before teardown, with a
synchronous conflict recheck before latching. It stops matching Shell and Playground workers,
keeps credentials and the verified identity, and refreshes the same tree node with one
**Connect** action. The integrated build and 225 focused tests passed. Remove and saved edits
are not wired into teardown yet.
- **WI-7 S2b:** Remove and folder deletion keep their existing deletion confirmation and share
one tab choice for the affected connections. The batch rechecks and fences the entire set
before disposal or deletion. A failed storage delete leaves the surviving connection
disconnected rather than stuck in the removed state. Build and 30 focused tests passed.
- **WI-7 S3:** The save fence reports a retryable update-in-progress state; only a changed
stored value permanently retires the older generations. This also covers password-only and
partial secret writes without adding passwords to the fingerprint. Existing views remain
copyable. Same-settings reconnect can still follow a newer generation. Build and 196
focused tests passed.
- **OP-5 (`1.1.1-alpha.4`):** The operator reported that Keep open, Close all with a dirty
draft, Remove, and the saved-edit lock passed. Disconnect during import or export was
not tested live; it is checked in the real transfer-lease and teardown preflight paths
by automated tests. Operator feedback: label the tree action **Reconnect**, use the
default Fluent layout with an instant backdrop, and clarify that an old view is bound
to its previous connection settings.
- **PR6 review:** The operator kept the single dirty check at **Close all** confirmation
([review thread](https://github.com/microsoft/vscode-documentdb/pull/1130#discussion_r4694258852)).
In a batch removal, a view edited after that check still closes; there is no second prompt.
- **Carry-forward from WI-4d:** An explicit Update Credentials that changes the tenant must
replace or clear the old verified Entra identity so the next connect can use the saved
tenant (decision 0011). Automatic reconnect remains pinned until that explicit update.
Expand All @@ -1756,9 +1794,9 @@ one loop.
of a failed command long enough to classify it. A terminal kind (auth, closed client) is rethrown so
that `runWithClient` returns `unavailable`. An unsupported command, such as `serverStatus` on some
servers, stays an ordinary partial sample with its entry in `errors`.
2. The webview poll effect depends on the overlay state: it stops on `unavailable` or on a `disable`
message, and starts again after Reconnect. React's effect cleanup keeps it to one loop; no extra loop
token.
2. The webview poll effect stops on `unavailable` or a `disable` message, even when the dialog is
dismissed to copy contents. It starts again only after Retry succeeds. React's effect cleanup
keeps it to one loop; no extra loop token.
3. A ping that resolves while the overlay shows is ignored (the WI-6 webview rule), so it cannot clear the
overlay.
4. Visibility pause and backoff are the rest of #1091. Do them here only if they are trivial; otherwise
Expand All @@ -1775,6 +1813,12 @@ one loop.

**Progress:**

- The Dashboard polls with a background-only binding. Auth and closed-client errors from
inside the sampler return an unavailable result; unsupported `serverStatus` still returns a
partial sample. Build and 131 focused tests passed. The browser fixture showed no polls
during disconnect, copy mode or reveal; Retry restarted one loop. A held ping released
after disconnect did not clear the dialog.

---

## WI-9: Token renewal telemetry (PR 7)
Expand Down
Loading
Loading