Repository navigation
feat(gallery): scope a search to the bucket on show - #95
Merged
Merged
Conversation
Searching while viewing a bucket used to rank the whole library and ignore the bucket. Now the bucket filters first — its hand-added photos and a smart rule's current matches — and the query ranks what is left, scoped before the two-hundred cut so the bucket's photos are never crowded out. The search follows the bucket: switching buckets under a live query re-ranks, a viewed smart bucket refilling re-ranks, and the strip keeps to the bucket's current contents so a hand removal leaves at once. The header says "Bucket · name · Search results", and empty results get their own message. Both gallery_search MCP tools take an optional bucket; the in-app one views it as it searches, the headless one scopes to the hand-added photos it can see. The shared rank() gains the scope parameter, with tests in both crates. Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
Summary
Searching while viewing a bucket used to rank the whole library and ignore the bucket. Now the bucket filters first and the query ranks what is left.
Bucket · <name> · Search results(with· near <place>when the query named one); a photo removed by hand leaves the strip at once; empty results get their own message in and out of a bucket.gallery_searchtools take an optionalbucket. The in-app one switches the gallery to it as it searches and reports it in the reply and ingallery_state; the headless one scopes to the hand-added photos it can see. An unknown name is an error, not a library-wide search.rank()inschist-gallerygains the scope parameter, plus aRankedalias that clears a clippy complexity warning.docs/gallery.md.Test plan
schist-gallery: scope filters before the floor; an empty bucket searches nothingschist-app:search_scope()returns the bucket's contents deduplicated, and nothing for a stale slot🤖 Generated with Claude Code