Skip to content

[6.x] Fix asset filters not applying the first time - #14943

Merged
jasonvarga merged 2 commits into
6.xfrom
refetch-listing-on-url-change
Jul 6, 2026
Merged

[6.x] Fix asset filters not applying the first time#14943
jasonvarga merged 2 commits into
6.xfrom
refetch-listing-on-url-change

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Jul 6, 2026

Copy link
Copy Markdown
Member

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

duncanmcclean and others added 2 commits July 6, 2026 09:11
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>
@duncanmcclean duncanmcclean changed the title [6.x] Apply asset filters on the first attempt [6.x] Fix asset filters not applying the first time Jul 6, 2026
@jasonvarga
jasonvarga merged commit 2ba4f02 into 6.x Jul 6, 2026
23 checks passed
@jasonvarga
jasonvarga deleted the refetch-listing-on-url-change branch July 6, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants