Skip to content

feat(tasks): implement fuzzy search using Fuse.js#217

Merged
its-me-abhishek merged 1 commit intoCCExtractor:mainfrom
ShivaGupta-14:feat/162-fuzzySearch
Nov 25, 2025
Merged

feat(tasks): implement fuzzy search using Fuse.js#217
its-me-abhishek merged 1 commit intoCCExtractor:mainfrom
ShivaGupta-14:feat/162-fuzzySearch

Conversation

@ShivaGupta-14
Copy link
Copy Markdown
Contributor

Description

This PR adds fuzzy search to the Tasks screen using Fuse.js, replacing the previous exact-match .includes() search.
With this, users can now find tasks using partial matches or minor typos.

Fixes: #162


Key Changes

Fuzzy Search Integration

  • Integrated Fuse.js for fuzzy matching on description, project, and tags.
  • Configured a threshold for balanced relevance.
  • Search now respects all existing filters (project, tags, status).

Improved Search UX

  • Added a two-state search (searchInput + debouncedTerm) with 300ms debounce.
  • Prevents unnecessary searches on every keystroke.

Unified Filtering Logic

  • Combined search + tag/project/status filters into one master filtering useEffect.
  • Ensures consistent results across all filter combinations.

Test Updates

  • Updated Jest tests for fuzzy search behavior.
  • Added tests for typo tolerance (e.g., "fiace""Finance").

Checklist

  • Ran npx prettier --write .
  • Ran gofmt -w . (Go backend)
  • Ran npm test
  • Added/updated unit tests
  • All tests passing
  • Documentation updated if needed

Additional Notes

Video demo: Click here to see

Replaces the previous exact-match `.includes()` search with a more flexible
and powerful fuzzy search. Users can now find tasks even with partial
matches or typos, improving workflow efficiency and overall usability.

Key changes:
- Integrated `Fuse.js` to perform fuzzy matching across `description`,
  `project`, and `tags`.
- Added a dual-state search pattern (`searchInput` + `debouncedTerm`) to keep
  typing responsive while debouncing the expensive search operation.
- Consolidated all filters (projects, tags, status) and fuzzy search into a
  single "Master Filter" `useEffect`, ensuring all filters interact correctly.
- Updated Jest tests using `jest.useFakeTimers()` and `act` to validate the
  debounced fuzzy search, including typo-tolerant queries like "fiace".

Fixes: CCExtractor#162
@its-me-abhishek its-me-abhishek merged commit 6eaf0ce into CCExtractor:main Nov 25, 2025
4 checks passed
@ShivaGupta-14 ShivaGupta-14 deleted the feat/162-fuzzySearch branch November 25, 2025 08:39
ShivaGupta-14 added a commit to ShivaGupta-14/ccsync that referenced this pull request Dec 25, 2025
Replaces the previous exact-match `.includes()` search with a more flexible
and powerful fuzzy search. Users can now find tasks even with partial
matches or typos, improving workflow efficiency and overall usability.

Key changes:
- Integrated `Fuse.js` to perform fuzzy matching across `description`,
  `project`, and `tags`.
- Added a dual-state search pattern (`searchInput` + `debouncedTerm`) to keep
  typing responsive while debouncing the expensive search operation.
- Consolidated all filters (projects, tags, status) and fuzzy search into a
  single "Master Filter" `useEffect`, ensuring all filters interact correctly.
- Updated Jest tests using `jest.useFakeTimers()` and `act` to validate the
  debounced fuzzy search, including typo-tolerant queries like "fiace".

Fixes: CCExtractor#162
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.

Implement fuzzy search in task list with instant results

2 participants