Skip to content

fix: exclude environment workspaces from Move/Copy to Workspace dropdown#9737

Open
BloodShop wants to merge 1 commit intoKong:developfrom
BloodShop:fix/workspace-dropdown-environments
Open

fix: exclude environment workspaces from Move/Copy to Workspace dropdown#9737
BloodShop wants to merge 1 commit intoKong:developfrom
BloodShop:fix/workspace-dropdown-environments

Conversation

@BloodShop
Copy link

Summary

This PR fixes issue #8837 by correcting the workspace filtering logic in the Move/Copy to Workspace dropdown to exclude environment workspaces.

Problem

When users tried to move or copy requests to different workspaces, the dropdown was incorrectly populated with environments instead of actual workspaces. This made it impossible to properly move requests between workspaces.

Root Cause

The workspace filtering logic was only excluding mock-server workspaces but was accidentally including environment workspaces, which are not valid destinations for moving/copying requests.

Solution

Updated the workspace filter in both modal components to exclude environment workspaces:

Before:

.filter(w => w.scope !== 'mock-server')

After:

.filter(w => w.scope !== 'mock-server' && w.scope !== 'environment')

Files Modified

  • packages/insomnia/src/ui/components/modals/request-settings-modal.tsx
  • packages/insomnia/src/ui/components/modals/request-group-settings-modal.tsx

Benefits

  • ✅ Users now see only valid workspace types (design, collection, mcp) in the dropdown
  • ✅ Move/Copy to Workspace functionality works as expected
  • ✅ No more confusion with environments appearing in the workspace list
  • ✅ Minimal, surgical fix that doesn't break existing functionality

Testing

Verified that the filtering logic correctly excludes both mock-server and environment workspaces while preserving valid workspace types.

Fixes #8837

- Updated workspace filtering logic to exclude environment workspaces
- Only design, collection, and mcp workspaces are now shown in the dropdown
- Fixes confusion where users saw environments instead of actual workspaces
- Applied to both request-settings-modal and request-group-settings-modal

Fixes Kong#8837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move/Copy to Workspace dropdown is populated with environments instead of workspaces

1 participant