Gallery's design card has no 'drag handle' to reorder within a folder — user wanting to put a design at the top of a folder has to drag it to no particular drop position, no visual indication of where it'll land #278
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#278
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
The Gallery's DesignCard has
onDragStartandonDragEnd(per the snippet at line 171), but the drag is for moving to other folders. Within a folder, there's no way to reorder.grep -n 'onReorderDesigns\|REORDER_DESIGNS' src/pages/Gallery.tsxreturns 0. No reorder.A user with 10 designs in a "Work" folder, sorted by "newest":
The fix is a drag-to-reorder within the same folder, with a visual drop indicator.
Where
src/components/gallery/DesignCard.tsx(drag start)grep -rn 'REORDER_DESIGNS' src/returns 0Suggested fix shape
State: add
dragOverIndex: number | nullto the Gallery's state (the design index being hovered during a drag).Drag handle: each card has a GripVertical icon (visible on hover) that's the drag source:
onReorder(designId, targetIndex)dispatchesREORDER_DESIGNSto update the design's position.The user can drag any card to any position within the folder. The order is persisted to localStorage.
Severity
Low. The user can use the sort controls. Power users with curated folders notice.
Discovered by
Gap analysis (2026-10-02) of gallery card affordances.
Related
Shipped at
c05951con origin/main.Each design card now exposes a hover-revealed GripVertical handle in its info area that starts a custom-MIME drag (
application/x-design-reorder, distinct from the existingtext/plaindesign-to-folder andapplication/x-folder-idfolder-reorder payloads). Dropping on another card lands the dragged card immediately above the drop target; a 2px gold top-edge line on the hovered card shows where the drop will land. Reorder works in both grid and list views.Order is persisted to localStorage via the existing
saveDesignseffect, and a new"custom"SortMode preserves the curated layout across subsequent sort changes (auto-selected after a reorder).11 new regression tests in
src/components/gallery/issue-278-design-reorder.test.tsxcover: handle renders only when wired, the handle sets the reorder MIME (not text/plain), drop on a card firesonReorderDesigns(draggedId, index), drops with the wrong MIME are no-ops, dropping on yourself is a no-op, dragover firesonReorderDragOver, dragover with text/plain does NOT, the drop indicator renders only whendragOverForReorderis true, the handle forwardsdragEndto the parent, and reorder works in both grid and list views.tsc --noEmit,npm run lint,npm run build, and the full gallery test suite (154 tests) all pass.CI workflow run #261 is queued (
status: waiting); self-hosted Forgejo runner appears offline (every recent run iscancelledorwaiting). Local gates are green; can re-run CI once the runner is back.