fix(profiles): enable drag-and-drop reordering for built-in profiles

Wrap built-in profiles section with DndContext and SortableContext
to allow reordering of pre-configured profiles, matching the behavior
available for custom profiles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-10 14:44:39 +01:00
parent fff8a6398f
commit e210d676c1
2 changed files with 40 additions and 10 deletions

View File

@@ -311,5 +311,24 @@
"skipTests": false,
"model": "sonnet",
"thinkingLevel": "none"
},
{
"id": "feature-1765374057950-og96suob2",
"category": "Other",
"description": "I found an issue u can reorder custom profiles created by our self but the pre build in when u try to drag nothing happend",
"steps": [],
"status": "verified",
"startedAt": "2025-12-10T13:40:58.991Z",
"imagePaths": [
{
"id": "img-1765374055642-rdjksh8g1",
"path": "/Users/shirone/Library/Application Support/automaker/images/1765374055641-o7pu97zuz_SCR-20251210-namv.png",
"filename": "SCR-20251210-namv.png",
"mimeType": "image/png"
}
],
"skipTests": true,
"model": "sonnet",
"thinkingLevel": "medium"
}
]

View File

@@ -598,16 +598,27 @@ export function ProfilesView() {
Pre-configured profiles for common use cases. These cannot be
edited or deleted.
</p>
<div className="space-y-3">
{builtInProfiles.map((profile) => (
<SortableProfileCard
key={profile.id}
profile={profile}
onEdit={() => {}}
onDelete={() => {}}
/>
))}
</div>
<DndContext
sensors={sensors}
collisionDetection={closestCenter}
onDragEnd={handleDragEnd}
>
<SortableContext
items={builtInProfiles.map((p) => p.id)}
strategy={verticalListSortingStrategy}
>
<div className="space-y-3">
{builtInProfiles.map((profile) => (
<SortableProfileCard
key={profile.id}
profile={profile}
onEdit={() => {}}
onDelete={() => {}}
/>
))}
</div>
</SortableContext>
</DndContext>
</div>
</div>
</div>