Repository navigation
Conversation
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.
Mirror of snapetech-org/seerrng#747. The
lumen/tree is identical to that PR's branch. Review and discussion happen upstream; this closes once upstream merges and the sync picks it up.Builds on #745 (branch
pr/lumen-phone-layout): the Lumen search page uses the phone filter hooks and the partial-failure note from that PR. The two server commits don't depend on it.Summary
Search now reads what was typed instead of only passing it on. "nate standup" is split into a person ("nate") and an intent (stand-up); TMDB person search finds Nate Bargatze (comedians ranked up), and his stand-up specials come back as a top result. The query is always still searched as typed: the intent only adds results and ordering.
Server
searchIntent): a tested parser for formats, genres, media types, roles, seasons, years and decades, and "X by Y". Besides stand-up it handles " live", " audiobook", " season 3", "2015 horror" and "80s action movies".searchIntentResolver): for a person plus stand-up it collects comedy credits where they play themselves, TMDB keyword 9716 (stand-up comedy) and titles with their name.searchRanking): typo- and prefix-tolerant matching ("bargatze", "nate barg", "bergatze"), one 0–100 score per result (text fit, exact title, intent fit, owned, popularity, provider order), results ordered within each media type, and dedupe across providers.GET /searchaddsintent,topResult,correctedQuery(did-you-mean when nothing matched),matchScoreper result andfailedSources. Existing fields are unchanged.GET /search/streamanswers per provider group as NDJSON, so TMDB results arrive while slow catalogs fill in or time out on their own.GET /search/suggestanswers from an in-memory index within 120 ms: library titles, recent answers, trending, people, intent queries such as "Nate Bargatze stand-up specials", and spelling corrections.searchProviderCache): Bookshelf and ComicVine answers are kept for 2 minutes, and identical searches in flight share one request.seerr-api.yml, and the new API messages are registered in the catalog.Lumen
aria-activedescendant; the boxes keep their searchbox role./search/streamfor video, music, authors and magazines (books and comics keep their own endpoints)./search.intent.sections). The partial-failure note names the sources that didn't answer (Music, Authors...) with Retry. Corrected searches show "Showing results for …", otherwise a "Did you mean" link.Testing
searchIntent.test.ts(parser),searchRanking.test.ts(matching and scoring),searchSmart.test.ts(intent, top result, stand-up specials filtering, corrections, stream and suggest routes, dictionary seeding);searchTiming.bench.tsmeasures classic, streamed and suggest timings with mocked providers (run on demand:node server/test/index.mts server/routes/searchTiming.bench.ts);searchStream.test.mjs(NDJSON line splitting, stream paths, a cut-off stream is rejected);search-suggestions.spec.ts(suggests while typing, keyboard moves and picks, a click opens a person, Escape closes, spelling correction);search-stream.spec.ts("nate standup" top result, one quiet note with Retry for a source that doesn't answer, the Search page box suggests while typing).00b4b12d1), with #745 below it:tsc -p server/tsconfig.json, ESLint on the changed files,pnpm i18n:check: pass;src/hooks/detailDisclosureMediaServer.test.mjs(same as in #740 and #741);tsc, build and unit tests (93), ESLint on the changed Lumen files: pass;search-suggestions,search-stream,search-localization,people-search,mobile-navigation,swipe-navigation,review-core,indexer-search; desktop, iPhone, Android, tablet): 158 passed, 16 failed. The failures are the 4review-coretests on every size, which fail the same way on untouched main.AI assistance
AI tools helped write parts of the code and tests. I reviewed the changes, ran the tests listed above, and checked it on a live install.