Skip to content

Enhancement: Persist playground connection metadata across reopen #585

@tnaum-ms

Description

@tnaum-ms

Summary

Saved .documentdb.js playground files lose their connection binding when reopened (or across VS Code sessions). The PlaygroundService._connections map is in-memory only. On reopen, the file loads from disk with all content intact but shows "Not connected."

Current Behavior

The user must create a new playground from the tree panel and copy their code over. For untitled documents, once closed, they're gone entirely (VS Code behavior).

Proposed Enhancement

Persist the connection metadata (clusterId + databaseName) in workspace state or in the document's metadata, and attempt to restore it on reopen.

Context

Identified during pre-merge review of PR #583 (multi-connection playgrounds). This is a follow-up enhancement, not a blocker for the current PR.


From review issue #4 in multi-connection-playgrounds-review.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions