Filter media and groups by favorite state - #506
Merged
Conversation
Media and group lists did not expose their per-user favorite state as a composable criterion, so users could not build or save focused favorite views even though the entities supported favorites. Add a shared affinity-backed boolean predicate to all six API filter models and list paths, expose a consistent Favorite criterion in the UI, preserve it through saved filters, and cover positive, negative, and cross-entity behavior with backend and frontend regression tests.
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
Add a consistent Favorite criterion to video, image, audio, text, gallery, and group list filters. The criterion filters against the signed-in user's affinity state, composes with existing criteria, renders the standard applied-filter chip, and is preserved by saved filters.
Favorite: No includes both explicit non-favorites and entities without an affinity row. The same behavior is used by normal list and aggregate queries, with matching support in filter-backed dynamic audio and text groups.
Linked issue
Closes #430
Type of change
AI usage
Testing done & evidence
dotnet test src/Cove.Tests/Cove.Tests.csproj --configuration Release --no-build --no-restore --filter "FullyQualifiedName~Cove.Tests.EntityListSortBehaviorHarnessTests.RepresentativeFiltersMatchSeededFixtureSet" --logger "console;verbosity=normal"dotnet build src/Cove.Tests/Cove.Tests.csproj --configuration Release --no-restoredotnet build src/Cove.slnx -c Release --no-restorenpm test -- --run src/test/filterCriteriaDefinitions.test.tsnpm test -- --run src/test/FilterDialog.test.tsx src/test/SavedFilterMenu.test.tsxfavoriteCriterion:npm test -- --run src/test/SavedFilterMenu.test.tsxnpm run buildFavorite: Yeschip.Checklist