Fix: Duplicates when click spam loading elements in FT (1/3)#9383
Open
Shadorc wants to merge 1 commit into
Open
Fix: Duplicates when click spam loading elements in FT (1/3)#9383Shadorc wants to merge 1 commit into
Shadorc wants to merge 1 commit into
Conversation
auto-merge was automatically disabled
July 7, 2026 14:26
Pull request was converted to draft
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.
Pull Request Type
Related issue
partially addresses #3541 (channel tabs)
Description
There are no safeguards to prevent multiple queries from being sent simultaneously with the same data, which causes duplicate results to be displayed.
Most components already have
isLoadingbools, but they have side effects on page content. They're designed to detect initial loading rather than any loading state, which is why I opted for a separate variable.I also chose to hide the button during loading, but we could alternatively disable it with CSS or display a loading icon. It won't make much difference here since the request usually completes too quickly for it to appear, but that won't be the case for the other two fixes.
I considered grouping all three fixes in one MR, but some are more complex and would probably need a separate MR for easier review.
Screenshots
The following video is recorded with a 2s delay applied to each request.
https://github.com/user-attachments/assets/8fe0b174-2cca-402a-90b4-d63a439d821d
Testing
Testing can be simplified by simulating a slow connection. To do this, simply add
await new Promise((resolve) => setTimeout(resolve, 2000))to theChannel#handleFetchMoremethod afterisFetchMoreLoading.value = trueDesktop