6ee667c384
- Add includes section to profile editor with drag-and-drop reordering - Display included profiles with scope badges (Global, Project, Tool) - Add 'Add Include' dropdown filtered by compatibility and cycle prevention - Add remove button per include row - Save includes together with profile form - Add include count badges to profile list sidebar - Add drag icon to Icon component Implements config-profile-includes-ui tasks 1.1-4.3
30 lines
1.7 KiB
Markdown
30 lines
1.7 KiB
Markdown
## Why
|
|
|
|
The config profiles feature supports ordered profile composition via the includes system (A includes B then C, resolution applies B → C → A), but this capability is completely invisible to users. They can create and edit individual profiles, but cannot see, add, remove, or reorder the profiles their configuration depends on. Without a UI for profile composition, users cannot build reusable config layers (e.g., an "Auth" profile + "Database" profile → "Full Stack" profile), which was a core design goal of the config profiles feature.
|
|
|
|
## What Changes
|
|
|
|
- Add a drag-and-drop includes management section to the config profile editor
|
|
- Display current includes with scope badges (Global, Project, Tool scoped)
|
|
- Allow adding includes via dropdown filtered by compatibility
|
|
- Allow removing includes
|
|
- Reorder includes via drag-and-drop (order affects resolution priority)
|
|
- Save includes together with the main profile form
|
|
- Add frontend cycle detection to prevent adding profiles that would create an include cycle
|
|
- Update profile list items to show include count badge
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
- `config-profile-includes-management`: Managing ordered profile includes through the UI, including adding, removing, reordering, and visualizing the composition graph with scope indicators
|
|
|
|
### Modified Capabilities
|
|
- *(none — backend APIs already fully support includes)*
|
|
|
|
## Impact
|
|
|
|
- **Frontend**: `apps/web/src/pages/config-profiles.tsx` — add includes management UI section
|
|
- **Frontend**: `apps/web/src/api/config_profiles.ts` — already has `updateProfileIncludes()`, no changes needed
|
|
- **Backend**: No changes required — `PUT /config-profiles/{id}/includes` and cycle detection already exist
|
|
- **No breaking changes**
|