Skip to content

Refactor TODONT module with configurable hotkey and bulk archive #16

Open

Description

@salmonumbrella

Problem

The TODONT/Archive module has several limitations:

  • The Archive hotkey (Cmd/Ctrl+Shift+Enter) is hardcoded with no way to customize it
  • Archiving doesn't work on multi-selected blocks
  • The ARCHIVED button styling replaces the button's inner text, which breaks accessibility (screen readers see "x" instead of "ARCHIVED")
  • The module uses a raw keydown listener instead of Roam's command palette, so it doesn't appear in the command search
  • Missing null-safety guards in replaceText and mobile icon handlers

Proposed Changes

  • Accept extensionAPI parameter in initializeTodont, return { toggle, cleanup } for proper lifecycle management
  • Register Archive command via extensionAPI.ui.commandPalette.addCommand with configurable default hotkey
  • Add archiveBlock helper using updateBlock for multi-select support
  • Use CSS ::before pseudo-element for ARCHIVED button styling (keeps text as "ARCHIVED" for accessibility)
  • Replace styleArchivedButtons with syncArchivedButton/syncArchivedButtons pattern
  • Add null-safety guards and proper cleanup on extension unload

Activity

  1. coderabbitai commented on Feb 28, 2026

    @coderabbitai
    🔗 Related PRs

    #12 - Add 'Ignore Tags' feature to TODO/DONE triggers [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions