feat(tasks): Add fuzzy search support using Fuse.js#184
Closed
ShivaGupta-14 wants to merge 3 commits intoCCExtractor:mainfrom
Closed
feat(tasks): Add fuzzy search support using Fuse.js#184ShivaGupta-14 wants to merge 3 commits intoCCExtractor:mainfrom
ShivaGupta-14 wants to merge 3 commits intoCCExtractor:mainfrom
Conversation
Adds visual indicators for tasks modified locally but not yet synced with the backend. Implementation details: - Uses `localStorage` to track dirty UUIDs (keeps IndexedDB schema clean). - Adds "Unsynced" badge to task rows. - Adds a notification counter badge to the Sync button. - Masks temporary negative IDs with a dash in the UI. - Updates tasks optimistically for instant UI feedback. - Clears unsynced status automatically upon successful sync.
Replaces the previous exact-match `.includes()` search with a
more flexible and powerful fuzzy search. This allows users to
find tasks even with partial matches or typos, improving workflow
efficiency.
Key changes:
- Integrates `fuse.js` to search across the `description`, `project`,
and `tags` fields.
- Implements a dual-state (`searchInput` / `debouncedTerm`) pattern to
keep the input responsive while debouncing the expensive search logic.
- Consolidates all filtering (dropdown filters + search) into a single
"Master Filter" `useEffect` to ensure all filters work together correctly.
- Updates tests using `jest.fakeTimers` and `act` to validate the debounced
fuzzy search behavior using a typo search term ("Norml").
Fixes: CCExtractor#162
---
**Stacked PR Notice**
This PR is *stacked on top of PR CCExtractor#143*.
Please merge **PR CCExtractor#143** first.
Contributor
Author
|
Closing this PR as it was stacked on another PR. I’ve opened a clean, standalone PR #217 to make the review easier. |
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.
Description
This PR implements fuzzy search support in the Tasks screen using
Fuse.js, replacing the previous exact-match.includes()search.With this improvement, users can now find tasks using partial matches or even minor typos, significantly enhancing the search experience and workflow speed.
Key Changes
Fuzzy Search Integration:
Fuse.jsto perform fuzzy matching ondescription,project, andtags.Improved Search UX:
searchInput→ immediate UI updatesdebouncedTerm→ fuzzy search triggered after 300ms debounceUnified Filtering Logic:
useEffect.Test Enhancements:
"Norml"to match"Normal Synced Task".Stacked PR Notice
Please merge PR #181 first; after that, this PR will become clean automatically.
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes
Video: Link to see changes