Content
View differences
Updated by Alexander Coles 6 days ago
Implement server support for optimistic drag-and-drop reordering in backlogs. Drag moves are applied in the client DOM first, then persisted through the existing backlogs move endpoint with an explicit optimistic flag so the server can decide when a full backlogs frame reload is unnecessary.
Expected behavior:
- Same-list drag moves persist the new position and avoid reloading the whole backlogs frame when the server can safely accept the optimistic order.
- Cross-list drag moves and menu/dialog moves keep the existing frame reload behavior so list membership, visibility, and flash messages stay reconciled.
- The work package list update and position update are atomic: a failure while assigning the final position must roll back the whole move.
- Successful moves still dispatch the backlogs work-package-moved event so split-view lock_version state can refresh.
Important edge cases to cover:
- Stale or invalid prev_id must not leave the client showing an optimistic order that differs from persisted server order; reload/reconcile in that case.
- Existing query parameters from the turbo frame must be preserved when building the move request URL.
- Absolute move URL templates, if supported by the generic sortable-lists controller, should keep their origin when optimistic=true is added.
- Non-drag move paths must remain unflagged so they continue to receive the normal reload response.
Expected behavior:
- Same-list drag moves persist the new position and avoid reloading the whole backlogs frame when the server can safely accept the optimistic order.
- Cross-list drag moves and menu/dialog moves keep the existing frame reload behavior so list membership, visibility, and flash messages stay reconciled.
- The work package list update and position update are atomic: a failure while assigning the final position must roll back the whole move.
- Successful moves still dispatch the backlogs work-package-moved event so split-view lock_version state can refresh.
Important edge cases to cover:
- Stale or invalid prev_id must not leave the client showing an optimistic order that differs from persisted server order; reload/reconcile in that case.
- Existing query parameters from the turbo frame must be preserved when building the move request URL.
- Absolute move URL templates, if supported by the generic sortable-lists controller, should keep their origin when optimistic=true is added.
- Non-drag move paths must remain unflagged so they continue to receive the normal reload response.