Skip to content

fix: sync keyword highlights and deduplicate filters#1214

Merged
danielroe merged 6 commits intonpmx-dev:mainfrom
RYGRIT:fix/keyword-highlight-persistence
Feb 26, 2026
Merged

fix: sync keyword highlights and deduplicate filters#1214
danielroe merged 6 commits intonpmx-dev:mainfrom
RYGRIT:fix/keyword-highlight-persistence

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 26, 2026 11:13am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 26, 2026 11:13am
npmx-lunaria Ignored Ignored Feb 26, 2026 11:13am

Request Review

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 3 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 90.90% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d1f48f and 8e8b34c.

📒 Files selected for processing (3)
  • app/composables/useStructuredFilters.ts
  • app/pages/org/[org].vue
  • app/pages/search.vue
💤 Files with no reviewable changes (2)
  • app/pages/search.vue
  • app/pages/org/[org].vue

📝 Walkthrough

Walkthrough

The PR updates the structured filters composable: parseSearchOperators now deduplicates keywords case‑insensitively; a new removeKeywordFromQuery(query, keyword) helper removes keywords from both kw: and keyword: formats (including comma lists) with cleanup; add/remove/toggle keyword logic now prevents case‑insensitive duplicates and uses the new remover; filter state is initialised/exposed earlier and synchronised from URL query changes to set text and keywords while preserving other filters; UseStructuredFiltersOptions gains optional initialFilters and initialSort. Tests for keyword parsing and clearing were added.

Possibly related PRs

Suggested reviewers

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

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@danielroe danielroe changed the title fix(search): sync keyword highlights and deduplicate filters fix: sync keyword highlights and deduplicate filters Feb 26, 2026
@danielroe danielroe enabled auto-merge February 26, 2026 11:11
@danielroe danielroe added this pull request to the merge queue Feb 26, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 26, 2026
@danielroe danielroe added this pull request to the merge queue Feb 26, 2026
Merged via the queue into npmx-dev:main with commit f374326 Feb 26, 2026
25 of 26 checks passed
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.

2 participants