Review follow-up (Greptile P1 x2, Codex P2 x3 on #1172): for multi-token
compound terms like "A&E HD", the compound substring arms let any title
containing "a&e" into the bounded SQL candidate window (200 per-playlist /
5000 global) before scoring enforced the remaining tokens, so enough plain
"A&E" rows could push real "US: A&E HD" matches out of the window.
- title and M3U payload conditions now compose per word: each word's token
conditions AND together, and only a compound word's own arm gains the
intact-substring OR — every other word stays an independent constraint
- the trigram FTS supplement AND-s the non-compound tokens as contains
LIKE conditions next to MATCH '"a&e"'
- new SearchWordPlan/getSearchWordPlans/getCompoundResidualTokenGroups
helpers in content-search.util.ts
Verified on real SQLite: searching "A&E HD" selects "US | A&E HD" but no
longer selects plain "A&E"/"US: A&E" rows at the SQL level.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Search normalization splits "A&E" into the 1-letter tokens "a" + "e",
and short first tokens are prefix-anchored for performance (GLOB 'a*'
plus a startsWith gate in the ranking), so provider-prefixed channels
such as "US: A&E" could never match.
Words that keep internal punctuation after edge-trimming ("a&e",
"x-men", "l'equipe") are now preserved as compound words and matched as
an intact substring in addition to the existing token logic:
- global Xtream search supplements the unchanged prefix/GLOB arm with a
trigram FTS substring lookup (MATCH '"a&e"'), deduped by content id,
falling back to the content scan if FTS is unavailable
- the ranking gate lets multi-token phrases match as a space-bounded
whole-word sequence anywhere in the title ("US: A&E", score 40)
without crossing word boundaries ("Casa e Villa" stays excluded)
- per-playlist search and the M3U payload prefilter OR-in intact-word
contains patterns
The pure search-text helpers moved out of content.operations.ts into a
new drizzle-free content-search.util.ts so they are unit-testable
without database mocks; scoreSearchTextMatch is re-exported.
Fixes#1161
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Split EPG IPC orchestration, worker lifecycle, and query logic into focused services. Harden clear-worker lifecycle after review with timeout/exit handling and regression coverage.
- Updated confirmation dialog messages to provide detailed consequences of deleting playlists.
- Added backup hints and progress messages for better user experience during playlist deletion.
- Ensured consistency in language across all supported translations (de, el, en, es, fr, it, ja, ko, nl, pl, pt, ru, tr, zh, zhtw).
Entire-Checkpoint: c6e522b4276c
- Moved Stalker-related components and services from apps/web to libs/portal for better modularity.
- Introduced SQLite DB Worker to handle non-EPG database operations, improving UI responsiveness.
- Updated documentation for the Workspace Dashboard and Shell, detailing current implementation and routing structure.
- Added new EPG fixture scenarios to the Xtream mock server for testing purposes.
- Enhanced the overall architecture documentation to reflect recent changes and improvements.