fix(kanban): atomic column rename with rollback on cascade failure #143

Merged
zaelgohary merged 2 commits from development_fix_kanban_rename_atomic into development 2026-04-23 08:48:53 +00:00
Member

Summary

Renaming a kanban column used to save the new name server-side and then fan out per-task moves in parallel. When any of those moves failed, the project already held the new swimlane name but some tasks still pointed at the old one and the cards disappeared from the board. The fix snapshots both the project and the affected tasks before the optimistic change, and on partial failure rolls everything back — server-side first so a reload can't resurrect the half-renamed state, then client-side. If the rollback itself has errors, they're appended to the banner so the user knows the UI is stale and a reload is needed.

Closes #139

Changes

  • Column rename now captures a project + tasks snapshot before the optimistic update and uses them to roll back on any cascade failure
  • Rollback runs server-first (re-save original project, re-move successfully migrated tasks back) so a reload can't re-read the partial state
  • The banner after a failed cascade names the failed tasks; if the rollback also failed it appends a "reload to resync" note with the underlying errors

Test Results

cargo check / clippy -D warnings / fmt --check clean on hero_archipelagos_kanban; cargo check --workspace clean; manually verified the happy-path rename still works on the shared test instance.

Manual verification

  • Rename a column with tasks in it — cards stay in the renamed column, no banner
  • Simulate an RPC failure on one task's move (or reproduce mid-cascade) — banner reads Rename rolled back — N task(s) failed to migrate …, column reverts to old name, cards return to their original swimlane
  • Concurrent / repeated renames don't leave an orphaned card
## Summary Renaming a kanban column used to save the new name server-side and then fan out per-task moves in parallel. When any of those moves failed, the project already held the new swimlane name but some tasks still pointed at the old one and the cards disappeared from the board. The fix snapshots both the project and the affected tasks before the optimistic change, and on partial failure rolls everything back — server-side first so a reload can't resurrect the half-renamed state, then client-side. If the rollback itself has errors, they're appended to the banner so the user knows the UI is stale and a reload is needed. ## Related Issue Closes #139 ## Changes - Column rename now captures a project + tasks snapshot before the optimistic update and uses them to roll back on any cascade failure - Rollback runs server-first (re-save original project, re-move successfully migrated tasks back) so a reload can't re-read the partial state - The banner after a failed cascade names the failed tasks; if the rollback also failed it appends a "reload to resync" note with the underlying errors ## Test Results `cargo check / clippy -D warnings / fmt --check` clean on `hero_archipelagos_kanban`; `cargo check --workspace` clean; manually verified the happy-path rename still works on the shared test instance. ## Manual verification - [ ] Rename a column with tasks in it — cards stay in the renamed column, no banner - [ ] Simulate an RPC failure on one task's move (or reproduce mid-cascade) — banner reads `Rename rolled back — N task(s) failed to migrate …`, column reverts to old name, cards return to their original swimlane - [ ] Concurrent / repeated renames don't leave an orphaned card
zaelgohary merged commit c181481a95 into development 2026-04-23 08:48:53 +00:00
zaelgohary deleted branch development_fix_kanban_rename_atomic 2026-04-23 08:48:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_archipelagos!143
No description provided.