You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Query Playground result stays linked to the original file after first save or Save As #1172
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
Create an untitled Query Playground, connect it to a database, and run any query that opens a result tab.
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.
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.
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