Skip to content

Query Playground result stays linked to the original file after first save or Save As #1172

Backlog

Description

Known limitation

An open Query Playground result stays associated with the source file it ran from. A first save of an untitled Playground or Save As to a different file changes the source URI but does not relink the existing result. Saving an already named Playground to the same file does not trigger this behavior.

Steps to reproduce

  1. Create an untitled Query Playground, connect it to a database, and run any query that opens a result tab.
  2. Leave the result tab open. Save the Playground as a .documentdb.js file for the first time. Alternatively, start with a named Playground and use File: Save As to save it to a different path after the run.
  3. From the newly saved Playground, invoke Query Playground: Focus Result. It does not navigate to the old result tab. From that old result tab, invoke Query Playground: Focus Playground. It still points at the original source and cannot return to it if that editor closed during the save.
  4. Run the query again from the saved Playground. A new result tab opens if the saved file does not already have one. Both focus commands work for the new pair, and subsequent runs reuse that result tab. The old result tab remains open and is not updated by runs from the new file.

Workaround and disposition

Running queries is not blocked. Rerun from the saved Playground to restore the result link and keyboard navigation. The old result can be kept for comparison or closed.

The native VS Code save event supplies the destination document, not the source it replaced. Matching on text can wrongly reassign a result when an unrelated Playground with identical text is saved. Tab events supply separate opens and closes, and Save As can leave the original editor open in a split, so they cannot prove the relationship either. This limitation was accepted rather than guessing or taking over the normal save workflow. An extension-owned save command could obtain a confirmed destination URI, but would not fix VS Code's native commands by itself.

Found during the accessibility and keyboard workflow review: PR #1147, C02.

Activity

  1. added
    wontfix
    and removed
    wontfix
    on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions