-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: add "Installed" filter to Roo Marketplace #7007
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
Conversation
- Added installed boolean filter to ViewState interface - Implemented UI checkbox for "Show installed only" filter - Updated filterItems method to filter by installation status - Added translation strings for the new filter - Updated tests to include the new filter property Fixes #7004
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.
Reviewing my own code is like debugging in production - technically possible but morally questionable.
payload: { filters: state.filters }, | ||
}) | ||
} | ||
}, [marketplaceInstalledMetadata, state.installedMetadata, state.filters, manager]) |
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.
Is this useEffect intentional? It seems redundant since the state manager already handles installedMetadata updates through the handleMessage method. This could cause unnecessary re-renders and state updates when the metadata changes.
<label className="flex items-center gap-2 cursor-pointer"> | ||
<input | ||
type="checkbox" | ||
className="rounded border-vscode-input-border" |
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.
Could we add proper ARIA labels here for better accessibility? Screen reader users might have difficulty understanding the purpose of this checkbox without proper labeling.
className="rounded border-vscode-input-border" | |
<input | |
type="checkbox" | |
className="rounded border-vscode-input-border" | |
checked={state.filters.installed} | |
aria-label="Show installed items only" | |
onChange={(e) => |
} | ||
installedMetadata?: any // Store installed metadata for filtering |
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.
Type safety concern: Consider creating a proper TypeScript interface for the installed metadata structure instead of using any
. This would improve type safety and make the code more maintainable.
installedMetadata?: any // Store installed metadata for filtering | |
installedMetadata?: { | |
global?: Record<string, any>; | |
project?: Record<string, any>; | |
} // Store installed metadata for filtering |
@@ -65,6 +67,7 @@ | |||
type: "", | |||
search: "", | |||
tags: [], | |||
installed: false, | |||
}, |
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.
The installedMetadata
field should be initialized in the getDefaultState()
method to avoid potential undefined behavior on first load. Consider adding:
}, | |
installed: false, | |
}, | |
installedMetadata: undefined, |
if (installed && installedMetadata) { | ||
const isInstalledGlobally = !!installedMetadata?.global?.[item.id] | ||
const isInstalledInProject = !!installedMetadata?.project?.[item.id] | ||
installedMatch = isInstalledGlobally || isInstalledInProject |
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.
Performance consideration: The installed filter logic checks both global and project metadata for every item when the filter is active. Could we memoize the installed status calculation or compute it once when metadata updates rather than on every filter operation? This would improve performance for large item lists.
@roomote-agent Can you please add the missing Translations for this new feature? Currently the QA Roo Code Checks for translation fail. All Other CI/CD Tests seam to work fine. |
Hi @semidark! I see the issue with the missing translations for the "Installed" filter feature. I'll add the missing translations to all language files right away to fix the failing CI check. |
- Added "filters.installed.label" and "filters.installed.description" keys - Updated all backend marketplace.json files (src/i18n/locales/*/marketplace.json) - Updated all frontend marketplace.json files (webview-ui/src/i18n/locales/*/marketplace.json) - All translation checks now pass successfully
@semidark The missing translations have been successfully added! ✅ The check-translations CI job is now passing. I added the required translations for filters.installed.label and filters.installed.description to all 18 supported languages in both backend and frontend marketplace.json files. Total files modified: 35 |
- Replace plain HTML checkbox with UI library Checkbox component for consistency - Add proper TypeScript typing for installedMetadata (MarketplaceInstalledMetadata) - Optimize filterItems method to avoid unnecessary object copying - Remove dead code for subcomponent filtering
- Replace checkbox with dropdown for better UX - Place dropdown inline with search field for better layout - Add three filter options: All Items, Installed Only, Not Installed - Update filter logic to handle all three states - Improve translation labels to clarify it's a filter - Optimize filterItems method for better performance - Add proper TypeScript types throughout
- Set both Select and Button components to h-7 for visual consistency - Installation status dropdown and tags dropdown now have identical height - Improved visual alignment for better UX
…e-render loop; rely on state manager handleMessage sync
- Replace checkbox-based installed keys with dropdown keys: { label, all, installed, notInstalled } - Updated both frontend and backend marketplace.json files for all non-English locales - Ensures translation completeness for CI check
…oss all locales (frontend + backend)
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.
LGTM
This PR adds an "Installed" filter to the Roo Marketplace to help users easily find and manage their installed MCPs and modes.
Changes
installed
boolean filter to ViewState interfacefilterItems
method to filter by installation statusScreenshots
The new filter appears as a checkbox below the search input:
Testing
installed
property in filter objectsFixes #7004
Important
Adds 'Installed' filter to Roo Marketplace, allowing users to filter items by installation status, with updates to UI, state management, and translations.
MarketplaceListView.tsx
allowing users to filter items by installation status.filterItems
inMarketplaceViewStateManager.ts
to handle 'installed', 'not_installed', and 'all' states.installed
filter toViewState
inMarketplaceViewStateManager.ts
.handleMessage
andtransition
methods to manage installed metadata.en/marketplace.json
,es/marketplace.json
, andfr/marketplace.json
.MarketplaceListView.spec.tsx
andMarketplaceViewStateManager.spec.ts
to include 'installed' filter scenarios.This description was created by
for 0bf4e0c. You can customize this summary. It will automatically update as commits are pushed.