Files
jellytau/specs/scoped-search.html
T

431 lines
29 KiB
HTML

<!DOCTYPE HTML>
<html lang="en" class="navy" dir="ltr">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Scoped Search - JellyTau Documentation</title>
<!-- Custom HTML head -->
<meta name="description" content="Requirements, traceability, and architecture for the JellyTau Jellyfin client.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
<link rel="stylesheet" href="../css/chrome.css">
<link rel="stylesheet" href="../css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body class="sidebar-visible no-js">
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "navy";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('navy')
html.classList.add(theme);
var body = document.querySelector('body');
body.classList.remove('no-js')
body.classList.add('js');
</script>
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var body = document.querySelector('body');
var sidebar = null;
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
sidebar_toggle.checked = sidebar === 'visible';
body.classList.remove('sidebar-visible');
body.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded affix "><a href="../index.html">Introduction</a></li><li class="chapter-item expanded affix "><li class="part-title">Requirements & Traceability</li><li class="chapter-item expanded "><a href="../requirements.html"><strong aria-hidden="true">1.</strong> Requirements Specification</a></li><li class="chapter-item expanded "><a href="../traceability.html"><strong aria-hidden="true">2.</strong> Traceability Matrix</a></li><li class="chapter-item expanded "><a href="../traceability-ci.html"><strong aria-hidden="true">3.</strong> Traceability CI</a></li><li class="chapter-item expanded "><a href="../traces-quick-ref.html"><strong aria-hidden="true">4.</strong> Traces Quick Reference</a></li><li class="chapter-item expanded affix "><li class="part-title">Architecture</li><li class="chapter-item expanded "><a href="../architecture/index.html"><strong aria-hidden="true">5.</strong> Overview</a><a class="toggle"><div></div></a></li><li><ol class="section"><li class="chapter-item "><a href="../architecture/01-rust-backend.html"><strong aria-hidden="true">5.1.</strong> Rust Backend</a></li><li class="chapter-item "><a href="../architecture/02-svelte-frontend.html"><strong aria-hidden="true">5.2.</strong> Svelte Frontend</a></li><li class="chapter-item "><a href="../architecture/03-data-flow.html"><strong aria-hidden="true">5.3.</strong> Data Flow</a></li><li class="chapter-item "><a href="../architecture/04-type-sync-and-threading.html"><strong aria-hidden="true">5.4.</strong> Type Sync & Threading</a></li><li class="chapter-item "><a href="../architecture/05-platform-backends.html"><strong aria-hidden="true">5.5.</strong> Platform Backends</a></li><li class="chapter-item "><a href="../architecture/06-downloads-and-offline.html"><strong aria-hidden="true">5.6.</strong> Downloads & Offline</a></li><li class="chapter-item "><a href="../architecture/07-connectivity.html"><strong aria-hidden="true">5.7.</strong> Connectivity</a></li><li class="chapter-item "><a href="../architecture/08-database-design.html"><strong aria-hidden="true">5.8.</strong> Database Design</a></li><li class="chapter-item "><a href="../architecture/09-security.html"><strong aria-hidden="true">5.9.</strong> Security</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">UX</li><li class="chapter-item expanded "><a href="../ux-flows.html"><strong aria-hidden="true">6.</strong> UX Flows</a></li><li class="chapter-item expanded affix "><li class="part-title">Specs — Pending Work</li><li class="chapter-item expanded "><a href="../specs/index.html"><strong aria-hidden="true">7.</strong> Specs Index</a></li><li class="chapter-item expanded "><a href="../specs/SPEC-TEMPLATE.html"><strong aria-hidden="true">8.</strong> Spec Template</a></li><li class="chapter-item expanded "><a href="../specs/SPEC-REVIEW-CHECKLIST.html"><strong aria-hidden="true">9.</strong> Spec Review Checklist</a></li><li class="chapter-item expanded "><a href="../specs/playback-backend-unification.html"><strong aria-hidden="true">10.</strong> Playback Backend Unification</a></li><li class="chapter-item expanded "><a href="../specs/linux-native-video-spike.html"><strong aria-hidden="true">11.</strong> Linux Native Video Spike</a></li><li class="chapter-item expanded "><a href="../specs/backend-owned-stream-selection.html"><strong aria-hidden="true">12.</strong> Backend-Owned Stream Selection</a></li><li class="chapter-item expanded "><a href="../specs/player-facade-enforcement.html"><strong aria-hidden="true">13.</strong> Player Facade Enforcement</a></li><li class="chapter-item expanded "><a href="../specs/windows-native-audio-backend.html"><strong aria-hidden="true">14.</strong> Windows Native Audio Backend</a></li><li class="chapter-item expanded "><a href="../specs/libmpv2-migration.html"><strong aria-hidden="true">15.</strong> libmpv2 Migration</a></li><li class="chapter-item expanded "><a href="../specs/read-through-media-cache.html"><strong aria-hidden="true">16.</strong> Read-Through Media Cache</a></li><li class="chapter-item expanded "><a href="../specs/scoped-search.html" class="active"><strong aria-hidden="true">17.</strong> Scoped Search</a></li><li class="chapter-item expanded "><a href="../specs/scoped-search-boundary.html"><strong aria-hidden="true">18.</strong> Scoped Search Boundary</a></li><li class="chapter-item expanded "><a href="../specs/scoped-search-boundary-implementation.html"><strong aria-hidden="true">19.</strong> Scoped Search Boundary — Implementation</a></li><li class="chapter-item expanded "><a href="../specs/frontend-domain-model.html"><strong aria-hidden="true">20.</strong> Frontend Domain Model</a></li><li class="chapter-item expanded "><a href="../specs/build-provenance.html"><strong aria-hidden="true">21.</strong> Build Provenance</a></li><li class="chapter-item expanded affix "><li class="part-title">Build & Release</li><li class="chapter-item expanded "><a href="../build/build-release.html"><strong aria-hidden="true">22.</strong> Build & Release</a></li><li class="chapter-item expanded "><a href="../release-checklist.html"><strong aria-hidden="true">23.</strong> Release Checklist</a></li><li class="chapter-item expanded "><a href="../build/build-desktop-packages.html"><strong aria-hidden="true">24.</strong> Desktop Packaging</a></li><li class="chapter-item expanded "><a href="../build/build-windows.html"><strong aria-hidden="true">25.</strong> Windows Build</a></li><li class="chapter-item expanded "><a href="../defect-windows.html"><strong aria-hidden="true">26.</strong> Defect Windows</a></li><li class="chapter-item expanded "><a href="../build/docker.html"><strong aria-hidden="true">27.</strong> Docker</a></li><li class="chapter-item expanded "><a href="../build/build-builder-image.html"><strong aria-hidden="true">28.</strong> Builder Image</a></li><li class="chapter-item expanded affix "><li class="spacer"></li><li class="chapter-item expanded affix "><a href="../api-redirect.html">Rust API Reference (rustdoc)</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
</div>
</nav>
<!-- Track and set sidebar scroll position -->
<script>
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
sidebarScrollbox.addEventListener('click', function(e) {
if (e.target.tagName === 'A') {
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
}
}, { passive: true });
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
sessionStorage.removeItem('sidebar-scroll');
if (sidebarScrollTop) {
// preserve sidebar scroll position when navigating via links within sidebar
sidebarScrollbox.scrollTop = sidebarScrollTop;
} else {
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
var activeSection = document.querySelector('#sidebar .active');
if (activeSection) {
activeSection.scrollIntoView({ block: 'center' });
}
}
</script>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky">
<div class="left-buttons">
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</label>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">JellyTau Documentation</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<a href="https://gitea.tourolle.paris/dtourolle/jellytau" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
<a href="https://gitea.tourolle.paris/dtourolle/jellytau/_edit/master/docs/../docs/specs/scoped-search.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="spec-context-scoped-search-with-filter-chips-and-configurable-group-order"><a class="header" href="#spec-context-scoped-search-with-filter-chips-and-configurable-group-order">Spec: Context-scoped search with filter chips and configurable group order</a></h1>
<blockquote>
<p>⚠️ <strong>Superseded in part by
<a href="scoped-search-boundary.html">scoped-search-boundary.md</a>.</strong> The "frontend only,
no Rust changes" decision below (§Background 2, §Design "Scope model" and
"Threading scope through the store") left Jellyfin's item-type taxonomy in the
presentation layer, which violates the backend/frontend boundary. The taxonomy
is being moved into Rust. The <strong>user-facing behaviour and UX in this spec are
unchanged</strong>; only where the scope→item-type mapping and result bucketing live
changes. Read the boundary spec before touching search code.</p>
<p><strong>Progress:</strong> the scope→item-type mapping now lives in Rust
(<code>SearchScope::item_types()</code>); the frontend sends an opaque scope. Result-side
bucketing (<code>GROUP_ITEM_TYPES</code>) is still frontend-side — see
<a href="scoped-search-boundary-implementation.html">scoped-search-boundary-implementation.md</a>
§Stage 2.</p>
</blockquote>
<p><strong>Status:</strong> Implemented (boundary revision: query side done, result side pending)
<strong>Scope:</strong> Frontend only. No Rust changes required. <em>(Revised — see banner.)</em>
<strong>Requirements:</strong> UR-049 → DR-063, DR-064, DR-065; UR-050 → DR-066, DR-067
(see <a href="../requirements.html">requirements.md</a>).
<strong>UX spec:</strong> <a href="../ux-flows.html">ux-flows.md §6</a> — §6.1 scope, §6.2 layout,
§6.3 group order, §6.4 current deviations.</p>
<h2 id="summary"><a class="header" href="#summary">Summary</a></h2>
<p>Two related changes to search:</p>
<ol>
<li><strong>Scope</strong> — a search started inside a library searches <em>that</em> library.
Started from Home, <code>/library</code>, or the search tab, it searches everything.
The active scope shows as a chip row under the search bar, preselected from
context and freely changeable without retyping.</li>
<li><strong>Group order</strong> — the order result groups appear in (Songs, Albums, Artists,
Movies, TV Shows) becomes a drag-and-drop setting instead of being hardcoded.</li>
</ol>
<h2 id="motivation"><a class="header" href="#motivation">Motivation</a></h2>
<p>Searching "office" while browsing TV currently returns music albums, because
both search entry points call the same unscoped query. The user has already
told us what they're looking at; ignoring that makes search feel indiscriminate
and pushes the relevant result below unrelated media.</p>
<h2 id="background-what-already-exists"><a class="header" href="#background-what-already-exists">Background: what already exists</a></h2>
<p>Verified in code — <strong>most of the plumbing is already there.</strong> This is
substantially a wiring task, not new infrastructure.</p>
<ol>
<li>
<p><strong><code>SearchOptions</code> already carries the filter.</strong>
<a href="../../src/lib/api/bindings.ts">bindings.ts</a>
<code>SearchOptions = { limit?, includeItemTypes?, searchTerm? }</code>.</p>
</li>
<li>
<p><strong>Rust already honours <code>include_item_types</code> on both paths</strong> — online
(<a href="../../src-tauri/src/repository/online.rs">online.rs</a>, in the <code>get_items</code>
options mapping) and offline
(<a href="../../src-tauri/src/repository/offline.rs">offline.rs</a>, which builds a SQL
type filter from it). <strong>Do not add Rust code for filtering.</strong></p>
</li>
<li>
<p><strong>Per-page list search already does this correctly.</strong>
<a href="../../src/lib/components/library/GenericMediaListPage.svelte">GenericMediaListPage.svelte</a>
passes <code>includeItemTypes: [config.itemType]</code> to <code>repo.search(...)</code>. Use it as
the reference for the call shape, including the <code>requestId</code> handling.</p>
</li>
<li>
<p><strong>The gap is exactly one function.</strong>
<a href="../../src/lib/stores/library.ts">library.ts</a><code>search(query)</code> takes only a
query and calls <code>repo.search(query, { limit: 10000 }, requestId)</code>, dropping
any scope. Both callers
(<a href="../../src/routes/search/+page.svelte">search/+page.svelte</a> and
<a href="../../src/routes/library/+layout.svelte">library/+layout.svelte</a>) go through
it.</p>
</li>
<li>
<p><strong>Group order is hardcoded in markup.</strong>
<a href="../../src/lib/components/search/SearchResults.svelte">SearchResults.svelte</a>
categorizes into <code>music{tracks,albums,artists} / movies / tvShows</code> and
renders three fixed sections in source order.</p>
</li>
<li>
<p><strong>Frontend preferences persist via <code>localStorage</code></strong>, per the existing
<code>viewMode</code> precedent in <a href="../../src/lib/stores/library.ts">library.ts</a>
(<code>jellytau-view-mode</code>). Follow that pattern — <strong>do not</strong> add a Rust settings
command for this.</p>
</li>
</ol>
<h2 id="design"><a class="header" href="#design">Design</a></h2>
<h3 id="scope-model"><a class="header" href="#scope-model">Scope model</a></h3>
<p>One <code>SearchScope</code> type, defined once and shared:</p>
<div class="table-wrapper"><table><thead><tr><th>Scope</th><th><code>includeItemTypes</code></th><th>Chip label</th></tr></thead><tbody>
<tr><td><code>all</code></td><td><em>unset</em></td><td>All</td></tr>
<tr><td><code>music</code></td><td><code>MusicAlbum</code>, <code>MusicArtist</code>, <code>Audio</code>, <code>Playlist</code></td><td>Music</td></tr>
<tr><td><code>movies</code></td><td><code>Movie</code></td><td>Movies</td></tr>
<tr><td><code>tv</code></td><td><code>Series</code>, <code>Episode</code></td><td>TV</td></tr>
</tbody></table>
</div>
<p><code>all</code> must send <strong>no</strong> <code>includeItemTypes</code> key rather than a list of every type —
the two are not equivalent for item types not enumerated here (Person, folders).</p>
<h3 id="route--scope-resolution-dr-063"><a class="header" href="#route--scope-resolution-dr-063">Route → scope resolution (DR-063)</a></h3>
<p>A pure function, unit-testable without a DOM:</p>
<pre><code class="language-ts">resolveSearchScope(pathname: string): SearchScope
</code></pre>
<ul>
<li><code>/library/music*</code><code>music</code></li>
<li><code>/library/movies*</code><code>movies</code></li>
<li><code>/library/tv*</code><code>tv</code></li>
<li><code>/</code>, <code>/library</code>, <code>/search</code>, anything else → <code>all</code></li>
</ul>
<p>Note <code>/library/shows/genres</code> exists as a route; treat <code>shows</code> as <code>tv</code>. Check the
current route list before finalising — do not assume this table is exhaustive.</p>
<h3 id="scope-is-a-starting-point-not-a-lock-dr-064"><a class="header" href="#scope-is-a-starting-point-not-a-lock-dr-064">Scope is a starting point, not a lock (DR-064)</a></h3>
<p>The resolved scope sets the <strong>initial</strong> chip only. Once the user taps a chip,
their choice governs until they leave the search surface. Concretely: derive the
initial value from the route, hold it in component state, and do not re-derive
it on every navigation — otherwise a user who widens to All snaps back to TV.</p>
<p>Changing a chip re-runs the current query at the new scope. Changing the query
keeps the current scope.</p>
<h3 id="threading-scope-through-the-store-dr-065"><a class="header" href="#threading-scope-through-the-store-dr-065">Threading scope through the store (DR-065)</a></h3>
<p>Extend the store's search signature to accept an optional scope and pass
<code>includeItemTypes</code> down to <code>repo.search</code>. Preserve the existing behaviour
exactly: the <code>requestId</code> bump, the stale-response guard, the <code>search-event</code>
listener merge, the 10s timeout, and the empty-query clear path. This is an
additive parameter — no caller should break.</p>
<h3 id="group-order-dr-066-dr-067"><a class="header" href="#group-order-dr-066-dr-067">Group order (DR-066, DR-067)</a></h3>
<p>Persist an ordered array of group ids:</p>
<pre><code>["songs", "albums", "artists", "movies", "tvShows"] // shipped default
</code></pre>
<p>Rendering composes scope and order as <strong>two independent axes</strong>, in this order:</p>
<ol>
<li>drop groups outside the active scope,</li>
<li>sort the remainder by the user's saved order,</li>
<li>omit groups that came back empty.</li>
</ol>
<p>Scope never rewrites the saved order — narrowing to Music and back to All must
restore the user's full arrangement. See <a href="../ux-flows.html">ux-flows.md §6.3</a> for
the worked example.</p>
<p>Settings gets a reorderable list. <strong>Dragging alone is not sufficient</strong>: provide
keyboard-operable move up/down controls with proper labels, or the setting is
unusable with a screen reader and on any pointerless input.</p>
<p>Unknown or missing ids in the stored array must not crash rendering — treat the
stored order as a hint, append any group it doesn't mention, and ignore ids that
no longer exist. A user upgrading from a build with fewer groups must not lose
the new ones.</p>
<h2 id="out-of-scope"><a class="header" href="#out-of-scope">Out of scope</a></h2>
<ul>
<li>Ranking <em>within</em> a group. Order is presentation-only.</li>
<li>Server-side search ranking or the Jellyfin query itself.</li>
<li>Scope chips on the per-page list search in <code>GenericMediaListPage</code> — that page
is already implicitly scoped by its own <code>itemType</code>.</li>
<li>Any Rust change.</li>
</ul>
<h2 id="acceptance-criteria"><a class="header" href="#acceptance-criteria">Acceptance criteria</a></h2>
<ul>
<li><input disabled="" type="checkbox"/>
Searching from inside Music returns no movies or TV; from inside TV, no music.</li>
<li><input disabled="" type="checkbox"/>
Searching from Home, <code>/library</code>, or the search tab returns all types.</li>
<li><input disabled="" type="checkbox"/>
The chip row renders under the search bar on both the search page and the
in-library header search, with the context-derived chip preselected.</li>
<li><input disabled="" type="checkbox"/>
Tapping a chip re-runs the search with the query preserved; editing the
query preserves the selected chip.</li>
<li><input disabled="" type="checkbox"/>
Tapping "All" from a context-scoped search widens results without retyping.</li>
<li><input disabled="" type="checkbox"/>
Result groups render in the user's configured order, with out-of-scope and
empty groups omitted and relative order preserved.</li>
<li><input disabled="" type="checkbox"/>
Group order is reorderable by drag <strong>and</strong> by keyboard, persists across
restarts, and ships with the documented default.</li>
<li><input disabled="" type="checkbox"/>
Offline search respects scope (the offline path already filters — verify,
don't reimplement).</li>
<li><input disabled="" type="checkbox"/>
<code>bun run check</code> and <code>bun run test</code> pass.</li>
</ul>
<h2 id="testing"><a class="header" href="#testing">Testing</a></h2>
<p>Follow the existing frontend test conventions (vitest, <code>src/lib/**/*.test.ts</code>).</p>
<ul>
<li><code>resolveSearchScope</code> — pure unit tests over the route table, including the
<code>/library/shows/genres</code> case and unknown routes falling back to <code>all</code>.</li>
<li>Scope → <code>includeItemTypes</code> mapping, asserting <code>all</code> omits the key entirely.</li>
<li>The compose step: scope filter + user order + empty-group omission, including
the "narrow then widen restores order" case and a stored order containing an
unknown id.</li>
<li>Store-level: scoped search forwards <code>includeItemTypes</code> to the repository, and
the existing stale-<code>requestId</code> guard still discards superseded responses.</li>
</ul>
<p>New requirement-implementing code needs <code>TRACES:</code> comments — see
<a href="../../CLAUDE.html">CLAUDE.md</a>. Suggested tags: the scope resolver and chip row
<code>UR-049 | DR-063, DR-064</code>, the store change <code>UR-049 | DR-065</code>, the settings list
and ordered rendering <code>UR-050 | DR-066, DR-067</code>.</p>
<h2 id="notes-for-the-implementer"><a class="header" href="#notes-for-the-implementer">Notes for the implementer</a></h2>
<ul>
<li>Read <a href="../ux-flows.html">ux-flows.md §6</a> first — it is the behavioural spec; this
document is the implementation plan.</li>
<li>The IPC camelCase rule applies to anything new that crosses the boundary
(<a href="../../CLAUDE.html">CLAUDE.md</a>) — though this change should not add commands.</li>
<li>Another session may be active in this repo. Check <code>git diff</code> before
"repairing" unexpected changes.</li>
</ul>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../specs/read-through-media-cache.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next prefetch" href="../specs/scoped-search-boundary.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="../specs/read-through-media-cache.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next prefetch" href="../specs/scoped-search-boundary.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>