-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Typing in the search box fires API calls for every keystroke (no debounce), causing excessive requests and potential rate-limit issues.
Steps to reproduce:
Open search page.
Type quickly into search input.
Observe multiple rapid requests to the search endpoint.
Actual: one API call per keystroke.
Expected: search should debounce input (e.g., 300–500ms) and only call API when user pauses.
Root cause: missing debounce logic on search input.
Proposed fix:
Add debounce (300–500ms) on input before calling API (Lodash debounce or custom).
Optionally cache results for repeated terms and add a loading indicator.
Add unit tests simulating rapid typing.
If valid, please assign to @Drishtipixiee — under wocs label. I’ll open a PR implementing debounce and tests.