-
Notifications
You must be signed in to change notification settings - Fork 2.5k
exp-rooedits-1 #8496
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
exp-rooedits-1 #8496
Conversation
|
@James-Cherished can you please add screenshots? |
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.
I found several integration and correctness issues that will block this feature and break builds. Inline comments call out precise spots with fixes.
| modeFamilies, | ||
| activeFamily, | ||
| setActiveFamily, | ||
| } = useExtensionState()</search> |
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.
[P0] Broken TSX due to leftover search-and-replace markers. The file contains raw </search> / </search_and_replace> tokens which will fail compilation. First occurrence is here; additional occurrences at ~653–654, 733–735, and 775–777. Remove these artifacts and ensure the destructuring + JSX are valid.
|
|
||
| // Request initial data | ||
| useEffect(() => { | ||
| vscode.postMessage({ type: "getModeFamilies" }) |
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.
[P0] Frontend posts messages that are not handled in the backend. getModeFamilies (and later createModeFamily / updateModeFamily / deleteModeFamily / setActiveModeFamily) have no corresponding cases in webviewMessageHandler.ts in this PR, so the UI won’t load or mutate families. Add handlers that wire to a ModeFamiliesManager (persist to global state) and return a modeFamiliesResponse payload.
| /** Optional description */ | ||
| description?: string | ||
| /** Mode slugs that are enabled in this family */ | ||
| enabledModes: string[] |
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.
[P1] Contract mismatch with backend. UI uses enabledModes: string[] but server-side ModeFamiliesManager defines enabledModeSlugs. This will silently break mapping. Align on a single name (e.g., enabledModeSlugs) or add a mapper at the webview boundary.
| // Check if we have a valid cached result. | ||
| const now = Date.now() | ||
|
|
||
| // Include active family ID in cache key for proper invalidation |
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.
[P2] Unused cache key + ineffective invalidation. activeFamilyId and cacheKey are computed but the cache still uses a single cachedModes/cachedAt. Either key the cache by activeFamilyId (e.g., Map<string|null, {modes, ts}>) or drop cacheKey. As-is, family switches can return stale results during TTL.
| const now = Date.now() | ||
| const cacheKey = "allModes" | ||
|
|
||
| if (this.cachedModes && now - this.cachedAt < CustomModesManager.cacheTTL) { |
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.
[P1] Shared cache between getAllModes and getCustomModes can cross-contaminate results. getAllModes() sets this.cachedModes (unfiltered), which may cause subsequent getCustomModes() calls to return unfiltered data until TTL. Use separate caches or include the activeFamilyId in the cache key.
|
I have difficulties pushing my fixes to git.
|
|
Thanks for the effort on this! I’m going to close this PR for now - I’m not fully clear on what specific problem it’s solving. It would help to reword the proposal or description so it’s clearer why the current search bar isn’t sufficient and what behavior this change is improving. |


Related GitHub Issue
Fixes #8494
Providing Roo work here in case someone wants to pick this up
[ENHANCEMENT] Mode Families: Organize Custom Modes into Grouped Collections
Problem (one or two sentences)
Users with many custom modes struggle to manage and switch between different mode collections for various workflows, leading to cluttered mode lists and difficulty finding the right mode for specific tasks.
Context (who is affected and when)
This affects power users and teams who have created multiple specialized custom modes for different types of development work (e.g., frontend development, backend APIs, documentation, testing, DevOps tasks). The problem becomes more pronounced as the number of custom modes grows beyond 5-10 modes, making it hard to quickly find and switch to the appropriate mode for the current task.
Desired behavior (conceptual, not technical)
Users should be able to create "families" or "groups" of modes that represent different workflows or contexts (e.g., "Frontend Development", "API Development", "Documentation"). When a family is selected, only the modes in that family should be available for selection, while other modes remain stored but hidden from the active session. This allows users to focus on relevant modes for their current work while maintaining access to all their custom modes.
Constraints / preferences (optional)
Request checklist
Acceptance criteria (optional)
Given a user has multiple custom modes for different workflows
When they create a mode family for "Frontend Development" containing relevant modes
Then only those modes should be visible when the family is active
And other modes should remain stored but not interfere with the current session
And users should be able to quickly switch between different families
Given a user switches to a different mode family
When the family contains modes that don't exist in current configuration
Then those modes should be gracefully ignored with appropriate validation feedback
But the family should still function with available modes
Proposed approach (optional)
Implement a three-phase approach:
Phase 1: Backend Foundation
ModeFamiliesManagerclass for family CRUD operationsCustomModesManagerfor mode filteringPhase 2: Frontend Integration
ModeFamiliesSettingscomponent for family managementPhase 3: User Experience Enhancement
Architecture Overview
graph TB A[ModeFamiliesManager] --> B[VS Code Settings Storage] A --> C[CustomModesManager] C --> D[Mode Filtering Logic] D --> E[Active Modes List] E --> F[UI Mode Selection]Data Structure
Trade-offs / risks (optional)
Benefits:
Potential Risks:
Migration Strategy:
This enhancement would significantly improve the mode management experience for users with extensive custom mode collections while maintaining the simplicity for users who prefer the current approach.
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Introduces mode families feature to group custom modes, with new UI components and state management updates for creating, editing, and managing these families.
ModeFamiliesManager.FamilyContextIndicator,FamilySwitcher,FamilyList,ModeFamiliesSettings,ModeFamilyEditor, andModeToggleGrid.ModesViewto integrate mode family selection and display.ExtensionStateContextto include mode families state and active family management.types.ts.SettingsViewwith a new tab for mode families.This description was created by
for 16f95b0. You can customize this summary. It will automatically update as commits are pushed.