Skip to content

Conversation

@multiplex55
Copy link
Owner

Motivation

  • Separate tag tokens from text tokens in todo list queries so tag filters are applied deterministically.
  • Allow explicit exclusion of tags (prefixed with !@ or !#) and preserve existing ! negation semantics for text matching.
  • Ensure tag filtering runs before fuzzy text matching and that priority sorting is preserved when tag filters are used.
  • Add a focused unit test to exercise tag combinations and negated text behavior.

Description

  • Updated TodoPlugin::search_internal parsing so each token after todo list is split on whitespace and categorized as a requested tag, excluded tag, or text token while preserving single-! negation for text via strip_prefix('!').
  • Applied tag filtering first by retaining entries that contain all requested_tags (case-insensitive) and removing any that contain any excluded_tags (case-insensitive).
  • Kept the existing fuzzy text filtering (using the joined text_tokens) and preserved priority sorting when tag filters are active or when there is no text filter.
  • Added a unit test list_filters_by_tags_and_text in src/plugins/todo.rs that creates sample entries and verifies todo list @testing, todo list @testing @ui, and todo list !foo @testing behaviors.

Testing

  • Added the automated unit test list_filters_by_tags_and_text in src/plugins/todo.rs which asserts tag-only filtering, combined-tag (AND) behavior, and negated text after tag filtering.
  • No automated test suite was executed as part of this change (tests were added but not run).

Codex Task

@multiplex55 multiplex55 merged commit 61d1b0d into master Jan 9, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/enhance-todoplugin-search-functionality branch January 9, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants