Skip to content

Conversation

@RYGRIT
Copy link
Contributor

@RYGRIT RYGRIT commented Feb 8, 2026

This PR fixes two issues:

  • Persistent Highlights: Keyword highlights now properly clear when the search input changes (updated the route.query.q watcher).
  • Keyword Sync: Toggling a highlighted keyword now correctly removes it from the input, handling both kw: and keyword: formats.

Also added deduplication for keywords in the filter state.

Before
2026-02-08.15-50-59.mp4
After
freecompress-2026-02-08.22-38-24.mp4

@vercel
Copy link

vercel bot commented Feb 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 8, 2026 2:45pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 8, 2026 2:45pm
npmx-lunaria Ignored Ignored Feb 8, 2026 2:45pm

Request Review

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 70.83333% with 7 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/composables/useStructuredFilters.ts 70.83% 3 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

The pull request modifies the structured filters composable to implement keyword deduplication and improve filter synchronisation. Changes include adding a private escapeRegExp helper function for safe regex usage, deduplicating keywords case-insensitively during search operator parsing, and enhancing the removeKeyword function to handle both kw: and keyword: formats with comma-separated values. The UseStructuredFiltersOptions interface gains an optional initialSort parameter. Filter state initialisation and URL synchronisation are refined to properly reflect parsed search operators. Corresponding test coverage is added for keyword deduplication, clearing, and various operator scenarios.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, detailing fixes for keyword highlight persistence and synchronisation, plus deduplication.

✏️ 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

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
app/composables/useStructuredFilters.ts (1)

78-87: Align keyword casing across filters to prevent duplicates.

Dedup is case‑insensitive but downstream keyword checks (e.g., add/remove) are case‑sensitive, so keywords with different casing can reappear. Consider a case‑insensitive compare in add/remove to keep behaviour consistent with the new dedup logic.


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

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.

1 participant