Skip to content

feat: configurable Archive hotkey, TODONT settings, and transition fixes#15

Closed
salmonumbrella wants to merge 2 commits intoRoamJS:mainfrom
salmonumbrella:integration/selective-todont
Closed

feat: configurable Archive hotkey, TODONT settings, and transition fixes#15
salmonumbrella wants to merge 2 commits intoRoamJS:mainfrom
salmonumbrella:integration/selective-todont

Conversation

@salmonumbrella
Copy link
Copy Markdown

@salmonumbrella salmonumbrella commented Feb 28, 2026

Summary

  • Configurable Archive TODO hotkey via extension settings (default: Cmd/Ctrl+Shift+Enter)
  • TODONT mode and hotkey settings moved into the main settings panel for discoverability
  • Fixed ARCHIVED→TODO transitions: Cmd/Ctrl+Enter on an ARCHIVED block now correctly replaces with TODO instead of prepending TODO+ARCHIVED
  • Fixed DONE transition detection: blocks edited from non-TODO to DONE now fire onDone callbacks via focusin/focusout tracking
  • Improved click handler for TODO menu items using .closest() instead of fragile parent traversal
  • Settled state reads: setTimeout wrappers so block text is read after Roam processes state changes
  • Proper cleanup on extension unload (listeners, styles, command palette)

PR consolidates work from #11 and #13, which have been closed. The changes are tightly coupled (hotkey config depends on the transition fixes, and the settings panel reorganization touches the same code), so they're submitted together.

What was broken / missing?

What changed?

  • src/index.ts: settings panel gains TODONT mode + hotkey fields, ARCHIVED→TODO normalization on Cmd/Ctrl+Enter, focusin/focusout tracking for DONE detection, proper unload cleanup
  • src/utils/todont.ts: hotkey registration via Roam command palette instead of raw keydown, ARCHIVED button styling via CSS class instead of text replacement, extracted todontCallback for reuse
  • src/utils/normalizeTodoArchivedPrefix.ts (new): regex helper to collapse TODO+ARCHIVED into TODO

How was it verified?

Manual testing in Roam.

video-for-github.mp4

Test plan

  • Cmd/Ctrl+Shift+Enter on a TODO block → becomes ARCHIVED
  • Cmd/Ctrl+Shift+Enter on a DONE block → becomes ARCHIVED
  • Cmd/Ctrl+Shift+Enter on an ARCHIVED block → ARCHIVED removed
  • Cmd/Ctrl+Enter on an ARCHIVED block → becomes TODO (not TODO+ARCHIVED)
  • Cmd/Ctrl+Enter on an multiple blocks → becomes ARCHIVED
  • Change hotkey in settings → new hotkey works
  • Toggle TODONT mode (off / icon / strikethrough) → styling updates live
  • Edit a plain block to start with DONE → onDone callback fires

Closes #4, closes #8, closes #10.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 28, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@salmonumbrella salmonumbrella force-pushed the integration/selective-todont branch from ecb54e6 to 22bbaf1 Compare February 28, 2026 01:21
@salmonumbrella
Copy link
Copy Markdown
Author

@mdroidian done + Loom! Ready for you.

@mdroidian
Copy link
Copy Markdown
Contributor

@mdroidian done + Loom! Ready for you.

Hi — thank you for putting this together. I appreciate the effort here.

PRs that touch multiple concerns are significantly harder to review, and I have limited bandwidth right now. Following the guide helps ensure contributions can be reviewed and merged much more quickly.

https://github.com/RoamJS/contributing/blob/main/contributing.md

A couple adjustments are needed before this can move forward:

  • One PR = One Issue — this PR currently spans multiple issues. Please split it into separate PRs (one per issue).
  • Keep PRs small and tightly scoped per the size guidelines.

Once this is split up, I’ll be happy to take a look.

@salmonumbrella
Copy link
Copy Markdown
Author

Splitting this into 3 smaller, focused PRs per the contributing guidelines (one issue per PR, <500 lines each). The changes will be submitted as stacked PRs:

  1. Fix ARCHIVED → TODO transition (closes Handle ARCHIVED => TODO #4)
  2. Fix TODO state detection and prevent duplicates (closes On Todo does not add text #8, Results in duplicate tasks #10)
  3. Refactor TODONT module with configurable hotkey and bulk archive (new feature issue)

Each PR will be independently reviewable. The stacked approach ensures changes don't conflict since some fixes are prerequisites for others.

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.

Results in duplicate tasks On Todo does not add text Handle ARCHIVED => TODO

2 participants