feat: implement Story 1.4 — recent view and drag-and-drop organization

Add sortOrder column to diagrams, extend PATCH endpoint with projectId
and sortOrder fields, add POST /diagrams/reorder bulk endpoint with
ownership verification and duplicate ID validation. Enhance RecentList
with lastAiMessage preview subtitle. Implement @dnd-kit drag-and-drop
in ProjectTree sidebar with cross-project moves, intra-project reorder,
optimistic updates, drag overlay, drop indicators, and keyboard/pointer
sensor support. Context-aware GET ordering: sortOrder for project views,
updatedAt for recent/all views. 141 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-02-23 23:21:09 +00:00
parent e9cd685d3d
commit 098f4968be
14 changed files with 3366 additions and 363 deletions

View File

@@ -45,7 +45,7 @@ development_status:
1-1-create-and-view-diagrams: done
1-2-organize-diagrams-into-projects: done
1-3-diagram-access-control-and-management: done
1-4-recent-view-and-drag-and-drop-organization: backlog
1-4-recent-view-and-drag-and-drop-organization: done
epic-1-retrospective: optional
# ── Epic 2: Interactive Canvas & Diagram Types (Phase 2) ──