feat: add Move button to change a managed query's folder#142
Merged
MathiasVDA merged 2 commits intomainfrom Feb 28, 2026
Merged
feat: add Move button to change a managed query's folder#142MathiasVDA merged 2 commits intomainfrom
MathiasVDA merged 2 commits intomainfrom
Conversation
- Add moveQuery?(queryId, newFolderId): Promise<string> to WorkspaceBackend interface - Implement moveQuery in GitWorkspaceBackend (read+write to new path+delete old) - Implement moveQuery in SparqlWorkspaceBackend (update dcterms:isPartOf triple, ensure folder exists) - Implement moveQuery in InMemoryWorkspaceBackend (for tests) - Add showFolderPickerOnly() to SaveManagedQueryModal for folder-only selection - Add Move button in QueryBrowser that opens folder picker and calls moveQuery - Update open git tabs when a query is moved to preserve path metadata - Add 3 unit tests for moveQuery behaviour Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add functionality to change folder of managed query
feat: add Move button to change a managed query's folder
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Managed queries could be renamed but not moved to a different folder after initial creation. The only workaround was duplicate → save to new folder → delete original.
Changes
Backend
WorkspaceBackend: new optionalmoveQuery?(queryId, newFolderId): Promise<string>— returns the new query ID (differs for Git where the ID encodes the path)GitWorkspaceBackend: reads content, writes tonewFolder/filename, deletes old pathSparqlWorkspaceBackend: ensures new folder exists (INSERT DATA), then updatesdcterms:isPartOfviaDELETE/INSERT WHEREInMemoryWorkspaceBackend: same contract for testsUI
SaveManagedQueryModal: newshowFolderPickerOnly(workspaceId, currentFolderPath)— reuses the existing folder picker in a stripped-down "Move to folder" modal (no workspace selector, name, filename, or message fields); modal instance is lazily cached onQueryBrowserQueryBrowser: Move button added next to Rename for each query entry; after folder selection callsbackend.moveQuery()and patches open tab metadata for Git backends so in-flight tabs track the new pathTests
3 new unit tests on
InMemoryWorkspaceBackend: move to a different folder (version history preserved), move to root, and same-folder no-op.UI
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.