Skip to content

Conversation

@jacbn
Copy link
Contributor

@jacbn jacbn commented Nov 11, 2025

Migrates the site search logic to RTKQ.

I was toying between using debounce and throttle here, but went with a debounce with both leading and trailing set. This makes it instantly responsive on first use, but waits until the timeout has passed entirely once if there are multiple presses. Truthfully this probably doesn't *need* a debounce here since it's unlikely someone would spam enter alongside typing their query, but it doesn't hurt.
@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 75.92593% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.08%. Comparing base (c5c833e) to head (7d2d887).
⚠️ Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
src/app/components/pages/Search.tsx 72.41% 8 Missing ⚠️
src/app/components/site/phy/NavigationMenuPhy.tsx 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1826      +/-   ##
==========================================
+ Coverage   41.73%   42.08%   +0.35%     
==========================================
  Files         542      542              
  Lines       23685    23670      -15     
  Branches     7855     6998     -857     
==========================================
+ Hits         9884     9961      +77     
+ Misses      13757    13664      -93     
- Partials       44       45       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jacbn jacbn marked this pull request as ready for review November 11, 2025 16:34
Copy link
Contributor

@axlewin axlewin left a comment

Choose a reason for hiding this comment

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

The search logic looks good, as does the main search page.

This breaks header search, though, where onSearch isn't defined.

@axlewin axlewin merged commit 5657208 into main Nov 17, 2025
10 checks passed
@axlewin axlewin deleted the improvement/site-search-rtkq-migration branch November 17, 2025 15:14
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.

3 participants