Fix TODO transition handling (#4 #8 #10)#13
Fix TODO transition handling (#4 #8 #10)#13salmonumbrella wants to merge 7 commits intoRoamJS:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…emory leak Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ner on unload Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughThis pull request introduces debounced transition handling for TODO/DONE state changes to prevent duplicate processing. The src/index.ts file adds a stateful debouncing mechanism with latestHandledTransition tracking and time-window throttling, replacing direct onTodo/onDone calls with triggerOnTodo/triggerOnDone wrappers that gate execution based on recent handling state. Additionally, the ARCHIVED replacement logic in src/utils/todont.ts is modified to insert a TODO marker instead of an empty string, and the README.md documents this updated archive behavior. Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
onTodocallback fires correctly.closest()instead of fragile parent traversalsetTimeoutwrappers to read block text after Roam processes state changesCode Review Cleanup
50intoROAM_STATE_SETTLE_MSconstantclickListenerin cleanup return (was leaked on unload)unloadcallback to clean uptodoTriggerBounddataset flagsasyncfrom event listenersTest Plan
onTodotext is appendedappendTextis addedCloses #4, closes #8, closes #10
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes