Skip to content

Fuzzy-search implementation for web import#833

Merged
egorikftp merged 1 commit intomainfrom
feature/#787-web-import-fuzzy-search
Feb 5, 2026
Merged

Fuzzy-search implementation for web import#833
egorikftp merged 1 commit intomainfrom
feature/#787-web-import-fuzzy-search

Conversation

@vkatz
Copy link
Contributor

@vkatz vkatz commented Feb 4, 2026

Implements fuzzy-serach, allowing some mistake, key letter search

Screen.Recording.2026-02-04.at.16.25.47.mov

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Walkthrough

The pull request introduces fuzzy search functionality to the Valkyrie IDE plugin. A new library dependency sublime-fuzzy (version 2.3.4) is added to the Gradle configuration. The idea-plugin module is updated to use this dependency. In the MaterialSymbolsViewModel, the icon filtering logic is refactored from simple name-based filtering to fuzzy matching-based filtering. The new implementation uses a sequence-based approach that computes fuzzy match scores for each icon, filters successful matches, sorts by score, and maps results to IconItem objects.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fuzzy-search implementation for web import' accurately describes the main change: adding fuzzy-search functionality to the web import feature.
Description check ✅ Passed The description explains the fuzzy-search feature implementation and includes a visual demonstration, which is directly related to the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#787-web-import-fuzzy-search

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@tools/idea-plugin/build.gradle.kts`:
- Line 76: The build fails to resolve the fuzzysearch dependency because the
module-level repositories block in tools/idea-plugin/build.gradle.kts only
points to the local m2 repo and overrides root repositories; update the
repositories block that contains implementation(libs.fuzzysearch) to include
JitPack by adding maven(url = "https://jitpack.io") so artifacts with groupId
com.github.* (e.g., com.github.android-password-store:sublime-fuzzy:2.3.4) can
be resolved.
🧹 Nitpick comments (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/webimport/material/MaterialSymbolsViewModel.kt (1)

10-10: Confirm fuzzyMatch semantics and consider input normalization.

Please verify Fuzzy.fuzzyMatch expects (pattern, target) and that a higher score means a better match before sorting descending. If matching is case-sensitive, normalizing query/target helps preserve the “forgiving” search UX.

Possible normalization tweak (optional)
         } else {
+            val query = searchQuery.trim().lowercase()
             categoryFiltered
                 .asSequence()
                 .flatMap { it.value }
-                .map { it to Fuzzy.fuzzyMatch(searchQuery, it.name) }
+                .map { icon -> icon to Fuzzy.fuzzyMatch(query, icon.name.lowercase()) }
                 .filter { it.second.first }
                 .sortedByDescending { it.second.second }
                 .map { IconItem(it.first, it.first.originalName) }
                 .toList()
         }

Also applies to: 173-179

@egorikftp egorikftp merged commit 4e3aa74 into main Feb 5, 2026
4 of 5 checks passed
@egorikftp egorikftp deleted the feature/#787-web-import-fuzzy-search branch February 5, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Web import] [Search] Use fuzzy-search for icon search

2 participants