Manual page ordering with drag-and-drop #45
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#45
Loading…
Reference in New Issue
Block a user
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?
Context
The third sidebar sort mode from the vision: a freely defined order.
Scope
Backend:
sort_keyfractional-index handling —PATCH /pages/:id/position(before/after page id) recomputing only the moved page's key, rebalancing when precision exhausts. Frontend: enable 'manual' in the pond sort-mode setting; drag-and-drop reordering in the sidebar (keyboard alternative: move up/down menu actions); new pages append at the end in manual mode.Acceptance criteria
Technical notes
sort_key), story #26 (sort-mode switch exists).Dependencies
Depends on #26.
Size: ~1 day
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Implemented in
69b00fc(Claude Opus 4.8). Pipeline green (CI incl. the new reorder e2e pack; CD deploy Test → smoke → promote Int).Live-verified on Test: set manual mode, created A/B/C,
PATCH /pages/:id/position {afterId:A, beforeId:B}on C → 200,GET /ponds/:id/pagesreturns A, C, B — order lives insort_key, server-authoritative. ✓Acceptance criteria
sort_key; a fresh read (reload / other user) sees the same order (e2e + db test).sort-key.test.tshammers the adversarial "always insert into the tightest gap" pattern; keys stay unique, sorted, and ≤ MAX_SORT_KEY_LENGTH becausenextKeyOrRebalancereturns null → the service rebalances the pond to evenly-spaced keys in one transaction.sort_key, switching back to manual shows the same order — keys are never rewritten by a mode change).aria-live="polite"status; e2e asserts the announcement.Notes
PATCH /pages/:id/positionrecomputes only the moved page's key between its two named neighbours; full-pond rebalance is the fallback for key-length overflow or stale/out-of-order neighbours (the fractional-indexing lib silently mis-generates on reversed neighbours, so ordering is guarded explicitly).sort-key.ts,reorder.ts) are unit-tested; e2e drives the keyboard path (native HTML5 drag events are unreliable to simulate) which shares the samemoveTo→ endpoint code.Next M4 issue: #46 (wikilink node with autocomplete).