Skip to content

Conversation

@mdroidian
Copy link
Contributor

@mdroidian mdroidian commented Feb 7, 2026


Open with Devin

Summary by CodeRabbit

  • New Features

    • Added "Ignore Tags" setting to skip TODO/DONE triggers for specified tags (comma- or pipe-separated). Blocks matching these tags are now excluded from formatting, replacement, and style changes.
  • Documentation

    • Updated README with new configuration options, added/clarified placeholder entries (including a deprecated placeholder), and expanded Replace Tags and Ignore Tags explanations.

- Updated README to clarify configuration options and added support for 'Ignore Tags' to skip TODO/DONE triggers based on specified tags.
- Implemented logic in the extension to handle ignored tags during TODO/DONE transitions.
@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

Warning

Rate limit exceeded

@mdroidian has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Adds an "Ignore Tags" extension setting that accepts a comma- or pipe-separated list of tags to skip TODO/DONE triggers. Implements a new helper shouldIgnoreBlock() to normalize tags and match block text against the ignore list. Adds early-exit logic to onTodo and onDone, and propagates guards across styling/unstyling and block-selection flows to bypass ignored blocks. Updates README.md with new/changed placeholder descriptions and a new "Ignore Tags" configuration bullet.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and concisely summarizes the main change: adding an 'Ignore Tags' feature to control TODO/DONE triggers, which matches the core functionality introduced across README and src/index.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ignore-tags

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.

@mdroidian mdroidian linked an issue Feb 7, 2026 that may be closed by this pull request
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@README.md`:
- Line 18: Fix the duplicated word "the the" in the README descriptions for the
`/Today` entry (and the duplicate occurrence later) by replacing "inserts the
the current day" with "inserts the current day" wherever the `/Today`
description appears; search for the literal string "/Today" to locate both
occurrences and update the text accordingly.
🧹 Nitpick comments (4)
src/index.ts (4)

433-442: Consider merging the two if (block) checks.

The double if (block) at Lines 433 and 440 works correctly but reads awkwardly. These can be consolidated into a single conditional.

♻️ Suggested consolidation
-          if (block) {
-            const blockUid = getBlockUidFromTarget(input);
-            if (blockUid && shouldIgnoreBlock(getTextByBlockUid(blockUid))) {
-              unstyleBlock(block);
-              return;
-            }
-          }
-          if (block) {
-            styleBlock(block);
+          if (block) {
+            const blockUid = getBlockUidFromTarget(input);
+            if (blockUid && shouldIgnoreBlock(getTextByBlockUid(blockUid))) {
+              unstyleBlock(block);
+            } else {
+              styleBlock(block);
+            }
           }

454-463: Redundant ignore guard — unchecked blocks always get unstyled.

In the unchecked (else) branch, both the ignore path (Line 457) and the normal path (Line 462) call unstyleBlock(block). The shouldIgnoreBlock check and early return at Lines 454-460 have no observable effect and can be removed to simplify the code.

♻️ Suggested simplification
          const block = CLASSNAMES_TO_CHECK.map(
            (c) => l.closest(`.${c}`) as HTMLElement,
          ).find((d) => !!d);
-          if (block) {
-            const blockUid = getBlockUidFromTarget(input);
-            if (blockUid && shouldIgnoreBlock(getTextByBlockUid(blockUid))) {
-              unstyleBlock(block);
-              return;
-            }
-          }
          if (block) {
            unstyleBlock(block);
          }

301-327: Click handler on checkbox doesn't guard against onDone returning early for ignored blocks.

When input.checked is false (Line 315), onDone is called and the return value's .explode property is accessed at Line 317. This works correctly today because shouldIgnoreBlock returns { explode: false } from onDone. However, there's a latent fragility: the onTodo path (Line 314) discards the return value, yet the onDone path depends on it. If a future refactor changes onDone's early-return to undefined or void, Line 317 would throw at runtime (Cannot read properties of undefined).

Consider a defensive check:

              const config = onDone(blockUid, oldValue);
-              if (config.explode) {
+              if (config?.explode) {

This is not a current bug — just a minor resilience improvement.


403-404: Pre-existing: isStrikethrough and isClassname are read once at init, not reactively.

This isn't introduced by this PR, but worth noting: if a user toggles the Strikethrough or Classname settings after the extension loads, the change won't take effect until Roam is reloaded. The new shouldIgnoreBlock function reads settings on each call (which is reactive), creating a behavioral inconsistency. Not actionable for this PR, but something to be aware of.

…ock UID and ignore tags. This change enhances the handling of zoom items by unstyling blocks that should be ignored.
…lder in configuration options for TODO/DONE triggers.
@mdroidian mdroidian merged commit 408a720 into main Feb 7, 2026
2 checks passed
@mdroidian mdroidian deleted the ignore-tags branch February 7, 2026 01:32
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.

Feature Request

1 participant