Fix v2 gallery not refetching when filter logic operator changes#3840
Merged
Conversation
The v2 gallery refetch watcher in GalleryShell only watched the filter
selection arrays, not the per-filter logic operators (any/all/none).
Toggling a filter to the inverse ("none") updated the store but did not
trigger a refetch, so the results only changed when the selection itself
was edited or after a reload (URL hydration re-runs the initial fetch).
Watch all *Logic operators alongside their selections so inverting a
filter (e.g. statuses -> "none") refetches immediately.
Fixes #3798
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Greptile SummaryThis PR makes v2 gallery results refresh when a filter logic operator changes. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "Fix v2 gallery not refetching when filte..." | Re-trigger Greptile |
greptile-apps
Bot
dismissed
their stale review
July 20, 2026 00:46
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
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.
Description
Explain the changes or enhancements you are proposing with this pull request.
Fixes #3798.
In the v2 gallery, filters expose a logic operator (any / all / none) alongside their selection. The "none" operator inverts a filter, e.g. selecting the "Finished" and "100%" statuses with
noneshould show every ROM that is not in those states.The refetch watcher in
GalleryShell.vueonly watched the filter selection arrays (selectedStatuses,selectedGenres, ...), not the per-filter*Logicoperators. As a result, toggling a filter to its inverse updated thegalleryFilterstore but never triggered a refetch. The change only took effect when the selection itself was edited, or after a reload (URL hydration re-runs the initial fetch), which matches the report that the inverse "sometimes needs a reload to trigger".The fetch layer (
galleryRoms) already sendsstatusesLogicand the other operators to the backend, so the query was correct all along; only the client-side refetch trigger was missing.Fix: watch all
*Logicoperators alongside their selections inGalleryShell.vue, so inverting a filter (or switching any/all/none) refetches immediately.v1's
FilterDrawer/Base.vuealready emits a refetch on logic-toggle, so this was v2-specific.AI assistance disclosure: This change was written with AI assistance (Claude Code). The maintainer reviewed the diagnosis and the fix.
Checklist
Please check all that apply.
Screenshots (if applicable)
🤖 Generated with Claude Code