-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(marketplace): distinguish marketplace-installed modes from local … #8181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(marketplace): distinguish marketplace-installed modes from local … #8181
Conversation
…custom modes by origin flags; key installed metadata by marketplaceItemId; restrict removal to marketplace-installed mode in selected scope; add scoped delete in CustomModesManager to avoid unintended deletions (fixes RooCodeInc#4828)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this comprehensive fix to the slug collision issue! The approach of using origin metadata fields to distinguish marketplace-installed modes from local custom modes is solid, and I appreciate the attention to backward compatibility. The test coverage looks thorough as well.
…safety and i18n; atomic deleteCustomModeForSource; update tests and en locale
…lled mode; remove added en locale key to satisfy translation check
…y string on Ubuntu
fix(marketplace): distinguish marketplace-installed modes from local custom modes by origin flags; key installed metadata by marketplaceItemId; restrict removal to marketplace-installed mode in selected scope; add scoped delete in CustomModesManager to avoid unintended deletions (fixes #4828)
Related GitHub Issue
Closes: #4828
Roo Code Task Context (Optional)
N/A
Description
This PR resolves a slug-collision bug in the Marketplace where a marketplace mode and a locally created custom mode share the same slug. Previously:
Key changes:
Files changed:
packages/types/src/mode.ts
src/services/marketplace/SimpleInstaller.ts
src/services/marketplace/MarketplaceManager.ts
src/core/config/CustomModesManager.ts
Tests updated: src/services/marketplace/tests/SimpleInstaller.spec.ts
Reviewer notes:
Test Procedure
Unit tests
From repo root:
Run targeted tests from the src package (per repo rules, run from the package directory):
Expected: tests pass (previous run summary: 296 files, 3812+ passing tests overall, several skipped; SimpleInstaller tests pass with marketplace-origin assertions).
Manual verification steps
Environment notes
Pre-Submission Checklist
Screenshots / Videos
N/A (no UI changes visible; behavior changes are in installed badge logic and scoped removal; functional verification described in "Test Procedure").
Documentation Updates
No documentation updates are required.
Additional Notes
Backward compatibility: existing modes without marketplace origin metadata are unaffected.
i18n: No user-facing strings changed for this fix.
Important
Fixes slug-collision bug by distinguishing marketplace-installed modes from local modes using origin flags and updating removal logic.
installedFromMarketplace
andmarketplaceItemId
flags inmode.ts
.slug
,marketplaceItemId
, andsource
inSimpleInstaller.ts
.SimpleInstaller.ts
.CustomModesManager.ts
to prevent unintended deletions.SimpleInstaller.spec.ts
to verify new behavior and error handling for marketplace-installed modes.This description was created by
for a76bc0b. You can customize this summary. It will automatically update as commits are pushed.