Fix todo tag listing for empty filters#792
Merged
multiplex55 merged 1 commit intomasterfrom Feb 2, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
todo tagwith an empty filter returns tag counts from the entire todo cache rather than applying a fuzzy filter to an empty query.rest.trim()is empty so the command lists all known tags.Description
todo taghandler insrc/plugins/todo.rsto treat an emptyrestas no filter (None) and to only run fuzzy filtering when a non-empty filter string exists.TODO_DATAfirst and applied the fuzzy match only whenSome(filter)is present, preserving full counts otherwise.tag_command_without_filter_lists_all_tagsintests/todo_plugin.rsthat seeds multiple todos with overlapping tags and asserts thatplugin.search("todo tag")returns deduped tag counts in the expected order (#alpha (2),#beta (2),#gamma (1)).Testing
cargo test tag_command_without_filter_lists_all_tagswhich attempted to run the single new test but the build failed due to a missing system dependency (alsa), causing the test run to fail during crate compilation.tests/todo_plugin.rsand will pass once the environment provides the required system library for building (alsa/pkg-configconfiguration).Codex Task