Repository navigation
Refine connection lifecycle recovery UX - #1146
Tomasz Naumowicz (tnaum-ms) merged 51 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip nested Git checkouts so type-aware ESLint checks only the current workspace without exhausting its heap. Keep untracked source in scope and cover both checkout directions with a regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit f38e028)
Preserve view identifiers and error/redaction test behavior while correcting lint-visible types and synchronous awaits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ CI passed: standard tier (ready PR)Commit
Full run: add the Code quality
Build sizeNo size data for Artifacts: VSIX | Bundle-reports-46049379306 | L1-manifest-report-46049379306 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. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical defects block diagnostic Shell startup under authentication holds and can direct Azure VM diagnostic sessions to the wrong port, potentially reaching a different database.
12 open issues
Diagnostic sessions are blocked by authentication latches · New Azure VM diagnostic shell uses the wrong port · New Stale open-shell actions leave removed nodes visible · New Stale connection feedback appears after the Playground is re-picked · New Completed connection edits silently drop stale-action feedback · New Dismissed sign-in can show a stale-action modal · New Disconnect restores command text but loses cursor position · New Anonymous startup failures still show a host notification · New Async sign-in errors overwrite terminal input · New Client churn is misreported as an endpoint change · New Tree failures can trigger duplicate error modals · New Stale bound-view cancellation is reported as a failure · New
What changed in this PR
Refines connection-lifecycle recovery in the DocumentDB extension for Visual Studio Code as a focused follow-up to #1136, preserving original connection bindings and avoiding automatic operation replay. Descendant-expansion feedback remains deferred to #1143.
Changes:
- Keeps Retry available throughout retained-view unavailability and displays failed-attempt feedback inside the dialog.
- Introduces a separate unauthenticated diagnostic Shell and refines tree, Shell, and Playground recovery feedback.
- Updates debug statistics, localization, documentation, regression coverage, and nested-checkout lint exclusions.
| File | Description |
|---|---|
src/webviews/documentdb/useBoundViewRecovery.ts |
Tracks persistent Retry availability and in-view failures. |
src/webviews/documentdb/useBoundViewRecovery.test.tsx |
Covers Retry episodes and obsolete responses. |
src/webviews/documentdb/documentView/documentView.tsx |
Connects Document View to updated recovery state. |
src/webviews/documentdb/collectionView/CollectionView.tsx |
Connects Collection View to updated recovery state. |
src/webviews/documentdb/clusterDashboard/ClusterDashboard.tsx |
Connects Dashboard to updated recovery state. |
src/webviews/components/DisconnectedOverlay.tsx |
Displays Retry failures and retains recovery controls. |
src/webviews/components/DisconnectedOverlay.test.tsx |
Covers alerts, controls, and retained content. |
src/utils/commandErrorHandling.ts |
Separates tree-modal and webview-notification feedback. |
src/utils/commandErrorHandling.test.ts |
Covers command feedback routing and cancellation. |
src/tree/documentdb/ClusterItemBase.ts |
Adds endpoint access and diagnostic Shell recovery action. |
src/tree/documentdb/ClusterItemBase.test.ts |
Covers endpoint reads and revised recovery rows. |
src/tree/connections-view/DocumentDBClusterItem.ts |
Reads stored endpoints and clarifies password-save copy. |
src/tree/connections-view/DocumentDBClusterItem.test.ts |
Covers stored endpoints and dismissed password updates. |
src/tree/connections-view/ConnectionsBranchDataProvider.test.ts |
Updates expected recovery action labels and IDs. |
src/documentdb/shell/unauthenticatedEndpoint.ts |
Strips authentication material from diagnostic endpoints. |
src/documentdb/shell/unauthenticatedEndpoint.test.ts |
Covers sanitization, TLS preservation, and bounded errors. |
src/documentdb/shell/ShellSessionManager.ts |
Adds anonymous-session initialization and lifecycle checks. |
src/documentdb/shell/ShellSessionManager.test.ts |
Covers anonymous isolation and lifecycle boundaries. |
src/documentdb/shell/ShellCompletionProvider.ts |
Makes shared metadata access optional. |
src/documentdb/shell/ShellCompletionProvider.test.ts |
Covers metadata-free local completions. |
src/documentdb/shell/DocumentDBShellPty.ts |
Refines anonymous behavior, disconnect output, and recovery guidance. |
src/documentdb/shell/DocumentDBShellPty.test.ts |
Covers isolation, disconnect rendering, and stale sign-in actions. |
src/documentdb/connectionTeardown.ts |
Simplifies the Keep open label. |
src/documentdb/connectionTeardown.test.ts |
Updates teardown label expectations. |
src/documentdb/ClustersExtension.ts |
Registers the diagnostic Shell command. |
src/commands/signInAgain/signInAgain.ts |
Adds bounded feedback for stale tree sign-in actions. |
src/commands/signInAgain/signInAgain.test.ts |
Covers stale sign-in routing and quiet supersession. |
src/commands/showWorkerStats/showWorkerStats.ts |
Standardizes readable worker statistics. |
src/commands/showWorkerStats/showWorkerStats.test.ts |
Covers formatting and restricted diagnostic fields. |
src/commands/showConnectionStats/showConnectionStats.ts |
Separates connection statistics into readable fields. |
src/commands/showConnectionStats/showConnectionStats.test.ts |
Covers lifecycle facts, units, and output boundaries. |
src/commands/retryAuthentication/retryAuthentication.ts |
Refreshes and explains stale Retry actions. |
src/commands/retryAuthentication/retryAuthentication.test.ts |
Covers superseded reads, closes, and cancellation. |
src/commands/playground/executePlaygroundCode.ts |
Refines rerun guidance and stale sign-in feedback. |
src/commands/playground/executePlaygroundCode.test.ts |
Covers lifecycle guidance and obsolete recovery actions. |
src/commands/openInteractiveShell/openInteractiveShell.ts |
Adds the unauthenticated Shell entry point. |
src/commands/openInteractiveShell/openInteractiveShell.test.ts |
Covers endpoint sanitization and startup guards. |
src/commands/disconnect/disconnect.ts |
Refreshes and explains stale Disconnect/Reconnect actions. |
src/commands/disconnect/disconnect.test.ts |
Covers stable identity and stale-action handling. |
l10n/bundle.l10n.json |
Updates localized recovery and diagnostic Shell strings. |
eslint.config.mjs |
Excludes nested Git checkouts from lint traversal. |
docs/user-manual/diagnose-connection.md |
Updates the diagnostic Shell recovery label. |
docs/user-manual/connecting-to-databases.md |
Documents diagnostic Shell isolation and persistent Retry. |
docs/release-notes/1.2.md |
Updates the Keep open wording. |
docs/ai-and-plans/features/connection-lifecycle/README.md |
Records recovery policies and deferred expansion scope. |
docs/ai-and-plans/features/connection-lifecycle/decisions.md |
Records authentication, feedback, and stale-action decisions. |
CONTRIBUTING.md |
Documents lint behavior for nested checkouts. |
CHANGELOG.md |
Aligns teardown wording with the revised label. |
build/verification/eslint-worktrees.test.cjs |
Covers current-checkout versus nested-checkout linting. |
build/verification/browser/scenarios.ts |
Updates the recovery-dialog dismissal selector. |
build/verification/browser/fixtures.ts |
Adds the Document View dirty-report response. |
.github/skills/tree-cluster-architecture/SKILL.md |
Documents diagnostic Shell identity and isolation boundaries. |
.github/skills/error-translation/SKILL.md |
Documents diagnostic Shell feedback ownership. |
Review effort: Max
Preserve the operator selections and per-thread reporting policy before the lead implementation run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply all nine accepted fixes; preserve C05/C10/C12 no-code decisions and the superseded deferral history. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Define explicit interfaces and non-overlapping worker ownership for all nine accepted fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Do not warn a newly re-picked document about removal or changes to its previous connection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Distinguish session dismissal from internal stale acquisition without changing identity or startup guards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep implementation outcomes separate from code commits and identify local-only commit references. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pass an explicit host-only capability instead of inferring authorization from NoAuth; retain all lifecycle and epoch fences. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture the strict ordinary-session and lifecycle invariants verified by the advisor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Track exact error presentation ownership without treating SDK suppression as proof of feedback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document one-modal integration coverage and retained error presentation invariants. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain the sanitized attempted port and fail closed when unknown instead of falling back to discovery defaults. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Refresh supported nodes and use proven removed or changed reasons without guessing from epoch-only churn. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve normal Shell notifications while enforcing the diagnostic terminal-only feedback policy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the sanitizer rework rationale and explicit local-only delivery status. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the user editing position across Disconnect using the existing wrap-aware renderer without replaying input. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture intentional wrapped-output assertions and the remaining C09 render-origin check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reuse the existing prompt-width origin reset instead of introducing a new input API. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve operator-selected won’t-fix decisions without resolving discussions or changing code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Separate feedback from the live prompt, preserve cursor and multiline state, and defer output while evaluation owns the terminal. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture all nine local fixes, twelve individual thread outcomes, Case 1 verification, pending live checks, and measured model-role usage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply the required repository formatter separately from code and verification fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a typed rejection mock and throwing cleanup helper while retaining error identity and modal-count coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture the eight check results, preserved C11 fixture coverage, publishing authorization, and measured follow-up usage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0b81b3a
into
feature/connection-lifecycle


