Skip to content

Add local DocumentDB Quick Start design#653

Draft
guanzhousongmicrosoft wants to merge 9 commits into
mainfrom
guanzhou/local-quickstart-design
Draft

Add local DocumentDB Quick Start design#653
guanzhousongmicrosoft wants to merge 9 commits into
mainfrom
guanzhou/local-quickstart-design

Conversation

@guanzhousongmicrosoft

Copy link
Copy Markdown
Contributor

Summary

  • Add a UX-focused design doc for Local Quick Start: installing, starting, connecting to, and managing DocumentDB Local from the extension.
  • Capture learnings from the vscode-cosmosdb emulator attach-only flow.
  • Include ASCII user flows, lifecycle states, edge cases, and design review findings/resolutions.

Validation

  • npx prettier --check docs/ai-and-plans/local-quickstart/local-quickstart.md

Signed-off-by: Guanzhou Song <guanzhousong@microsoft.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a UX design reference for the proposed Local Quick Start experience, documenting how the extension would install, start, connect to, and manage a local DocumentDB container from VS Code.

Changes:

  • Adds end-to-end UX flows, tree shapes, lifecycle states, and action matrices.
  • Documents conflict handling, Docker readiness, telemetry hints, edge cases, non-goals, and design review outcomes.
  • Captures intended coexistence with the existing manual local connection flow.

Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md Outdated
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md Outdated
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md Outdated
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md Outdated
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
@tnaum-ms

Copy link
Copy Markdown
Collaborator

@guanzhousongmicrosoft Have you had a chance to check out the wizard and container launch flow in the Postgres extension?

@tnaum-ms tnaum-ms added this to the 0.10.0 milestone May 19, 2026
guanzhousongmicrosoft and others added 3 commits May 19, 2026 09:27
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Guanzhou Song <guanzhousong@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Guanzhou Song <guanzhousong@microsoft.com>
@tnaum-ms

Copy link
Copy Markdown
Collaborator

This is encouraging: microsoft/vscode#307838
It opens the path of actually using a web view for the setup and, once that API is added, convert it into a modal style web view.

@tnaum-ms tnaum-ms changed the base branch from next to main May 21, 2026 10:37
@tnaum-ms

Copy link
Copy Markdown
Collaborator

I'm keen to drop all manual connections in the DocumentDB Local section, and have it dedicated to quick starts only.

Everything else can be just added as a regular connection.

Thoughts?

@tnaum-ms

Copy link
Copy Markdown
Collaborator
image image image

then we've got the progress in the terminal, and the webview closes automatically.

@tnaum-ms tnaum-ms marked this pull request as draft May 22, 2026 15:54

@xgerman xgerman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two more things to consider:

  • users might use test containers which start a container before every test and then tear down after the test. In case of an error, they might choose to retain the container. How can we easily connect to that for investigations?
  • how do we manage multiple containers running potentially multiple document DB versions or otherDBs?

I am also curious how we initialize the container. Are we relying on the init scripts or will be a special VS code thing? How would we support init script development?

Are we telling users when a new conatiner image becomes available or do we update automatically?

Lastly, if there's an issue with the container are we helping to file an issue in the documentdb repo?

Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
Comment thread docs/ai-and-plans/local-quickstart/local-quickstart.md
- Add local-quickstart-v2.md: simplified design that removes the dedicated
  local connection subtree, uses a webview for container creation, gates
  TLS exceptions in the regular connection wizard, and migrates legacy
  emulator connections on first launch.
- Mark local-quickstart.md as iteration 1 with a forward reference.

tnaum-ms commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

@guanzhousongmicrosoft @xgerman -- Iteration 2 of the design doc is here: local-quickstart-v2.md

