Skip to content

fix: add debounce to pods and queues search#275

Open
pggdev wants to merge 2 commits into
volcano-sh:mainfrom
pggdev:feat/add-search-debounce
Open

fix: add debounce to pods and queues search#275
pggdev wants to merge 2 commits into
volcano-sh:mainfrom
pggdev:feat/add-search-debounce

Conversation

@pggdev

@pggdev pggdev commented May 20, 2026

Copy link
Copy Markdown

Summary

#274

Adds debounced search for Pods and Queues to avoid sending backend requests on every keystroke.

Changes

Added reusable useDebouncedValue hook.
Updated Pods search to use debounced search text.
Updated Queues search to use debounced search text.
Preserved existing pagination and refresh behavior.

Signed-off-by: pggdev <princegupta.ns153@gmail.com>
@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jessestutler for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a custom useDebouncedValue hook to optimize search functionality in the Pods and Queues components, reducing the frequency of API calls. While the implementation improves performance, the reviewer identified a regression in the handleRefresh logic where data may fail to reload if the search state remains unchanged. Additional feedback includes standardizing React state setter naming conventions and correcting minor syntax issues such as missing semicolons.

Comment thread frontend/src/components/pods/Pods.jsx Outdated
Comment thread frontend/src/hooks/useDebouncedValue.js Outdated
Comment thread frontend/src/components/queues/Queues.jsx Outdated
Signed-off-by: pggdev <princegupta.ns153@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants