[Routine - VT] fix: preserve sourceScopeId when duplicating a group#67
Draft
winterdrive wants to merge 5 commits into
Draft
[Routine - VT] fix: preserve sourceScopeId when duplicating a group#67winterdrive wants to merge 5 commits into
winterdrive wants to merge 5 commits into
Conversation
In multi-scope workspaces the duplicated group was missing sourceScopeId, causing saveGroupsImmediate() to fall back to the first scope regardless of which scope the original group belonged to. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Jun 26, 2026
Draft
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.
Pre-flight Check
Active branches/PRs checked before this PR:
fix/issue-60-folder-drop-files-mime) — touchessrc/core/DropUriParser.ts,src/dragAndDrop.ts,src/provider.ts, and drag-related test files. No conflict: this PR only modifiessrc/commands.ts(thevirtualTabs.duplicateGroupcommand handler), which is not touched by PR [codex] Fix VirtualTabs folder/group drag data transfer #66.No other open PRs were found.
Changes
File:
src/commands.ts—virtualTabs.duplicateGroupcommand handler (~line 543)Before: the duplicated group object omitted
sourceScopeId, sosaveGroupsImmediate()inprovider.tsfell back to the first availableConfigScope(backward-compat path, line 352–360) regardless of which scope the original group belonged to. In a multi-scope workspace this silently saved the duplicate to the wrong scope.After:
sourceScopeId: group.sourceScopeIdis copied to the new group, routing the save to the correct scope.provider.groups.push({ id: Date.now().toString() + Math.random().toString(36).substring(2, 9), name: newName, - files: group.files ? [...group.files] : [] + files: group.files ? [...group.files] : [], + sourceScopeId: group.sourceScopeId });Safety Verification
TypeScript compilation (
tsc -p ./) succeeded with zero errors as part of the test run. No lint/format scripts exist in this project.🤖 Generated with Claude Code