-
Notifications
You must be signed in to change notification settings - Fork 16
Bug: Query results not cleared when query string is empty #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@coderabbitai also, it was found that the query in the backend is not cancelled after the query input box is cleared by the user. we need a more proper fix. create an issue to track this |
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed:
Length of output: 573 🏁 Script executed:
Length of output: 2517 🏁 Script executed:
Length of output: 10264 🏁 Script executed:
Length of output: 3565 🏁 Script executed:
Length of output: 1570 🏁 Script executed:
Length of output: 2016 @junhaoliao I've created an issue to track this bug: #278 After analyzing the codebase, I found that while there are checks to prevent starting new queries with empty strings, there's no mechanism to cancel an ongoing query when the user clears the input box. The issue includes detailed technical information and a suggested solution that involves implementing a |
Description
When the query string is empty, the previous search results still remain displayed in the panel. This happens because in
startQuery()
function, we return early when the query string equals the default empty string, without clearing the previous results first.Current Behavior
Currently in
src/stores/queryStore/createQueryControllerSlice.ts
:When the query string is empty or matches the default value, the function returns early without clearing previous results, causing them to remain visible.
Expected Behavior
The
clearQueryResults()
function should be called before the early return to ensure that previous results are cleared when the query string is empty:References
Screenshots
The text was updated successfully, but these errors were encountered: