Skip to content

fix(kanban): preserve recurring occurrence during a drag - #2520

Merged
callumalpass merged 2 commits into
mainfrom
fix/kanban-recurring-drag-refresh
Nov 8, 2026
Merged

callumalpass merged 2 commits into
mainfrom
fix/kanban-recurring-drag-refresh

Conversation

@callumalpass

@callumalpass callumalpass commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Cause

Found during 4.17.0 release validation. A task-updated event schedules a 150ms Kanban refresh. Unlike onDataUpdated, that timer could redraw during an active drag and replace the dragged card's occurrence cache. If the occurrence had just been completed elsewhere, dropping the original card on Done could complete the newly pending occurrence too.

Fix

  • Defer the debounced redraw while a task drag is active, including timers queued before pickup.
  • Mark the render pending so existing drop/cancel cleanup refreshes the board afterwards.
  • Flush pending refreshes after touch cancellation as well as mouse drag end; don't schedule that refresh during unload.
  • Keep occurrence freshness checks and post-drop suppression unchanged.

Validation

  • New fake-timer regression tests fail without the drag guard and pass with it; cover both timer/drag orderings, stale-drop rejection and real post-drop refresh. Added unload/touch cleanup coverage.
  • Strengthened the native mid-drag completion test with an active-drag assertion and a 500ms hold beyond the refresh debounce; added mouse and touch cancellation/catch-up cases.
  • The sequential ordinary-drop control now waits for the previous interaction's post-drop redraw before measuring the next card; file persistence can finish before that redraw. No assertion was removed.
  • Final full Jest: 782 suites / 6,042 tests passed (existing skips/todos retained).
  • Isolated Obsidian 1.14.2: 18 related recurring-drop/status-cycle/manual-order tests passed, including mouse, touch, batch, ordinary drops and Undo.
  • Stale-drop, mouse cancellation, touch cancellation and ordinary-drop cases: 20/20 passed across five repeats each.
  • Strict lint, typecheck, docs checks, production build, generated CSS lint and bundle budget passed.
  • Independent read-only review found no blocking issue with the race fix; its touch-cancel observation is addressed above.

No plugin release is published by this PR. The pending release draft is left untouched.

@callumalpass
callumalpass merged commit 5722c6f into main Nov 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant