Repository navigation
fix(bindx-dataview): drop a pending search debounce on every change - #163
Merged
Merged
Conversation
useDataViewTextFilterInput debounced only non-empty values and left a pending timer running when the box was emptied, so the stale timer applied the previous letter after the filter was cleared, and the sync effect copied it back into the input. A reset from outside while a timer was pending was skipped, and the pending value landed afterwards. The input now cancels the pending timer on every change, including the one that empties the box, and remembers the last query it applied itself: a different query in the filter state came from outside, so the pending value is dropped and the input shows the new query. Fixes #142 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Review round 1: independent Claude agent (Claude Code, Verdict: approve Nothing material. The fix removes the root cause, and both tests fail without it. Two notes, not addressed here:
|
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.
Fixes #142.
useDataViewTextFilterInputdebounced only non-empty values and left a pending timer running when the box was emptied. The stale timer then applied the previous letter after the filter was cleared, and the sync effect copied it back into the input. A reset from outside while a timer was pending was skipped as well, and the pending value landed afterwards.The input now:
Kept separate from the other DataView fixes: it touches only
filterHooks.ts.Tests
tests/react/dataview/textFilterInputDebounce.test.tsx: emptying the box within the debounce, and a reset from outside within the debounce. Both fail without the fix.Status
approve.mainas 1818ca8 (merge commit). Released in 0.1.61.🤖 Generated with Claude Code