Summary
The swap interface search fires a request per keystroke and can render a stale response over a newer one. Add debouncing and cancel/ignore superseded requests.
Why this matters
Per-keystroke, race-prone search wastes work and shows wrong results. Debounce + cancellation is the standard, testable fix.
Requirements
- Debounce swap interface search input before querying.
- Cancel or ignore responses from superseded requests (guard against stale results).
- Show loading, empty-result, and error states distinctly.
- Keyboard and screen-reader accessible.
Technical guidance
- Track the latest request token and drop out-of-order responses.
- Trim/normalize the query before sending.
Edge cases — each must have a test
Acceptance criteria
Out of scope
- Search history/suggestions
- Server-side ranking
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.
Summary
The swap interface search fires a request per keystroke and can render a stale response over a newer one. Add debouncing and cancel/ignore superseded requests.
Why this matters
Per-keystroke, race-prone search wastes work and shows wrong results. Debounce + cancellation is the standard, testable fix.
Requirements
Technical guidance
Edge cases — each must have a test
Acceptance criteria
npm run lint,npm test, andnpm run buildall pass locallyCloses #<issue>Out of scope
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.