IsFavorite and IsLiked are ignored by every by-name listing, so Favorites shows the whole library #180
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on the Favorites tab of the throwaway instance in
TESTCONTAINER/,with exactly one favourite marked in the whole library.
What it looks like
Moviescorrectly holds the one film. Under it,Studioslists every studioin the library — 1.21 Entertainment, 6th & Idaho Motion Picture Company, 20th
Century Fox … — and
Peoplelists every person. Nothing there was favourited.What answers
With one favourite film and no other user data at all:
/Studios?IsFavorite=true/Persons?IsFavorite=true/Genres?IsFavorite=true/Artists?IsFavorite=true/MusicGenres?IsFavorite=true/Items?IsFavorite=true&IncludeItemTypes=MovieIsFavorite=falseanswers 498 as well, andIsLiked=trueanswers 498 — so theby-name routes are not answering true for everything, they are dropping the
narrowing altogether.
/Itemshonours it.Where to start
The by-name routes build their query without the user-data predicates
/Itemsadds. Whatever
/Itemsdoes withIsFavoriteandIsLikedhas to reach theby-name listings; the harness's note about a by-name listing narrowing the name
rows themselves as well as the items they were gathered from is the shape to
follow.
How to know it is done
A favourited studio and a favourited person are the only rows
/Studios?IsFavorite=trueand/Persons?IsFavorite=trueanswer with,IsFavorite=falseanswers with the rest, and the Favorites tab shows what wasfavourited. This is a request no committed scenario makes, so it wants one.
House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin. Generated artifacts are regenerated, never edited.Fixed in
47b18ec, with the review's findings indb0bad8.Measured against the reference instance at the pin rather than read: a person
marked there is the only one
/Persons?IsFavorite=trueanswers with, and/Artistsand/Artists/AlbumArtistsnarrow the same way.Three things the review corrected on top of the first pass:
AlbumArtists and Authors tabs with
Filters=IsFavoriteand only Studios withisFavorite, so the first pass fixed the tab that was least broken. The twospellings disagree about which wins:
PersonsControllerreads the list onlywhere no
isFavoritewas spelled out,ArtistsControllerapplies the listafter the parameter and so turns the mark on over an explicit
false, andthe genre and studio listings declare no list at all. All three measured.
/Yearsdeclares noisFavorite. Binding it to a flag on the params thesix listings share turned
GET /Years?isFavorite=yesinto a400whereupstream answers
200, and an emptyisFavorite=into a400on all six.IsLikedis left alone on/Persons, where upstream answers the wholelisting for either value. It is not ignored on the other four — upstream's
outer filter carries
IsLikedandIsFavoriteOrLiked— but both are onlyreachable through
Filterson/Artists, and neither is supported here.That gap is older than this issue.
One thing the review turned up that is not this issue and is now #183: the row
standing for a name is picked before the filters rather than after, so an
account that cannot see the representative — or a mark on the row that loses
the pick — answers differently from upstream.