[6.x] Fix asset filters not applying the first time - #14943
Merged
Conversation
Fixes the asset browser not applying a filter on the first attempt. The browser swaps between its folder and search endpoints as filters are toggled, but the listing only re-requested on parameter changes, so the first request went to the stale (folder) URL which ignores filters. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
This pull request fixes an issue where applying a filter in the asset browser for the first time did nothing. The listing stayed unfiltered until the filter was changed a second time or pagination was used.
This was happening because the asset browser swaps between two endpoints — a "folder" endpoint that ignores filters, and a "search" endpoint that applies them — based on whether any filters are active. When a filter is first applied, the listing fired its request against the stale (folder) URL before the browser had recomputed the URL to the search endpoint, so the filter was never sent to an endpoint that respects it. On subsequent changes the URL was already correct, so it worked.
This PR fixes it by re-requesting the listing whenever its URL changes, so the results always reflect the current endpoint. The stale in-flight request is aborted by the listing's existing
AbortController.Thanks for Juri for reporting this via support!
Before
CleanShot.2026-07-06.at.09.15.31.mp4
After
CleanShot.2026-07-06.at.09.14.37.mp4