Summary
Refine connection-lifecycle recovery across tree actions, retained views, the Interactive Shell and Query Playground without changing bound identities or replaying failed database operations.
Scope and decisions
This is a dedicated follow-up to #1136, targeting
feature/connection-lifecycle.Operator decisions and rejected alternatives are recorded in the feature and its iteration 2 implementation record.
Descendant-expansion feedback is deferred to #1143 until foreground attribution is supported. F7 remains pending an operator reproduction; no speculative menu fix is included.
The main-branch worktree lint exclusion was ported independently, without unrelated dependency or feature changes.
Validation
All eight Case 2 commands ran and passed after addressing failures:
l10n,prettier-fix,l10n:check,lint,build,typecheck:tests, full Vitest, andpackage.Still draft
The Section 6 AI pre-review file for this UX round is not committed. No readiness for human review is claimed.
Manual checks remain: real-terminal disconnect with idle/partial/wrapped/multiline/evaluating input; F7 credential repair and the refreshed Disconnect menu; and screen-reader announcements after failed Retry. Source/browser and unit checks do not replace those live checks.
Post-merge description review
The retained-view Retry behavior above was an intermediate design, superseded by #1149 and #1169. Recoverable failures do not require a separate in-view Retry to unlock a tab. When the old session has ended, the tab instead shows Session ended: you can copy its contents, but must open a new tab to resume database work. The separate unauthenticated Shell remains available for diagnostics without reusing saved credentials or authenticated shared metadata.