fix(books): show read status on the book detail discovery shelf

The series, author and similar endpoints never selected a read status, so
every cover in the detail shelf rendered bare. Attach the requesting user's
status in one bulk lookup per lane, and draw the badge in BookCarousel using
the same icons and placement as the library grid, plus an sr-only label.
BookRepository has no user in scope, so it now returns UnscopedBookRecommendation
and the type system forces the status on where the user exists.

Also adds the untracked scanner overlap repro for issue 1094.

Closes #1163
This commit is contained in:
neon
2026-08-27 21:56:17 +00:00
parent ce5b000d7a
commit ddb296cade
8 changed files with 402 additions and 33 deletions
+5
View File
@@ -327,10 +327,14 @@ export type BookRecommendation = {
updatedAt: string | null;
hasCover: boolean;
authors: string[];
readStatus: UserBookStatus | null;
isAudiobook?: boolean;
isComic?: boolean;
};
/** A recommendation row before a user's read status is attached, for lookups that have no user in scope. */
export type UnscopedBookRecommendation = Omit<BookRecommendation, "readStatus">;
export type SeriesBookRecommendation = {
id: number;
title: string | null;
@@ -339,6 +343,7 @@ export type SeriesBookRecommendation = {
seriesIndex: SeriesIndex | null;
hasCover: boolean;
authors: string[];
readStatus: UserBookStatus | null;
isAudiobook?: boolean;
isComic?: boolean;
};