--- version: 1 slug: "web-src-main-ts" primary_target: "web/src/main.ts" related_targets: ["web/index.html","web/src/search.ts","web/src/style.css"] --- # Surface: unified search (web/src/main.ts, §9.2) Mode: Operate. The operator finds or adds a title without knowing which of the two they are doing. - Audience: the household operator; desktop mostly, phone sometimes. - Task: one rail-mounted command input. Typing swaps the chain board for the search deck; clearing or Esc returns to the board. "/" focuses from anywhere. - Structure (pinned by DESIGN.md §9.2): IN LIBRARY group first, ON TMDB below, engraved micro-label headings, machined rows, chips on the right. - Add flow: inline panel under a TMDB row — root radio cards (audience name, policy name, path), main pre-selected, one confirm. Never a separate page. - Manual intake: magnet / .torrent input routes to a MANUAL GRAB panel showing parsed display name and btih; grab wiring lands with the release buckets (issue #31/#22), and the panel says so honestly. - Constraints: 250 ms debounce, AbortController cancellation, token-gated CSS, cyan for interaction only, dead-air rule (no idle animation). - Unresolved: library rows are informational until the library view (#32) gives them a destination; TMDB search is movie-only until series land (#39).