feat(search): monitor and navigate authors, series and narrators from result cards - #888
Open
krejko wants to merge 2 commits into
Open
feat(search): monitor and navigate authors, series and narrators from result cards#888krejko wants to merge 2 commits into
krejko wants to merge 2 commits into
Conversation
… result cards Monitoring could only be started from a collection page, and collection pages are built from the library, so following a series or author required already owning one of their books. That is backwards for the case the feature exists to serve. Every author, series and narrator named on a result card is now a link to its collection page, with a monitor toggle beside the author and series that shows Monitoring when already monitored. The book title links to its library entry once added. Monitoring status is a local database read, and names are deduplicated across the page, so a ten-book series resolves once. Three details worth review: Series entries arrive carrying the book's position - "Harry Potter #1" - and that must not reach a collection route or a monitoring request, since monitoring "Harry Potter #1" would register a series that does not exist. It is stripped before use. Narrator values arrive as { name } objects from the search endpoint but as bare strings elsewhere, so both shapes are accepted. Handling only strings silently produced an empty list and dropped the line entirely. The narrator line no longer clamps to one line: a full-cast title lists a dozen narrators, and wrapping beats hiding all but the first. GET /search/audible/series was declared object? and had no frontend caller. It keeps its bare-array shape - verified against a live instance - and only gains a declared element type, so nothing reading it must change. Entries without a name are dropped, and an unexpected provider shape logs and returns empty rather than leaking the raw payload.
ActiveProductionSourceFiles_RemainFocused caps production files at 500 lines and SearchController.cs reached 506 with the typed series endpoint inlined. Extracted to a partial alongside the existing SearchController.DownloadReferences.cs, which brings the controller back to 457 lines.
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.
Monitoring could only be started from a collection page, which is built from the library — so following a series or author required already owning one of their books. That's backwards for the case the feature exists for.
Every author, series and narrator on a result card is now a link to its collection page, with a monitor toggle beside author and series. The book title links to its library entry once added.
Monitoring status is a local database read (
GetByNameRegionLanguageAsync), not a provider call, and names are deduped across the page, so a ten-book series resolves once.Three details worth review
Series position must not leak into the name. Entries arrive as
Harry Potter (Full-Cast Editions) #1. Navigating there is merely wrong; monitoring it would register aMonitoredSeriesnamed after a single book, syncing forever against nothing. Stripped before either use.Narrator shapes differ by endpoint —
{ name }objects from search, bare strings elsewhere. Handling only strings silently produced an empty list and dropped the line entirely.The narrator line wraps instead of clamping. A full-cast title lists a dozen narrators;
-webkit-line-clamp: 1hid all but the first.Endpoint typing
GET /search/audible/serieswas declaredTask<object?>with no frontend caller. It keeps its bare-array shape — verified against a live instance — and only gains a declared element type, so nothing reading it today has to change. Nameless entries are dropped; an unexpected provider shape logs and returns empty rather than leaking the raw payload.