Key changes from iteration 1:

  • No dedicated local connection subtree. The DocumentDB Local section is replaced with DocumentDB Local - Quick Start, focused on container/Docker management only. The managed cluster is inline (expand to browse databases).
  • No local connections, only clusters. User-created localhost connections live alongside regular connections. Existing emulator connections are migrated to a Local Connections (Legacy) folder on first launch.
  • Emulator templates removed. The "MongoDB Emulator RU" / "DocumentDB Local" / "Custom" picker is dropped. Users use the regular new connection wizard.
  • TLS exception gated in the regular wizard. The "allow invalid certificates" step appears only for localhost, single-word hostnames, .local domains, and RFC 1918 private IPs. For other hosts, it will be accessible via a connection edit dialog (to be built).
  • Container creation via webview. Uses existing tRPC/webview infrastructure with card-based design (query insights tab as reference). Will become modal once the VS Code API supports it.
  • German's feedback incorporated. Docker-first with OCI/podman as follow-up issues, URL-safe password generation, port availability prereq check, platform/CPU validation.

The iteration 1 doc is kept as reference with a forward pointer to this revision.

…decision note

- terminal-first create progress for v1.0 (staged in-webview card deferred to v1.1)
- adopt @microsoft/vscode-container-client (Docker+Podman) as the runtime layer
- port fallback only for the default port; read the bound port from docker inspect
- distinguish create-vs-start failure; pre-check connection name AND container name
- scope prereq checks v1.0/v1.1; add section 18.1 PostgreSQL source-benchmark learnings
- add docs/ai-and-plans/PRs/653-local-quickstart-design/description.md decision note

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@guanzhousongmicrosoft

Copy link
Copy Markdown
Contributor Author

@xgerman — thanks for the review. The inline comments are all addressed in iteration 2 (local-quickstart-v2.md) plus the latest commit (cb21ed6); I've replied inline and resolved those threads. Your five review-level questions are now handled in the design too:

  1. Retained test containers — connect for investigation. Any locally reachable container can be attached through the regular new-connection wizard at its localhost:<port> — Quick Start doesn't need to own it. Auto-discovery of unmanaged/test containers is tracked for v1.1. (§13 rule 10, §15)
  2. Multiple containers / versions / other DBs. v1 is single-managed-instance, but recognition is label-based so the model is forward-compatible; multiple managed instances and multiple image versions side-by-side are v1.1. (Other DB engines are out of scope — this is DocumentDB-local.) (§10.1, §15)
  3. Container initialization & init-script development. We use the image's standard init-script convention (mount a host dir into the image's documented init directory) rather than a bespoke VS Code mechanism, so it stays portable and testable outside the extension. "Seed sample data" just drops a bundled init script into that dir; for init-script development, the Advanced panel lets you point at a local scripts folder that's mounted in. (§8.4)
  4. New image: notify vs auto-update. Notify only — an UpdateAvailable badge in the tree; we never auto-update (no-surprises rule). "Update Image" stays a manual, user-initiated verb (v1.1). (§6.1, §11)
  5. Help file an issue on container failure. Planned as a Report Issue action on the Error / readiness-timeout states that pre-fills a GitHub issue with sanitized diagnostics (no credentials, hostnames, or ports, per the telemetry rules). Tracked for v1.1. (§14, §15)

For context, there's a short decision/reasoning note for reviewers at docs/ai-and-plans/PRs/653-local-quickstart-design/description.md, and a PostgreSQL source-benchmark summary in local-quickstart-v2.md §18.1 (we'll reuse @microsoft/vscode-container-client, which already ships both Docker and Podman clients — directly relevant to your OCI point).

@github-actions

Copy link
Copy Markdown
Contributor

✅ Code Quality Checks

Check Status How to fix
Localization (l10n) ✅ Passed
ESLint ✅ Passed
Prettier formatting ✅ Passed

This comment is updated automatically on each push.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Size Report

Metric Base (main) PR Delta
VSIX (vscode-documentdb-0.9.0-beta.vsix) 7.60 MB 7.60 MB ✅ 0 KB (0.0%)
Webview bundle (views.js) 5.88 MB 5.88 MB ✅ 0 KB (0.0%)

Download artifact · updated automatically on each push.

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.

4 participants