Repository navigation
feat(loaders): add a debounce option to query loaders - #529
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
kianbazza
added this pull request to stack #526
September 28, 2026 23:52
kianbazza
force-pushed
the
ui-558-add-a-debounce-option-to-query-loaders
branch
from
September 29, 2026 14:29
3f2fa24 to
ed93571
Compare
kianbazza
marked this pull request as ready for review
September 29, 2026 14:45
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Query loaders accept
debounce(ms, default 0):createQueryLoader,createSWRQueryLoaderandcreateVanillaQueryLoader. The engine holds the search until it stops changing, then passes it to the loader. The loader'squeryandenabledboth come from the held search, so a search thatminQueryLengthdisallows is never run. While a newer search waits, the loader counts as fetching.useAsyncMenuCoordinator().isAnyFetchingcan drive a "working" indicator, and the menu doesn't treat the search as finished.Evidence
New
loader-debounce.test.tsx(fake timers, 7 tests):''and'ab'reach the fetcher.minQueryLength: 2,''is never fetched while'ab'waits.Emptystays hidden during the wait and shows after.isAnyFetchingis true during the wait.debounce: 0fetches every keystroke as before.Merge Danger
Door: two-way
Blast Radius: none by default
Default 0 keeps today's behaviour.
Closes UI-558