microsoft / microsoft/vscode-documentdb
Experiment: surface connection state in the Connections tree via FileDecorationProvider
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Description
Summary
Experiment with using a FileDecorationProvider to surface connection state for clusters in the Connections tree (and potentially the Discovery tree) in general.
Today a user cannot tell at a glance which clusters are currently connected and which are not. A decoration provider could attach a small badge/color overlay to each cluster node reflecting its live state (e.g. connected, disconnected, connecting, error), adding value without replacing the node icon.
Motivation
- At-a-glance visibility of which clusters have an active session/connection.
- Non-intrusive: decorations overlay the existing icon instead of replacing it, so the DocumentDB cluster icon stays intact.
- Came out of the PR #621 Kubernetes discovery UX review (§9.6 option B), where a reachability badge for ClusterIP / port-forwarded targets was considered. Generalizing it to all connections is more broadly useful than a Kubernetes-only badge.
Scope of the experiment
- Prototype a
FileDecorationProviderregistered for the Connections view that maps cluster nodes (by a stable URI scheme/resourceUri) to a decoration reflecting connection state. - Define the connection-state model and where it is sourced from (credential cache / active client presence / port-forward tunnel status).
- Evaluate UX: badge glyph vs. color, light/dark/high-contrast themes, and accessibility (the state must also be conveyed via tooltip/description, not color alone).
- Decide whether to extend to the Discovery tree (e.g. Kubernetes reachability) once the general mechanism works.
Out of scope
- Final visual design / string wording (decide after the prototype).
- Replacing existing node icons.
Notes
- Decorations require nodes to expose a
resourceUri; confirm the tree items can carry one without breaking existingtreeId/clusterIdbehavior. - Accessibility: never rely on color alone — mirror the state in the tooltip and/or description (see the a11y guidance in the repo).
Filed for the 0.10.0 milestone as a follow-up from the Kubernetes discovery UX review (PR #621).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Connections tree entry point, the VS Code FileDecorationProvider API, and the Kubernetes discovery UX discussion in PR #621. Inspect whether tree items can expose a stable resourceUri without breaking treeId or clusterId behavior, then prototype connection-state mapping and evaluate tooltip, theme, and accessibility behavior before deciding whether Discovery should also be covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100