Skip to content

StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.

removed plans

David Nashash7cda00239776
diff --git a/docs/superpowers/plans/2026-08-17-player-input-policy.md b/docs/superpowers/plans/2026-08-17-player-input-policy.md
deleted file mode 100644
index 14393f56..00000000
--- a/docs/superpowers/plans/2026-08-17-player-input-policy.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# Player Input Policy Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task with verification checkpoints.
-
-**Goal:** Extract the player root key-routing decisions into a tested, platform-free policy without changing TV input behavior.
-
-**Architecture:** `PlayerInputPolicy.kt` owns immutable state snapshots, platform-free keys, typed decisions, and pure preview/normal decision functions. `PlayerScreen.kt` keeps Android event conversion, Compose modifiers, focus/pointer behavior, state mutation, ViewModel calls, and Back execution.
-
-**Tech Stack:** Kotlin, Jetpack Compose, Android `KeyEvent` adapter, JUnit4, Truth.
-
-## Global Constraints
-
-- Preserve separate preview and normal key phases.
-- Preserve action-down-only handling and `notifyUserActivity()` ordering.
-- Preserve all current overlay/modal/RTL/catch-up predicates and command ordering.
-- Keep `PlayerBackNavigationPolicy` and all mutable state in `PlayerScreen.kt`.
-- Do not introduce Phase 2 modal state, navigation contracts, or ViewModel APIs.
-
-### Task 1: Add the platform-free policy contract and tests
-
-**Files:**
-- Create: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerInputPolicy.kt`
-- Test: `app/src/test/java/com/streamvault/app/ui/screens/player/PlayerInputPolicyTest.kt`
-
-**Interfaces:**
-- Produces `PlayerInputKey`, `PlayerInputState`, `PlayerInputAction`, `PlayerInputDecision`, `playerPreviewInputDecision()`, and `playerInputDecision()`.
-
-- [x] **Step 1: Write failing policy tests** covering preview zapping/blocking, modal Back/pass-through, center numeric/live behavior, RTL left/right mapping, seek, episode picker, media/guide/info/menu, channel previous, mute repeat, and numeric digits.
-- [x] **Step 2: Run the focused test and verify it fails because the policy contract is absent.**
-- [x] **Step 3: Implement the smallest pure policy model and decision functions matching the design invariants.**
-- [x] **Step 4: Run the focused policy test until all cases pass.**
-
-### Task 2: Wire the policy into `PlayerScreen`
-
-**Files:**
-- Modify: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt` in the root modifier key handlers.
-- Modify: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerInputPolicy.kt` only if adapter visibility requires it.
-
-**Interfaces:**
-- Consumes the pure decisions from Task 1.
-- Produces the same existing ViewModel/state mutations and modifier return values.
-
-- [x] **Step 1: Add the Android key-code adapter at the screen boundary, including numeric digit conversion.**
-- [x] **Step 2: Build one `PlayerInputState` snapshot from the existing screen values without moving ownership.**
-- [x] **Step 3: Replace only the preview handler’s branching with `playerPreviewInputDecision()`, preserving notification and callback order.**
-- [x] **Step 4: Replace only the normal handler’s branching with `playerInputDecision()`, preserving the existing `handleBackPress()` call and all side effects.**
-- [x] **Step 5: Compile and run focused policy tests.**
-
-### Task 3: Verify behavior-preserving decomposition
-
-**Files:**
-- Inspect: `PlayerScreen.kt`, `PlayerInputPolicy.kt`, and `PlayerInputPolicyTest.kt`.
-
-- [x] **Step 1: Run source checks confirming Back policy, pointer input, focus properties, and ViewModel ownership remain in `PlayerScreen.kt`.**
-- [x] **Step 2: Run `:app:testDebugUnitTest` and `:app:compileDebugKotlin`.**
-- [x] **Step 3: Run `git diff --check` and `graphify update .`.**
-- [ ] **Step 4: Re-run applicable player/golden/live validation; record any existing environment failures without attributing them to this extraction.**
-
-Verification recorded 2026-08-17: the focused policy test and full `:app:testDebugUnitTest` pass, and `:app:compileDebugKotlin` passes. `:app:lintDebug` still reports the repository’s 56 unsuppressed baseline findings; none reference the changed player input/modal files. Fresh emulator evidence captured 61 frames at a 2-second cadence for USA CBSN Minnesota (provider HTTP 509, one unique frame, terminal provider-limit error) and USA Fox News (21 unique frames, HLS first frame followed by provider-limit recovery to MPEG-TS; media session was PLAYING during recovery but the final post-window dump was STOPPED). These are provider/environment outcomes, not attributed to the input extraction, but they do not satisfy the clean live gate. The manual TV matrix and final player acceptance therefore remain open Phase 1 gates.
-
-`:app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.PlayerSmokeTest'` also reproduces the existing three failures (category search-field focus, controls play-button focus, and track-selection fixture setup); the mute-action smoke test passes. No failure points at the extracted policy.
diff --git a/docs/superpowers/plans/2026-08-17-player-modal-hosts.md b/docs/superpowers/plans/2026-08-17-player-modal-hosts.md
deleted file mode 100644
index 236087d9..00000000
--- a/docs/superpowers/plans/2026-08-17-player-modal-hosts.md
+++ /dev/null
@@ -1,263 +0,0 @@
-# Player Modal Hosts Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task with verification checkpoints.
-
-**Goal:** Extract the nine player dialog call sites into placement-preserving internal hosts without changing player behavior.
-
-**Architecture:** Add `PlayerModalHosts.kt` with `PlayerTopLevelModalHost` for the two dialogs currently composed before the root player `Box`, and `PlayerControlsModalHost` for the seven dialogs currently composed inside the `Box`. Keep all state, effects, Back/input policy, navigation callbacks, and ViewModel ownership in `PlayerScreen.kt`; move only dialog invocation composition and its direct arguments/callbacks.
-
-**Tech Stack:** Kotlin, Jetpack Compose, Hilt Compose ViewModels, Android Gradle Plugin, existing app unit/instrumentation tests.
-
-## Global Constraints
-
-- Preserve every existing visibility predicate, composition location, source order, callback order, state owner, effect key, Back/focus/input rule, and ViewModel scope.
-- MultiView remains visible under its existing `showSplitDialog && currentChannel != null` predicate; do not add a PiP restriction.
-- Audio/video offset remains gated by `showAudioVideoOffsetDialog && audioVideoSyncEnabled && castConnectionState != CastConnectionState.CONNECTED`, in addition to the non-PiP host guard.
-- Do not introduce Phase 2 modal exclusivity, sealed modal state, state grouping, route contracts, feature modules, or player behavior changes.
-- Keep `PlayerModalHosts.kt` internal to `com.streamvault.app.ui.screens.player`.
-- Run `graphify update .` only if Kotlin source changes are made.
-
----
-
-### Task 1: Establish a clean implementation baseline
-
-**Files:**
-- Read: `docs/superpowers/specs/2026-08-17-player-modal-host-design.md`
-- Read: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt`
-- Read: `app/src/main/java/com/streamvault/app/ui/screens/player/overlay/PlayerSystemOverlays.kt`
-- Read: `app/src/main/java/com/streamvault/app/ui/screens/multiview/MultiViewPlannerDialog.kt`
-
-**Interfaces:**
-- Consumes: the approved modal-host design and current dialog call sites.
-- Produces: a verified baseline and a line-by-line call-site map for Tasks 2–3.
-
-- [x] **Step 1: Verify the current working tree and source inventory**
-
-Run:
-
-```powershell
-git status --short
-rg -n "ProgramHistoryDialog\(|MultiViewPlannerDialog\(|PlayerTrackSelectionDialog\(|ChannelVariantSelectionDialog\(|PlayerSpeedSelectionDialog\(|PlayerSleepTimerDialog\(|PlayerAudioVideoOffsetDialog\(|PlayerEpisodeSelectionDialog\(" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt
-```
-
-Expected: only the approved documentation edits are present; exactly nine dialog invocations are found.
-
-- [x] **Step 2: Run the existing app unit-test baseline**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --no-daemon --console=plain
-```
-
-Expected: exit code 0. If the baseline fails, record the existing failure before changing Kotlin and do not attribute it to this extraction.
-
-### Task 2: Create the placement-preserving modal hosts
-
-**Files:**
-- Create: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt`
-- Test: no new production test seam; this is a mechanical composition extraction verified by source mapping and existing Compose/instrumentation coverage.
-
-**Interfaces:**
-- Consumes: existing dialog argument types and callbacks from `PlayerScreen.kt`.
-- Produces: `internal @Composable fun PlayerTopLevelModalHost(...)` and `internal @Composable fun PlayerControlsModalHost(...)` in the player package.
-
-- [x] **Step 1: Write the failing structural check**
-
-Before creating the file, run:
-
-```powershell
-if (Test-Path 'app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt') { throw 'PlayerModalHosts.kt already exists; inspect before proceeding.' }
-```
-
-Expected: the check succeeds because the new host file does not yet exist.
-
-- [x] **Step 2: Add the top-level host with the exact existing predicates and order**
-
-Implement `PlayerTopLevelModalHost` with read-only values and callbacks for:
-
-```kotlin
-@Composable
-internal fun PlayerTopLevelModalHost(
- isInPictureInPictureMode: Boolean,
- showProgramHistory: Boolean,
- programHistory: List<Program>,
- onDismissProgramHistory: () -> Unit,
- onSelectProgramHistory: (Program) -> Unit,
- showSplitDialog: Boolean,
- currentChannel: Channel?,
- onDismissSplitDialog: () -> Unit,
- onLaunchMultiView: () -> Unit,
-)
-```
-
-Inside the host, preserve this order and no other wrapper:
-
-1. Compose `ProgramHistoryDialog` only when `!isInPictureInPictureMode && showProgramHistory`.
-2. Compose `MultiViewPlannerDialog` only when `showSplitDialog && currentChannel != null`.
-3. Obtain `MultiViewViewModel` with `hiltViewModel()` inside that second branch only.
-
-Do not add `!isInPictureInPictureMode` to the MultiView branch.
-
-- [x] **Step 3: Add the in-Box host with the exact existing order**
-
-Implement `PlayerControlsModalHost` with parameters corresponding directly to the current seven invocations: PiP flag, track state/lists, variant state/channel, speed state, both timer states/titles, precomputed audio/video-offset visibility and state, channel-save capability, episode presentation data, and narrow callbacks.
-
-Inside the host, preserve this order and no other wrapper:
-
-1. `PlayerTrackSelectionDialog`
-2. `ChannelVariantSelectionDialog`
-3. `PlayerSpeedSelectionDialog`
-4. stop-playback `PlayerSleepTimerDialog`
-5. idle-standby `PlayerSleepTimerDialog`
-6. `PlayerAudioVideoOffsetDialog`
-7. `PlayerEpisodeSelectionDialog`
-
-Guard all seven with the existing non-PiP condition. Pass audio/video offset `visible` as the complete existing predicate, not merely `showAudioVideoOffsetDialog`.
-
-- [x] **Step 4: Compile the new file before wiring it**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-```
-
-Expected: exit code 0. Fix only imports, parameter types, and syntax needed for the standalone host file; do not alter dialog implementations.
-
-### Task 3: Replace the two contiguous call-site blocks in `PlayerScreen.kt`
-
-**Files:**
-- Modify: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt:346-370`
-- Modify: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt:1137-1220`
-
-**Interfaces:**
-- Consumes: `PlayerTopLevelModalHost` and `PlayerControlsModalHost` from Task 2.
-- Produces: the same player screen behavior with only dialog invocation composition moved.
-
-- [x] **Step 1: Wire `PlayerTopLevelModalHost` at the old top-level position**
-
-Replace only the current program-history/MultiView contiguous block with one call at the same location. Keep callback bodies equivalent:
-
-```kotlin
-PlayerTopLevelModalHost(
- isInPictureInPictureMode = isInPictureInPictureMode,
- showProgramHistory = showProgramHistory,
- programHistory = programHistory,
- onDismissProgramHistory = { showProgramHistory = false },
- onSelectProgramHistory = { program ->
- viewModel.playCatchUp(program)
- showProgramHistory = false
- },
- showSplitDialog = showSplitDialog,
- currentChannel = currentChannel,
- onDismissSplitDialog = { showSplitDialog = false },
- onLaunchMultiView = {
- showSplitDialog = false
- viewModel.handOffPlaybackToMultiView()
- onNavigate?.invoke(Routes.MULTI_VIEW)
- }
-)
-```
-
-Use the actual parameter names from the host implementation; do not move `currentChannel`, state declarations, or navigation policy.
-
-- [x] **Step 2: Wire `PlayerControlsModalHost` at the old in-Box position**
-
-Replace only the current track-through-episode contiguous block with one call after `PlayerResumePrompt` and before diagnostics/live overlays. Preserve the exact callback bodies from the current call sites, including:
-
-- subtitle deactivation before subtitle selection;
-- live translation clearing before activation;
-- user activity before each timer mutation and flag clear;
-- audio/video-offset flag clear before preview dismissal;
-- episode picker flag clear before playback.
-
-Compute and pass:
-
-```kotlin
-audioVideoOffsetVisible = showAudioVideoOffsetDialog &&
- audioVideoSyncEnabled &&
- castConnectionState != CastConnectionState.CONNECTED
-```
-
-Keep `PlayerResumePrompt`, diagnostics, live overlays, `anyOverlayVisible`, Back handling, effects, and focus/input code in `PlayerScreen.kt`.
-
-- [x] **Step 3: Remove only imports made unused by the move**
-
-Retain imports still used elsewhere in `PlayerScreen.kt`; remove only dialog imports no longer referenced there. Do not remove `Routes`, `MultiViewViewModel`, or other imports until compilation proves they are unused and the host owns the corresponding reference.
-
-- [x] **Step 4: Run the focused compile check**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-```
-
-Expected: exit code 0 with no new Kotlin errors.
-
-### Task 4: Verify the mechanical extraction and regression gates
-
-**Files:**
-- Inspect: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt`
-- Inspect: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt`
-- Inspect: `docs/superpowers/specs/2026-08-17-player-modal-host-design.md`
-
-**Interfaces:**
-- Consumes: the wired hosts from Task 3.
-- Produces: evidence that the Phase 1 slice is behavior-preserving and ready for manual/live validation.
-
-- [x] **Step 1: Verify all nine call sites moved exactly once**
-
-Run:
-
-```powershell
-rg -n "ProgramHistoryDialog\(|MultiViewPlannerDialog\(|PlayerTrackSelectionDialog\(|ChannelVariantSelectionDialog\(|PlayerSpeedSelectionDialog\(|PlayerSleepTimerDialog\(|PlayerAudioVideoOffsetDialog\(|PlayerEpisodeSelectionDialog\(" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt
-```
-
-Expected: every dialog invocation appears in `PlayerModalHosts.kt` and no dialog invocation remains in `PlayerScreen.kt`.
-
-- [x] **Step 2: Verify source constraints**
-
-Run:
-
-```powershell
-rg -n "PlayerViewModel|NavController|BackHandler|LaunchedEffect|remember\(|PlayerResumePrompt|DiagnosticsOverlay|ChannelInfoOverlay|EpgOverlay" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt
-```
-
-Expected: no forbidden host-owned state/effect/input/navigation references; only the dialog-specific implementation references are outside the host.
-
-- [x] **Step 3: Run scoped automated checks**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --no-daemon --console=plain
-.\gradlew.bat :app:lintDebug --no-daemon --console=plain
-git diff --check
-```
-
-Result: `compileDebugKotlin`, `testDebugUnitTest`, and `git diff --check` passed. `lintDebug` originally failed on 57 unfiltered repository findings: dependency/version freshness checks, missing translations, Compose resource-access checks, unused resources, KTX/recycle suggestions, and one `ModifierParameter` finding in the earlier `PlayerControlsOverlayHost.kt` extraction. The `ModifierParameter` issue was corrected by moving `modifier` before the first optional parameter; a fresh `compileDebugKotlin` passed and a fresh `lintDebug` now fails only on the remaining 56 unrelated repository findings. No finding names the new `PlayerModalHosts.kt` or the modified `PlayerScreen.kt`; this lint baseline remains a repository gate, not a finding in the modal-host slice.
-
-- [x] **Step 4: Refresh the graph after Kotlin changes**
-
-Run:
-
-```powershell
-graphify update .
-```
-
-Expected: graphify reports the changed Kotlin files and updates `graphify-out/` without modifying unrelated source.
-
-- [ ] **Step 5: Run required manual and live validation before declaring Phase 1 slice complete**
-
-Use the repository protocol from the design spec: TV smoke coverage for all applicable dialogs, PiP, Back/focus, controls auto-hide, and cast gating; then validate at least two live channels with 2-second screenshots for at least 45 captures (prefer 61), changing screenshot hashes, media-session `PLAYING`/`error=null`, and sanitized logs showing no fatal/stuck/fallback regressions.
-
-If an emulator, provider, or stream prevents a gate from running, record the exact limitation and leave the gate incomplete.
-
-Validation evidence (2026-08-17, `emulator-5554`, `com.streamvault.app.debug`, APK installed from the current workspace):
-
-- TV smoke path reached seeded Live TV data and full playback using keyboard focus; no provider credentials were required. CBSN New York and F1 Channel both opened through the seeded preview-to-full-playback flow.
-- CBSN New York: 61 screenshots at a 2-second cadence (`C:\Temp\streamvault_live_validation_cbsn`), 61 unique SHA-256 hashes, visible frame progression, media session `PLAYING` with `error=null`, metadata `US CBSN New York (D)`. Logs showed HLS prepare and first-frame success; no player fatal/stuck/recovery/fallback diagnostics. Two unrelated historical Bluetooth service `state=ERROR` lines were excluded from player findings.
-- F1 Channel: 61 screenshots at a 2-second cadence (`C:\Temp\streamvault_live_validation_f1`), 61 unique SHA-256 hashes, visible frame progression, media session `PLAYING` with `error=null`, metadata `F1 Channel`. Logs showed HLS prepare and first-frame success; no player fatal/stuck/recovery/fallback diagnostics.
-- Additional smoke evidence: the player controls opened on the TV emulator, Back dismissed the variant dialog, and the extracted subtitle and video-quality dialogs rendered (`Select Subtitles` and `Video Quality`). `PlayerOverlayGoldenTest` passed all 6 tests on the same emulator. `PlayerSmokeTest` executed but failed 3 existing overlay/focus assertions (play-button focus lookup, category-rail search focus lookup, and audio-track selection); no failure names `PlayerScreen` or `PlayerModalHosts`, and the class does not compose either host. Full manual coverage of every timer/speed/episode/PiP/cast scenario remains incomplete, so Step 5 stays open and Phase 1 is not being marked fully accepted.
diff --git a/docs/superpowers/plans/2026-08-18-phase-1-architecture-continuation.md b/docs/superpowers/plans/2026-08-18-phase-1-architecture-continuation.md
deleted file mode 100644
index 04e73d9b..00000000
--- a/docs/superpowers/plans/2026-08-18-phase-1-architecture-continuation.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Phase 1 Architecture Continuation
-
-## Goal
-
-Finish the remaining Phase 1 source decomposition while preserving runtime behavior and keeping state ownership changes out of scope.
-
-## Acceptance criteria
-
-- Player input decisions read mutable input state at event time; rapid numeric-entry confirmation cannot observe a stale composition snapshot.
-- ProviderSetup retains draft state, launchers, effects, and ViewModel calls in its root, while provider-specific UI branches and leaf utilities/hosts are separated into same-package files.
-- AppNavigation retains root orchestration and `NavController` ownership, while route/request contracts, adapters, external-navigation handling, policy, and graph registrations are separated into same-package files.
-- Existing focused and unit tests pass, whitespace/static checks pass, and graphify is updated.
-- No typed-route, feature-module, or Phase 2 state-ownership redesign is introduced.
-
-## Implementation tasks
-
-1. Add a failing regression test for rapid numeric input followed by Enter, then make player event callbacks construct `PlayerInputState` from current values at event time. Run the focused test before and after the fix.
-2. Extract the remaining `ProviderFormContent` branches into provider-specific composables with unchanged parameters and named call sites. Move `StalkerCompatibilitySelector`, `FormErrors`, password transformation, completion effects/dialogs, and remaining leaf dialogs to same-package host/component files without moving root-owned state or effects.
-3. Split `AppNavigation.kt` into same-package contracts/adapters, external-navigation host, top-level navigation policy, and graph-registration extensions. Keep behavior, registration order, and root orchestration unchanged.
-4. Run focused tests, the debug unit-test suite, `git diff --check`, and `graphify update .`. Review the diff for accidental behavior or ownership changes and update the architecture plan with status/gaps.
-
-## Verification commands
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.ui.screens.player.*" --tests "com.streamvault.app.ui.screens.provider.*" --tests "com.streamvault.app.navigation.*" --rerun --no-daemon --console=plain
-.\gradlew.bat :app:testDebugUnitTest --rerun-tasks --no-daemon --console=plain
-git diff --check HEAD
-graphify update .
-```
diff --git a/docs/superpowers/plans/2026-08-21-phase2-runtime-state-isolation.md b/docs/superpowers/plans/2026-08-21-phase2-runtime-state-isolation.md
deleted file mode 100644
index e58e77b9..00000000
--- a/docs/superpowers/plans/2026-08-21-phase2-runtime-state-isolation.md
+++ /dev/null
@@ -1,247 +0,0 @@
-# Phase 2 Runtime State Isolation Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task with review checkpoints. Steps use checkbox syntax for tracking.
-
-**Goal:** Reduce broad Compose invalidation in player and channel-card hot paths while preserving playback behavior and record evidence against Phase 0.
-
-**Architecture:** Keep PlayerScreen as the coordinator. Move consumer-only flow collection into player hosts, replace modal flags with one nullable sealed modal, and move channel progress time to list owners. Finish with hot-list and compiler/build audits; device playback remains an explicit gate.
-
-**Tech Stack:** Kotlin, Jetpack Compose, lifecycle-aware Flow, JUnit/Truth, Compose compiler reports, Macrobenchmark, graphify.
-
-**Spec:** docs/superpowers/specs/2026-08-21-phase2-runtime-state-isolation-design.md
-
-## Global Constraints
-
-- Preserve preparation, recovery, timeshift, Media3, PiP, focus, Back priority, and event-time input behavior.
-- Keep top-level modal calls before the player Box and controls modal calls after PlayerResumePrompt inside the Box.
-- Modal state is one nullable PlayerModal; derived queries must not store duplicate flags.
-- Cards receive one shared 30-second clock value; cards do not collect the clock.
-- Hot lazy items use stable keys and contentType where required.
-- Do not blanket-annotate domain/data models.
-- Follow red-green-refactor for new pure production functions.
-- Run graphify update . after Kotlin changes.
-- Do not claim Phase 2 exit without multi-channel live-playback evidence; adb unavailability remains an incomplete gate.
-
----
-
-### Task 1: Modal state and shared channel progress policy
-
-**Files:**
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalState.kt
-- Test: app/src/test/java/com/streamvault/app/ui/screens/player/PlayerModalStateTest.kt
-- Create: app/src/main/java/com/streamvault/app/ui/components/ChannelProgressTicker.kt
-- Test: app/src/test/java/com/streamvault/app/ui/components/ChannelProgressTickerTest.kt
-
-**Interfaces:**
-- PlayerModal is a sealed interface with TrackSelection(TrackType), VariantSelection, SpeedSelection, AudioVideoOffset, StopPlaybackTimer, IdleStandbyTimer, ProgramHistory, Split, and EpisodePicker.
-- PlayerModalState(val active: PlayerModal? = null) exposes derived modal queries plus hasVisibleModal, open(modal), and dismiss().
-- ChannelProgressTicker exposes read-only StateFlow<Long> nowMs.
-- channelProgressFraction(nowMs, startTimeMs, endTimeMs) returns a clamped Float.
-
-- [ ] Step 1: Add failing tests for modal replacement, track-type retention, derived visibility, dismissal, and empty state.
-
-~~~kotlin
-@Test
-fun opening_a_modal_replaces_the_previous_modal() {
- val state = PlayerModalState()
- .open(PlayerModal.ProgramHistory)
- .open(PlayerModal.SpeedSelection)
-
- assertThat(state.showProgramHistory).isFalse()
- assertThat(state.showSpeedSelection).isTrue()
-}
-~~~
-
-Run:
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests '*PlayerModalStateTest' --no-daemon --console=plain
-~~~
-Expected: FAIL because the new API is absent.
-
-- [ ] Step 2: Implement the minimal sealed modal state and derived queries. Do not change PlayerScreen in this task.
-
-- [ ] Step 3: Run the focused modal test again. Expected: PASS.
-
-- [ ] Step 4: Add failing channel-progress tests for before-start, in-progress, after-end, and non-positive duration.
-
-~~~kotlin
-@Test
-fun progress_is_clamped_to_the_program_interval() {
- assertThat(channelProgressFraction(90L, 100L, 200L)).isEqualTo(0f)
- assertThat(channelProgressFraction(150L, 100L, 200L)).isEqualTo(0.5f)
- assertThat(channelProgressFraction(250L, 100L, 200L)).isEqualTo(1f)
-}
-~~~
-
-Run the focused ChannelProgressTickerTest. Expected: FAIL because the pure function is absent.
-
-- [ ] Step 5: Implement one 30-second StateFlow ticker and the pure clamped progress function, returning 0f for non-positive duration.
-
-- [ ] Step 6: Run:
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests '*PlayerModalStateTest' --tests '*ChannelProgressTickerTest' --no-daemon --console=plain
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-~~~
-Expected: both commands exit 0.
-
-- [ ] Step 7: Commit:
-~~~powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalState.kt app/src/test/java/com/streamvault/app/ui/screens/player/PlayerModalStateTest.kt app/src/main/java/com/streamvault/app/ui/components/ChannelProgressTicker.kt app/src/test/java/com/streamvault/app/ui/components/ChannelProgressTickerTest.kt
-git commit -m "refactor: model phase 2 modal and channel state"
-~~~
-
-### Task 2: Migrate PlayerScreen modal transitions
-
-**Files:**
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt
-- Inspect: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt
-
-**Interfaces:** Consume Task 1 modal APIs and preserve all existing callback order, Back priority, focus behavior, auto-hide behavior, predicates, and composition placement.
-
-- [ ] Step 1: Enumerate existing modalState.copy(...) call sites:
-~~~powershell
-rg -n "modalState\.copy\(" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt
-~~~
-
-- [ ] Step 2: Replace modal openings with modalState.open(...), using the matching sealed variant for track, variant, speed, both timers, audio/video offset, program history, split, and episode picker.
-
-- [ ] Step 3: Replace modal-only flag clears with modalState.dismiss(). Preserve ViewModel side effects and ordering, especially audio/video preview dismissal and timer activity notification.
-
-- [ ] Step 4: Run:
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests '*PlayerModalStateTest' --tests '*PlayerBackNavigationPolicyTest' --tests '*PlayerInputPolicyTest' --no-daemon --console=plain
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-~~~
-Expected: exit 0.
-
-- [ ] Step 5: Confirm PlayerTopLevelModalHost is still before preparation and PlayerControlsModalHost is still after PlayerResumePrompt and before diagnostics/live overlays:
-~~~powershell
-rg -n -C 3 "PlayerTopLevelModalHost|PlayerControlsModalHost|PlayerResumePrompt|DiagnosticsOverlay|EpgOverlay" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt
-~~~
-
-- [ ] Step 6: Commit:
-~~~powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt
-git commit -m "refactor: use exclusive player modal state"
-~~~
-
-### Task 3: Isolate player state by consumer
-
-**Files:**
-- Create: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerLiveOverlayHost.kt
-- Create: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerDiagnosticsHost.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerControlsOverlayHost.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt
-
-**Interfaces:**
-- PlayerLiveOverlayHost owns live-only lists/categories/EPG data collection and renders the existing live overlay call sites.
-- PlayerDiagnosticsHost collects playerStats only while the diagnostics overlay is visible.
-- PlayerControlsOverlayHost retains position/duration collection and owns controls-only track, cast, timer, seek-preview, and media-control state.
-
-- [ ] Step 1: Capture the current collection map in the ledger:
-~~~powershell
-rg -n "collectAsStateWithLifecycle\(\)|playerStats|availableCategories|currentChannelList|recentChannels|upcomingPrograms|availableAudioTracks|availableSubtitleTracks|availableVideoQualities|seekPreview|timeshiftUiState|sleepTimerUiState" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt app/src/main/java/com/streamvault/app/ui/screens/player/PlayerControlsOverlayHost.kt
-~~~
-
-- [ ] Step 2: Move live-only collectors for availableCategories, parentalControlLevel, activeCategoryId, currentChannelList, recentChannels, lastVisitedCategory, upcomingPrograms, and numericChannelInput into PlayerLiveOverlayHost. Keep root visibility flags needed by input, Back, and focus policy; pass those flags into the host.
-
-- [ ] Step 3: Move playerStats into PlayerDiagnosticsHost under the existing visible/non-PiP predicate. Keep root playback/surface/error state at the root.
-
-- [ ] Step 4: Move controls-only track, translation, recording, mute, speed, media-title, cast, seek-preview, timeshift, and sleep-timer collection into the controls subtree where the root does not need the value for surface, lifecycle, or input decisions. Keep currentPosition and duration in PlayerControlsOverlayHost.
-
-- [ ] Step 5: Run:
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests '*Player*' --no-daemon --console=plain
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-~~~
-Expected: exit 0.
-
-- [ ] Step 6: Verify moved collectors are absent from PlayerScreen and present in consumer hosts; run git diff --check; commit:
-~~~powershell
-rg -n "val (availableCategories|parentalControlLevel|activeCategoryId|currentChannelList|recentChannels|lastVisitedCategory|upcomingPrograms|numericChannelInput|playerStats) by .*collectAsState" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt
-rg -n "collectAsStateWithLifecycle\(\)" app/src/main/java/com/streamvault/app/ui/screens/player/PlayerLiveOverlayHost.kt app/src/main/java/com/streamvault/app/ui/screens/player/PlayerDiagnosticsHost.kt app/src/main/java/com/streamvault/app/ui/screens/player/PlayerControlsOverlayHost.kt
-git diff --check
-git add app/src/main/java/com/streamvault/app/ui/screens/player
-git commit -m "refactor: isolate player consumer state"
-~~~
-
-### Task 4: Consolidate channel clock and audit hot lazy lists
-
-**Files:**
-- Modify: app/src/main/java/com/streamvault/app/ui/components/Cards.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/components/shell/AppMediaCards.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/dashboard/DashboardScreen.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/search/SearchScreen.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/screens/epg/EpgGridComponents.kt
-- Modify: app/src/main/java/com/streamvault/app/ui/components/CategoryRow.kt
-- Modify: affected player/catalog/dialog files found by the audit
-- Create: docs/COMPOSE_REDUCTION_PHASE2_LIST_AUDIT.md
-
-**Interfaces:** ChannelCard and LiveChannelRowCard accept nowMs: Long; LiveChannelRowSurface forwards it. Dashboard, Home, and search owners collect ChannelProgressTicker.nowMs once per channel-progress list. The audit document records each reviewed list, key, contentType, status, and notes.
-
-- [ ] Step 1: Prove the precondition:
-~~~powershell
-rg -n "ChannelProgressTicker|LiveChannelRowTicker|collectAsStateWithLifecycle" app/src/main/java/com/streamvault/app/ui/components/Cards.kt app/src/main/java/com/streamvault/app/ui/components/shell/AppMediaCards.kt
-~~~
-Expected: both card-owned tickers are found before the migration.
-
-- [ ] Step 2: Remove card-owned ticker objects, add nowMs parameters, and use channelProgressFraction in progress indicators. Add owner-level collection outside items { } in dashboard/Home/search.
-
-- [ ] Step 3: Add stable keys and contentType to the Home channel list, EPG rows, CategoryRow, dashboard shelf, player/dialog dynamic lists, and media shelf/grid lists found by the audit. Preserve existing stable ID keys.
-
-- [ ] Step 4: Write docs/COMPOSE_REDUCTION_PHASE2_LIST_AUDIT.md with a table of every reviewed list and the reason unchanged lists are sufficient.
-
-- [ ] Step 5: Verify:
-~~~powershell
-rg -n "ChannelProgressTicker|LiveChannelRowTicker|collectAsStateWithLifecycle" app/src/main/java/com/streamvault/app/ui/components/Cards.kt app/src/main/java/com/streamvault/app/ui/components/shell/AppMediaCards.kt
-rg -n "items\(|itemsIndexed\(" app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg app/src/main/java/com/streamvault/app/ui/components app/src/main/java/com/streamvault/app/ui/screens/player -g '*.kt'
-~~~
-Expected: no ticker collection remains in card files; changed hot lists have stable keys and required contentType.
-
-- [ ] Step 6: Run focused progress tests, compile, git diff --check, then commit:
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests '*ChannelProgressTickerTest' --no-daemon --console=plain
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-git diff --check
-git add app/src/main/java/com/streamvault/app/ui docs/COMPOSE_REDUCTION_PHASE2_LIST_AUDIT.md
-git commit -m "perf: consolidate channel progress and audit lazy lists"
-~~~
-
-### Task 5: Record evidence and refresh graphify
-
-**Files:**
-- Create: docs/COMPOSE_REDUCTION_PHASE2_REPORT.md
-- Modify: graphify-out/ through graphify update .
-- Inspect: docs/COMPOSE_REDUCTION_BASELINE.md and app/build/reports/compose-compiler/app_debug-composables.txt
-
-**Interfaces:** Produce an evidence report separating implementation, compiler audit, build/test evidence, benchmark evidence, live playback gate, remaining gaps, and exit assessment.
-
-- [ ] Step 1: Run fresh compile, unit-test, assemble, and compiler-report commands:
-~~~powershell
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-.\gradlew.bat :app:testDebugUnitTest --no-daemon --console=plain
-.\gradlew.bat :app:assembleDebug --no-daemon --console=plain
-rg -n -i "unstable|PlayerScreen|PlayerControlsOverlay|ChannelCard|LiveChannelRowCard|MovieCard|SeriesCard|CategoryRow" app/build/reports/compose-compiler/app_debug-composables.txt
-~~~
-Record exit codes, test counts, and named hotspots against the Phase 0 baseline.
-
-- [ ] Step 2: Run the existing benchmark task discovered from benchmark/build.gradle.kts. Record exact output; an unavailable emulator/provider is an incomplete gate.
-
-- [ ] Step 3: Run graphify update . and verify graphify-out changed for Kotlin sources.
-
-- [ ] Step 4: Write docs/COMPOSE_REDUCTION_PHASE2_REPORT.md with sections Implementation, Compiler audit, Build/test evidence, Benchmark evidence, Live playback gate, Remaining Phase 2 gaps, and Exit assessment. State that Phase 2 is not exit-ready if required live validation cannot run.
-
-- [ ] Step 5: Run git diff --check, git status --short, and git log --oneline -8; review the full diff against the spec.
-
-- [ ] Step 6: Commit:
-~~~powershell
-git add docs/COMPOSE_REDUCTION_PHASE2_REPORT.md graphify-out
-git commit -m "docs: record phase 2 compose evidence"
-~~~
-
-## Final handoff
-
-If adb and a stable provider stream become available, run the repository multi-channel protocol and report channel names, screenshot count, interval, unique hashes, media-session state, and sanitized logs. Otherwise report the exact blocker and keep the Phase 2 exit gate open.
-
diff --git a/docs/superpowers/plans/2026-08-22-platform-smoke-reliability.md b/docs/superpowers/plans/2026-08-22-platform-smoke-reliability.md
deleted file mode 100644
index d0cb3140..00000000
--- a/docs/superpowers/plans/2026-08-22-platform-smoke-reliability.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# Platform Smoke Reliability Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Make platform-smoke failures diagnosable and validate the exact release matrix on `develop` before merging to `master`.
-
-**Architecture:** Extract the matrix into a develop-push/reusable/manual GitHub Actions workflow and make release delegate to it. Run Gradle only while the emulator is active, and capture Android failure evidence from an exit trap before the emulator is destroyed.
-
-**Tech Stack:** GitHub Actions YAML, POSIX shell, Gradle Android instrumentation, adb
-
-**Spec:** `docs/superpowers/specs/2026-08-22-platform-smoke-reliability-design.md`
-
-## Global Constraints
-
-- Do not trigger or publish a master release during implementation.
-- Preserve API 25, 26, 28, 32, 33, 35, and 36 coverage.
-- Preserve the original failing exit status when collecting diagnostics.
-- API 25–35 use their last known-good execution path without a precompile stage.
-- API 36 remains isolated as Android TV x86 until CI evidence supports another configuration.
-
----
-
-### Task 1: Failure diagnostics
-
-**Files:**
-- Create: `tools/capture-platform-smoke-diagnostics.sh`
-- Modify: `tools/run-platform-smoke.sh`
-- Create: `tools/tests/platform-smoke-diagnostics-test.sh`
-
-**Interfaces:**
-- Consumes: `PLATFORM_SMOKE_ARTIFACT_DIR`, `PLATFORM_SMOKE_ACTIVE_SUITE`, `ANDROID_SERIAL`
-- Produces: diagnostic text/log files without altering the test command's exit status
-
-- [x] Write a shell test with fake `adb` and failing `gradlew`; assert a nonzero status, active-suite record, crash-buffer call, and DropBox call.
-- [x] Run `bash tools/tests/platform-smoke-diagnostics-test.sh`; expect failure because diagnostics do not exist.
-- [x] Add the diagnostic collector and an exit trap installed before the first Gradle suite.
-- [x] Run the shell test and existing emulator-wait test; expect both to pass.
-
-### Task 2: Reusable workflow
-
-**Files:**
-- Create: `.github/workflows/platform-smoke.yml`
-- Modify: `.github/workflows/release.yml`
-- Create: `tools/tests/platform-smoke-workflow-test.sh`
-
-**Interfaces:**
-- Produces: reusable `platform-smoke.yml` run on develop pushes, callable by release, and manually dispatchable after it exists on the default branch
-- Produces: artifacts named `platform-smoke-api-<api>-diagnostics`
-
-- [x] Write static assertions for workflow-call/manual triggers, release delegation, no precompile stage, and connected-test artifact paths.
-- [x] Run `bash tools/tests/platform-smoke-workflow-test.sh`; expect failure while the matrix remains embedded in release.
-- [x] Move the matrix job into the reusable workflow and replace the release matrix with a local reusable-workflow call.
-- [x] Add always-run artifact upload per matrix entry.
-- [x] Run both CI helper tests and parse both workflow YAML files.
-
-### Task 3: Verification and handoff
-
-**Files:**
-- Modify only files required by verification findings.
-
-- [x] Run all shell helper tests.
-- [x] Run instrumentation compile gates and relevant host tests.
-- [x] Run `graphify update .` and review the final diff.
-- [ ] Commit and push the isolated branch to `origin/develop`.
-- [ ] Manually dispatch `platform-smoke.yml` against `develop`, never `release.yml` or master.
-- [ ] Inspect every matrix job; if one fails, use its uploaded diagnostics to identify the exact Android exception before changing configuration.
diff --git a/docs/superpowers/plans/2026-08-23-core-ui-boundary.md b/docs/superpowers/plans/2026-08-23-core-ui-boundary.md
deleted file mode 100644
index 56e71897..00000000
--- a/docs/superpowers/plans/2026-08-23-core-ui-boundary.md
+++ /dev/null
@@ -1,548 +0,0 @@
-# Phase 3 Core UI Boundary Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.
-
-**Goal:** Create :core:ui, move reusable Compose/TV presentation primitives into it, and leave app navigation and repository-backed destination resolution behind an app-owned adapter without changing behavior.
-
-**Architecture:** :core:ui will contain theme/design tokens, generic focus and pointer/remote primitives, TV controls, TV-device classification, and generic shell visuals. :app will retain route/domain/resource/repository knowledge in AppShellNavigation.kt, convert app destinations to UiDestination, and delegate rendering to CoreAppScreenScaffold.
-
-**Tech Stack:** Android library module, Kotlin/JVM 17, existing Compose BOM, Compose Foundation/UI, TV Foundation/Material, Material icons, Lifecycle Runtime Compose, JUnit, existing Compose golden/instrumentation infrastructure, Gradle verification tasks, and graphify.
-
-**Spec:** docs/superpowers/specs/2026-08-23-core-ui-boundary-design.md
-
-## Global Constraints
-
-- Preserve existing visuals, focus behavior, pointer/remote activation, navigation callbacks, resource text, and golden output.
-- :core:ui must not depend on :app, :data, :domain, :player, navigation, Hilt, repositories, or feature implementations.
-- Core APIs must use stable rendering data only; UiDestination must not contain a NavController, route parser, repository, activity, resource ID, or domain model.
-- Keep app-specific Fire TV, removable-storage, route, repository, domain, and resource logic in :app.
-- Do not introduce :core:navigation, typed destinations, feature modules, Views migrations, modal/state changes, or player lifecycle/recovery changes.
-- Use the existing version catalog and Compose/TV versions; add only the missing direct compose-foundation alias.
-- Every production-code migration ends with graphify update .
-- If a player-facing behavior change is detected, stop and apply the repository's full Live TV validation protocol.
-
----
-
-### Task 1: Add the :core:ui module and dependency guard
-
-**Files:**
-
-- Modify: settings.gradle.kts
-- Modify: build.gradle.kts
-- Modify: gradle/libs.versions.toml
-- Modify: app/build.gradle.kts
-- Create: core/ui/build.gradle.kts
-- Create: core/ui/src/main/AndroidManifest.xml
-
-**Interfaces:**
-
-- Produces the com.streamvault.core.ui Android library module.
-- Produces :core:ui:verifyCoreUiBoundary and root verifyCoreUiBoundary Gradle tasks.
-- Later tasks consume the module's Compose, TV Material, lifecycle, and test dependencies.
-
-- [ ] **Step 1: Register the module and direct Compose Foundation alias**
-
-Add include(":core:ui") to settings.gradle.kts. Add this alias beside the existing Compose aliases:
-
-~~~toml
-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" }
-~~~
-
-- [ ] **Step 2: Create the Android library build file**
-
-Create core/ui/build.gradle.kts with the existing library/Kotlin/Compose plugins, namespace com.streamvault.core.ui, compileSdk = 36, minSdk = 25, Java/Kotlin 17, and no project dependencies. Use:
-
-~~~kotlin
-dependencies {
- implementation(platform(libs.compose.bom))
- implementation(libs.compose.foundation)
- implementation(libs.compose.ui)
- implementation(libs.compose.material.icons.extended)
- implementation(libs.compose.tv.foundation)
- implementation(libs.compose.tv.material)
- implementation(libs.lifecycle.runtime.compose)
- implementation(libs.core.ktx)
-
- testImplementation(libs.junit)
- testImplementation(libs.robolectric)
- testImplementation(libs.truth)
-}
-~~~
-
-Do not apply Hilt, KSP, Kover, navigation, or app-only plugins.
-
-- [ ] **Step 3: Add the app consumer dependency**
-
-Add the core UI project dependency to the existing app dependencies, before the data/player dependencies:
-
-~~~kotlin
-implementation(project(":core:ui"))
-~~~
-
-This is the only new project dependency required by the Phase 3 presentation migration.
-
-- [ ] **Step 4: Add the core boundary guard before moving source**
-
-In core/ui/build.gradle.kts, add a task that scans src/main Kotlin files and fails with the file and matching token for any of these exact banned tokens:
-
-~~~kotlin
-val bannedCoreUiTokens = listOf(
- "com.streamvault.app",
- "com.streamvault.data",
- "com.streamvault.domain",
- "com.streamvault.player",
- "androidx.navigation",
- "dagger.hilt",
- "MainActivity",
- "NavController",
- "NavHost"
-)
-~~~
-
-The task must also inspect resolved project dependencies and reject any project dependency whose path is not empty. Wire check to depend on it. Add this root task to build.gradle.kts:
-
-~~~kotlin
-tasks.register("verifyCoreUiBoundary") {
- group = "verification"
- dependsOn(":core:ui:verifyCoreUiBoundary")
-}
-~~~
-
-Keep the scan limited to the exact tokens above so Android framework, Compose, TV Material, and Lifecycle Compose remain legal.
-
-- [ ] **Step 5: Add the manifest and run the module guard**
-
-Create the minimal library manifest:
-
-~~~xml
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
-~~~
-
-Run:
-
-~~~powershell
-.\gradlew.bat verifyCoreUiBoundary
-~~~
-
-Expected: BUILD SUCCESSFUL; the task reports no project dependency and no banned source token.
-
-### Task 2: Extract and test the generic television-device predicate
-
-**Files:**
-
-- Create: core/ui/src/main/java/com/streamvault/core/ui/device/TelevisionDevice.kt
-- Create: core/ui/src/test/java/com/streamvault/core/ui/device/TelevisionDeviceTest.kt
-- Modify: app/src/main/java/com/streamvault/app/device/DeviceSupport.kt
-
-**Interfaces:**
-
-- Produces com.streamvault.core.ui.device.Context.isTelevisionDevice() for generic core interaction code.
-- Keeps the existing app package extension as a compatibility wrapper.
-- Leaves isFireTvDevice, removableAppStorageDirs, and rememberIsTelevisionDevice app-owned.
-
-- [ ] **Step 1: Write the failing pure predicate tests**
-
-Create tests for the behavior currently implemented in DeviceSupport.kt:
-
-~~~kotlin
-class TelevisionDeviceTest {
- @Test
- fun leanbackFeatureIdentifiesTelevision() {
- assertThat(classifyTelevisionDevice(
- hasLeanback = true,
- hasLeanbackOnly = false,
- hasTelevision = false,
- hasFireTv = false,
- uiModeType = null,
- screenWidthDp = 0,
- hasTouchscreen = true
- )).isTrue()
- }
-
- @Test
- fun touchDeviceBelowTelevisionFallbackIsNotTelevision() {
- assertThat(classifyTelevisionDevice(
- hasLeanback = false,
- hasLeanbackOnly = false,
- hasTelevision = false,
- hasFireTv = false,
- uiModeType = null,
- screenWidthDp = 600,
- hasTouchscreen = true
- )).isFalse()
- }
-}
-~~~
-
-- [ ] **Step 2: Run the focused test and verify the expected missing-symbol failure**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :core:ui:testDebugUnitTest --tests "com.streamvault.core.ui.device.TelevisionDeviceTest"
-~~~
-
-Expected: FAIL because classifyTelevisionDevice and the core source do not exist yet.
-
-- [ ] **Step 3: Implement the minimal pure predicate and Context adapter**
-
-Implement internal classifyTelevisionDevice(...) with the existing precedence: any Leanback/television/Fire TV feature is true; then television UI mode is true; otherwise return true only when there is no touchscreen and screenWidthDp >= 900. Add fun Context.isTelevisionDevice() that reads the same Android signals and delegates to the pure predicate.
-
-Update app DeviceSupport.kt to preserve its existing API through an aliased core import:
-
-~~~kotlin
-import com.streamvault.core.ui.device.isTelevisionDevice as coreIsTelevisionDevice
-
-fun Context.isTelevisionDevice(): Boolean = coreIsTelevisionDevice()
-~~~
-
-- [ ] **Step 4: Run the focused test and app compile check**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :core:ui:testDebugUnitTest --tests "com.streamvault.core.ui.device.TelevisionDeviceTest"
-.\gradlew.bat :app:compileDebugKotlin
-~~~
-
-Expected: PASS and no app callers lose the existing com.streamvault.app.device.isTelevisionDevice symbol.
-
-### Task 3: Move theme and design tokens with font resources
-
-**Files:**
-
-- Move: app/src/main/java/com/streamvault/app/ui/design/AppColors.kt to core/ui/src/main/java/com/streamvault/core/ui/design/AppColors.kt
-- Move: app/src/main/java/com/streamvault/app/ui/design/AppMotion.kt to core/ui/src/main/java/com/streamvault/core/ui/design/AppMotion.kt
-- Move: app/src/main/java/com/streamvault/app/ui/design/AppShapes.kt to core/ui/src/main/java/com/streamvault/core/ui/design/AppShapes.kt
-- Move: app/src/main/java/com/streamvault/app/ui/design/AppSpacing.kt to core/ui/src/main/java/com/streamvault/core/ui/design/AppSpacing.kt
-- Move: app/src/main/java/com/streamvault/app/ui/design/AppTypography.kt to core/ui/src/main/java/com/streamvault/core/ui/design/AppTypography.kt
-- Move: app/src/main/java/com/streamvault/app/ui/design/FocusHelpers.kt to core/ui/src/main/java/com/streamvault/core/ui/design/FocusHelpers.kt
-- Move: app/src/main/java/com/streamvault/app/ui/design/FocusSpec.kt to core/ui/src/main/java/com/streamvault/core/ui/design/FocusSpec.kt
-- Move: app/src/main/java/com/streamvault/app/ui/theme/Color.kt to core/ui/src/main/java/com/streamvault/core/ui/theme/Color.kt
-- Move: app/src/main/java/com/streamvault/app/ui/theme/Spacing.kt to core/ui/src/main/java/com/streamvault/core/ui/theme/Spacing.kt
-- Move: app/src/main/java/com/streamvault/app/ui/theme/Theme.kt to core/ui/src/main/java/com/streamvault/core/ui/theme/Theme.kt
-- Move: app/src/main/res/font/inter_bold.ttf to core/ui/src/main/res/font/inter_bold.ttf
-- Move: app/src/main/res/font/inter_medium.ttf to core/ui/src/main/res/font/inter_medium.ttf
-- Move: app/src/main/res/font/inter_regular.ttf to core/ui/src/main/res/font/inter_regular.ttf
-- Move: app/src/main/res/font/inter_semibold.ttf to core/ui/src/main/res/font/inter_semibold.ttf
-- Modify: all Kotlin consumers of com.streamvault.app.ui.design or com.streamvault.app.ui.theme
-
-**Interfaces:**
-
-- Produces the same public token/theme names under com.streamvault.core.ui.design and com.streamvault.core.ui.theme.
-- Produces com.streamvault.core.ui.theme.StreamVaultTheme without an app resource dependency.
-
-- [ ] **Step 1: Move source/resources and update packages**
-
-Move the files with history preservation, change package declarations to com.streamvault.core.ui.*, and change AppTypography.kt from com.streamvault.app.R to the generated core R. Keep all values, typography construction, CompositionLocals, and names unchanged.
-
-- [ ] **Step 2: Update imports mechanically**
-
-Replace only these package references:
-
-~~~text
-com.streamvault.app.ui.design -> com.streamvault.core.ui.design
-com.streamvault.app.ui.theme -> com.streamvault.core.ui.theme
-~~~
-
-Update production code, unit tests, and instrumentation tests. Do not change app screen behavior or styling.
-
-- [ ] **Step 3: Compile core and app**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :core:ui:compileDebugKotlin
-.\gradlew.bat :app:compileDebugKotlin
-~~~
-
-Expected: PASS with no com.streamvault.app.R reference remaining under core/ui/src/main.
-
-### Task 4: Move generic interaction and focus primitives
-
-**Files:**
-
-- Move: app/src/main/java/com/streamvault/app/ui/interaction/MouseSupport.kt to core/ui/src/main/java/com/streamvault/core/ui/interaction/MouseSupport.kt
-- Move: app/src/main/java/com/streamvault/app/ui/interaction/TvComponents.kt to core/ui/src/main/java/com/streamvault/core/ui/interaction/TvComponents.kt
-- Move: app/src/main/java/com/streamvault/app/ui/interaction/TvInteractionSounds.kt to core/ui/src/main/java/com/streamvault/core/ui/interaction/TvInteractionSounds.kt
-- Modify: all consumers of com.streamvault.app.ui.interaction
-
-**Interfaces:**
-
-- Produces mouseClickable, TvClickableSurface, TvButton, TvIconButton, TvInteractionSounds, and rememberTvInteractionSounds under com.streamvault.core.ui.interaction.
-- Core interaction code imports only com.streamvault.core.ui.device.isTelevisionDevice and core design tokens.
-
-- [ ] **Step 1: Add the focused activation behavior test**
-
-Add an internal pure helper in TvComponents.kt and test it before moving the file. The test must be concrete:
-
-~~~kotlin
-@Test
-fun enterKeyActivatesOnlyOnUpAndConsumesBothEvents() {
- assertThat(remoteActivationHandling(true, KeyEvent.KEYCODE_ENTER, KeyEvent.ACTION_DOWN, false))
- .isEqualTo(RemoteActivationHandling.Consume)
- assertThat(remoteActivationHandling(true, KeyEvent.KEYCODE_ENTER, KeyEvent.ACTION_UP, false))
- .isEqualTo(RemoteActivationHandling.Activate)
-}
-
-@Test
-fun longClickLeavesActivationSequenceToTvMaterial() {
- assertThat(remoteActivationHandling(true, KeyEvent.KEYCODE_ENTER, KeyEvent.ACTION_DOWN, true))
- .isEqualTo(RemoteActivationHandling.Ignore)
-}
-~~~
-
-The helper returns Ignore for disabled/non-activation keys and long-click paths, Consume for activation down/up events that should be intercepted, and Activate only for an activation key-up without a long-click handler.
-
-- [ ] **Step 2: Run the narrow test before moving implementation**
-
-Run the focused target before the package move. If it passes against the current implementation, record it as a characterization test and retain it as the regression guard.
-
-- [ ] **Step 3: Move source and update imports**
-
-Change packages to com.streamvault.core.ui.interaction, remove the app-device import from MouseSupport.kt, and import the core TV-device predicate. Make activateOnRemoteKey delegate to the tested remoteActivationHandling helper. Preserve pointer, touch, mouse, long-press, remote-key, and sound behavior exactly.
-
-- [ ] **Step 4: Run interaction and compilation checks**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :core:ui:testDebugUnitTest
-.\gradlew.bat :core:ui:compileDebugKotlin
-.\gradlew.bat :app:compileDebugKotlin
-~~~
-
-### Task 5: Extract generic shell visuals and define the core scaffold API
-
-**Files:**
-
-- Create: core/ui/src/main/java/com/streamvault/core/ui/components/shell/AppShellVisuals.kt
-- Create: core/ui/src/androidTest/java/com/streamvault/core/ui/components/shell/CoreAppScreenScaffoldTest.kt
-- Modify: core/ui/build.gradle.kts for Compose UI test dependencies
-- Modify: app/src/main/java/com/streamvault/app/ui/components/shell/AppShell.kt during the adapter split
-
-**Interfaces:**
-
-- Produces NavigationChrome, UiDestination, and CoreAppScreenScaffold.
-- Produces generic AppScreenHeader, AppHeroHeader, AppSectionHeader, StatusPill, AppMessageState, LoadMoreCard, ContentMetadataStrip, and AppTopBarCloseAction.
-- AppTopBarCloseAction accepts caller-provided contentDescription: String and does not access app resources.
-
-- [ ] **Step 1: Write the failing core scaffold semantic test**
-
-Add a Compose UI test that sets a core scaffold with currentDestinationId = "home" and asserts the root node exposes streamvault.destination:home. Also assert that selecting a destination invokes the callback with that destination ID. The test must use only UiDestination, a Material icon, and plain strings.
-
-- [ ] **Step 2: Run the new test and verify the missing-symbol failure**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :core:ui:connectedDebugAndroidTest
-~~~
-
-Expected: FAIL because the core scaffold API does not exist. If no emulator is available, compile the test and record the unavailable connected-test gate; do not count it as runtime validation.
-
-- [ ] **Step 3: Implement the core visual API without app knowledge**
-
-Move the visual portions of AppShell.kt into AppShellVisuals.kt. Replace app route/resource/domain references with currentDestinationId, destinations: List<UiDestination>, onDestinationSelected, plain labels, caller-provided close-action descriptions, and NavigationChrome. Preserve gradients, spacing, shapes, focus requesters, focus scaling, interaction sounds, semantics, selected-state colors, callback order, and composition order.
-
-- [ ] **Step 4: Add test dependencies and run the focused test**
-
-Add these dependencies to :core:ui:
-
-~~~kotlin
-androidTestImplementation(platform(libs.compose.bom))
-androidTestImplementation("androidx.compose.ui:ui-test-junit4")
-androidTestImplementation(libs.androidx.test.ext.junit)
-androidTestImplementation(libs.androidx.test.runner)
-debugImplementation("androidx.compose.ui:ui-test-manifest")
-~~~
-
-Run :core:ui:connectedDebugAndroidTest again. Expected: PASS when a compatible emulator is available.
-
-### Task 6: Add and test the app-owned navigation adapter
-
-**Files:**
-
-- Delete: app/src/main/java/com/streamvault/app/ui/components/shell/AppShell.kt after generic visual code is moved
-- Create: app/src/main/java/com/streamvault/app/ui/components/shell/AppShellNavigation.kt
-- Create: app/src/test/java/com/streamvault/app/ui/components/shell/AppShellNavigationTest.kt
-- Modify: app screen call sites that import AppNavigationChrome or shell helpers
-
-**Interfaces:**
-
-- Produces the app-facing AppScreenScaffold compatibility wrapper.
-- Produces app-owned AppNavigationChrome mapping to core NavigationChrome.
-- Produces an internal pure buildDestinationItems(configured, layout) helper retaining the VOD merge rule.
-- Produces rememberAppDestinationItems() mapping app labels/routes/icons into List<UiDestination>.
-
-- [ ] **Step 1: Write failing adapter tests**
-
-Create these behaviors:
-
-~~~kotlin
-@Test
-fun splitCatalogPreservesConfiguredMovieAndSeriesDestinations() {
- val result = buildDestinationItems(
- configured = listOf(AppTopLevelDestination.MOVIES, AppTopLevelDestination.SERIES),
- layout = CatalogLayout.SPLIT
- )
-
- assertThat(result.map { it.route })
- .containsExactly(Routes.MOVIES, Routes.SERIES)
- .inOrder()
-}
-
-@Test
-fun unifiedCatalogReplacesMovieAndSeriesWithOneVodDestination() {
- val result = buildDestinationItems(
- configured = listOf(
- AppTopLevelDestination.HOME,
- AppTopLevelDestination.MOVIES,
- AppTopLevelDestination.SERIES
- ),
- layout = CatalogLayout.UNIFIED_VOD
- )
-
- assertThat(result.map { it.route })
- .containsExactly(Routes.HOME, Routes.VOD)
- .inOrder()
-}
-~~~
-
-- [ ] **Step 2: Run focused tests and verify the missing-symbol failure**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.ui.components.shell.AppShellNavigationTest"
-~~~
-
-Expected: FAIL because the adapter test/helper does not exist.
-
-- [ ] **Step 3: Implement the adapter with existing behavior**
-
-Move the current destination data class, buildDestinationItems, rememberDestinationItems, AppTopLevelDestination mapping, plugin icon, and MainActivity context bridge into AppShellNavigation.kt. Keep the pure helper internal and testable. In the composable adapter:
-
-1. collect the same configured destinations and active-provider catalog layout;
-2. convert each app destination to UiDestination(id, stringResource(labelRes), icon);
-3. map AppNavigationChrome.Rail/TopBar to NavigationChrome.Rail/TopBar;
-4. delegate rendering to CoreAppScreenScaffold;
-5. pass title, subtitle, header, actions, padding, and content lambdas unchanged.
-
-Do not move route constants, repository collection, or MainActivity access into core.
-
-- [ ] **Step 4: Run adapter tests and compile**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.ui.components.shell.AppShellNavigationTest"
-.\gradlew.bat :app:compileDebugKotlin
-~~~
-
-Expected: PASS and existing screen call sites remain source-compatible.
-
-### Task 7: Migrate consumers, preserve golden coverage, and remove old app UI copies
-
-**Files:**
-
-- Modify: all app/src/main/java Kotlin imports of com.streamvault.app.ui.design, .interaction, and .theme
-- Modify: app/src/androidTest/java/com/streamvault/app/ui/components/shell/ShellGoldenTest.kt
-- Modify: app/src/androidTest/java/com/streamvault/app/ui/PremiumRouteGoldenTest.kt
-- Modify: all tests importing moved core UI packages
-- Delete: obsolete files under app/src/main/java/com/streamvault/app/ui/design, ui/interaction, and ui/theme
-
-**Interfaces:**
-
-- Generic presentation consumers compile against com.streamvault.core.ui.
-- App screens retain only app adapter imports for AppScreenScaffold and AppNavigationChrome.
-
-- [ ] **Step 1: Update generic imports mechanically**
-
-Replace only:
-
-~~~text
-com.streamvault.app.ui.design -> com.streamvault.core.ui.design
-com.streamvault.app.ui.theme -> com.streamvault.core.ui.theme
-com.streamvault.app.ui.interaction -> com.streamvault.core.ui.interaction
-~~~
-
-Keep app-only navigation adapter imports under com.streamvault.app.ui.components.shell. Do not rewrite route or screen logic.
-
-- [ ] **Step 2: Update golden fixtures only for package/API names**
-
-Keep the existing golden scenarios, dimensions, test data, labels, and visual parameters. Update theme and generic component imports to core, while using the app adapter for navigation-backed scaffold setup.
-
-- [ ] **Step 3: Run compile and unit gates**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :core:ui:check
-.\gradlew.bat :app:compileDebugKotlin
-.\gradlew.bat :app:testDebugUnitTest
-~~~
-
-- [ ] **Step 4: Run shell golden/instrumentation validation**
-
-Run the existing shell and premium-route golden tests using the repository's established connected-test command. Expected: unchanged golden output. If no emulator/device is available, record the exact unavailable command and leave the gate open.
-
-- [ ] **Step 5: Confirm old package and forbidden dependency removal**
-
-Run:
-
-~~~powershell
-rg -n "com\.streamvault\.app\.ui\.(design|interaction|theme)" app core --glob '*.kt'
-rg -n "com\.streamvault\.app|com\.streamvault\.data|com\.streamvault\.domain|com\.streamvault\.player|androidx\.navigation|dagger\.hilt|MainActivity|NavController|NavHost" core/ui/src/main --glob '*.kt'
-~~~
-
-Expected: no old generic imports under app and no banned core tokens.
-
-### Task 8: Full Phase 3 verification, graph refresh, and report
-
-**Files:**
-
-- Create: docs/COMPOSE_REDUCTION_PHASE3_REPORT.md
-- Modify: docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md only when execution evidence requires a status/checklist update
-- Update: graphify-out/ through graphify update .
-
-**Interfaces:**
-
-- Produces evidence for module independence, intentional recompilation boundaries, and golden coverage.
-
-- [ ] **Step 1: Run complete build checks**
-
-Run:
-
-~~~powershell
-.\gradlew.bat verifyCoreUiBoundary
-.\gradlew.bat :core:ui:compileDebugKotlin
-.\gradlew.bat :core:ui:testDebugUnitTest
-.\gradlew.bat :app:compileDebugKotlin
-.\gradlew.bat :app:testDebugUnitTest
-.\gradlew.bat :app:assembleDebug
-~~~
-
-Record pass/fail output and pre-existing baseline failures separately.
-
-- [ ] **Step 2: Capture module/task impact**
-
-Record relevant Gradle task output or build scans, including that a core UI source change compiles :core:ui and its app consumer while an app-only screen change does not add a dependency from core. Do not claim a performance improvement without before/after measurements.
-
-- [ ] **Step 3: Refresh the repository graph**
-
-Run from the repository root:
-
-~~~powershell
-graphify update .
-~~~
-
-Confirm completion and that the core module/source appears in updated graph output.
-
-- [ ] **Step 4: Write the Phase 3 report**
-
-Document the new module/package structure, dependency guard command/result, moved source/resources, adapter responsibilities, compile/unit/golden results, task impact, unavailable emulator gates, pre-existing failures, and explicit confirmation that no player behavior changed.
-
-- [ ] **Step 5: Commit in reviewable slices**
-
-Use separate commits where practical for module/guard setup, primitive migration, shell/adapter extraction, consumer imports, and verification/report updates. Run the narrow checks for each slice and Task 8 completely before final handoff.
diff --git a/docs/superpowers/plans/2026-08-23-navigation-contracts.md b/docs/superpowers/plans/2026-08-23-navigation-contracts.md
deleted file mode 100644
index 7e34494b..00000000
--- a/docs/superpowers/plans/2026-08-23-navigation-contracts.md
+++ /dev/null
@@ -1,1557 +0,0 @@
-# Phase 4 Navigation Contracts Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Create typed, app-independent navigation contracts; move startup and external navigation orchestration out of the root composable; and reduce `AppNavHost` to a feature-graph registry ready for Phase 5 extraction.
-
-**Architecture:** Add a pure Kotlin `:core:navigation` module for serializable destination/request/action contracts. Keep route strings, Android intent parsing, AndroidX `NavController`, domain adapters, and presentation-hint transport in `:app`; split the app graph into controller-free `NavGraphBuilder` registration extensions that communicate through typed actions.
-
-**Tech Stack:** Kotlin/JVM 17, Android Gradle Plugin 8.12-era project conventions, AndroidX Navigation Compose, Kotlin coroutines/StateFlow, Hilt activity-retained scope, JUnit 4, Truth, Mockito Kotlin, Robolectric, Compose instrumentation tests, Gradle static boundary tasks, and graphify.
-
-**Spec:** `docs/superpowers/specs/2026-08-23-navigation-contracts-design.md`
-
-## Global Constraints
-
-- `:core:navigation` must have no project dependencies and no references to `:app`, `:data`, `:domain`, `:player`, Android, Compose, AndroidX Navigation, Hilt, Activities, `NavController`, or `NavHost`.
-- Preserve all existing route strings, argument names, intent extra names, URI validation, startup landing behavior, player payload fields, return behavior, screen visuals, and focus behavior.
-- Feature graph registration files must not accept or reference the root `NavHostController`; only `AppNavigation.kt`, `AppNavHost.kt`, and `NavControllerNavigator.kt` may reference it in production navigation source.
-- Domain objects and movie/series presentation-hint models remain app-owned during Phase 4.
-- Phase 4 does not extract feature modules or change player composition, playback lifecycle, stream recovery, or stream policy.
-- Use JVM 17 everywhere; Android modules retain compile SDK 36 and minimum SDK 25.
-- Add failing tests before implementation changes, run the narrow test after each slice, and commit each independently reviewable task.
-- After modifying code, run `graphify update .` from the repository root.
-
-## Planned file structure
-
-```text
-core/navigation/
- build.gradle.kts
- src/main/kotlin/com/streamvault/core/navigation/
- AppDestination.kt
- PlayerNavigationRequest.kt
- NavigationRequest.kt
- NavigationActions.kt
- src/test/kotlin/com/streamvault/core/navigation/
- AppDestinationTest.kt
- PlayerNavigationRequestTest.kt
- NavigationRequestTest.kt
-
-app/src/main/java/com/streamvault/app/navigation/
- AppNavigation.kt # composition wiring only
- AppNavHost.kt # one NavHost plus registration calls
- AppRouteCodec.kt # typed destination <-> existing route
- AppNavigationPayloads.kt # saved-state player/detail payload bridge
- CatalogDetailNavigationActions.kt # app/domain detail hint boundary
- NavControllerNavigator.kt # only NavController command executor
- AppNavigationLifecycle.kt # lifecycle-resumed command gate
- AppNavigationCoordinator.kt # pending startup/external commands
- NavigationCoordinatorModule.kt # command ID source binding
- StartupNavigationResolver.kt # repository-backed startup selection
- ExternalNavigationRequestParser.kt# Android Intent -> typed request
- PlayerNavigationAdapters.kt # domain model -> core player request
- graph/
- WelcomeGraph.kt
- ProviderGraph.kt
- HomeGraph.kt
- LiveGraph.kt
- CatalogGraph.kt
- PlayerGraph.kt
- SystemGraph.kt
-```
-
----
-
-### Task 1: Add the pure `:core:navigation` module and enforce its boundary
-
-**Files:**
-
-- Modify: `settings.gradle.kts`
-- Modify: `app/build.gradle.kts`
-- Modify: `build.gradle.kts`
-- Create: `core/navigation/build.gradle.kts`
-
-**Interfaces:**
-
-- Consumes: root Kotlin JVM plugin alias and existing JUnit/Truth version-catalog aliases.
-- Produces: `:core:navigation`, `:core:navigation:verifyCoreNavigationBoundary`, and root `verifyCoreNavigationBoundary`.
-
-- [ ] **Step 1: Register the module and app dependency**
-
-Add to `settings.gradle.kts`:
-
-```kotlin
-include(":core:navigation")
-```
-
-Add beside the existing core UI dependency in `app/build.gradle.kts`:
-
-```kotlin
-implementation(project(":core:navigation"))
-implementation(project(":core:ui"))
-```
-
-- [ ] **Step 2: Create the pure Kotlin module and static guard**
-
-Create `core/navigation/build.gradle.kts`:
-
-```kotlin
-import org.gradle.api.artifacts.ProjectDependency
-
-plugins {
- alias(libs.plugins.kotlin.jvm)
- alias(libs.plugins.kover)
-}
-
-java {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
-}
-
-kotlin {
- jvmToolchain(17)
-}
-
-val bannedCoreNavigationTokens = listOf(
- "com.streamvault.app",
- "com.streamvault.data",
- "com.streamvault.domain",
- "com.streamvault.player",
- "android.",
- "androidx.compose",
- "androidx.navigation",
- "dagger.hilt",
- "MainActivity",
- "NavController",
- "NavHost"
-)
-
-val verifyCoreNavigationBoundary = tasks.register("verifyCoreNavigationBoundary") {
- group = "verification"
- description = "Verifies that core navigation contains contracts only."
- notCompatibleWithConfigurationCache(
- "The boundary scan reads resolved Gradle model state at execution time."
- )
- doLast {
- val projectDependencies = configurations
- .flatMap { configuration ->
- configuration.dependencies
- .withType<ProjectDependency>()
- .filter { dependency -> dependency.path != project.path }
- .map { dependency -> "${configuration.name}:${dependency.path}" }
- }
- .distinct()
- check(projectDependencies.isEmpty()) {
- ":core:navigation must not declare project dependencies: ${projectDependencies.joinToString()}"
- }
-
- val sourceRoot = layout.projectDirectory.asFile.resolve("src/main")
- val violations = sourceRoot.walkTopDown()
- .filter { it.isFile && it.extension == "kt" }
- .flatMap { file ->
- file.readLines().flatMapIndexed { index, line ->
- bannedCoreNavigationTokens.filter(line::contains).map { token ->
- "${file.relativeTo(sourceRoot)}:${index + 1}: $token"
- }
- }
- }
- .toList()
- check(violations.isEmpty()) {
- ":core:navigation contains forbidden references:\n${violations.joinToString("\n")}"
- }
- }
-}
-
-tasks.named("check") {
- dependsOn(verifyCoreNavigationBoundary)
-}
-
-dependencies {
- testImplementation(libs.junit)
- testImplementation(libs.truth)
-}
-```
-
-- [ ] **Step 3: Add the root verification entry point**
-
-Add to root `build.gradle.kts`:
-
-```kotlin
-tasks.register("verifyCoreNavigationBoundary") {
- group = "verification"
- description = "Verifies that :core:navigation remains contract-only."
- dependsOn(":core:navigation:verifyCoreNavigationBoundary")
-}
-```
-
-- [ ] **Step 4: Run the empty-module checks**
-
-Run:
-
-```powershell
-.\gradlew.bat verifyCoreNavigationBoundary :core:navigation:compileKotlin :app:compileDebugKotlin --console=plain
-```
-
-Expected: all tasks pass and the guard reports no project dependency or banned-source violation.
-
-- [ ] **Step 5: Commit the module boundary**
-
-```powershell
-git add settings.gradle.kts build.gradle.kts app/build.gradle.kts core/navigation/build.gradle.kts
-git commit -m "build: add core navigation boundary"
-```
-
-### Task 2: Define typed destinations and navigation request contracts
-
-**Files:**
-
-- Create: `core/navigation/src/main/kotlin/com/streamvault/core/navigation/AppDestination.kt`
-- Create: `core/navigation/src/main/kotlin/com/streamvault/core/navigation/PlayerNavigationRequest.kt`
-- Create: `core/navigation/src/main/kotlin/com/streamvault/core/navigation/NavigationRequest.kt`
-- Create: `core/navigation/src/main/kotlin/com/streamvault/core/navigation/NavigationActions.kt`
-- Create: `core/navigation/src/test/kotlin/com/streamvault/core/navigation/AppDestinationTest.kt`
-- Create: `core/navigation/src/test/kotlin/com/streamvault/core/navigation/PlayerNavigationRequestTest.kt`
-- Create: `core/navigation/src/test/kotlin/com/streamvault/core/navigation/NavigationRequestTest.kt`
-
-**Interfaces:**
-
-- Consumes: Java `Serializable` only.
-- Produces: `AppDestination`, `PlayerNavigationRequest`, `ExternalNavigationRequest`, `NavigationCommand`, `NavigationOptions`, and `NavigationActions`.
-
-- [ ] **Step 1: Write failing typed-contract tests**
-
-Create tests that refer to the not-yet-created contracts:
-
-```kotlin
-class AppDestinationTest {
- @Test
- fun detailDestinationKeepsTypedReturnTarget() {
- val destination = AppDestination.MovieDetail(
- movieId = 42L,
- returnDestination = AppDestination.Search("night")
- )
-
- assertThat(destination.movieId).isEqualTo(42L)
- assertThat(destination.returnDestination)
- .isEqualTo(AppDestination.Search("night"))
- }
-}
-```
-
-```kotlin
-class PlayerNavigationRequestTest {
- @Test
- fun serializableRoundTripPreservesEpisodeAndReturnIdentity() {
- val request = PlayerNavigationRequest(
- streamUrl = "https://example.com/e.m3u8",
- title = "Episode",
- providerId = 9L,
- contentType = "SERIES_EPISODE",
- returnDestination = AppDestination.SeriesDetail(12L),
- seriesId = 12L,
- seasonNumber = 3,
- episodeNumber = 4,
- episodeId = 77L
- )
-
- val restored = java.io.ObjectInputStream(
- java.io.ByteArrayInputStream(
- java.io.ByteArrayOutputStream().also { bytes ->
- java.io.ObjectOutputStream(bytes).use { it.writeObject(request) }
- }.toByteArray()
- )
- ).use { it.readObject() as PlayerNavigationRequest }
-
- assertThat(restored).isEqualTo(request)
- }
-}
-```
-
-```kotlin
-class NavigationRequestTest {
- @Test
- fun externalAndInternalRequestsRemainTyped() {
- assertThat(ExternalNavigationRequest.Search("sports"))
- .isNotEqualTo(ExternalNavigationRequest.Destination(AppDestination.Home))
- assertThat(NavigationCommand.OpenPlayer(PlayerNavigationRequest("https://x", "X")))
- .isInstanceOf(NavigationCommand.OpenPlayer::class.java)
- }
-}
-```
-
-- [ ] **Step 2: Run the tests and verify they fail**
-
-```powershell
-.\gradlew.bat :core:navigation:test --tests "com.streamvault.core.navigation.*" --console=plain
-```
-
-Expected: compilation fails because the contract types do not exist.
-
-- [ ] **Step 3: Implement the typed destination model**
-
-Create `AppDestination.kt` with these exact variants:
-
-```kotlin
-sealed interface AppDestination : Serializable {
- data object Welcome : AppDestination
- data object Home : AppDestination
- data class LiveTv(val categoryId: Long? = null) : AppDestination
- data object Movies : AppDestination
- data object Series : AppDestination
- data object Vod : AppDestination
- data object Downloads : AppDestination
- data class Guide(
- val categoryId: Long? = null,
- val anchorTimeMs: Long? = null,
- val favoritesOnly: Boolean = false
- ) : AppDestination
- data class Settings(val backupUri: String? = null) : AppDestination
- data object Plugins : AppDestination
- data class Search(val query: String? = null) : AppDestination
- data class ProviderSetup(
- val providerId: Long? = null,
- val importUri: String? = null
- ) : AppDestination
- data class MovieDetail(
- val movieId: Long,
- val returnDestination: AppDestination? = null
- ) : AppDestination
- data class SeriesDetail(
- val seriesId: Long,
- val returnDestination: AppDestination? = null
- ) : AppDestination
- data class ParentalControlGroups(val providerId: Long) : AppDestination
- data object Player : AppDestination
- data object MultiView : AppDestination
-}
-```
-
-Import `java.io.Serializable` and require positive IDs for detail/parental destinations in `init` blocks.
-
-- [ ] **Step 4: Implement player and command contracts**
-
-Move the existing player fields unchanged into core, replacing `returnRoute: String?` with:
-
-```kotlin
-val returnDestination: AppDestination? = null
-```
-
-Define requests/actions:
-
-```kotlin
-sealed interface ExternalNavigationRequest : Serializable {
- data class Search(val query: String) : ExternalNavigationRequest
- data class Player(val request: PlayerNavigationRequest) : ExternalNavigationRequest
- data class Destination(val destination: AppDestination) : ExternalNavigationRequest
- data class ImportM3u(val uri: String) : ExternalNavigationRequest
- data class ImportBackup(val uri: String) : ExternalNavigationRequest
-}
-
-data class NavigationOptions(
- val launchSingleTop: Boolean = false,
- val restoreState: Boolean = false,
- val saveState: Boolean = false,
- val popUpTo: AppDestination? = null,
- val inclusive: Boolean = false
-) : Serializable
-
-sealed interface NavigationCommand : Serializable {
- data class Navigate(
- val destination: AppDestination,
- val options: NavigationOptions = NavigationOptions()
- ) : NavigationCommand
- data class OpenPlayer(val request: PlayerNavigationRequest) : NavigationCommand
- data object Back : NavigationCommand
- data class ReturnTo(val destination: AppDestination?) : NavigationCommand
-}
-
-interface NavigationActions {
- fun navigate(
- destination: AppDestination,
- options: NavigationOptions = NavigationOptions()
- )
- fun openPlayer(request: PlayerNavigationRequest)
- fun back(): Boolean
- fun returnTo(destination: AppDestination?): Boolean
-}
-```
-
-- [ ] **Step 5: Run core tests and boundary verification**
-
-```powershell
-.\gradlew.bat :core:navigation:test verifyCoreNavigationBoundary --console=plain
-```
-
-Expected: all core tests and the boundary guard pass.
-
-- [ ] **Step 6: Commit typed contracts**
-
-```powershell
-git add core/navigation/src
-git commit -m "feat: add typed navigation contracts"
-```
-
-### Task 3: Add the app route codec and legacy route compatibility
-
-**Files:**
-
-- Create: `app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt`
-- Create: `app/src/test/java/com/streamvault/app/navigation/AppRouteCodecTest.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/ExternalDestinationTest.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/RoutesTest.kt`
-- Keep temporarily: `app/src/main/java/com/streamvault/app/navigation/ExternalNavigationRequest.kt` until Task 6 migrates Android intent producers/consumers
-
-**Interfaces:**
-
-- Consumes: `AppDestination` from Task 2.
-- Produces: `AppRoutePatterns`, `AppRouteCodec.encode(AppDestination): String`, `AppRouteCodec.decode(String): AppDestination?`, and legacy-route parsing through the codec.
-
-- [ ] **Step 1: Write failing route round-trip tests**
-
-Create parameterized-style assertions without introducing a new test framework:
-
-```kotlin
-@Test
-fun typedDestinationsPreserveExistingRoutes() {
- val cases = mapOf(
- AppDestination.Home to "home",
- AppDestination.LiveTv(42L) to "live_tv?categoryId=42",
- AppDestination.Guide(21L, 1_700_000_000_000L, true) to
- "epg?categoryId=21&anchorTime=1700000000000&favoritesOnly=true",
- AppDestination.Search("night shift") to "search?query=night%20shift",
- AppDestination.ProviderSetup(7L, "content://playlist/1") to
- "provider_setup?providerId=7&importUri=content%3A%2F%2Fplaylist%2F1"
- )
-
- cases.forEach { (destination, route) ->
- assertThat(AppRouteCodec.encode(destination)).isEqualTo(route)
- assertThat(AppRouteCodec.decode(route)).isEqualTo(destination)
- }
-}
-
-@Test
-fun nestedReturnDestinationRoundTrips() {
- val destination = AppDestination.SeriesDetail(
- seriesId = 42L,
- returnDestination = AppDestination.Search("night")
- )
- assertThat(AppRouteCodec.decode(AppRouteCodec.encode(destination)))
- .isEqualTo(destination)
-}
-```
-
-- [ ] **Step 2: Run the focused route tests and verify failure**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.AppRouteCodecTest --console=plain
-```
-
-Expected: compilation fails because `AppRouteCodec` does not exist.
-
-- [ ] **Step 3: Implement route patterns and deterministic encoding**
-
-Move the existing pattern constants into `AppRoutePatterns`. Implement `encode` with the same path/argument names and sentinel values currently used by `Routes`:
-
-```kotlin
-internal object AppRoutePatterns {
- const val WELCOME = "welcome"
- const val HOME = "home"
- const val LIVE_TV = "live_tv"
- const val LIVE_TV_DESTINATION = "live_tv?categoryId={categoryId}"
- const val MOVIES = "movies"
- const val SERIES = "series"
- const val VOD = "vod"
- const val DOWNLOADS = "downloads"
- const val EPG = "epg"
- const val EPG_DESTINATION =
- "epg?categoryId={categoryId}&anchorTime={anchorTime}&favoritesOnly={favoritesOnly}"
- const val SETTINGS = "settings"
- const val SETTINGS_DESTINATION = "settings?backupUri={backupUri}"
- const val PLUGINS = "plugins"
- const val PLAYER = "player"
- const val SEARCH = "search"
- const val SEARCH_DESTINATION = "search?query={query}"
- const val PROVIDER_SETUP = "provider_setup?providerId={providerId}&importUri={importUri}"
- const val MOVIE_DETAIL = "movie_detail/{movieId}?returnRoute={returnRoute}"
- const val SERIES_DETAIL = "series_detail/{seriesId}?returnRoute={returnRoute}"
- const val PARENTAL_CONTROL_GROUPS = "parental_control_groups/{providerId}"
- const val MULTI_VIEW = "multi_view"
-}
-```
-
-Use `android.net.Uri.encode` for values to preserve Android route encoding. Decode query values defensively; malformed values return `null` for that value and never throw.
-
-- [ ] **Step 4: Keep a temporary `Routes` façade while consumers migrate**
-
-Retain an internal compatibility object in `AppRouteCodec.kt` that delegates route construction to typed destinations:
-
-```kotlin
-internal object Routes {
- const val PROVIDER_SETUP = AppRoutePatterns.PROVIDER_SETUP
- const val HOME = AppRoutePatterns.HOME
- const val LIVE_TV = AppRoutePatterns.LIVE_TV
- const val LIVE_TV_DESTINATION = AppRoutePatterns.LIVE_TV_DESTINATION
- const val MOVIES = AppRoutePatterns.MOVIES
- const val SERIES = AppRoutePatterns.SERIES
- const val VOD = AppRoutePatterns.VOD
- const val DOWNLOADS = AppRoutePatterns.DOWNLOADS
- const val EPG = AppRoutePatterns.EPG
- const val EPG_DESTINATION = AppRoutePatterns.EPG_DESTINATION
- const val SETTINGS = AppRoutePatterns.SETTINGS
- const val SETTINGS_DESTINATION = AppRoutePatterns.SETTINGS_DESTINATION
- const val PLUGINS = AppRoutePatterns.PLUGINS
- const val PLAYER = AppRoutePatterns.PLAYER
- const val SEARCH = AppRoutePatterns.SEARCH
- const val SEARCH_DESTINATION = AppRoutePatterns.SEARCH_DESTINATION
- const val MOVIE_DETAIL = AppRoutePatterns.MOVIE_DETAIL
- const val SERIES_DETAIL = AppRoutePatterns.SERIES_DETAIL
- const val WELCOME = AppRoutePatterns.WELCOME
- const val PARENTAL_CONTROL_GROUPS = AppRoutePatterns.PARENTAL_CONTROL_GROUPS
- const val MULTI_VIEW = AppRoutePatterns.MULTI_VIEW
-
- fun liveTv(categoryId: Long? = null): String =
- AppRouteCodec.encode(AppDestination.LiveTv(categoryId))
-
- fun epg(categoryId: Long? = null, anchorTime: Long? = null, favoritesOnly: Boolean? = null): String =
- AppRouteCodec.encode(
- AppDestination.Guide(categoryId, anchorTime, favoritesOnly ?: false)
- )
-}
-```
-
-Do not keep player/domain factory methods in this façade; Task 4 moves those separately.
-
-- [ ] **Step 5: Migrate legacy external destination tests**
-
-Replace `ExternalDestination.fromLegacyRoute(route)` assertions with `AppRouteCodec.decodeLegacyExternalRoute(route)`. Preserve the existing supported subset: Home, Plugins, Provider Setup, Movie Detail, and Series Detail. Unsupported external routes still return `null`.
-
-- [ ] **Step 6: Run route tests and app compilation**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.navigation.*Route*Test" :app:compileDebugKotlin --console=plain
-```
-
-Expected: route/legacy tests pass and existing route consumers still compile through the compatibility façade.
-
-- [ ] **Step 7: Commit route compatibility**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt app/src/test/java/com/streamvault/app/navigation
-git commit -m "refactor: add typed app route codec"
-```
-
-### Task 4: Move player requests to core and isolate domain adapters
-
-**Files:**
-
-- Create: `app/src/main/java/com/streamvault/app/navigation/PlayerNavigationAdapters.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/PlayerNavigationPolicy.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigation.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationGraph.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationAdapters.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationStartupPolicy.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/ExternalNavigationRequest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/PlaybackHistoryNavigation.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationContracts.kt`
-- Modify: `app/src/main/java/com/streamvault/app/MainActivity.kt`
-- Modify: `app/src/main/java/com/streamvault/app/tv/LauncherRecommendationsManager.kt`
-- Modify: `app/src/main/java/com/streamvault/app/tvinput/TvInputChannelSyncManager.kt`
-- Modify: `app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsRecordingSection.kt`
-- Modify: `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/RoutesTest.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/PlayerNavigationRequestTest.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/PlaybackHistoryNavigationTest.kt`
-
-**Interfaces:**
-
-- Consumes: core `PlayerNavigationRequest` and typed return destinations.
-- Produces: `Channel.toLivePlayerRequest`, `Movie.toPlayerNavigationRequest`, `Episode.toPlayerNavigationRequest`, `PlaybackHistory.toPlayerNavigationRequest`, `playerNavigationRequest`, and `safePlayerNavigationRequest`.
-
-- [ ] **Step 1: Convert existing player tests to typed returns and core imports**
-
-Update the guide-return test:
-
-```kotlin
-val request = channel.toLivePlayerRequest(
- categoryId = 9L,
- providerId = 7L,
- returnDestination = AppDestination.Guide(
- categoryId = 9L,
- anchorTimeMs = 1_700_000_360_000L,
- favoritesOnly = false
- )
-)
-assertThat(request.returnDestination)
- .isEqualTo(AppDestination.Guide(9L, 1_700_000_360_000L, false))
-```
-
-Import `PlayerNavigationRequest` from `com.streamvault.core.navigation` in player safety/history tests.
-
-- [ ] **Step 2: Run focused tests and verify failure**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.RoutesTest --tests com.streamvault.app.navigation.PlayerNavigationRequestTest --tests com.streamvault.app.navigation.PlaybackHistoryNavigationTest --console=plain
-```
-
-Expected: compilation fails because the typed adapter functions do not exist and old requests still use `returnRoute`.
-
-- [ ] **Step 3: Implement domain-to-core factories**
-
-Create adapters with the existing field mapping:
-
-```kotlin
-internal fun Channel.toLivePlayerRequest(
- categoryId: Long? = this.categoryId,
- providerId: Long? = this.providerId,
- isVirtual: Boolean = false,
- combinedProfileId: Long? = null,
- combinedSourceFilterProviderId: Long? = null,
- returnDestination: AppDestination? = null
-): PlayerNavigationRequest = playerNavigationRequest(
- streamUrl = streamUrl,
- title = name,
- channelId = epgChannelId,
- internalId = id,
- categoryId = categoryId ?: ChannelRepository.ALL_CHANNELS_ID,
- providerId = providerId,
- isVirtual = isVirtual,
- combinedProfileId = combinedProfileId,
- combinedSourceFilterProviderId = combinedSourceFilterProviderId,
- contentType = "LIVE",
- returnDestination = returnDestination
-)
-```
-
-Add these three domain factories with exact mappings:
-
-```kotlin
-internal fun Movie.toPlayerNavigationRequest(
- returnDestination: AppDestination? = null
-): PlayerNavigationRequest = playerNavigationRequest(
- streamUrl = streamUrl,
- title = name,
- internalId = id,
- categoryId = categoryId,
- providerId = providerId,
- contentType = "MOVIE",
- artworkUrl = posterUrl ?: backdropUrl,
- returnDestination = returnDestination
-)
-
-internal fun Episode.toPlayerNavigationRequest(
- returnDestination: AppDestination? = null
-): PlayerNavigationRequest = playerNavigationRequest(
- streamUrl = streamUrl,
- title = "$title - S${seasonNumber}E${episodeNumber}",
- internalId = id,
- providerId = providerId,
- contentType = "SERIES_EPISODE",
- artworkUrl = coverUrl,
- returnDestination = returnDestination,
- seriesId = seriesId.takeIf { it > 0L },
- seasonNumber = seasonNumber,
- episodeNumber = episodeNumber,
- episodeId = episodeId.takeIf { it > 0L }
-)
-
-internal fun PlaybackHistory.toPlayerNavigationRequest(
- returnDestination: AppDestination? = null
-): PlayerNavigationRequest = playerNavigationRequest(
- streamUrl = streamUrl,
- title = title,
- internalId = contentId,
- providerId = providerId,
- contentType = contentType.name,
- artworkUrl = posterUrl,
- returnDestination = returnDestination,
- seriesId = seriesId,
- seasonNumber = seasonNumber,
- episodeNumber = episodeNumber
-)
-```
-
-`playerNavigationRequest(...)` is the single generic/archive factory. Its parameters expose every existing primitive field, including `archiveStartMs`, `archiveEndMs`, `archiveTitle`, and `returnDestination`; it constructs the core request without deriving metadata.
-
-- [ ] **Step 4: Move URL safety into a focused app policy file**
-
-Move the existing scheme allowlist unchanged to `PlayerNavigationPolicy.kt` and import the core request type. Keep the accepted schemes:
-
-```kotlin
-setOf("http", "https", "rtsp", "rtmp", "rtsps", "mms", "xtream", "stalker", "content", "file")
-```
-
-- [ ] **Step 5: Migrate consumers mechanically**
-
-Replace app-contract imports with `com.streamvault.core.navigation.PlayerNavigationRequest` in MainActivity, launcher recommendations, Watch Next, TV input, player screen/tests, and settings playback entry points. Replace `Routes.livePlayer/moviePlayer/episodePlayer/player` calls with the new adapters.
-
-Change `PlayerScreen` parameters from:
-
-```kotlin
-returnRoute: String? = null,
-onNavigate: ((String) -> Unit)? = null
-```
-
-to:
-
-```kotlin
-returnDestination: AppDestination? = null,
-onNavigate: ((AppDestination) -> Unit)? = null
-```
-
-The guide-notice action invokes `onNavigate(returnDestination)` only when both are non-null.
-
-- [ ] **Step 6: Remove player/domain content from `AppNavigationContracts.kt`**
-
-Delete the old `PlayerNavigationRequest`, player factory methods, and URL policy. Leave only temporary route aliases not yet migrated by Task 8; delete the file completely once no declarations remain.
-
-- [ ] **Step 7: Run player/navigation tests and compilation**
-
-```powershell
-.\gradlew.bat :core:navigation:test :app:testDebugUnitTest --tests "com.streamvault.app.navigation.*" :app:compileDebugKotlin --console=plain
-```
-
-Expected: all focused tests pass; player and external intent producers compile against the core request.
-
-- [ ] **Step 8: Commit player request extraction**
-
-```powershell
-git add core/navigation app/src/main app/src/test
-git commit -m "refactor: move player navigation contracts to core"
-```
-
-### Task 5: Centralize Android controller execution and typed return behavior
-
-**Files:**
-
-- Create: `app/src/main/java/com/streamvault/app/navigation/NavControllerNavigator.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/AppNavigationPayloads.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/CatalogDetailNavigationActions.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/ReturnNavigationPolicy.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/AppNavigationLifecycle.kt`
-- Create: `app/src/test/java/com/streamvault/app/navigation/ReturnNavigationPolicyTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationAdapters.kt`
-
-**Interfaces:**
-
-- Consumes: core `NavigationActions`, `NavigationCommand`, `NavigationOptions`, destinations, and requests; app `AppRouteCodec`.
-- Produces: `NavControllerNavigator.execute(command): Boolean`, typed feature actions, and app-owned payload access for player/detail destinations.
-
-The payload boundary exposed to graph registrations is:
-
-```kotlin
-internal interface AppNavigationPayloads {
- fun consumePlayerRequest(entry: NavBackStackEntry): PlayerNavigationRequest?
- fun consumeMoviePresentationHint(entry: NavBackStackEntry): MovieDetailPresentationHint?
- fun consumeSeriesPresentationHint(entry: NavBackStackEntry): SeriesDetailPresentationHint?
-}
-```
-
-Keep domain presentation hints behind a separate app-owned action boundary:
-
-```kotlin
-internal interface CatalogDetailNavigationActions {
- fun openMovieDetail(movie: Movie, returnDestination: AppDestination? = null)
- fun openSeriesDetail(series: Series, returnDestination: AppDestination? = null)
-}
-```
-
-`NavControllerNavigator` implements both `NavigationActions` and `CatalogDetailNavigationActions`. The catalog interface remains in `:app` for Phase 4 because `Movie` and `Series` are domain models; Phase 5 moves/refines it with the catalog feature rather than polluting `:core:navigation`.
-
-- [ ] **Step 1: Write failing pure return-policy tests**
-
-```kotlin
-class ReturnNavigationPolicyTest {
- @Test
- fun existingTargetPopsBeforeNavigating() {
- assertThat(planReturnNavigation(hasTargetInBackStack = true, hasPreviousEntry = true))
- .isEqualTo(ReturnNavigationPlan.PopToTarget)
- }
-
- @Test
- fun missingTargetNavigatesAndClearsPlayer() {
- assertThat(planReturnNavigation(hasTargetInBackStack = false, hasPreviousEntry = true))
- .isEqualTo(ReturnNavigationPlan.NavigateToTarget)
- }
-
- @Test
- fun missingReturnAndBackStackFallsBackHome() {
- assertThat(planReturnNavigation(hasTargetInBackStack = false, hasPreviousEntry = false))
- .isEqualTo(ReturnNavigationPlan.NavigateHome)
- }
-}
-```
-
-- [ ] **Step 2: Run the test and verify failure**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.ReturnNavigationPolicyTest --console=plain
-```
-
-Expected: compilation fails because the policy types do not exist.
-
-- [ ] **Step 3: Implement the pure return plan**
-
-```kotlin
-internal enum class ReturnNavigationPlan {
- PopToTarget,
- NavigateToTarget,
- PopPrevious,
- NavigateHome
-}
-
-internal fun planReturnNavigation(
- hasReturnTarget: Boolean,
- hasTargetInBackStack: Boolean,
- hasPreviousEntry: Boolean
-): ReturnNavigationPlan = when {
- hasReturnTarget && hasTargetInBackStack -> ReturnNavigationPlan.PopToTarget
- hasReturnTarget -> ReturnNavigationPlan.NavigateToTarget
- hasPreviousEntry -> ReturnNavigationPlan.PopPrevious
- else -> ReturnNavigationPlan.NavigateHome
-}
-```
-
-Update the first two tests to pass `hasReturnTarget = true` and the fallback test to pass `false`.
-
-- [ ] **Step 4: Implement the only root-controller adapter**
-
-`NavControllerNavigator` implements `NavigationActions`, `CatalogDetailNavigationActions`, and `AppNavigationPayloads`, and adds:
-
-```kotlin
-internal fun execute(command: NavigationCommand): Boolean
-internal fun navigateIfResumed(
- destination: AppDestination,
- options: NavigationOptions = NavigationOptions()
-): Boolean
-internal fun consumePlayerRequest(entry: NavBackStackEntry): PlayerNavigationRequest?
-internal fun consumeMoviePresentationHint(entry: NavBackStackEntry): MovieDetailPresentationHint?
-internal fun consumeSeriesPresentationHint(entry: NavBackStackEntry): SeriesDetailPresentationHint?
-```
-
-All route conversion goes through `AppRouteCodec`. `openPlayer` writes `PLAYER_REQUEST_KEY` to the current entry before navigating to `AppDestination.Player`. Detail helpers keep the existing presentation-hint keys and previous-entry copy behavior inside this adapter.
-
-- [ ] **Step 5: Replace old controller extensions**
-
-Move `Lifecycle.awaitResumed` unchanged to `AppNavigationLifecycle.kt`. Remove `navigateToPlayer`, `navigateToExternalPlayer`, `navigateToMovieDetail`, and `navigateToSeriesDetail` controller extensions after their call sites move to typed actions. Keep domain presentation-hint conversion in `AppNavigationPayloads.kt`.
-
-- [ ] **Step 6: Run policy tests and compile**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.ReturnNavigationPolicyTest :app:compileDebugKotlin --console=plain
-```
-
-Expected: pass.
-
-- [ ] **Step 7: Commit the controller adapter**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/navigation/ReturnNavigationPolicyTest.kt
-git commit -m "refactor: centralize typed navigation execution"
-```
-
-### Task 6: Extract external intent parsing and pending command coordination
-
-**Files:**
-
-- Create: `app/src/main/java/com/streamvault/app/navigation/ExternalNavigationRequestParser.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/AppNavigationCoordinator.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/NavigationCoordinatorModule.kt`
-- Create: `app/src/test/java/com/streamvault/app/navigation/ExternalNavigationRequestParserTest.kt`
-- Create: `app/src/test/java/com/streamvault/app/navigation/AppNavigationCoordinatorTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/MainActivity.kt`
-- Modify: `app/src/main/java/com/streamvault/app/tv/LauncherRecommendationsManager.kt`
-- Modify: `app/src/main/java/com/streamvault/app/tvinput/TvInputSetupActivity.kt`
-- Modify: `app/src/androidTest/java/com/streamvault/app/compat/PlatformCompatibilityMatrixTest.kt`
-- Delete: `app/src/main/java/com/streamvault/app/navigation/AppNavigationExternalNavigation.kt`
-- Delete: `app/src/main/java/com/streamvault/app/navigation/ExternalNavigationRequest.kt`
-
-**Interfaces:**
-
-- Consumes: core external requests/commands and app route codec.
-- Produces: `ExternalNavigationRequestParser.parse(Intent): ExternalNavigationRequest?`, `PendingNavigationCommand`, and coordinator submit/acknowledge flows.
-
-- [ ] **Step 1: Write failing intent parser tests with Robolectric**
-
-Cover player, typed destination, legacy route, search, and malformed fallback:
-
-```kotlin
-@RunWith(RobolectricTestRunner::class)
-class ExternalNavigationRequestParserTest {
- private val context = ApplicationProvider.getApplicationContext<Context>()
- private val parser = ExternalNavigationRequestParser(context)
-
- @Test
- fun searchIntentBecomesTypedSearchRequest() {
- val intent = Intent(Intent.ACTION_SEARCH)
- .putExtra(SearchManager.QUERY, " sports ")
- assertThat(parser.parse(intent))
- .isEqualTo(ExternalNavigationRequest.Search("sports"))
- }
-
- @Test
- fun malformedLegacyRouteFallsBackHome() {
- val intent = Intent().putExtra(MainActivity.EXTRA_EXTERNAL_ROUTE, "bad/route")
- assertThat(parser.parse(intent)).isEqualTo(
- ExternalNavigationRequest.Destination(AppDestination.Home)
- )
- }
-}
-```
-
-Add these concrete cases:
-
-- `ACTION_VIEW` with `audio/x-mpegurl` and a content URI produces `ImportM3u`.
-- `ACTION_VIEW` with an `.m3u8` path and no MIME type produces `ImportM3u`.
-- `ACTION_SEND` with JSON MIME and `EXTRA_STREAM` produces `ImportBackup` using the URI returned by `BackupFileBridge`.
-- `EXTRA_PLAYER_REQUEST` produces `Player` and takes precedence over all later inputs.
-- `EXTRA_EXTERNAL_DESTINATION` produces the matching typed `Destination`.
-- A generic `ACTION_VIEW` that is neither playlist nor backup produces `Destination(Home)`.
-- A blank search/assistant/voice query produces no search request.
-
-- [ ] **Step 2: Write failing coordinator idempotence tests**
-
-```kotlin
-@Test
-fun commandIsClearedOnlyAfterMatchingAcknowledgement() = runTest {
- val ids = sequenceOf(10L, 11L).iterator()
- val coordinator = AppNavigationCoordinator(NavigationCommandIdSource { ids.next() })
- coordinator.submitExternalRequest(ExternalNavigationRequest.Search("news"))
-
- val pending = coordinator.pendingCommand.value
- assertThat(pending?.id).isEqualTo(10L)
- coordinator.acknowledge(11L)
- assertThat(coordinator.pendingCommand.value).isEqualTo(pending)
- coordinator.acknowledge(10L)
- assertThat(coordinator.pendingCommand.value).isNull()
-}
-```
-
-- [ ] **Step 3: Run tests and verify failure**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.ExternalNavigationRequestParserTest --tests com.streamvault.app.navigation.AppNavigationCoordinatorTest --console=plain
-```
-
-Expected: compilation fails because parser/coordinator types do not exist.
-
-- [ ] **Step 4: Implement the app-owned Android parser**
-
-Use this boundary:
-
-```kotlin
-class ExternalNavigationRequestParser @Inject constructor(
- @ApplicationContext private val context: Context
-) {
- fun parse(intent: Intent): ExternalNavigationRequest?
-}
-```
-
-Move these exact operations from `MainActivity` into private parser helpers while preserving precedence and accepted inputs:
-
-- `readPlayerRequestExtra`
-- typed destination extra reading
-- legacy route handling
-- playlist URI validation
-- backup JSON candidate validation and `BackupFileBridge.copyToImportInbox(context, uri)`
-- search/assistant/voice query handling
-- generic `ACTION_VIEW` Home fallback
-
-Keep `EXTRA_PLAYER_REQUEST`, `EXTRA_EXTERNAL_DESTINATION`, and `EXTRA_EXTERNAL_ROUTE` in `MainActivity` for binary compatibility and preserve their exact string values.
-
-Migrate `LauncherRecommendationsManager` and `TvInputSetupActivity` to serialize core `AppDestination` values under `EXTRA_EXTERNAL_DESTINATION`, and have the parser read that exact type. Update `PlatformCompatibilityMatrixTest` to exercise `AppRouteCodec.decodeLegacyExternalRoute`. Once those producers, parser tests, and compatibility tests compile, delete the app-owned `ExternalDestination` and duplicate `ExternalNavigationRequest` declarations together.
-
-Add the pure conversion used by the coordinator:
-
-```kotlin
-internal fun ExternalNavigationRequest.toNavigationCommand(): NavigationCommand = when (this) {
- is ExternalNavigationRequest.Search -> NavigationCommand.Navigate(
- destination = AppDestination.Search(query),
- options = NavigationOptions(launchSingleTop = true)
- )
- is ExternalNavigationRequest.Player -> NavigationCommand.OpenPlayer(request)
- is ExternalNavigationRequest.Destination -> NavigationCommand.Navigate(
- destination = destination,
- options = NavigationOptions(launchSingleTop = true)
- )
- is ExternalNavigationRequest.ImportM3u -> NavigationCommand.Navigate(
- destination = AppDestination.ProviderSetup(importUri = uri),
- options = NavigationOptions(launchSingleTop = true)
- )
- is ExternalNavigationRequest.ImportBackup -> NavigationCommand.Navigate(
- destination = AppDestination.Settings(backupUri = uri),
- options = NavigationOptions(launchSingleTop = true)
- )
-}
-```
-
-- [ ] **Step 5: Implement coordinator pending-command state**
-
-```kotlin
-internal data class PendingNavigationCommand(
- val id: Long,
- val command: NavigationCommand
-)
-
-@HiltViewModel
-class AppNavigationCoordinator @Inject constructor(
- private val commandIds: NavigationCommandIdSource
-) : ViewModel() {
- private val commandQueue = ArrayDeque<PendingNavigationCommand>()
- private val _pendingCommand = MutableStateFlow<PendingNavigationCommand?>(null)
- val pendingCommand: StateFlow<PendingNavigationCommand?> = _pendingCommand.asStateFlow()
-
- fun submitExternalRequest(request: ExternalNavigationRequest)
- fun submit(command: NavigationCommand)
- fun acknowledge(id: Long)
-}
-
-internal fun interface NavigationCommandIdSource {
- fun next(): Long
-}
-
-internal class AtomicNavigationCommandIdSource @Inject constructor() : NavigationCommandIdSource {
- private val nextId = AtomicLong(0L)
- override fun next(): Long = nextId.incrementAndGet()
-}
-```
-
-`submit` appends to `commandQueue` and publishes the head only when no command is active. `acknowledge` removes only a matching head, then publishes the next queued command. This prevents a second intent from overwriting an unacknowledged first intent. Add a test that submits two searches, acknowledges the first, and observes the second.
-
-Bind the ID source explicitly:
-
-```kotlin
-@Module
-@InstallIn(ActivityRetainedComponent::class)
-internal abstract class NavigationCoordinatorModule {
- @Binds
- @ActivityRetainedScoped
- abstract fun bindNavigationCommandIdSource(
- implementation: AtomicNavigationCommandIdSource
- ): NavigationCommandIdSource
-}
-```
-
-- [ ] **Step 6: Wire MainActivity submission without changing Compose yet**
-
-Inject `ExternalNavigationRequestParser`, obtain the coordinator with `private val appNavigationCoordinator by viewModels<AppNavigationCoordinator>()`, and replace `_externalNavigationRequestFlow` mutation with:
-
-```kotlin
-intent?.let(parser::parse)?.let(appNavigationCoordinator::submitExternalRequest)
-```
-
-Keep `openPlayer(request)` as a compatibility method that submits `ExternalNavigationRequest.Player(request)`. Remove `clearExternalNavigationRequest` and the Activity-owned request flow after `AppNavigation.kt` migrates in Task 9.
-
-- [ ] **Step 7: Run parser/coordinator tests and app compilation**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.ExternalNavigationRequestParserTest --tests com.streamvault.app.navigation.AppNavigationCoordinatorTest :app:compileDebugKotlin --console=plain
-```
-
-Expected: pass.
-
-- [ ] **Step 8: Commit external orchestration**
-
-```powershell
-git add app/src/main app/src/test/java/com/streamvault/app/navigation app/src/androidTest/java/com/streamvault/app/compat/PlatformCompatibilityMatrixTest.kt
-git commit -m "refactor: extract external navigation coordination"
-```
-
-### Task 7: Extract startup navigation resolution from the root composable
-
-**Files:**
-
-- Create: `app/src/main/java/com/streamvault/app/navigation/StartupNavigationResolver.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/AppNavigationState.kt`
-- Create: `app/src/test/java/com/streamvault/app/navigation/StartupNavigationResolverTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationCoordinator.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationStartupPolicy.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationPolicy.kt`
-
-**Interfaces:**
-
-- Consumes: existing repositories and landing/catalog domain preferences inside `:app`.
-- Produces: `StartupNavigationResolver.resolve(AppLandingDestination): StartupNavigationTarget`, coordinator `state`, startup command idempotence, and typed catalog destination resolution.
-
-- [ ] **Step 1: Write failing resolver tests**
-
-Use Mockito Kotlin repositories and concrete channels/history. Start with this complete favorite fixture:
-
-```kotlin
-@Test
-fun firstFavoriteProducesVirtualLiveRequestReturningToLive() = runTest {
- whenever(preferencesRepository.showFavoritesCategory).thenReturn(flowOf(true))
- whenever(combinedM3uRepository.getActiveLiveSource()).thenReturn(
- flowOf(ActiveLiveSource.ProviderSource(7L))
- )
- whenever(favoriteRepository.getFavorites(7L, ContentType.LIVE)).thenReturn(
- flowOf(
- listOf(
- Favorite(
- providerId = 7L,
- contentId = 42L,
- contentType = ContentType.LIVE
- )
- )
- )
- )
- whenever(preferencesRepository.getHiddenChannelIds(7L)).thenReturn(flowOf(emptySet()))
- whenever(channelRepository.getChannel(42L)).thenReturn(
- Channel(
- id = 42L,
- name = "News",
- streamUrl = "https://example.com/live.m3u8",
- providerId = 7L
- )
- )
-
- val result = resolver.resolve(AppLandingDestination.FIRST_FAVORITE_LIVE)
-
- assertThat(result.destination).isEqualTo(AppDestination.LiveTv())
- assertThat(result.playerRequest?.internalId).isEqualTo(42L)
- assertThat(result.playerRequest?.categoryId).isEqualTo(VirtualCategoryIds.FAVORITES)
- assertThat(result.playerRequest?.returnDestination).isEqualTo(AppDestination.LiveTv())
-}
-```
-
-Add these exact resolver cases:
-
-- `HOME` returns `StartupNavigationTarget(AppDestination.Home, playerRequest = null)`.
-- Two Live playback-history entries with `lastWatchedAt` values `100L` and `200L` select the `200L` channel.
-- A selected channel ID present in `getHiddenChannelIds(providerId)` is skipped and produces no player request when no visible candidate remains.
-- A combined profile with enabled providers `7L` and `8L` sets `combinedProfileId`, accepts channels only from those enabled members, and ignores disabled/non-member providers.
-- No active live source and no active provider produces the typed landing destination with no player request.
-- A candidate ID whose `ChannelRepository.getChannel` result is `null` produces no player request.
-
-- [ ] **Step 2: Run resolver test and verify failure**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.StartupNavigationResolverTest --console=plain
-```
-
-Expected: compilation fails because the resolver does not exist.
-
-- [ ] **Step 3: Implement explicit startup result and resolver**
-
-```kotlin
-internal data class StartupNavigationTarget(
- val destination: AppDestination,
- val playerRequest: PlayerNavigationRequest? = null
-)
-```
-
-Move the repository logic from `resolveStartupPlayerRequest` into an injected resolver class. Preserve active provider/combined source selection, favorite ordering, playback-history ordering, hidden-channel filtering, virtual category IDs, and provider/profile IDs exactly.
-
-- [ ] **Step 4: Add coordinator state and one-shot startup commands**
-
-Expand the coordinator constructor in this task:
-
-```kotlin
-@HiltViewModel
-class AppNavigationCoordinator @Inject constructor(
- private val commandIds: NavigationCommandIdSource,
- private val startupResolver: StartupNavigationResolver,
- private val preferencesRepository: PreferencesRepository,
- private val providerRepository: ProviderRepository
-) : ViewModel()
-```
-
-```kotlin
-internal data class AppNavigationState(
- val startupTarget: StartupNavigationTarget? = null,
- val topLevelDestinations: List<AppTopLevelDestination> = AppTopLevelDestination.defaultOrder,
- val catalogLayout: CatalogLayout? = null,
- val lastSplitCatalogType: ContentType = ContentType.MOVIE,
- val splitPreferenceReady: Boolean = false
-)
-```
-
-The Hilt ViewModel coordinator observes the existing preference/provider flows in `viewModelScope`, resolves startup once per active provider/configuration, and exposes typed top-level/catalog navigation helpers. Implement the startup handshake explicitly:
-
-```kotlin
-fun requestStartupNavigation(popUpTo: AppDestination)
-fun onDestinationResumed(destination: AppDestination)
-```
-
-`requestStartupNavigation` submits the resolved landing destination with `NavigationOptions(popUpTo = popUpTo, inclusive = true)` and remembers that startup transition. When its command is acknowledged, retain—not enqueue—the optional startup player request. `onDestinationResumed(AppDestination.LiveTv(...))` then enqueues that player request exactly once; any other destination leaves it pending. Extend `AppNavigationCoordinatorTest` with assertions for repeated requests, non-Live resumed destinations, matching Live resumption, acknowledgement, and reattaching collectors to the same coordinator without duplicate commands. The Hilt ViewModel ownership is what retains that coordinator across Activity recreation.
-
-- [ ] **Step 5: Convert catalog policy to typed destinations**
-
-Change `resolveCatalogRoute` into:
-
-```kotlin
-internal fun resolveCatalogDestination(
- layout: CatalogLayout?,
- requested: AppDestination,
- lastSplitCatalogType: ContentType,
- splitPreferenceReady: Boolean
-): AppDestination
-```
-
-Preserve the SPLIT/UNIFIED/UNKNOWN behavior covered by `CatalogRouteResolverTest` and update the test to use `AppDestination.Movies`, `Series`, and `Vod`.
-
-Expose `fun requestTopLevelNavigation(requested: AppDestination)` on the coordinator. It resolves through `resolveCatalogDestination`, persists `MOVIE`/`SERIES` as the provider's last split catalog type when applicable, and submits a `Navigate` command with `popUpTo = AppDestination.Welcome`, `saveState = true`, `launchSingleTop = true`, and `restoreState = true`. This replaces the old root `tabNavigate` branch.
-
-- [ ] **Step 6: Run startup/catalog tests and compilation**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.StartupNavigationResolverTest --tests com.streamvault.app.navigation.CatalogRouteResolverTest :app:compileDebugKotlin --console=plain
-```
-
-Expected: pass.
-
-- [ ] **Step 7: Commit startup orchestration**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/navigation
-git commit -m "refactor: extract startup navigation coordination"
-```
-
-### Task 8: Split the graph into controller-free feature registration extensions
-
-**Files:**
-
-- Create: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/graph/WelcomeGraph.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/graph/ProviderGraph.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/graph/HomeGraph.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/graph/LiveGraph.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/graph/CatalogGraph.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/graph/PlayerGraph.kt`
-- Create: `app/src/main/java/com/streamvault/app/navigation/graph/SystemGraph.kt`
-- Create: `app/src/test/java/com/streamvault/app/navigation/FeatureGraphBoundaryTest.kt`
-- Modify: `app/build.gradle.kts`
-- Delete: `app/src/main/java/com/streamvault/app/navigation/AppNavigationGraph.kt`
-
-**Interfaces:**
-
-- Consumes: `NavigationActions`, app-owned `CatalogDetailNavigationActions`, `AppNavigationPayloads`, route patterns, and screen callbacks.
-- Produces: `AppNavHost` as registry and seven `NavGraphBuilder.register*Graph` extensions with no root-controller parameter.
-
-- [ ] **Step 1: Add a failing source-boundary test**
-
-Create a JVM test that scans the graph source directory:
-
-```kotlin
-@Test
-fun featureGraphsDoNotReferenceRootController() {
- val graphRoot = File("src/main/java/com/streamvault/app/navigation/graph")
- val files = graphRoot.walkTopDown()
- .filter { it.extension == "kt" }
- .toList()
- assertThat(files.map { it.name }).containsAtLeast(
- "WelcomeGraph.kt",
- "ProviderGraph.kt",
- "HomeGraph.kt",
- "LiveGraph.kt",
- "CatalogGraph.kt",
- "PlayerGraph.kt",
- "SystemGraph.kt"
- )
- val violations = files
- .filter { "NavHostController" in it.readText() || "NavController" in it.readText() }
- .map { it.name }
- .toList()
- assertThat(violations).isEmpty()
-}
-```
-
-Also add a Gradle `verifyFeatureNavigationBoundary` task with the same source scan and make `check` depend on it, so the rule applies outside unit-test execution.
-
-- [ ] **Step 2: Run the test and verify failure**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.FeatureGraphBoundaryTest --console=plain
-```
-
-Expected: the test fails because the seven registration files do not exist yet.
-
-- [ ] **Step 3: Create the registry-only host**
-
-`AppNavHost` must contain one `NavHost` and registration calls only:
-
-```kotlin
-@Composable
-internal fun AppNavHost(
- navController: NavHostController,
- actions: NavigationActions,
- catalogDetailActions: CatalogDetailNavigationActions,
- payloads: AppNavigationPayloads,
- startupReady: Boolean,
- onStartupNavigationRequested: (popUpTo: AppDestination) -> Unit,
- onTopLevelDestinationRequested: (AppDestination) -> Unit
-) {
- NavHost(
- navController = navController,
- startDestination = AppRoutePatterns.WELCOME
- ) {
- registerWelcomeGraph(actions, startupReady, onStartupNavigationRequested)
- registerProviderGraph(actions, startupReady, onStartupNavigationRequested)
- registerHomeGraph(actions, catalogDetailActions, onTopLevelDestinationRequested)
- registerLiveGraph(actions)
- registerCatalogGraph(
- actions,
- catalogDetailActions,
- payloads,
- onTopLevelDestinationRequested
- )
- registerPlayerGraph(actions, payloads)
- registerSystemGraph(actions)
- }
-}
-```
-
-No screen composable call belongs in `AppNavHost.kt`.
-
-- [ ] **Step 4: Move each destination while preserving callbacks and arguments**
-
-Move the existing `composable` blocks with this fixed ownership:
-
-- `WelcomeGraph.kt`: `WELCOME`
-- `ProviderGraph.kt`: `PROVIDER_SETUP`
-- `HomeGraph.kt`: `HOME`
-- `LiveGraph.kt`: `LIVE_TV_DESTINATION` and `EPG_DESTINATION`
-- `CatalogGraph.kt`: `MOVIES`, `SERIES`, `VOD`, `SEARCH_DESTINATION`, `MOVIE_DETAIL`, and `SERIES_DETAIL`
-- `PlayerGraph.kt`: `PLAYER` and `MULTI_VIEW`
-- `SystemGraph.kt`: `DOWNLOADS`, `SETTINGS_DESTINATION`, `PLUGINS`, and `PARENTAL_CONTROL_GROUPS`
-
-Within those blocks, replace navigation operations as follows:
-
-```kotlin
-navController.navigateToPlayer(request)
-// becomes
-actions.openPlayer(request)
-
-navController.popBackStack()
-// becomes
-actions.back()
-
-navController.navigate(route)
-// becomes
-actions.navigate(checkNotNull(AppRouteCodec.decode(route)))
-
-navController.navigateToMovieDetail(movie, returnRoute)
-// becomes
-catalogDetailActions.openMovieDetail(movie, returnRoute?.let(AppRouteCodec::decode))
-```
-
-Route arguments continue to come from each destination's `NavBackStackEntry`. Player/detail payload reads use the app-owned `payloads` interface, not a controller parameter. Domain-to-request conversion uses Task 4 adapters.
-
-Top-level shell callbacks decode their current app route once and call `onTopLevelDestinationRequested`; the coordinator applies SPLIT/UNIFIED correction, persists the last split catalog selection, and submits the resulting typed command. They do not call `actions.navigate` directly for tab changes.
-
-- [ ] **Step 5: Keep typed return behavior in player/catalog graphs**
-
-`registerPlayerGraph` passes `safePlayerRequest.returnDestination` to `PlayerScreen` and calls `actions.returnTo` on back. Movie/series detail destinations carry typed return targets and call `actions.returnTo` rather than navigating raw route strings.
-
-- [ ] **Step 6: Run graph guard, compile, and targeted tests**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests com.streamvault.app.navigation.FeatureGraphBoundaryTest verifyFeatureNavigationBoundary :app:compileDebugKotlin --console=plain
-```
-
-Expected: pass, and no file below `navigation/graph` references `NavController`.
-
-- [ ] **Step 7: Commit the graph split**
-
-```powershell
-git add app/build.gradle.kts app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/navigation/FeatureGraphBoundaryTest.kt
-git commit -m "refactor: split app navigation graph registry"
-```
-
-### Task 9: Reduce the root composable to coordinator/host wiring
-
-**Files:**
-
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigation.kt`
-- Modify: `app/src/main/java/com/streamvault/app/MainActivity.kt`
-- Modify: `app/src/main/java/com/streamvault/app/ui/components/shell/AppShellNavigation.kt`
-- Delete when empty: `app/src/main/java/com/streamvault/app/navigation/AppNavigationContracts.kt`
-- Delete when empty: `app/src/main/java/com/streamvault/app/navigation/AppNavigationAdapters.kt`
-- Create: `app/src/androidTest/java/com/streamvault/app/ui/AppNavigationContractTest.kt`
-
-**Interfaces:**
-
-- Consumes: coordinator state/commands, `NavControllerNavigator`, and `AppNavHost`.
-- Produces: root `AppNavigation` wiring with no startup/external/domain resolution and connected contract coverage.
-
-- [ ] **Step 1: Add failing connected navigation contract tests**
-
-Use `createComposeRule`, a `TestNavHostController` configured with `ComposeNavigator`, and the same internal `NavigationCommandEffect` used by production. Seed it with `MutableStateFlow<PendingNavigationCommand?>` and an acknowledgement recorder. Cover:
-
-```kotlin
-@Test
-fun externalSearchCommandNavigatesOnceAndAcknowledges() {
- // Submit Search("news"), resume the host, assert route search?query=news,
- // recompose, then assert only one search destination exists.
-}
-
-@Test
-fun playerBackReturnsToTypedGuideDestination() {
- // Navigate Guide -> Player(returnDestination = Guide), invoke back,
- // and assert the current typed destination is Guide with original arguments.
-}
-```
-
-Add these connected cases so every Phase 4 exit path crosses the production command effect:
-
-- a startup `OpenPlayer` command issued while Live TV is resumed opens Player once and Back returns to Live TV;
-- a malformed external route converted to `Navigate(Home)` lands on Home and acknowledges once;
-- legacy `movie_detail/42?returnRoute=home` parsing followed by command execution lands on Movie Detail with a typed Home return destination;
-- recomposition after each successful acknowledgement does not add a duplicate back-stack entry.
-
-- [ ] **Step 2: Run the connected class and verify failure**
-
-```powershell
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.AppNavigationContractTest' --console=plain
-```
-
-Expected: the new tests fail until root command collection is wired.
-
-- [ ] **Step 3: Rewrite `AppNavigation` as narrow wiring**
-
-The final function should have this shape:
-
-```kotlin
-@Composable
-fun AppNavigation(
- coordinator: AppNavigationCoordinator,
- navController: NavHostController = rememberNavController()
-) {
- val state by coordinator.state.collectAsStateWithLifecycle()
- val pending by coordinator.pendingCommand.collectAsStateWithLifecycle()
- val currentBackStackEntry by navController.currentBackStackEntryAsState()
- val navigator = remember(navController) {
- NavControllerNavigator(navController, AppRouteCodec)
- }
-
- NavigationCommandEffect(
- pending = pending,
- currentBackStackEntry = currentBackStackEntry,
- navigator = navigator,
- acknowledge = coordinator::acknowledge
- )
-
- DestinationResumedEffect(currentBackStackEntry) { route ->
- AppRouteCodec.decode(route)?.let(coordinator::onDestinationResumed)
- }
-
- AppNavHost(
- navController = navController,
- actions = navigator,
- catalogDetailActions = navigator,
- payloads = navigator,
- startupReady = state.startupTarget != null,
- onStartupNavigationRequested = coordinator::requestStartupNavigation,
- onTopLevelDestinationRequested = coordinator::requestTopLevelNavigation
- )
-}
-```
-
-The file must not import domain models or repositories and must not contain route branches.
-
-`NavigationCommandEffect` owns the lifecycle-resumed wait and acknowledges only when `navigator.execute(command.command)` returns `true`. `DestinationResumedEffect` waits for the current entry to reach `RESUMED` before reporting its route. Keeping both as separately testable internal composables gives the connected test the production lifecycle gates without constructing feature screens.
-
-- [ ] **Step 4: Wire MainActivity directly to the coordinator**
-
-Pass the Activity-owned Hilt ViewModel coordinator to `AppNavigation`. Remove repository exposure used only by the old root composable, remove the Activity-owned external request flow, and keep platform-only callbacks such as PiP/cast behavior unchanged.
-
-- [ ] **Step 5: Finish typed consumer migration**
-
-Confirm the Task 4/6 migration left `MainActivity`, `LauncherRecommendationsManager`, and `TvInputChannelSyncManager` on the core request type, then remove any now-empty app-owned compatibility declaration. Keep raw route strings only in `AppRoutePatterns`, `AppRouteCodec`, Android `composable` registrations, and shell selection identifiers. Confirm no feature implementation imports `NavHostController`:
-
-```powershell
-rg -n "NavHostController|NavController" app/src/main/java/com/streamvault/app/ui app/src/main/java/com/streamvault/app/navigation/graph --glob '*.kt'
-```
-
-Expected: no matches.
-
-- [ ] **Step 6: Run unit, compile, and connected contract checks**
-
-```powershell
-.\gradlew.bat verifyCoreNavigationBoundary verifyFeatureNavigationBoundary :core:navigation:test :app:testDebugUnitTest :app:compileDebugKotlin --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.AppNavigationContractTest' --console=plain
-```
-
-Expected: all pass.
-
-- [ ] **Step 7: Commit root wiring**
-
-```powershell
-git add app/src/main app/src/test app/src/androidTest core/navigation
-git commit -m "refactor: coordinate typed app navigation"
-```
-
-### Task 10: Full Phase 4 verification, graph refresh, and report
-
-**Files:**
-
-- Create: `docs/COMPOSE_REDUCTION_PHASE4_REPORT.md`
-- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md` to link the completed Phase 4 report after the Phase 4 exit criteria
-- Update: `graphify-out/` through `graphify update .`
-
-**Interfaces:**
-
-- Consumes: all Phase 4 implementation slices.
-- Produces: verification evidence and a Phase 5-ready navigation boundary report.
-
-- [ ] **Step 1: Run static boundary and full JVM/build checks**
-
-```powershell
-.\gradlew.bat verifyCoreNavigationBoundary verifyFeatureNavigationBoundary verifyCoreUiBoundary :core:navigation:test :core:ui:testDebugUnitTest :app:testDebugUnitTest :app:compileDebugKotlin :app:assembleDebug --console=plain
-```
-
-Expected: all tasks pass. Record exact test counts and any configuration-cache warning separately.
-
-- [ ] **Step 2: Run applicable connected coverage on the TV emulator**
-
-```powershell
-.\gradlew.bat :core:ui:connectedDebugAndroidTest --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.AppNavigationContractTest' --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.components.shell.ShellGoldenTest' --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.PremiumRouteGoldenTest' --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.PlayerSmokeTest' --console=plain
-```
-
-Expected: navigation contract tests, shell goldens, premium routes, and applicable player smoke tests pass. Record any known fixture failure precisely. These commands install the current checkout's debug APK over the same package on the emulator.
-
-- [ ] **Step 3: Confirm the exit-condition source shape**
-
-Run:
-
-```powershell
-rg -n "NavHostController|NavController" app/src/main/java/com/streamvault/app/ui app/src/main/java/com/streamvault/app/navigation/graph --glob '*.kt'
-rg -n "com\.streamvault\.(app|data|domain|player)|androidx\.navigation|androidx\.compose|dagger\.hilt|NavController|NavHost" core/navigation/src/main --glob '*.kt'
-```
-
-Expected: both commands return no matches. Inspect `AppNavHost.kt` and confirm it contains the `NavHost` plus registration calls, not feature screen composables.
-
-- [ ] **Step 4: Refresh the repository graph**
-
-```powershell
-graphify update .
-```
-
-Expected: graphify rebuilds successfully and the report contains `:core:navigation`, `AppNavigationCoordinator`, `AppNavHost`, and feature registration extensions. An HTML visualization may be skipped because the graph exceeds the configured node limit.
-
-- [ ] **Step 5: Write the Phase 4 report**
-
-Document:
-
-- module/package structure and dependency guards;
-- typed destination/player/external contracts;
-- route compatibility and legacy parsing;
-- coordinator and root-composable responsibilities;
-- graph registration ownership and Phase 5 move units;
-- startup, deep-link, player return, and external-navigation test evidence;
-- unit/build/golden/player smoke results;
-- warnings or unavailable gates;
-- explicit confirmation that no player lifecycle/recovery behavior changed.
-
-- [ ] **Step 6: Run final diff checks and commit the report**
-
-```powershell
-git diff --check
-git status --short
-git add docs/COMPOSE_REDUCTION_PHASE4_REPORT.md docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md graphify-out
-git commit -m "docs: report phase 4 navigation architecture"
-```
-
-If `graphify-out` is ignored or unchanged, omit it from `git add`. Expected: clean worktree after the commit.
diff --git a/docs/superpowers/plans/2026-08-23-upgrade-migration-resilience.md b/docs/superpowers/plans/2026-08-23-upgrade-migration-resilience.md
deleted file mode 100644
index 8214f802..00000000
--- a/docs/superpowers/plans/2026-08-23-upgrade-migration-resilience.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# Upgrade Migration Resilience Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Preserve every valid legacy provider during Room upgrades and keep database-open failures from crashing the application at startup.
-
-**Architecture:** Harden migration 72-to-74 with canonical type conversion, deterministic collision-safe identities, and scoped integrity validation. Add a single startup database coordinator that opens Room before admitting database consumers and exposes readiness to a TV-safe recovery UI.
-
-**Tech Stack:** Kotlin, Room, Hilt, coroutines/StateFlow, Jetpack Compose, JUnit, Robolectric, AndroidX MigrationTestHelper.
-
-**Spec:** `docs/superpowers/specs/2026-08-23-upgrade-migration-resilience-design.md`
-
-## Global Constraints
-
-- Preserve all providers and provider-owned data; never merge or delete normalized duplicates.
-- Keep `fallbackToDestructiveMigration` disabled.
-- Do not change Room schema version or entity shape.
-- Do not redesign the 37-table provider rebuild in this change.
-- Do not use the emulator until its other active worker has finished.
-
----
-
-### Task 1: Collision-safe migration identities and legacy types
-
-**Files:**
-- Modify: `data/src/main/java/com/streamvault/data/local/MigrationSupport.kt`
-- Modify: `data/src/main/java/com/streamvault/data/local/FeatureMigrationsV49To75.kt`
-- Create: `data/src/test/java/com/streamvault/data/local/MigrationSupportTest.kt`
-- Modify: `data/src/androidTest/java/com/streamvault/data/local/StreamVaultDatabaseMigrationTest.kt`
-
-**Interfaces:**
-- Produces: `canonicalLegacyProviderType(String): String`
-- Produces: `migrationIdentityKey(List<String>): String`
-- Produces: `disambiguatedMigrationIdentityKey(String, Long): String`
-
-- [ ] Write JVM tests proving all aliases canonicalize, unknown types follow the existing M3U fallback, canonical hashes are stable, and disambiguated hashes differ by provider ID.
-- [ ] Run `:data:testDebugUnitTest --tests com.streamvault.data.local.MigrationSupportTest` and verify failures because the helpers do not exist.
-- [ ] Implement the three minimal helpers in `MigrationSupport.kt`.
-- [ ] Re-run the targeted JVM test and verify it passes.
-- [ ] Add a migration test starting from schema 72 with raw-distinct but canonically equivalent providers and dependent channel rows; assert both reach the current schema with distinct identity keys and preserved rows.
-- [ ] Add migration fixtures for every supported alias and an unknown value; assert canonical stable provider/configuration types after migration.
-- [ ] Update migration 72-to-73 to canonicalize `providers.type`, compute the canonical key through the shared helper, and use the deterministic disambiguated key only when the canonical key is already present.
-
-### Task 2: Prevent runtime configuration replacement across providers
-
-**Files:**
-- Modify: `data/src/main/java/com/streamvault/data/local/dao/ProviderSnapshotDao.kt`
-- Modify: `data/src/test/java/com/streamvault/data/local/ProviderSnapshotDaoTest.kt`
-
-**Interfaces:**
-- Consumes: persisted disambiguated keys created by Task 1.
-- Produces: `commitConfiguration(ProviderConfigEntity): Boolean` that cannot replace another provider's configuration.
-
-- [ ] Add Robolectric tests with two providers proving a colliding new insert is rejected and an existing disambiguated provider retains its key during a colliding update.
-- [ ] Run the targeted DAO test and verify the current `REPLACE` implementation fails by removing or overwriting the other configuration.
-- [ ] Add DAO queries for the current config and identity owner, then make `commitConfiguration` retain the current provider's key on collision or reject a new colliding provider.
-- [ ] Re-run the targeted test and the existing DAO tests.
-
-### Task 3: Scope migration foreign-key validation
-
-**Files:**
-- Modify: `data/src/main/java/com/streamvault/data/local/FeatureMigrationsV49To75.kt`
-- Modify: `data/src/androidTest/java/com/streamvault/data/local/StreamVaultDatabaseMigrationTest.kt`
-
-**Interfaces:**
-- Consumes: `ProviderDependentBackup.table` from the existing rebuild.
-- Produces: migration 73-to-74 validation limited to restored provider-dependent tables.
-
-- [ ] Add a migration test with an unrelated pre-existing foreign-key violation and prove 73-to-74 currently rejects it.
-- [ ] Add a companion test proving a violation in a rebuilt provider-dependent table is still rejected.
-- [ ] Replace the global validation call with `validateForeignKeys` over the restored backup table names.
-- [ ] Run the migration test class when the shared emulator becomes available; otherwise leave the exact command and unverified status in the handoff.
-
-### Task 4: Gate startup on database readiness
-
-**Files:**
-- Create: `app/src/main/java/com/streamvault/app/startup/DatabaseStartupCoordinator.kt`
-- Create: `app/src/main/java/com/streamvault/app/startup/DatabaseStartupScreen.kt`
-- Create: `app/src/test/java/com/streamvault/app/startup/DatabaseStartupCoordinatorTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/StreamVaultApp.kt`
-- Modify: `app/src/main/java/com/streamvault/app/MainActivity.kt`
-- Modify: `app/src/main/res/values/strings.xml`
-
-**Interfaces:**
-- Produces: `DatabaseStartupState` with `Opening`, `Ready`, and sanitized `Failed` states.
-- Produces: `DatabaseStartupCoordinator.state: StateFlow<DatabaseStartupState>` and idempotent `start()` / `retry()`.
-- Consumes: `StreamVaultDatabase.openHelper.writableDatabase` and the existing startup actions.
-
-- [ ] Write coordinator tests for success, failure, retry, one-time admission, and isolated startup-action failures.
-- [ ] Run the targeted app JVM test and verify failure because the coordinator does not exist.
-- [ ] Implement the coordinator with one mutex-protected open attempt, sanitized failure state, and per-action exception containment.
-- [ ] Re-run coordinator tests.
-- [ ] Route all current `StreamVaultApp` database-backed startup work and `StartupWorkRegistry.register()` through the coordinator.
-- [ ] Render navigation only in `Ready`; render a focused TV-safe retry/share screen in `Opening` and `Failed` without collecting database-backed flows.
-- [ ] Run targeted app tests and compile the debug app.
-
-### Task 5: Verification and graph refresh
-
-**Files:**
-- Update generated graph under `graphify-out/` through the required command; generated output remains ignored unless already tracked.
-
-- [ ] Run targeted data and app JVM tests.
-- [ ] Run `:data:testDebugUnitTest` and `:app:testDebugUnitTest`.
-- [ ] Coordinate and run the Room migration instrumentation class when the emulator is free.
-- [ ] Run `git diff --check` and inspect `git diff` for unintended schema/entity changes.
-- [ ] Run `graphify update .` because code files changed.
-- [ ] Commit independently reviewable migration and startup changes.
diff --git a/docs/superpowers/plans/2026-08-24-playback-feature-extraction.md b/docs/superpowers/plans/2026-08-24-playback-feature-extraction.md
deleted file mode 100644
index a06ceb93..00000000
--- a/docs/superpowers/plans/2026-08-24-playback-feature-extraction.md
+++ /dev/null
@@ -1,801 +0,0 @@
-# Playback Feature Module Extraction Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.
-
-**Goal:** Extract Player and MultiView presentation, state, navigation registration, resources, and tests into :feature:playback while preserving every playback, focus, lifecycle, recovery, and navigation behavior.
-
-**Architecture:** :app remains the navigation/platform composition root and supplies saved-state payload plus Android service adapters. :feature:playback owns its graph, Player/MultiView presentation, ViewModels, coordinators, Cast implementation, resources, and tests; :player owns engine capabilities and render binding; shared generic UI and pure policies move to :core:ui and :domain only where ownership is already cross-feature.
-
-**Tech Stack:** Kotlin 2.2/JVM 17, Android compile SDK 36/min SDK 25, Compose/TV Compose, AndroidX Navigation Compose 2.9.7, Hilt 2.56.2/KSP, Media3 through :player, coroutines/StateFlow, Coil 3, JUnit 4, Truth, Mockito Kotlin, Robolectric, Compose instrumentation, Gradle boundary tasks, Macrobenchmark/Baseline Profile tooling, ADB, and graphify.
-
-**Spec:** docs/superpowers/specs/2026-08-24-phase-5-feature-module-extraction-design.md
-
-## Global Constraints
-
-- Preserve Player and MultiView visuals, routes, arguments, payload behavior,
- callback order, focus order, semantics/test tags, Back/input policy, effect
- keys, ViewModel scopes, PiP, Cast, permission, recovery, timeshift, and stream
- preparation behavior.
-- :feature:playback must not depend on or import :app, MainActivity,
- NavController, or NavHostController.
-- Allowed project dependencies are :core:navigation, :core:ui, :domain,
- :player, and temporary :data imports listed in the Phase 5 ledger.
-- Do not introduce dependencies between feature implementation modules.
-- Keep PlayerTransparentGuideOverlay.kt with app EPG code; it is unreferenced
- and is not part of playback.
-- Presentation code must not cast PlayerEngine to Media3PlayerEngine.
-- Mechanical moves, package/import changes, contract changes, and separately
- authorized behavior fixes use separate commits.
-- Use history-preserving moves. Do not remove the app destination until the
- feature destination passes scoped checks.
-- Run two-channel live validation after final integration: 61 screenshots per
- channel, two-second cadence, changing hashes, media session PLAYING with
- error=null, healthy HLS evidence, and no fatal/stuck/MPEG-TS fallback.
-- Run graphify update . after code changes.
-
-## Execution-order correction
-
-The numbered tasks describe ownership, but the playback graph cannot be moved
-before its host contract and feature-owned destinations exist. Execute the
-implementation in this order: Tasks 1, 2, 3, 5, 6, 7, 8, 4, 9, and 10. Task 4
-still owns the complete controller-free graph extraction and final AppNavHost
-wiring; it is intentionally deferred until the Player and MultiView destinations
-compile inside :feature:playback. No temporary app-to-feature rendering seam is
-allowed.
-
-## Planned file structure
-
-~~~text
-feature/playback/
- build.gradle.kts
- src/main/AndroidManifest.xml
- src/main/java/com/streamvault/feature/playback/
- api/PlaybackPlatformHost.kt
- api/PlaybackServicePorts.kt
- navigation/PlaybackGraph.kt
- navigation/PlaybackNavigationPolicy.kt
- navigation/PlaybackRoutePatterns.kt
- cast/
- player/
- player/overlay/
- multiview/
- preview/
- translation/
- src/main/res/values*/strings.xml
- src/test/java/com/streamvault/feature/playback/
- src/androidTest/java/com/streamvault/feature/playback/
-
-app/src/main/java/com/streamvault/app/playback/
- MainActivityPlaybackPlatformHost.kt
- AppPlaybackServiceAdapters.kt
- PlaybackIntegrationModule.kt
-
-player/src/main/java/com/streamvault/player/
- di/PlayerEngineQualifiers.kt
- ui/PlayerRenderView.kt
-~~~
-
----
-
-### Task 1: Record baseline and transitional dependencies
-
-**Files:**
-
-- Create: docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
-- Create: validation/phase5_playback/build-baseline/README.md
-- Inspect: app/src/main/java/com/streamvault/app/ui/screens/player/
-- Inspect: app/src/main/java/com/streamvault/app/ui/screens/multiview/
-- Inspect: app/src/main/java/com/streamvault/app/navigation/graph/PlayerGraph.kt
-
-**Interfaces:**
-
-- Consumes: Phase 0 build procedure and accepted Phase 5 design.
-- Produces: source/import/resource/test inventory, temporary dependency list,
- and before-extraction build samples.
-
-- [ ] **Step 1: Capture source/import/resource ownership**
-
-Run:
-
-~~~powershell
-$playbackFiles = rg --files app/src/main/java/com/streamvault/app/ui/screens/player app/src/main/java/com/streamvault/app/ui/screens/multiview
-$playbackFiles | Set-Content validation/phase5_playback/build-baseline/source-files.txt
-rg -n "^import com\.streamvault\.(app|data|domain|player|core)" $playbackFiles | Set-Content validation/phase5_playback/build-baseline/project-imports.txt
-rg -n "R\.(string|drawable|plurals|array)\." $playbackFiles | Set-Content validation/phase5_playback/build-baseline/resources.txt
-~~~
-
-Expected: both source roots are inventoried and every direct app/data import is
-visible before any move.
-
-- [ ] **Step 2: Create the dependency ledger**
-
-Create these initial entries with owner Phase 7:
-
-~~~markdown
-# Phase 5 Transitional Dependency Ledger
-
-| Feature | Imported implementation | Current consumer | Removal direction | Owner |
-|---|---|---|---|---|
-| playback | data.preferences.PreferencesRepository | PlayerPreferencesCoordinator | domain preference contract | Phase 7 |
-| playback | data.remote.stalker.StalkerPlaybackResolutionException | PlayerContentResolver | player/domain resolution error | Phase 7 |
-| playback | data.remote.xtream.ProviderPlaybackResolver | PlayerContentResolver | domain playback resolver | Phase 7 |
-| playback | data.remote.xtream.XtreamStreamKind | alternate stream support | domain/player stream kind | Phase 7 |
-| playback | data.remote.xtream.XtreamUrlFactory | alternate stream support | domain/player URL factory | Phase 7 |
-| playback | data.security.CredentialDecryptionException | content/provider resolution | domain provider-access error | Phase 7 |
-~~~
-
-- [ ] **Step 3: Capture five incremental Player UI runs**
-
-Make and restore a comment-only edit in PlayerOverlayItemKeys.kt. For each
-sample run:
-
-~~~powershell
-.\gradlew.bat :app:compileDebugKotlin --profile --console=plain
-~~~
-
-Record elapsed time and executed tasks in the baseline README.
-
-- [ ] **Step 4: Capture five Player unit-test compile runs**
-
-Make and restore a comment-only edit in PlayerInputPolicyTest.kt. Run:
-
-~~~powershell
-.\gradlew.bat :app:compileDebugUnitTestKotlin --profile --console=plain
-~~~
-
-- [ ] **Step 5: Commit baseline evidence**
-
-~~~powershell
-git add docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_playback/build-baseline
-git commit -m "docs: record playback extraction baseline"
-~~~
-
-### Task 2: Move shared playback foundations to stable owners
-
-**Files:**
-
-- Modify: player/build.gradle.kts
-- Modify: player/src/main/java/com/streamvault/player/PlayerEngine.kt
-- Modify: player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt
-- Modify: core/ui/build.gradle.kts
-- Move: app/src/main/java/com/streamvault/app/ui/components/PlayerRenderView.kt to player/src/main/java/com/streamvault/player/ui/PlayerRenderView.kt
-- Move: app/src/main/java/com/streamvault/app/di/PlayerEngineQualifiers.kt to player/src/main/java/com/streamvault/player/di/PlayerEngineQualifiers.kt
-- Move: app/src/main/java/com/streamvault/app/ui/model/ArchivePlayback.kt to domain/src/main/java/com/streamvault/domain/playback/ArchivePlayback.kt
-- Move: app/src/main/java/com/streamvault/app/ui/model/ChannelVariantUiHelpers.kt to domain/src/main/java/com/streamvault/domain/playback/ChannelIdentity.kt
-- Move: app/src/main/java/com/streamvault/app/util/PlaybackCompletion.kt to domain/src/main/java/com/streamvault/domain/playback/PlaybackCompletion.kt
-- Move: app/src/main/java/com/streamvault/app/ui/accessibility/MotionPreferences.kt to core/ui/src/main/java/com/streamvault/core/ui/accessibility/MotionPreferences.kt
-- Move: app/src/main/java/com/streamvault/app/ui/components/AsyncImageModels.kt to core/ui/src/main/java/com/streamvault/core/ui/image/AsyncImageModels.kt
-- Move: app/src/main/java/com/streamvault/app/ui/components/ChannelLogo.kt to core/ui/src/main/java/com/streamvault/core/ui/image/ChannelLogoBadge.kt
-- Move: app/src/main/java/com/streamvault/app/ui/components/dialogs/PremiumDialog.kt to core/ui/src/main/java/com/streamvault/core/ui/components/dialogs/PremiumDialog.kt
-- Move: app/src/main/java/com/streamvault/app/ui/notifications/NotificationPermissionGate.kt to core/ui/src/main/java/com/streamvault/core/ui/platform/NotificationPermissionGate.kt
-- Create: core/ui/src/main/java/com/streamvault/core/ui/components/dialogs/PinEntryDialog.kt
-- Create: core/ui/src/main/java/com/streamvault/core/ui/time/UiTimeFormat.kt
-- Create: app/src/main/java/com/streamvault/app/ui/time/UiTimeFormatAdapter.kt
-- Modify: app/src/main/java/com/streamvault/app/MainActivity.kt
-- Test: player/src/test/java/com/streamvault/player/PlayerEngineFeatureConfigurationTest.kt
-- Test: core/ui/src/test/java/com/streamvault/core/ui/time/UiTimeFormatTest.kt
-- Move: app/src/test/java/com/streamvault/app/ui/model/ArchivePlaybackTest.kt to domain/src/test/java/com/streamvault/domain/playback/ArchivePlaybackTest.kt
-- Move: app/src/test/java/com/streamvault/app/ui/model/ChannelVariantUiHelpersTest.kt to domain/src/test/java/com/streamvault/domain/playback/ChannelIdentityTest.kt
-
-**Interfaces:**
-
-- Produces: app-independent render binding, engine qualifiers, pure
- archive/identity policies, and explicit engine configuration APIs.
-
-- [ ] **Step 1: Add failing engine capability tests**
-
-Tests compile against these new PlayerEngine methods:
-
-~~~kotlin
-fun setAudioFocusBypassed(bypassed: Boolean)
-fun setResolutionConstrainedForMultiView(constrained: Boolean)
-~~~
-
-Run:
-
-~~~powershell
-.\gradlew.bat :player:testDebugUnitTest --tests "com.streamvault.player.PlayerEngineFeatureConfigurationTest" --console=plain
-~~~
-
-Expected: compilation fails because the methods do not exist.
-
-- [ ] **Step 2: Add API and Media3 implementation**
-
-Add default no-op interface methods for test/fallback engines. Map them in
-Media3PlayerEngine:
-
-~~~kotlin
-override fun setAudioFocusBypassed(bypassed: Boolean) {
- bypassAudioFocus = bypassed
-}
-
-override fun setResolutionConstrainedForMultiView(constrained: Boolean) {
- constrainResolutionForMultiView = constrained
-}
-~~~
-
-Existing setMediaSessionEnabled remains the media-session contract.
-
-- [ ] **Step 3: Move PlayerRenderView into :player**
-
-Apply the Kotlin Compose plugin, enable Compose, and add Compose BOM/UI
-dependencies to :player. Move PlayerRenderView to com.streamvault.player.ui
-without changing key, AndroidView, bind, release, or modifier behavior. Update
-Home, EPG, Player, and MultiView imports.
-
-- [ ] **Step 4: Move qualifiers and pure policies**
-
-Move MainPlayerEngine and AuxiliaryPlayerEngine to com.streamvault.player.di.
-Move archive and channel identity helpers to com.streamvault.domain.playback.
-Update imports mechanically without changing branches, constants, defaults, or
-ordering.
-
-- [ ] **Step 5: Move generic image/dialog primitives into :core:ui**
-
-Move reduced-motion detection, crossfade image model, ChannelLogoBadge,
-PremiumDialog, and NotificationPermissionGate to core packages. Add Coil
-Compose and Coil network dependencies to :core:ui. Replace app device imports with
-com.streamvault.core.ui.device.rememberIsTelevisionDevice.
-
-Create PinEntryDialog as the current PinDialog implementation with localized
-text supplied by callers:
-
-~~~kotlin
-@Composable
-fun PinEntryDialog(
- title: String,
- cancelLabel: String,
- onDismissRequest: () -> Unit,
- onPinEntered: (String) -> Unit,
- error: String? = null
-)
-~~~
-
-Keep the app PinDialog as a compatibility wrapper that passes
-R.string.pin_dialog_title and R.string.pin_dialog_cancel. MultiView calls
-PinEntryDialog with playback-module localized strings.
-
-- [ ] **Step 6: Add the app-independent time rendering contract**
-
-Create:
-
-~~~kotlin
-enum class UiTimeFormat {
- SYSTEM,
- TWELVE_HOUR,
- TWENTY_FOUR_HOUR
-}
-
-val LocalUiTimeFormat = compositionLocalOf { UiTimeFormat.SYSTEM }
-
-fun UiTimeFormat.createTimeFormat(locale: Locale = Locale.getDefault()): DateFormat
-fun UiTimeFormat.createDateTimeFormat(locale: Locale = Locale.getDefault()): DateFormat
-fun UiTimeFormat.createTimeFormatter(locale: Locale = Locale.getDefault()): DateTimeFormatter
-~~~
-
-The app adapter maps each domain AppTimeFormat value one-to-one. MainActivity
-provides LocalUiTimeFormat beside the existing LocalAppTimeFormat so unmoved app
-consumers remain unchanged. Moved playback code uses only the core local.
-
-- [ ] **Step 7: Run focused/integration checks**
-
-~~~powershell
-.\gradlew.bat :domain:test :core:ui:testDebugUnitTest :player:testDebugUnitTest :player:compileDebugKotlin :app:testDebugUnitTest :app:compileDebugKotlin --console=plain
-~~~
-
-- [ ] **Step 8: Commit stable-owner moves**
-
-~~~powershell
-git add domain core/ui player app/src/main app/src/test
-git commit -m "refactor: move playback foundations to stable modules"
-~~~
-
-### Task 3: Create :feature:playback and enforce its boundary
-
-**Files:**
-
-- Modify: settings.gradle.kts
-- Modify: build.gradle.kts
-- Modify: app/build.gradle.kts
-- Create: feature/playback/build.gradle.kts
-- Create: feature/playback/src/main/AndroidManifest.xml
-- Create: feature/playback/src/test/java/com/streamvault/feature/playback/PlaybackModuleBoundaryTest.kt
-
-**Interfaces:**
-
-- Produces: Android library :feature:playback, root/module boundary tasks, app
- dependency, and independent test source sets.
-
-- [ ] **Step 1: Register module and app dependency**
-
-Add:
-
-~~~kotlin
-include(":feature:playback")
-~~~
-
-Add to :app:
-
-~~~kotlin
-implementation(project(":feature:playback"))
-~~~
-
-- [ ] **Step 2: Create Android library configuration**
-
-Use namespace com.streamvault.feature.playback, compile SDK 36, min SDK 25,
-JVM 17, Compose enabled, Hilt/KSP, and dependencies on the five approved
-project modules. Add existing aliases used by moved source: Compose
-BOM/UI/Material3/icons/TV, activity-compose, lifecycle runtime/ViewModel
-Compose, navigation-compose, Hilt navigation, coroutines, Coil, core-ktx,
-MediaRouter/Cast, OkHttp, and current test aliases.
-
-- [ ] **Step 3: Add the boundary task**
-
-Permit only:
-
-~~~kotlin
-val allowedProjectDependencies = setOf(
- ":core:navigation",
- ":core:ui",
- ":domain",
- ":player",
- ":data"
-)
-~~~
-
-Scan src/main and reject import com.streamvault.app, NavHostController, and
-NavController. Register root verifyFeaturePlaybackBoundary and attach the
-module guard to check.
-
-- [ ] **Step 4: Verify empty module**
-
-~~~powershell
-.\gradlew.bat verifyFeaturePlaybackBoundary :feature:playback:compileDebugKotlin :app:compileDebugKotlin --console=plain
-~~~
-
-- [ ] **Step 5: Commit module boundary**
-
-~~~powershell
-git add settings.gradle.kts build.gradle.kts app/build.gradle.kts feature/playback
-git commit -m "build: add playback feature module"
-~~~
-
-### Task 4: Extract playback navigation registration
-
-Execute this task after Tasks 5–8. The graph move depends on the playback host
-contract and feature-owned Player/MultiView destinations; importing their old
-app implementations would violate the boundary guard.
-
-**Files:**
-
-- Create: feature/playback/src/main/java/com/streamvault/feature/playback/navigation/PlaybackRoutePatterns.kt
-- Move: app/src/main/java/com/streamvault/app/navigation/graph/PlayerGraph.kt to feature/playback/src/main/java/com/streamvault/feature/playback/navigation/PlaybackGraph.kt
-- Move: app/src/main/java/com/streamvault/app/navigation/PlayerNavigationPolicy.kt to feature/playback/src/main/java/com/streamvault/feature/playback/navigation/PlaybackNavigationPolicy.kt
-- Modify: app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt
-- Modify: app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt
-- Test: feature/playback/src/test/java/com/streamvault/feature/playback/navigation/PlaybackNavigationPolicyTest.kt
-- Test: app/src/test/java/com/streamvault/app/navigation/FeatureGraphBoundaryTest.kt
-
-**Interfaces:**
-
-- Produces: PlaybackRoutePatterns and controller-free registerPlaybackGraph.
-
-- [ ] **Step 1: Move request safety tests**
-
-Verify blank/unsupported requests return null while HTTP, HTTPS, RTSP, RTMP,
-RTSPS, MMS, Xtream, Stalker, content, and file requests retain every field.
-
-- [ ] **Step 2: Add route/registration API**
-
-~~~kotlin
-object PlaybackRoutePatterns {
- const val PLAYER = "player"
- const val MULTI_VIEW = "multi_view"
-}
-
-fun NavGraphBuilder.registerPlaybackGraph(
- actions: NavigationActions,
- platformHost: PlaybackPlatformHost?,
- consumePlayerRequest: (NavBackStackEntry) -> PlayerNavigationRequest?
-)
-~~~
-
-Keep missing-request LaunchedEffect, Back-first fallback, Home options, Player
-argument mapping, return callback, and MultiView replacement options unchanged.
-
-- [ ] **Step 3: Wire app adapter**
-
-Alias AppRoutePatterns.PLAYER and MULTI_VIEW to feature constants. Change
-AppNavHost to pass actions, playbackPlatformHost, and
-payloads::consumePlayerRequest. The feature does not receive
-AppNavigationPayloads.
-
-- [ ] **Step 4: Run navigation checks**
-
-~~~powershell
-.\gradlew.bat :feature:playback:testDebugUnitTest :app:testDebugUnitTest --tests "com.streamvault.app.navigation.*" verifyFeaturePlaybackBoundary :app:compileDebugKotlin --console=plain
-~~~
-
-- [ ] **Step 5: Commit navigation seam**
-
-~~~powershell
-git add feature/playback app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/navigation
-git commit -m "refactor: move playback graph registration to feature"
-~~~
-
-### Task 5: Introduce platform and service ports
-
-**Files:**
-
-- Create: feature/playback/src/main/java/com/streamvault/feature/playback/api/PlaybackPlatformHost.kt
-- Create: feature/playback/src/main/java/com/streamvault/feature/playback/api/PlaybackServicePorts.kt
-- Create: app/src/main/java/com/streamvault/app/playback/MainActivityPlaybackPlatformHost.kt
-- Create: app/src/main/java/com/streamvault/app/playback/AppPlaybackServiceAdapters.kt
-- Create: app/src/main/java/com/streamvault/app/playback/PlaybackIntegrationModule.kt
-- Modify: app/src/main/java/com/streamvault/app/navigation/AppNavigation.kt
-- Modify: app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt
-- Test: app/src/test/java/com/streamvault/app/playback/MainActivityPlaybackPlatformHostTest.kt
-- Test: app/src/test/java/com/streamvault/app/playback/AppPlaybackServiceAdaptersTest.kt
-
-**Interfaces:**
-
-- Produces: PlaybackPlatformHost, PlaybackStreamPreparer, CastUrlRewriter, and
- PlaybackSurfaceRefreshPort with app implementations.
-
-- [ ] **Step 1: Add exact contracts**
-
-Use the signatures in the design spec. PlaybackPlatformHost exposes PiP state
-and operations plus setKeepScreenOn. Service ports expose plugin preparation,
-Cast URL rewrite, Watch Next progress/refresh, and launcher refresh.
-
-- [ ] **Step 2: Write delegation tests**
-
-Use fakes to verify each call delegates once with unchanged arguments and
-returns the underlying result. Include keep-screen-on true/false, PiP state,
-plugin error/success, Watch Next progress, and both refresh calls.
-
-- [ ] **Step 3: Implement MainActivity adapter**
-
-Delegate PiP operations to existing Activity methods, Cast route chooser to
-openCastRouteChooser, and keep-screen-on to existing window flags. This adapter
-is the only playback path that knows MainActivity.
-
-- [ ] **Step 4: Implement service adapters and Hilt bindings**
-
-Adapt StreamVaultPluginManager to PlaybackStreamPreparer and CastUrlRewriter.
-Bind PlaybackSurfaceRefreshPort to WatchNextManager and
-LauncherRecommendationsManager. Add no policy.
-
-- [ ] **Step 5: Supply host from app composition**
-
-Create/remember the host at AppNavigation's Activity boundary and pass it
-through AppNavHost. Preserve null/no-op behavior when context is not
-MainActivity.
-
-- [ ] **Step 6: Run adapter checks**
-
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.playback.*" :feature:playback:compileDebugKotlin :app:compileDebugKotlin --console=plain
-~~~
-
-- [ ] **Step 7: Commit adapter boundary**
-
-~~~powershell
-git add feature/playback/src/main/java/com/streamvault/feature/playback/api app/src/main/java/com/streamvault/app/playback app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/playback
-git commit -m "refactor: add playback platform and service ports"
-~~~
-
-### Task 6: Move feature-owned Cast, preview, translation, and UI support
-
-**Files:**
-
-- Move: app/src/main/java/com/streamvault/app/cast/CastModels.kt
-- Move: app/src/main/java/com/streamvault/app/cast/CastMediaRequestFactory.kt
-- Move: app/src/main/java/com/streamvault/app/cast/CastManager.kt
-- Move: app/src/main/java/com/streamvault/app/cast/CastPlaybackCoordinator.kt
-- Move: app/src/main/java/com/streamvault/app/di/CastModule.kt
-- Move: app/src/main/java/com/streamvault/app/player/LivePreviewHandoffManager.kt
-- Move: app/src/main/java/com/streamvault/app/player/LiveTranslationClient.kt
-- Move: app/src/main/java/com/streamvault/app/player/LiveTranslationSession.kt
-- Move: app/src/main/java/com/streamvault/app/ui/components/dialogs/ProgramHistoryDialog.kt
-- Move: app/src/main/java/com/streamvault/app/cast/CastUiMessages.kt
-- Move: app/src/test/java/com/streamvault/app/cast/CastMediaRequestFactoryTest.kt to feature/playback/src/test/java/com/streamvault/feature/playback/cast/CastMediaRequestFactoryTest.kt
-- Move: app/src/test/java/com/streamvault/app/player/LivePreviewHandoffManagerTest.kt to feature/playback/src/test/java/com/streamvault/feature/playback/preview/LivePreviewHandoffManagerTest.kt
-- Move: app/src/test/java/com/streamvault/app/player/LiveTranslationClientTest.kt to feature/playback/src/test/java/com/streamvault/feature/playback/translation/LiveTranslationClientTest.kt
-- Move: app/src/test/java/com/streamvault/app/player/LiveTranslationCaptionPacingTest.kt to feature/playback/src/test/java/com/streamvault/feature/playback/translation/LiveTranslationCaptionPacingTest.kt
-- Create: feature/playback/src/test/java/com/streamvault/feature/playback/cast/CastUiMessagesTest.kt
-- Modify: app/src/main/java/com/streamvault/app/plugins/StreamVaultPluginManager.kt
-- Modify: app/src/main/java/com/streamvault/app/MainActivity.kt
-
-**Interfaces:**
-
-- Consumes: Task 5 ports and player/domain/core contracts.
-- Produces: feature-owned support implementations with no app imports.
-
-- [ ] **Step 1: Move Cast values and request tests**
-
-Change packages to com.streamvault.feature.playback.cast, update app plugin and
-Activity imports, and run Cast request/factory tests before moving the manager.
-
-- [ ] **Step 2: Move Cast manager/coordinator**
-
-Replace CastManager's direct StreamVaultPluginManager dependency with
-CastUrlRewriter. Keep initialization, session listener, route selection,
-pending request, load, and delayed cancellation behavior unchanged.
-
-- [ ] **Step 3: Move preview and translation services**
-
-Use com.streamvault.feature.playback.preview and
-com.streamvault.feature.playback.translation. Update Home/app callers to import
-feature services. Preserve scopes, timing constants, and callback order.
-
-- [ ] **Step 4: Move player-specific dialog and Cast message mapping**
-
-Move ProgramHistoryDialog and CastUiMessages. Replace app device/time imports
-with stable core equivalents and move referenced Cast message strings into the
-feature resources without changing the enum-to-message mapping.
-
-- [ ] **Step 5: Run focused tests and boundary scan**
-
-~~~powershell
-.\gradlew.bat :feature:playback:testDebugUnitTest :app:testDebugUnitTest verifyFeaturePlaybackBoundary :app:compileDebugKotlin --console=plain
-~~~
-
-- [ ] **Step 6: Commit feature-owned support**
-
-~~~powershell
-git add feature/playback app/src/main app/src/test
-git commit -m "refactor: move playback support services to feature"
-~~~
-
-### Task 7: Move Player presentation, coordinators, resources, and tests
-
-**Files:**
-
-- Move: app/src/main/java/com/streamvault/app/ui/screens/player/*.kt to feature/playback/src/main/java/com/streamvault/feature/playback/player/
-- Move: app/src/main/java/com/streamvault/app/ui/screens/player/overlay/*.kt except PlayerTransparentGuideOverlay.kt to feature/playback/src/main/java/com/streamvault/feature/playback/player/overlay/
-- Move: app/src/main/java/com/streamvault/app/ui/screens/player/overlay/PlayerTransparentGuideOverlay.kt to app/src/main/java/com/streamvault/app/ui/screens/epg/PlayerTransparentGuideOverlay.kt
-- Move: app/src/test/java/com/streamvault/app/ui/screens/player/*.kt to feature/playback/src/test/java/com/streamvault/feature/playback/player/
-- Move: app/src/androidTest/java/com/streamvault/app/ui/screens/player/overlay/PlayerOverlayGoldenTest.kt to feature/playback/src/androidTest/java/com/streamvault/feature/playback/player/overlay/PlayerOverlayGoldenTest.kt
-- Create/modify: feature/playback/src/main/res/values*/strings.xml
-- Modify: app/src/main/res/values*/strings.xml only for playback-exclusive keys with no app consumer
-
-**Interfaces:**
-
-- Consumes: navigation/platform/service ports and stable player/domain/core APIs.
-- Produces: independently compiling/testing Player feature with no app imports.
-
-- [ ] **Step 1: Move tests and update packages**
-
-Move Player policy/coordinator tests first, use
-com.streamvault.feature.playback.player, and run them to expose remaining
-production ownership dependencies.
-
-- [ ] **Step 2: Move production mechanically**
-
-Use history-preserving moves and update package/import names only. Exclude the
-transparent EPG guide. Keep branches, constants, coroutine scopes, effect keys,
-callback order, state collection, and modifier order unchanged.
-
-- [ ] **Step 3: Replace app dependencies with approved owners/ports**
-
-- PlaybackPlatformHost replaces MainActivity discovery/casts.
-- PlaybackStreamPreparer replaces StreamVaultPluginManager.
-- PlaybackSurfaceRefreshPort replaces Watch Next/launcher managers.
-- com.streamvault.player.di.MainPlayerEngine replaces the app qualifier.
-- PlayerEngine capability methods replace Media3PlayerEngine casts.
-- Six ledgered data imports remain; no new unrecorded data import is allowed.
-
-- [ ] **Step 4: Copy required resources**
-
-Generate referenced keys:
-
-~~~powershell
-rg -o "R\.(string|drawable|plurals|array)\.[A-Za-z0-9_]+" feature/playback/src/main/java | Sort-Object -Unique | Set-Content validation/phase5_playback/playback-resource-keys.txt
-~~~
-
-Copy matching values for every existing values-* locale. Remove an app key only
-after an rg scan finds no remaining app source/test reference.
-
-- [ ] **Step 5: Run Player feature checks**
-
-~~~powershell
-.\gradlew.bat verifyFeaturePlaybackBoundary :feature:playback:compileDebugKotlin :feature:playback:testDebugUnitTest :feature:playback:compileDebugAndroidTestKotlin :app:compileDebugKotlin --console=plain
-~~~
-
-- [ ] **Step 6: Confirm forbidden imports are absent**
-
-~~~powershell
-rg -n "com\.streamvault\.app|MainActivity|NavController|NavHostController|Media3PlayerEngine" feature/playback/src/main --glob '*.kt'
-~~~
-
-Expected: no matches.
-
-- [ ] **Step 7: Commit Player move**
-
-~~~powershell
-git add feature/playback app/src/main app/src/test app/src/androidTest validation/phase5_playback/playback-resource-keys.txt
-git commit -m "refactor: move player presentation to playback feature"
-~~~
-
-### Task 8: Move MultiView and finish graph integration
-
-**Files:**
-
-- Move: app/src/main/java/com/streamvault/app/ui/screens/multiview/*.kt to feature/playback/src/main/java/com/streamvault/feature/playback/multiview/
-- Create: feature/playback/src/test/java/com/streamvault/feature/playback/multiview/MultiViewManagerTest.kt
-- Create: feature/playback/src/test/java/com/streamvault/feature/playback/multiview/MultiViewViewModelTest.kt
-- Modify: app/src/androidTest/java/com/streamvault/app/ui/PlayerSmokeTest.kt
-
-**Interfaces:**
-
-- Produces: feature-owned MultiView destination ready for the playback graph
- extracted in Task 4.
-
-- [ ] **Step 1: Add MultiView tests before production move**
-
-Cover slot replacement, maximum slots, generation cancellation, blocked
-performance policy, audio selection, channel identity lookup, and empty slots.
-
-- [ ] **Step 2: Move MultiView production**
-
-Use feature Cast/dialog/player imports. Inject
-@AuxiliaryPlayerEngine Provider<PlayerEngine> from :player. Replace the
-concrete Media3 cast with PlayerEngine configuration methods while preserving
-stagger delay, generation checks, cleanup, and focus.
-
-- [ ] **Step 3: Preserve graph wiring for Task 4**
-
-Do not modify the graph in this task; Task 4 performs the final graph move and
-wiring after the feature-owned Player and MultiView destinations exist. Keep
-the destination behavior requirements visible in the tests and report.
-
-- [ ] **Step 4: Run independent and app compilation**
-
-~~~powershell
-.\gradlew.bat :feature:playback:testDebugUnitTest :feature:playback:compileDebugAndroidTestKotlin :app:compileDebugAndroidTestKotlin :app:assembleDebug --console=plain
-~~~
-
-- [ ] **Step 5: Commit MultiView**
-
-~~~powershell
-git add feature/playback app/src/main app/src/test app/src/androidTest
-git commit -m "refactor: move multiview to playback feature"
-~~~
-
-### Task 9: Remove old app presentation and measure build isolation
-
-**Files:**
-
-- Modify: app/build.gradle.kts
-- Modify: build.gradle.kts
-- Modify: app/src/test/java/com/streamvault/app/player/PlaybackProgressGuardrailTest.kt
-- Modify: docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
-- Create: validation/phase5_playback/build-after/README.md
-- Delete: empty old Player/MultiView source/test directories after verification
-
-**Interfaces:**
-
-- Produces: app composition root without Player/MultiView implementation and
- measured independent feature compilation.
-
-- [ ] **Step 1: Run source-shape scans**
-
-~~~powershell
-rg -n "ui\.screens\.(player|multiview)" app/src/main/java --glob '*.kt'
-rg -n "com\.streamvault\.app|NavHostController|NavController" feature/playback/src/main --glob '*.kt'
-~~~
-
-Expected: app matches only documented compatibility adapters; feature has no
-matches.
-
-Update PlaybackProgressGuardrailTest so its direct progress-API scan covers
-feature/playback/src/main in addition to app/src/main and player/src/main.
-
-- [ ] **Step 2: Run feature-only gate**
-
-~~~powershell
-.\gradlew.bat verifyFeaturePlaybackBoundary :feature:playback:testDebugUnitTest :feature:playback:compileDebugAndroidTestKotlin --console=plain
-~~~
-
-- [ ] **Step 3: Run app integration gates**
-
-~~~powershell
-.\gradlew.bat verifyCoreNavigationBoundary verifyCoreUiBoundary :core:navigation:test :core:ui:testDebugUnitTest :app:testDebugUnitTest :app:compileDebugKotlin :app:assembleDebug --console=plain
-~~~
-
-- [ ] **Step 4: Capture five after-extraction feature edit runs**
-
-Repeat Task 1's reversible edits against the moved PlayerOverlayItemKeys.kt.
-Run five feature-edit and five feature-test samples:
-
-~~~powershell
-.\gradlew.bat :feature:playback:compileDebugKotlin :app:compileDebugKotlin --profile --console=plain
-.\gradlew.bat :feature:playback:compileDebugUnitTestKotlin --profile --console=plain
-~~~
-
-- [ ] **Step 5: Compare guardrails**
-
-Record median/min/max against Task 1 plus clean debug and warm no-change builds.
-Do not claim improvement when measurement noise exceeds the difference.
-
-- [ ] **Step 6: Commit cleanup/evidence**
-
-~~~powershell
-git add app build.gradle.kts feature/playback docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_playback/build-after
-git commit -m "refactor: complete playback module integration"
-~~~
-
-### Task 10: Connected behavior, live playback, profiles, graph, and report
-
-**Files:**
-
-- Create: docs/COMPOSE_REDUCTION_PHASE5_PLAYBACK_REPORT.md
-- Modify: docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md
-- Update: validation/phase5_playback/
-- Update: graphify-out/ through graphify update .
-- Regenerate: app/src/main/generated/baselineProfiles/ only through :benchmark
-
-**Interfaces:**
-
-- Produces: final behavior, stability, build-isolation, profile, and graph
- evidence for playback extraction.
-
-- [ ] **Step 1: Run connected feature/app coverage**
-
-Run playback overlay goldens from :feature:playback, app navigation contracts,
-and Player smoke coverage on Television_1080p(AVD) - 16. Record every case,
-including existing fixture failures, without counting failures as passes.
-
-- [ ] **Step 2: Run manual TV behavior coverage**
-
-Cover player launch/return, remote/Back priority, controls auto-hide, seeking,
-modal actions, channel/category/EPG overlays, numeric entry, repeated zapping,
-PiP, Cast chooser, MultiView open/focus/slot replacement, mouse/touch, RTL, and
-reduced motion where available.
-
-- [ ] **Step 3: Run two-channel long-duration validation**
-
-For each channel capture 61 screenshots at two-second cadence. Record channel
-name, screenshot count, unique hashes, final media session, HLS
-prepare/read/first-frame or recovery evidence, and prohibited log matches using
-AGENTS.md commands.
-
-- [ ] **Step 4: Regenerate and verify profiles**
-
-Use existing :benchmark startup and critical-journey producers. Verify source
-separation/subset and beta/release packaging. Keep generated output uncommitted
-when the physical-device gate remains open.
-
-- [ ] **Step 5: Refresh graph output**
-
-~~~powershell
-graphify update .
-~~~
-
-Confirm graph output contains :feature:playback and Player/MultiView source no
-longer resides in :app.
-
-- [ ] **Step 6: Write playback report**
-
-Record module ownership, public API, app adapters, moved
-files/resources/tests, data ledger, exact checks/results, build measurements,
-connected/manual/live evidence, profile status, existing failures, unavailable
-gates, and rollback notes. Update the main plan only with evidence.
-
-- [ ] **Step 7: Run final repository checks**
-
-~~~powershell
-git diff --check
-.\gradlew.bat verifyFeaturePlaybackBoundary verifyCoreNavigationBoundary verifyCoreUiBoundary :feature:playback:testDebugUnitTest :app:testDebugUnitTest :app:assembleDebug --console=plain
-~~~
-
-- [ ] **Step 8: Commit verified report/evidence**
-
-Stage only approved report, plan status, validation metadata, and graph outputs.
-Do not stage secrets, provider credentials, or unapproved generated profiles.
-
-~~~powershell
-git add docs/COMPOSE_REDUCTION_PHASE5_PLAYBACK_REPORT.md docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md validation/phase5_playback graphify-out
-git commit -m "docs: report playback feature extraction"
-~~~
diff --git a/docs/superpowers/plans/2026-08-26-provider-feature-extraction.md b/docs/superpowers/plans/2026-08-26-provider-feature-extraction.md
deleted file mode 100644
index a74e2909..00000000
--- a/docs/superpowers/plans/2026-08-26-provider-feature-extraction.md
+++ /dev/null
@@ -1,670 +0,0 @@
-# Provider Feature Module Extraction Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Extract provider setup, edit, import, pairing, presentation state, navigation registration, resources, and tests into `:feature:provider` without changing provider behavior, focus/typing behavior, file-launcher behavior, or app navigation contracts.
-
-**Architecture:** `:app` remains the composition root. `:feature:provider` owns the provider route, screen family, `ProviderSetupViewModel`, QR pairing, resources, and provider-scoped tests. It depends only on `:core:navigation`, `:core:ui`, `:domain`, and explicitly ledgered temporary `:data` types. The app supplies the existing settings-owned backup-preview dialog through a composable request renderer, avoiding an app import, feature-to-feature dependency, or duplicated dialog.
-
-**Tech Stack:** Kotlin 2.2/JVM 17, Android compile SDK 36/min SDK 25, Compose/TV Compose, Navigation Compose 2.9.7, Hilt 2.56.2/KSP, coroutines/StateFlow, ZXing 3.5.3, JUnit 4, Truth, Mockito Kotlin, Robolectric, Compose instrumentation, Gradle boundary tasks, Baseline Profile tooling, ADB, and graphify.
-
-**Spec:** `docs/superpowers/specs/2026-08-24-phase-5-feature-module-extraction-design.md`
-
-## Global constraints
-
-- Do not reset, delete, overwrite, or mix the current uncommitted navigation, golden-capture, baseline-profile, playback-test, or documentation work into provider extraction commits.
-- Begin implementation only after that work is reviewed, verified, and preserved as its own baseline commit(s).
-- Preserve create/edit/import/pairing behavior, provider types, defaults, validation, cancellation, retry, completion ordering, Activity Result contracts, persisted URI handling, focus order, keyboard and D-pad behavior, semantics, routes, arguments, and callbacks.
-- Do not redesign the UI or refactor business behavior during extraction. Mechanical moves and package/import changes come first; behavior fixes need separate evidence and commits.
-- `:feature:provider` must not depend on or import `:app`, another feature implementation, `MainActivity`, `NavController`, or `NavHostController`.
-- Allowed project dependencies are exactly `:core:navigation`, `:core:ui`, `:domain`, and temporary `:data` imports recorded in `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`.
-- Keep `AppDestination`, `AppRouteCodec`, external-route compatibility, startup coordination, and the root controller in their current owners.
-- Keep `SettingsBackupImportPreviewDialog.kt` app-owned until settings extraction. Inject it using a feature-owned composable request contract.
-- Performance timings remain open until exact pre/post Git refs exist. The idle-host release-like profile regeneration is complete, but the five paired samples must still run from clean checkouts; do not compare the current mixed dirty tree.
-- Playback acceptance remains independently open. Provider structural work does not resolve or waive live HLS, manual playback, or playback profile gates.
-- Run `graphify update .` after code changes.
-
-## Current execution status (2026-08-27)
-
-- Tasks 0–8 structural work is complete: the provider module, seams, moved
- setup/pairing/UI state, resources, tests, graph registration, ownership
- cleanup, boundaries, dependency audit, unit tests, feature lint, and debug
- assembly have passed.
-- Task 9 remains open. SDK-local `adb` reached the connected emulator for the
- focused provider completion test, app navigation/golden checks, playback
- overlays, and additional manual source/launcher/Drive/QR journeys. Full
- manual provider journeys and mixed-suite stabilization are recorded in
- `validation/phase5_provider/task9-runtime-validation.md`.
-- Task 10 is open for the paired timing samples and complete manual evidence;
- the idle-host release-like profile subgate passed on 2026-08-27. Ten profile
- tests passed, eight ordinary macrobenchmarks were skipped by assumption,
- generated profiles have no stale provider paths, and `:app:assembleRelease`
- passed afterward. See `validation/phase5_provider/performance-rerun.md`.
-- The repository has no root `verifyModuleBoundaries` task. The registered
- `verifyCoreNavigationBoundary`, `verifyCoreUiBoundary`,
- `verifyFeaturePlaybackBoundary`, `verifyFeatureProviderBoundary`, and
- `app:verifyFeatureNavigationBoundary` tasks are the authoritative checks.
-
-## Planned ownership
-
-```text
-feature/provider/
- build.gradle.kts
- src/main/AndroidManifest.xml
- src/main/java/com/streamvault/feature/provider/
- api/ProviderBackupPreviewContent.kt
- navigation/ProviderGraph.kt
- navigation/ProviderRoutePatterns.kt
- pairing/ProviderQrPairingManager.kt
- setup/ProviderSetup*.kt
- src/main/res/values*/strings.xml
- src/test/java/com/streamvault/feature/provider/setup/ProviderSetupViewModelTest.kt
- src/androidTest/java/com/streamvault/feature/provider/setup/ProviderSetupCompletionLayerTest.kt
- src/test/resources/boundary-fixtures/
-
-core/ui/src/main/java/com/streamvault/core/ui/progress/ProgressFraction.kt
-core/ui/src/test/java/com/streamvault/core/ui/progress/ProgressFractionTest.kt
-```
-
----
-
-### Task 0: Stabilize the existing Phase 5 baseline
-
-**Files:**
-
-- Inspect: every path reported by `git status --short`
-- Verify: `app/src/test/java/com/streamvault/app/navigation/AppNavigationCoordinatorTest.kt`
-- Verify: `app/src/androidTest/java/com/streamvault/app/ui/AppNavigationContractTest.kt`
-- Verify: `app/src/androidTest/java/com/streamvault/app/ui/test/GoldenCaptureTest.kt`
-- Verify: `feature/playback/src/androidTest/java/com/streamvault/feature/playback/player/overlay/PlayerOverlayGoldenCaptureTest.kt`
-- Verify: `docs/COMPOSE_REDUCTION_PHASE5_PLAYBACK_REPORT.md`
-- Verify: `validation/phase5_playback/task10-validation.md`
-
-**Interfaces:** Produces a preserved, reviewable hardening baseline for comparison.
-
-- [ ] **Step 1: Re-inventory the dirty tree**
-
-```powershell
-git status --short
-git diff --stat
-git diff --check
-```
-
-Expected: only known navigation, golden, profile, playback-test, and documentation work is present; whitespace validation passes.
-
-- [ ] **Step 2: Verify focused navigation regressions**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.navigation.AppNavigationCoordinatorTest" --tests "com.streamvault.app.navigation.StartupNavigationResolverTest" --tests "com.streamvault.app.navigation.AppRouteCodecTest" --tests "com.streamvault.app.navigation.ExternalDestinationTest" --rerun-tasks --no-daemon --console=plain
-```
-
-With an emulator connected:
-
-```powershell
-.\gradlew.bat :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.AppNavigationContractTest --no-daemon --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.test.GoldenCaptureTest --no-daemon --console=plain
-.\gradlew.bat :feature:playback:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.feature.playback.player.overlay.PlayerOverlayGoldenCaptureTest --no-daemon --console=plain
-```
-
-Expected: startup ordering, deferred live-player opening, unified-catalog reconciliation, detail-return replacement, and both golden suites pass.
-
-- [ ] **Step 3: Preserve this work separately**
-
-Review and commit existing hardening changes in coherent commits before adding any provider file. Then record:
-
-```powershell
-git status --short
-git rev-parse HEAD
-```
-
-Expected: empty status and an immutable baseline SHA. If cleaning the tree would discard or mix user work, stop and report the overlapping files.
-
----
-
-### Task 1: Record inventory, rollback point, and deferred measurements
-
-**Files:**
-
-- Create: `validation/phase5_provider/build-baseline/README.md`
-- Create: `validation/phase5_provider/build-baseline/source-files.txt`
-- Create: `validation/phase5_provider/build-baseline/project-imports.txt`
-- Create: `validation/phase5_provider/build-baseline/resources.txt`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-- Inspect: provider screen, pairing, test, and graph roots
-
-**Interfaces:** Produces the move inventory, rollback SHA, temporary dependency list, and idle-host timing obligation.
-
-- [ ] **Step 1: Capture exact inventory**
-
-Run and preserve outputs in the named files using `apply_patch`:
-
-```powershell
-rg --files app/src/main/java/com/streamvault/app/ui/screens/provider app/src/main/java/com/streamvault/app/pairing app/src/test/java/com/streamvault/app/ui/screens/provider app/src/androidTest/java/com/streamvault/app/ui/screens/provider
-rg -n "^import com\.streamvault\.(app|data|domain|core)" app/src/main/java/com/streamvault/app/ui/screens/provider app/src/main/java/com/streamvault/app/pairing/ProviderQrPairingManager.kt
-rg -n "R\.(string|drawable|plurals|array)\." app/src/main/java/com/streamvault/app/ui/screens/provider
-```
-
-Expected: all 22 `ProviderSetup*.kt` files, QR manager, ViewModel test, and completion instrumentation test are accounted for.
-
-- [ ] **Step 2: Extend the transitional ledger**
-
-Add Phase 7-owned rows for:
-
-- `StalkerParamOverride`, `StalkerRequestRule`
-- `StalkerAdvancedOptions`, `StalkerAdvancedOptionsCodec`, `StalkerCompatibilityRegistry`
-- `ProviderInputSanitizer`
-- `XtreamAuthenticationException`, `XtreamNetworkException`, `XtreamParsingException`, `XtreamRequestException`, `XtreamResponseTooLargeException`
-- `CredentialDecryptionException`
-
-Name current consumers. Removal direction is domain-owned setup/configuration policy for Stalker/input types and domain-owned provider-access/setup errors for exceptions.
-
-- [ ] **Step 3: Record deferred performance protocol**
-
-Record the clean baseline SHA, representative production edit `ProviderSetupTextField.kt`, representative test edit `ProviderSetupViewModelTest.kt`, five before/after production and test-compile runs, clean/warm guardrails, and same idle-host requirement. The profile subgate is complete, but mark timing rows `OPEN — requires committed post-extraction ref` until the paired samples are captured; never infer a pass from the current mixed dirty tree.
-
-Current execution note (2026-08-27): the idle-host profile subgate passed, but
-the paired timing rows remain `OPEN` until a committed post-extraction ref is
-available. Do not infer a performance result from the mixed dirty tree.
-
-Later before commands:
-
-```powershell
-.\gradlew.bat :app:compileDebugKotlin --profile --no-daemon --console=plain
-.\gradlew.bat :app:compileDebugUnitTestKotlin --profile --no-daemon --console=plain
-```
-
-- [ ] **Step 4: Commit evidence separately**
-
-```powershell
-git add docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_provider/build-baseline
-git commit -m "docs: record provider extraction baseline"
-```
-
----
-
-### Task 2: Create the module and enforce its boundary
-
-**Files:**
-
-- Create: `feature/provider/build.gradle.kts`
-- Create: `feature/provider/src/main/AndroidManifest.xml`
-- Create: `feature/provider/src/test/resources/boundary-fixtures/AppPackageImport.kt`
-- Create: `feature/provider/src/test/resources/boundary-fixtures/FullyQualifiedAppReference.kt`
-- Create: `feature/provider/src/test/resources/boundary-fixtures/MainActivityReference.java`
-- Create: `feature/provider/src/test/resources/boundary-fixtures/RootNavigation.kt`
-- Create: `feature/provider/src/test/resources/boundary-fixtures/RootNavigation.java`
-- Modify: `settings.gradle.kts`, `app/build.gradle.kts`, `build.gradle.kts`
-
-**Interfaces:** Adds `:feature:provider` with exact allowed dependencies and a fail-closed guard.
-
-- [ ] **Step 1: Register module and coverage**
-
-Add `include(":feature:provider")`, app implementation dependency, and root Kover dependency.
-
-- [ ] **Step 2: Configure library**
-
-Use namespace `com.streamvault.feature.provider`, SDK 36/25, JVM 17, Compose, Hilt/KSP, Kover, and existing runner. Project dependencies must be exactly:
-
-```kotlin
-implementation(project(":core:navigation"))
-implementation(project(":core:ui"))
-implementation(project(":domain"))
-implementation(project(":data"))
-```
-
-Add only used external libraries: Compose BOM/UI/Material3/icons, TV foundation/material, Activity Compose, lifecycle runtime/ViewModel Compose, Navigation Compose, Hilt Android/compiler/navigation, coroutines core/android, Core KTX, ZXing, and existing unit/instrumentation libraries. Do not add `:player`, `:feature:playback`, or broad app-only libraries.
-
-- [ ] **Step 3: Add boundary task**
-
-Mirror playback as `:feature:provider:verifyFeatureProviderBoundary`. Require the exact four project paths; scan Kotlin/Java production for `import com.streamvault.app`, `com.streamvault.app`, `MainActivity`, `NavHostController`, and `NavController`; prove fixture detection; write `build/reports/feature-provider-boundary/report.txt`; attach to `check` and tests. Add root aggregator.
-
-- [ ] **Step 4: Prove empty module**
-
-```powershell
-.\gradlew.bat :feature:provider:verifyFeatureProviderBoundary :feature:provider:assembleDebug --no-daemon --console=plain
-```
-
-- [ ] **Step 5: Commit shell**
-
-```powershell
-git add settings.gradle.kts build.gradle.kts app/build.gradle.kts feature/provider
-git commit -m "build: add provider feature boundary"
-```
-
----
-
-### Task 3: Establish shared and app-supplied presentation seams
-
-**Files:**
-
-- Move: `app/src/main/java/com/streamvault/app/ui/components/SyncProgressUtil.kt` to `core/ui/src/main/java/com/streamvault/core/ui/progress/ProgressFraction.kt`
-- Create: `core/ui/src/test/java/com/streamvault/core/ui/progress/ProgressFractionTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsSyncOverlay.kt`
-- Create: `feature/provider/src/main/java/com/streamvault/feature/provider/api/ProviderBackupPreviewContent.kt`
-- Modify during integration: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Reuse unchanged: `app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsBackupImportPreviewDialog.kt`
-
-**Interfaces:** Pure shared parser plus provider-owned backup-preview request rendered by app.
-
-- [ ] **Step 1: Test-drive parser**
-
-Test normal ratio, whitespace, missing ratio, zero total, and clamping. Run before implementation and expect failure:
-
-```powershell
-.\gradlew.bat :core:ui:testDebugUnitTest --tests "com.streamvault.core.ui.progress.ProgressFractionTest" --no-daemon --console=plain
-```
-
-- [ ] **Step 2: Move parser unchanged**
-
-Move regex/function to `com.streamvault.core.ui.progress`; update settings and provider imports; rerun and pass.
-
-- [ ] **Step 3: Define backup-preview seam**
-
-Create:
-
-```kotlin
-typealias ProviderBackupPreviewContent =
- @Composable (ProviderBackupPreviewRequest) -> Unit
-
-data class ProviderBackupPreviewRequest(
- val preview: BackupPreview,
- val plan: BackupImportPlan,
- val onDismiss: () -> Unit,
- val onStrategySelected: (BackupConflictStrategy) -> Unit,
- val onImportPreferencesChanged: (Boolean) -> Unit,
- val onImportProvidersChanged: (Boolean) -> Unit,
- val onImportSavedLibraryChanged: (Boolean) -> Unit,
- val onImportPlaybackHistoryChanged: (Boolean) -> Unit,
- val onImportMultiViewChanged: (Boolean) -> Unit,
- val onImportRecordingSchedulesChanged: (Boolean) -> Unit,
- val isImporting: Boolean,
- val onConfirm: () -> Unit,
-)
-```
-
-The feature constructs the request from existing state/callbacks. `AppNavHost` delegates every field to the existing dialog. Do not duplicate/move the dialog.
-
-- [ ] **Step 4: Compile and commit**
-
-```powershell
-.\gradlew.bat :core:ui:testDebugUnitTest :app:compileDebugKotlin --no-daemon --console=plain
-git add core/ui app/src/main/java/com/streamvault/app/ui/components/SyncProgressUtil.kt app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsSyncOverlay.kt feature/provider/src/main/java/com/streamvault/feature/provider/api
-git commit -m "refactor: define provider presentation seams"
-```
-
----
-
-### Task 4: Move pairing and presentation state
-
-**Files:**
-
-- Move: `app/src/main/java/com/streamvault/app/pairing/ProviderQrPairingManager.kt` to `feature/provider/src/main/java/com/streamvault/feature/provider/pairing/ProviderQrPairingManager.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupViewModel.kt` to `feature/provider/src/main/java/com/streamvault/feature/provider/setup/ProviderSetupViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupAdvancedOptionsModel.kt` to `feature/provider/src/main/java/com/streamvault/feature/provider/setup/ProviderSetupAdvancedOptionsModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupFormModels.kt` to `feature/provider/src/main/java/com/streamvault/feature/provider/setup/ProviderSetupFormModels.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/provider/ProviderSetupViewModelTest.kt` to `feature/provider/src/test/java/com/streamvault/feature/provider/setup/ProviderSetupViewModelTest.kt`
-
-**Interfaces:** Feature owns QR pairing state/manager and provider setup state with unchanged Hilt scopes and dependencies.
-
-- [ ] **Step 1: Move test first and show red**
-
-Change only package/imports, run feature test, expect missing production symbols.
-
-```powershell
-.\gradlew.bat :feature:provider:testDebugUnitTest --tests "com.streamvault.feature.provider.setup.ProviderSetupViewModelTest" --no-daemon --console=plain
-```
-
-- [ ] **Step 2: Move QR pairing mechanically**
-
-Preserve annotations, socket limits, session duration, token validation, response behavior, QR size, coroutine scope, and provider commands exactly.
-
-- [ ] **Step 3: Move ViewModel/models mechanically**
-
-Preserve constructor dependencies, StateFlow, edit initialization, defaults, Drive import, completion state, cancellation, pairing lifecycle, and error mapping.
-
-- [ ] **Step 4: Run and commit**
-
-```powershell
-.\gradlew.bat :feature:provider:testDebugUnitTest --tests "com.streamvault.feature.provider.setup.ProviderSetupViewModelTest" --rerun-tasks --no-daemon --console=plain
-git add app/src/main/java/com/streamvault/app/pairing app/src/main/java/com/streamvault/app/ui/screens/provider app/src/test/java/com/streamvault/app/ui/screens/provider feature/provider
-git commit -m "refactor: move provider setup state to feature"
-```
-
----
-
-### Task 5: Move UI, resources, and instrumentation tests
-
-**Files:**
-
-- Move to `feature/provider/src/main/java/com/streamvault/feature/provider/setup/`: `ProviderSetupActionButtons.kt`, `ProviderSetupAdvancedOptions.kt`, `ProviderSetupCompletionHost.kt`, `ProviderSetupFormPrimitives.kt`, `ProviderSetupImportDialogs.kt`, `ProviderSetupImportSupport.kt`, `ProviderSetupJellyfinForm.kt`, `ProviderSetupPairingCard.kt`, `ProviderSetupPasswordGlyph.kt`, `ProviderSetupPolicyOptions.kt`, `ProviderSetupProviderForms.kt`, `ProviderSetupScreen.kt`, `ProviderSetupSourceForms.kt`, `ProviderSetupSourcePanel.kt`, `ProviderSetupSourceSelector.kt`, `ProviderSetupStalkerCompatibilitySelector.kt`, `ProviderSetupStalkerRules.kt`, `ProviderSetupSyncDialog.kt`, and `ProviderSetupTextField.kt`
-- Move: `app/src/androidTest/java/com/streamvault/app/ui/screens/provider/ProviderSetupCompletionLayerTest.kt` to `feature/provider/src/androidTest/java/com/streamvault/feature/provider/setup/ProviderSetupCompletionLayerTest.kt`
-- Create/modify: `feature/provider/src/main/res/values*/strings.xml` and `app/src/main/res/values*/strings.xml`
-
-**Interfaces:** Complete presentation ownership with launchers, focus, typing, semantics, and completion preserved.
-
-- [ ] **Step 1: Move instrumentation test first and show red**
-
-Run the moved test before production move; expect missing symbols.
-
-```powershell
-.\gradlew.bat :feature:provider:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.feature.provider.setup.ProviderSetupCompletionLayerTest --no-daemon --console=plain
-```
-
-- [ ] **Step 2: Move remaining UI mechanically**
-
-Replace app R with feature R; pairing imports with feature pairing; progress import with core UI; device helper with `com.streamvault.core.ui.device.rememberIsTelevisionDevice`; direct backup dialog with the injected request renderer.
-
-Keep all three Activity Result contracts: playlist `OpenDocument`, backup `OpenDocument`, Drive `StartActivityForResult`.
-
-- [ ] **Step 3: Move resources locale by locale**
-
-Inventory:
-
-```powershell
-rg -o "R\.(string|drawable|plurals|array)\.[A-Za-z0-9_]+" feature/provider/src/main/java | Sort-Object -Unique
-```
-
-Copy provider-owned keys and every existing translation. Keep settings backup-preview strings app-owned. Remove an app key only after a repo-wide exact-key scan shows no app consumer. Do not rename keys or alter translations.
-
-- [ ] **Step 4: Verify and commit**
-
-```powershell
-.\gradlew.bat :feature:provider:verifyFeatureProviderBoundary :feature:provider:testDebugUnitTest :feature:provider:assembleDebug --no-daemon --console=plain
-.\gradlew.bat :feature:provider:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.feature.provider.setup.ProviderSetupCompletionLayerTest --no-daemon --console=plain
-git add app/src/main/java/com/streamvault/app/ui/screens/provider app/src/androidTest/java/com/streamvault/app/ui/screens/provider app/src/main/res feature/provider
-git commit -m "refactor: move provider presentation to feature"
-```
-
----
-
-### Task 6: Move graph registration and preserve route compatibility
-
-**Files:**
-
-- Create: `feature/provider/src/main/java/com/streamvault/feature/provider/navigation/ProviderRoutePatterns.kt`
-- Move: `app/src/main/java/com/streamvault/app/navigation/graph/ProviderGraph.kt` to `feature/provider/src/main/java/com/streamvault/feature/provider/navigation/ProviderGraph.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Verify: `app/src/test/java/com/streamvault/app/navigation/AppRouteCodecTest.kt`
-- Verify: `app/src/test/java/com/streamvault/app/navigation/ExternalDestinationTest.kt`
-- Verify: `app/src/androidTest/java/com/streamvault/app/compat/PlatformCompatibilityMatrixTest.kt`
-
-**Interfaces:** Controller-free feature graph with unchanged route and arguments.
-
-- [ ] **Step 1: Add route constant**
-
-```kotlin
-object ProviderRoutePatterns {
- const val PROVIDER_SETUP =
- "provider_setup?providerId={providerId}&importUri={importUri}"
-}
-```
-
-Alias `AppRoutePatterns.PROVIDER_SETUP` to it so route text remains identical.
-
-- [ ] **Step 2: Move graph**
-
-Expose:
-
-```kotlin
-fun NavGraphBuilder.registerProviderGraph(
- actions: NavigationActions,
- startupReady: Boolean,
- onStartupNavigationRequested: (AppDestination) -> Unit,
- backupPreviewContent: ProviderBackupPreviewContent,
-)
-```
-
-Preserve `providerId = -1L`, empty `importUri`, decoding, `actions.back()`, `dropUnlessResumed`, and `AppDestination.ProviderSetup()`. Retain currently unused `startupReady`; removal is separate cleanup.
-
-- [ ] **Step 3: Wire app renderer**
-
-Import feature graph in `AppNavHost`; pass navigation callbacks unchanged and adapt request to `BackupImportPreviewDialog` field-for-field.
-
-- [ ] **Step 4: Verify and commit**
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.navigation.AppRouteCodecTest" --tests "com.streamvault.app.navigation.ExternalDestinationTest" --rerun-tasks --no-daemon --console=plain
-.\gradlew.bat :app:compileDebugKotlin :feature:provider:verifyFeatureProviderBoundary --no-daemon --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.compat.PlatformCompatibilityMatrixTest --no-daemon --console=plain
-git add app/src/main/java/com/streamvault/app/navigation feature/provider/src/main/java/com/streamvault/feature/provider/navigation
-git commit -m "refactor: register provider graph from feature"
-```
-
----
-
-### Task 7: Remove legacy ownership and audit dependencies
-
-**Files:**
-
-- Remove only after verification: empty app provider/pairing directories
-- Modify: app/feature Gradle files and transitional ledger
-
-**Interfaces:** One production owner and only justified dependencies.
-
-- [ ] **Step 1: Scan**
-
-```powershell
-rg -n "com\.streamvault\.app\.(ui\.screens\.provider|pairing\.ProviderQrPairing)" --glob "*.kt" --glob "*.java" .
-rg -n "com\.streamvault\.app|MainActivity|NavHostController|NavController" feature/provider/src/main --glob "*.kt" --glob "*.java"
-rg -n "^import com\.streamvault\.data" feature/provider/src/main --glob "*.kt" --glob "*.java"
-```
-
-Expected: no legacy package, no forbidden feature import, and every data import matches the ledger.
-
-- [ ] **Step 2: Audit app dependencies**
-
-Remove a project/library dependency only after all app source sets show no direct consumer or generated/runtime requirement. App retains provider feature; provider retains temporary data.
-
-- [ ] **Step 3: Remove only confirmed-empty directories and verify**
-
-```powershell
-.\gradlew.bat verifyModuleBoundaries verifyFeaturePlaybackBoundary verifyFeatureProviderBoundary :feature:provider:dependencies --configuration debugRuntimeClasspath --no-daemon --console=plain
-```
-
-- [ ] **Step 4: Commit cleanup**
-
-```powershell
-git add app feature/provider docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
-git commit -m "refactor: remove legacy provider ownership"
-```
-
----
-
-### Task 8: Automated structural and regression validation
-
-**Files:**
-
-- Create: `validation/phase5_provider/task8-automated-validation.md`
-
-**Interfaces:** Reproducible build, test, boundary, lint, package, and graph evidence.
-
-- [ ] **Step 1: Feature verification**
-
-```powershell
-.\gradlew.bat :feature:provider:verifyFeatureProviderBoundary :feature:provider:testDebugUnitTest :feature:provider:assembleDebug :feature:provider:lintDebug --no-daemon --console=plain
-```
-
-- [ ] **Step 2: App integration**
-
-```powershell
-.\gradlew.bat verifyModuleBoundaries verifyFeaturePlaybackBoundary verifyFeatureProviderBoundary :app:testDebugUnitTest :app:assembleDebug :app:lintDebug --no-daemon --console=plain
-```
-
-Classify an existing failure as pre-existing only if reproduced at the Task 0 SHA.
-
-- [ ] **Step 3: Connected suites**
-
-```powershell
-.\gradlew.bat :feature:provider:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.feature.provider.setup.ProviderSetupCompletionLayerTest --no-daemon --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.AppNavigationContractTest --no-daemon --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.compat.PlatformCompatibilityMatrixTest --no-daemon --console=plain
-.\gradlew.bat :feature:provider:connectedDebugAndroidTest :app:connectedDebugAndroidTest --no-daemon --console=plain
-```
-
-- [ ] **Step 4: Graph update**
-
-```powershell
-graphify update .
-graphify query "How does the provider feature relate to app navigation, core navigation, core UI, domain, and data after extraction?"
-```
-
-Expected: app registers feature, no app/other-feature edge from provider, temporary data edges match ledger.
-
-- [ ] **Step 5: Record and commit**
-
-Include commands, timestamps, counts, failures, boundary report, source counts, and limitations.
-
-```powershell
-git add validation/phase5_provider graphify-out
-git commit -m "test: validate provider feature extraction"
-```
-
----
-
-### Task 9: Provider runtime acceptance
-
-**Files:**
-
-- Create: `validation/phase5_provider/task9-runtime-validation.md`
-
-**Interfaces:** Validates roadmap gate: create/edit/import, file launchers, focus, typing, completion, pairing.
-
-- [ ] **Step 1: Fresh install**
-
-```powershell
-.\gradlew.bat :app:installDebug --no-daemon --console=plain
-adb logcat -c
-adb shell am force-stop com.streamvault.app
-adb shell monkey -p com.streamvault.app 1
-```
-
-- [ ] **Step 2: Create journeys**
-
-Exercise Xtream, Stalker, M3U, and Jellyfin selection. Verify initial focus, typing, password visibility, validation, advanced options, Back/cancel, and successful or expected fixture-limited submission. Never record credentials/full URLs.
-
-- [ ] **Step 3: Edit journey**
-
-Open provider setup through the app for a sanitized test provider; verify population, harmless edit/save, callback/return, persistence, and cancel leaving stored state unchanged.
-
-- [ ] **Step 4: Launcher journeys**
-
-Verify playlist and backup `OpenDocument` launchers, MIME behavior, return/cancel, single URI delivery, Drive `StartActivityForResult`, focus return, and cold-start `importUri`.
-
-- [ ] **Step 5: Backup import journey**
-
-Use a non-sensitive test backup. Verify preview counts, strategy, toggles, dismiss, confirm, progress, completion, and restored-provider onboarding through the app renderer.
-
-- [ ] **Step 6: Focus and typing**
-
-Record initial focus, D-pad traversal, insertion/deletion, IME Next/Done, dialog/launcher focus restoration, and no double activation on phone/TV form factors available. Capture transition screenshots, not only a final screenshot.
-
-- [ ] **Step 7: QR pairing**
-
-Validate start/stop, QR/code state, expiry/cancel, and—when LAN permits—one sanitized second-device submission. If LAN/credentials are unavailable, leave that exact gate open; QR rendering alone is not acceptance.
-
-- [ ] **Step 8: Evidence**
-
-```powershell
-adb logcat -d -v time
-adb shell dumpsys activity activities
-```
-
-Record device/API/form factor, journeys, launcher results, focus/typing, sanitized errors, and screenshots. Never store tokens, passwords, backup contents, full URLs, or QR payloads.
-
----
-
-### Task 10: Idle-host performance/profile gates and report
-
-**Files:**
-
-- Create: `validation/phase5_provider/performance-rerun.md`
-- Create: `docs/COMPOSE_REDUCTION_PHASE5_PROVIDER_REPORT.md`
-- Modify: Phase 5 roadmap and main architecture plan
-- Regenerate when available: app generated baseline/startup profiles
-
-**Interfaces:** Final before/after evidence, release-like/profile evidence, rollback record, and honest Phase 5 status.
-
-- [ ] **Step 1: Record clean post SHA**
-
-```powershell
-git status --short
-git rev-parse HEAD
-```
-
-Name both pre/post SHAs in the report.
-
-- [ ] **Step 2: Five paired production-edit runs on idle host**
-
-Using clean checkouts of both SHAs, make/restore the same comment-only edit in the before app-owned and after feature-owned `ProviderSetupTextField.kt`. Run five samples:
-
-```powershell
-.\gradlew.bat :app:compileDebugKotlin --profile --no-daemon --console=plain
-.\gradlew.bat :feature:provider:compileDebugKotlin :app:compileDebugKotlin --profile --no-daemon --console=plain
-```
-
-Record wall time, task states, profile path, host load, and unrelated compilation.
-
-- [ ] **Step 3: Five paired test-edit runs**
-
-Make/restore the same edit in before/after `ProviderSetupViewModelTest.kt` and run five:
-
-```powershell
-.\gradlew.bat :app:compileDebugUnitTestKotlin --profile --no-daemon --console=plain
-.\gradlew.bat :feature:provider:compileDebugUnitTestKotlin --profile --no-daemon --console=plain
-```
-
-- [ ] **Step 4: Clean/warm guardrails**
-
-Run standard clean debug once and same no-change build once for each clean checkout. Compare only same-machine, same-load runs.
-
-- [x] **Step 5: Refresh profiles and release-like build**
-
-Use the existing Baseline Profile generator; do not hand-edit generated profiles.
-
-```powershell
-rg -n "com/streamvault/app/(ui/screens/provider|pairing/ProviderQrPairing)" app/src/main/generated/baselineProfiles
-.\gradlew.bat :app:assembleRelease --no-daemon --console=plain
-```
-
-Result (2026-08-27): generation passed (10 profile tests, eight macrobenchmark
-assumptions skipped), no stale provider package paths remain, and release
-assembly passed. The timing and manual-journey gates remain open.
-
-- [ ] **Step 6: Publish report**
-
-Include ownership, SHAs/rollback, boundaries, source/test counts, all test/build/lint results, runtime journeys, five-pair idle-host results, profile result, data ledger, independent playback gates, failures, and limitations.
-
-- [ ] **Step 7: Update status honestly**
-
-Provider is structurally complete only after Tasks 2–8 pass and accepted only after Tasks 9–10 pass. Do not mark Phase 5 complete: settings, live, catalog, optional-system evaluation, and open playback gates remain.
-
-- [ ] **Step 8: Final verification and commit**
-
-```powershell
-.\gradlew.bat verifyModuleBoundaries verifyFeaturePlaybackBoundary verifyFeatureProviderBoundary :feature:provider:check :app:testDebugUnitTest :app:assembleDebug :app:assembleRelease --no-daemon --console=plain
-graphify update .
-git diff --check
-git status --short
-```
-
-Then review evidence/generated files and commit:
-
-```powershell
-git add docs validation/phase5_provider app/src/main/generated/baselineProfiles graphify-out
-git commit -m "docs: report provider feature extraction"
-```
-
-## Exit criteria
-
-The provider slice is accepted only when:
-
-- feature owns setup/edit/import/pairing UI, state, resources, tests, and graph;
-- exact dependency boundary passes with no app/controller/other-feature imports;
-- route/external compatibility is byte-for-byte unchanged;
-- feature tests pass independently and app integration/build checks pass;
-- create/edit/import/launchers/Drive/focus/typing/completion/pairing have evidence or an explicit open blocker;
-- timing samples are rerun on an idle host using the two SHAs;
-- generated profiles have no stale provider paths and release-like build passes;
-- ledger and provider report are current;
-- playback and later Phase 5 gates remain open unless independently accepted.
diff --git a/docs/superpowers/plans/2026-08-27-settings-feature-extraction.md b/docs/superpowers/plans/2026-08-27-settings-feature-extraction.md
deleted file mode 100644
index b6c43894..00000000
--- a/docs/superpowers/plans/2026-08-27-settings-feature-extraction.md
+++ /dev/null
@@ -1,807 +0,0 @@
-# Settings Feature Module Extraction Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Move Settings, parental controls, backup/restore presentation, state, dialogs, resources, tests, and graph registration from `:app` into independently compiled `:feature:settings` without changing behavior.
-
-**Architecture:** `:app` remains the root navigation and Android platform composition root. `:feature:settings` owns presentation and controller-free graph registration, consumes neutral core/domain contracts, and reaches app-only operations through feature-defined ports implemented by app adapters. Temporary `:data` imports are fail-closed and ledgered; the existing provider backup-preview request remains unchanged and is adapted by `AppNavHost`.
-
-**Tech Stack:** Kotlin, Android library modules, Jetpack Compose/TV Material, Navigation Compose, Hilt/KSP, coroutines/StateFlow, JUnit4, Truth, Mockito-Kotlin, Robolectric, Compose UI tests, Kover, Gradle boundary tasks, Graphify.
-
-**Spec:** `docs/superpowers/specs/2026-08-27-phase-5-settings-feature-extraction-design.md`
-
-## Global Constraints
-
-- Preserve the intentional working tree; never reset, clean, delete, or rewrite unrelated changes.
-- This is a behavior-preserving Phase 5 extraction: preserve routes, arguments, focus, semantics, callbacks, persistence, launcher order, UI output, and error text.
-- `:app` remains the root `NavHostController`, external-intent, route-codec, payload, manifest, worker, and platform composition root.
-- `:feature:settings` may depend only on `:core:navigation`, `:core:ui`, `:domain`, temporary ledgered `:data`, and the audited `:player` dependency.
-- `:feature:settings` must never depend on `:app`, `:feature:provider`, `:feature:playback`, `NavController`, `NavHostController`, or `MainActivity`.
-- Keep `ProviderBackupPreviewContent` and `ProviderBackupPreviewRequest` source- and behavior-compatible; `:app` maps them to the settings-owned dialog.
-- Do not begin Live, Catalog, or System extraction.
-- Move files with `git mv` where practical; keep contract changes, mechanical moves, graph wiring, and cleanup in separate commits.
-- Every direct settings `:data` implementation import must appear in `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`.
-- Record unavailable runtime, credential, hardware, provider, account, performance, and physical-device gates as open rather than passing.
-- After code changes, run `graphify update .` before reporting completion.
-
----
-
-### Task 0: Freeze inventory, rollback point, and baseline obligations
-
-**Files:**
-- Create: `validation/phase5_settings/task0-inventory.md`
-- Create: `validation/phase5_settings/source-inventory.txt`
-- Create: `validation/phase5_settings/test-inventory.txt`
-- Create: `validation/phase5_settings/resource-inventory.txt`
-- Create: `validation/phase5_settings/dependency-inventory.txt`
-- Create: `validation/phase5_settings/performance-protocol.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-
-**Interfaces:**
-- Consumes: the approved spec, current branch status, current settings source/tests, Phase 5 roadmap, playback/provider reports.
-- Produces: exact move inventory, pre-extraction SHA, dirty-tree record, nine-type `:data` allowlist, `AudioCompatibilityMemoryStore` audit entry, and reproducible measurement protocol.
-
-- [ ] **Step 1: Capture the tree and exact source/test inventory**
-
-Run:
-
-```powershell
-git status --short --branch
-git rev-parse HEAD
-rg --files app/src/main/java/com/streamvault/app/ui/screens/settings -g '*.kt' | Sort-Object
-rg --files app/src/test/java/com/streamvault/app/ui/screens/settings -g '*.kt' | Sort-Object
-```
-
-Expected: 71 production Kotlin paths and 12 unit-test paths. Use `apply_patch` to record the exact command output in the inventory files and to record the SHA and every existing working-tree path in `task0-inventory.md`; do not modify or stage unrelated paths.
-
-- [ ] **Step 2: Capture app/data/player/resource imports**
-
-Run:
-
-```powershell
-rg '^import com\.streamvault\.(app|data|player)\.' app/src/main/java/com/streamvault/app/ui/screens/settings -g '*.kt' | Sort-Object
-rg -o 'R\.(string|plurals|drawable)\.[A-Za-z0-9_]+' app/src/main/java/com/streamvault/app/ui/screens/settings -g '*.kt' | ForEach-Object { ($_ -split ':')[-1] } | Sort-Object -Unique
-```
-
-Expected: nine distinct `com.streamvault.data` types, one `com.streamvault.player.AudioCompatibilityMemoryStore`, and 665 unique resource references (660 strings, five plurals). Use `apply_patch` to save the outputs. If counts differ, record the fresh counts and use the saved inventories as source of truth.
-
-- [ ] **Step 3: Add the settings ledger section**
-
-Append explicit rows for `ProgramDao`, `XtreamIndexJobDao`, `XtreamLiveOnboardingDao`, `XtreamIndexJobEntity`, `XtreamLiveOnboardingStateEntity`, `DatabaseMaintenanceSnapshot`, `PreferencesRepository`, `ProviderSyncCommands`, and `SyncRepairSection`, with the removal directions from the spec. Add a separate audit note for `AudioCompatibilityMemoryStore`; do not describe it as a `:data` import.
-
-- [ ] **Step 4: Write the paired measurement protocol**
-
-Record five pre/post runs for a reversible settings source edit and five pre/post runs for a reversible settings test edit. Use the same Gradle daemon/cache state and commands on both refs:
-
-```powershell
-.\gradlew.bat :app:compileDebugKotlin --profile --console=plain --warning-mode=none
-.\gradlew.bat :app:compileDebugUnitTestKotlin --profile --console=plain --warning-mode=none
-.\gradlew.bat :app:assembleDebug --profile --console=plain --warning-mode=none
-```
-
-The post-extraction equivalents are `:feature:settings:compileDebugKotlin` and `:feature:settings:compileDebugUnitTestKotlin`. State that mixed dirty-tree timings are diagnostic only.
-
-- [ ] **Step 5: Verify and commit only inventory artifacts**
-
-Run:
-
-```powershell
-git diff --check
-git diff -- docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_settings
-git add docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_settings
-git commit -m "docs: inventory settings feature extraction"
-```
-
-Expected: the commit contains documentation/evidence only.
-
-### Task 1: Create `:feature:settings` and prove a fail-closed boundary
-
-**Files:**
-- Create: `feature/settings/build.gradle.kts`
-- Create: `feature/settings/src/main/AndroidManifest.xml`
-- Create: `feature/settings/src/test/java/com/streamvault/feature/settings/SettingsModuleBoundaryTest.kt`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/AppPackageImport.kt`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/FullyQualifiedAppReference.kt`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/MainActivityReference.java`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/RootNavigation.kt`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/RootNavigation.java`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/ProviderFeatureImport.kt`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/PlaybackFeatureImport.java`
-- Modify: `settings.gradle.kts`
-- Modify: `app/build.gradle.kts`
-
-**Interfaces:**
-- Consumes: exact allowed project dependency set from the spec.
-- Produces: registered `:feature:settings`, `verifyFeatureSettingsBoundary`, and fixture-tested rejection of app/root-controller/feature-implementation imports.
-
-- [ ] **Step 1: Write the failing app dependency assertion**
-
-Add to the existing app Gradle/module structure test or create a focused assertion in `SettingsModuleBoundaryTest.kt` that resolves the module directory and requires the settings build script to exist:
-
-```kotlin
-@Test
-fun settingsModuleDeclaresExpectedBoundary() {
- val buildFile = File("build.gradle.kts")
- assertThat(buildFile.isFile).isTrue()
- val text = buildFile.readText()
- assertThat(text).contains("verifyFeatureSettingsBoundary")
- assertThat(text).contains(":core:navigation")
- assertThat(text).doesNotContain("project(\":app\")")
-}
-```
-
-- [ ] **Step 2: Run the test to verify red**
-
-Run:
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest --tests "com.streamvault.feature.settings.SettingsModuleBoundaryTest" --console=plain
-```
-
-Expected: Gradle fails because project `:feature:settings` is not registered.
-
-- [ ] **Step 3: Add module registration and library configuration**
-
-Add `include(":feature:settings")` to `settings.gradle.kts`, add `implementation(project(":feature:settings"))` to `:app`, and model `feature/settings/build.gradle.kts` on `feature/provider/build.gradle.kts` with namespace `com.streamvault.feature.settings`. The exact allowed project dependency set is:
-
-```kotlin
-val allowedProjectDependencies = setOf(
- ":core:navigation",
- ":core:ui",
- ":domain",
- ":data",
- ":player",
-)
-```
-
-Configure Compose, Hilt/KSP, Kover, Java/Kotlin 17, minSdk 25, compileSdk 36, unit-test dependencies, connected-test dependencies, `documentfile`, OkHttp, and the same Compose BOM used by provider.
-
-- [ ] **Step 4: Add the boundary scan and fixtures**
-
-Use the provider boundary implementation with these forbidden tokens:
-
-```kotlin
-val forbiddenFeatureSettingsSourceTokens = listOf(
- "import com.streamvault.app",
- "com.streamvault.app",
- "import com.streamvault.feature.provider",
- "import com.streamvault.feature.playback",
- "MainActivity",
- "NavHostController",
- "NavController",
-)
-```
-
-Require every Kotlin and Java fixture above to be detected. Make `check` and all test tasks depend on `verifyFeatureSettingsBoundary`.
-
-- [ ] **Step 5: Verify green**
-
-Run:
-
-```powershell
-.\gradlew.bat :feature:settings:verifyFeatureSettingsBoundary :feature:settings:testDebugUnitTest :feature:settings:assembleDebug --console=plain --warning-mode=none
-```
-
-Expected: boundary fixtures are detected, main source has zero violations, and the empty module assembles.
-
-- [ ] **Step 6: Commit the module shell**
-
-```powershell
-git add settings.gradle.kts app/build.gradle.kts feature/settings
-git commit -m "build: add settings feature module boundary"
-```
-
-### Task 2: Neutralize shared UI and persisted presentation contracts
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/components/SearchInput.kt` -> `core/ui/src/main/java/com/streamvault/core/ui/components/SearchInput.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/components/TvEmptyState.kt` -> `core/ui/src/main/java/com/streamvault/core/ui/components/TvEmptyState.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/components/dialogs/PinDialog.kt` -> `core/ui/src/main/java/com/streamvault/core/ui/components/dialogs/PinDialog.kt`
-- Move: `app/src/main/java/com/streamvault/app/localization/AppLocaleSupport.kt` -> `core/ui/src/main/java/com/streamvault/core/ui/localization/AppLocaleSupport.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/model/LiveTvChannelMode.kt` -> `domain/src/main/java/com/streamvault/domain/model/LiveTvChannelMode.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/model/LiveTvQuickFilterVisibilityMode.kt` -> `domain/src/main/java/com/streamvault/domain/model/LiveTvQuickFilterVisibilityMode.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/model/VodViewMode.kt` -> `domain/src/main/java/com/streamvault/domain/model/VodViewMode.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/model/CategoryDisplayPreferences.kt` -> `domain/src/main/java/com/streamvault/domain/policy/CategoryDisplayPreferences.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/dashboard/DashboardShelfCustomizationDialog.kt` -> `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/DashboardShelfCustomizationDialog.kt`
-- Modify: every current importer returned by `rg -l 'com.streamvault.app.ui.(components.SearchInput|components.TvEmptyState|components.dialogs.PinDialog|model.LiveTvChannelMode|model.LiveTvQuickFilterVisibilityMode|model.VodViewMode|model.applyProviderCategoryDisplayPreferences)' app feature core domain -g '*.kt'`
-- Test: existing `:core:ui`, `:domain`, and app model/policy tests discovered by `rg -l 'LiveTvChannelMode|LiveTvQuickFilterVisibilityMode|VodViewMode|applyProviderCategoryDisplayPreferences|PinDialog|SearchInput|TvEmptyState' --glob '*Test.kt'`
-
-**Interfaces:**
-- Consumes: existing component signatures and enum storage values.
-- Produces: app-independent imports usable by settings, live, and catalog; no new feature-to-feature dependency.
-
-- [ ] **Step 1: Move the existing model tests first**
-
-For every existing parsing/policy test found by the command above, move it to the owning module and update only its package/import. Add this assertion if no enum test currently covers storage compatibility:
-
-```kotlin
-@Test
-fun persistedDisplayModesKeepExistingStorageValues() {
- assertThat(VodViewMode.fromStorage("classic")).isEqualTo(VodViewMode.CLASSIC)
- assertThat(LiveTvChannelMode.fromStorage("PRO")).isEqualTo(LiveTvChannelMode.PRO)
- assertThat(LiveTvQuickFilterVisibilityMode.fromStorage("always"))
- .isEqualTo(LiveTvQuickFilterVisibilityMode.ALWAYS_VISIBLE)
-}
-```
-
-- [ ] **Step 2: Verify red after changing test imports**
-
-Run the moved test through `:domain:test` or `:core:ui:testDebugUnitTest` as appropriate.
-
-Expected: compilation fails because the new package does not exist.
-
-- [ ] **Step 3: Move production files mechanically and update all importers**
-
-Use `git mv`. Change package declarations and imports only. Preserve enum members, storage strings, supported language tags and `iw`/`he` plus `in`/`id` canonicalization, component parameters, semantics, focus behavior, and rendering. Use existing `CoreAppScreenScaffold`, `NavigationChrome`, `UiDestination`, `LocalUiTimeFormat`, and `UiTimeFormat.createDateTimeFormat` rather than moving app shell/time adapters into the feature.
-
-- [ ] **Step 4: Verify shared and app consumers**
-
-Run:
-
-```powershell
-.\gradlew.bat :domain:test :core:ui:testDebugUnitTest :app:compileDebugKotlin :feature:provider:compileDebugKotlin :feature:playback:compileDebugKotlin --console=plain --warning-mode=none
-```
-
-Expected: all tasks pass and `rg` finds no old package import.
-
-- [ ] **Step 5: Commit shared contract moves**
-
-```powershell
-git add core/ui domain app feature/settings
-git commit -m "refactor: expose settings shared presentation contracts"
-```
-
-### Task 3: Define settings ports and app adapters
-
-**Files:**
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/api/SettingsPlatformHost.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/api/SettingsBackupFileHost.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/api/SettingsSurfaceRefreshPort.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/api/SettingsDiagnosticsPort.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/api/SettingsAppUpdatePort.kt`
-- Create: `app/src/main/java/com/streamvault/app/settings/AppSettingsPlatformHost.kt`
-- Create: `app/src/main/java/com/streamvault/app/settings/AppSettingsBackupFileAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/settings/AppSettingsSurfaceRefreshAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/settings/AppSettingsDiagnosticsAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/settings/AppSettingsUpdateAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/settings/AppSettingsBindings.kt`
-- Test: `app/src/test/java/com/streamvault/app/settings/AppSettingsAdaptersTest.kt`
-
-**Interfaces:**
-- Consumes: `BackupFileBridge`, `CrashReportStore`, app update services, Watch Next, recommendations, TV-input manager/worker, official-build verifier, and recording player handoff.
-- Produces: the exact feature interfaces defined in the spec and app Hilt bindings for ViewModel-injected ports.
-
-- [ ] **Step 1: Write failing adapter delegation tests**
-
-Use internal operation interfaces in the app adapter file so tests assert delegation without Android singletons. Cover at least backup candidate mapping, surface refresh ordering, diagnostics mapping, release/download mapping, and recording playback field preservation:
-
-```kotlin
-@Test
-fun recordingPlaybackAdapterPreservesRequestFields() {
- val request = SettingsRecordingPlaybackRequest(
- streamUrl = "content://recording/7",
- title = "News",
- internalId = 7L,
- providerId = 3L,
- contentType = "MOVIE",
- )
- platformHost.playRecording(request)
- assertThat(playbackOperations.requests).containsExactly(request)
-}
-```
-
-- [ ] **Step 2: Run adapter tests to verify red**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.settings.AppSettingsAdaptersTest" --console=plain
-```
-
-Expected: compilation fails because settings API types/adapters do not exist.
-
-- [ ] **Step 3: Define immutable feature value types and interfaces**
-
-Implement the spec signatures. `SettingsBackupFileHost` must cover the current bridge behavior without exposing app types:
-
-```kotlin
-interface SettingsBackupFileHost {
- val jsonMimeType: String
- fun rememberManagedExport(uri: Uri)
- fun listManagedBackups(): List<SettingsBackupFileCandidate>
- fun listPickerFreeBackups(): List<SettingsBackupFileCandidate>
- fun listBackups(directory: File): List<SettingsBackupFileCandidate>
- fun createShareExportFile(): File
- fun createPickerFreeExportUri(): Uri?
- fun finishPickerFreeExport(uri: Uri, success: Boolean): Boolean
- fun createExportFile(directory: File): File
- fun delete(candidate: SettingsBackupFileCandidate): Boolean
- fun providerUri(file: File): Uri
-}
-```
-
-`SettingsBackupFileCandidate` contains `uri`, `displayName`, `lastModifiedMs`, and `sizeBytes`. Update types mirror every field consumed by `SettingsAppUpdateActions`. `SettingsAppUpdatePort` also exposes
-`fun isRemoteVersionNewer(remoteVersionCode: Int?, remoteVersionName: String, remotePublishedAt: String?): Boolean`; the app adapter delegates to the existing build/channel-aware policy. Feature-owned `SettingsUpdateCheckPolicy` preserves the current 24-hour success interval and 15-minute failure backoff, while feature-owned `SettingsUpdateActionState` and action selection preserve the current download/install decisions.
-
-- [ ] **Step 4: Implement app adapters with no new policy**
-
-Map app values field-for-field. `AppSettingsSurfaceRefreshAdapter` delegates to current Watch Next, recommendation, and TV-input operations. `AppSettingsUpdateAdapter` delegates to current checker/installer and retains their exact errors. Bind `SettingsSurfaceRefreshPort`, `SettingsDiagnosticsPort`, and `SettingsAppUpdatePort` from an app Hilt module; pass `SettingsPlatformHost` from `AppNavHost` because it performs route-owned Activity operations.
-
-- [ ] **Step 5: Verify green and boundary safety**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.settings.AppSettingsAdaptersTest" :feature:settings:verifyFeatureSettingsBoundary :app:compileDebugKotlin --console=plain --warning-mode=none
-```
-
-Expected: adapter tests pass and feature source contains no app reference.
-
-- [ ] **Step 6: Commit contracts and adapters**
-
-```powershell
-git add feature/settings/src/main/java/com/streamvault/feature/settings/api app/src/main/java/com/streamvault/app/settings app/src/test/java/com/streamvault/app/settings
-git commit -m "refactor: add settings platform service ports"
-```
-
-### Task 4: Transfer backup-preview ownership without changing provider API
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsBackupImportPreviewDialog.kt` -> `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsBackupImportPreviewDialog.kt`
-- Create: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsBackupPreviewTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Do not modify: `feature/provider/src/main/java/com/streamvault/feature/provider/api/ProviderBackupPreviewContent.kt`
-
-**Interfaces:**
-- Consumes: `BackupPreview`, `BackupImportPlan`, conflict strategy, import toggles, busy state, dismiss and confirm callbacks.
-- Produces: public settings-owned `BackupImportPreviewDialog(...)` invoked by app composition; provider request remains byte-for-byte unchanged.
-
-- [ ] **Step 1: Add the connected callback/semantics test first**
-
-Render the dialog with a populated preview and assert section labels, strategy selection, one import toggle, dismiss, and confirm callbacks. Name the root semantics tag `settings.backup.preview` only if the existing dialog already has an equivalent stable tag; otherwise assert existing text/content descriptions without adding semantics.
-
-- [ ] **Step 2: Run the test to verify red**
-
-```powershell
-.\gradlew.bat :feature:settings:compileDebugAndroidTestKotlin --console=plain
-```
-
-Expected: compilation fails because the dialog is not feature-owned.
-
-- [ ] **Step 3: Move the dialog and its exact resources**
-
-Use `git mv`, update package/R/device imports, and preserve layout, focus, row order, callbacks, and strings. Use `core.ui.device.rememberIsTelevisionDevice`.
-
-- [ ] **Step 4: Rewire only the app renderer**
-
-Keep the current `ProviderBackupPreviewRequest` mapping in `AppNavHost`; change only the dialog import to `com.streamvault.feature.settings.presentation.BackupImportPreviewDialog`. Confirm all request fields remain mapped exactly once.
-
-- [ ] **Step 5: Verify provider compatibility**
-
-```powershell
-.\gradlew.bat :feature:provider:testDebugUnitTest :feature:provider:compileDebugKotlin :feature:settings:compileDebugAndroidTestKotlin :app:testDebugUnitTest --tests "com.streamvault.app.navigation.*" --console=plain --warning-mode=none
-```
-
-Expected: provider code compiles unchanged and app navigation tests pass.
-
-- [ ] **Step 6: Commit the seam**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt feature/settings app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsBackupImportPreviewDialog.kt
-git commit -m "refactor: move backup preview rendering to settings feature"
-```
-
-### Task 5: Move parental-control presentation and route state
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/settings/parental/ParentalControlGroupViewModel.kt` -> `feature/settings/src/main/java/com/streamvault/feature/settings/parental/ParentalControlGroupViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/settings/parental/ParentalControlGroupScreen.kt` -> `feature/settings/src/main/java/com/streamvault/feature/settings/parental/ParentalControlGroupScreen.kt`
-- Create: `feature/settings/src/test/java/com/streamvault/feature/settings/parental/ParentalControlGroupViewModelTest.kt`
-
-**Interfaces:**
-- Consumes: `SavedStateHandle["providerId"]`, `CategoryRepository`, temporary `PreferencesRepository`, core search/PIN/shell components.
-- Produces: feature-owned parental state/ViewModel/screen with unchanged category keys, pending changes, hide/show behavior, messages, focus, and callbacks.
-
-- [ ] **Step 1: Write focused ViewModel policy tests before the move**
-
-Cover adult categories remaining protected, non-adult pending toggles, reset, search, hidden counts, save failure message, and provider ID preservation. The adult test must assert real state:
-
-```kotlin
-@Test
-fun adultCategoryCannotBeUnprotected() = runTest {
- val adult = category(id = 9L, isAdult = true, isUserProtected = false)
- repository.categories.value = listOf(adult)
- viewModel.toggleCategoryProtection(adult)
- assertThat(viewModel.uiState.first { !it.isLoading }.categories.single().isProtected).isTrue()
-}
-```
-
-- [ ] **Step 2: Run the feature test to verify red**
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest --tests "com.streamvault.feature.settings.parental.ParentalControlGroupViewModelTest" --console=plain
-```
-
-Expected: compilation fails because the parental classes remain in app.
-
-- [ ] **Step 3: Move the two files mechanically**
-
-Use core components and feature resources. Do not change string text, content descriptions, lazy-list keys, focus requesters, current mode/type state, or Hilt/SavedState behavior.
-
-- [ ] **Step 4: Verify green**
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest --tests "com.streamvault.feature.settings.parental.ParentalControlGroupViewModelTest" :feature:settings:compileDebugKotlin --console=plain --warning-mode=none
-```
-
-- [ ] **Step 5: Commit parental ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/settings/parental feature/settings/src/main/java/com/streamvault/feature/settings/parental feature/settings/src/test/java/com/streamvault/feature/settings/parental
-git commit -m "refactor: move parental controls to settings feature"
-```
-
-### Task 6: Move settings state, policies, actions, observers, and unit tests
-
-**Files:**
-- Move: all non-composable action/model/observer/formatter files listed in `validation/phase5_settings/source-inventory.txt`, including `SettingsUiStateModel.kt`, `SettingsOperationalModels.kt`, `SettingsPreferenceModels.kt`, `SettingsPreferenceSnapshotMapper.kt`, `RemoteShortcutSettingsModels.kt`, `RemoteShortcutSettingsSupport.kt`, `SettingsBackupActions.kt`, `SettingsDriveBackupActions.kt`, `SettingsProviderActions.kt`, `SettingsRecordingActions.kt`, `SettingsSyncActions.kt`, `SettingsEpgActions.kt`, `SettingsObserverRegistrations.kt`, `SettingsDerivedStateObservers.kt`, `SettingsGuideDefaultCategoryBindings.kt`, `SettingsStateBindings.kt`, `SettingsAppUpdateActions.kt`, `SettingsAppUpdateModels.kt`, `SettingsAppUpdateFormatting.kt`, `SettingsFormatting.kt`, and `InternetSpeedTestRunner.kt` into `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/`.
-- Move: all 12 paths in `validation/phase5_settings/test-inventory.txt` into `feature/settings/src/test/java/com/streamvault/feature/settings/presentation/`.
-- Modify: moved sources to consume Task 2 contracts and Task 3 ports.
-
-**Interfaces:**
-- Consumes: unchanged domain repositories/managers/use cases, ledgered `:data` types, settings ports, shared domain display enums.
-- Produces: independently testable settings state/action/observer layer with the existing method and state-field surface.
-
-- [ ] **Step 1: Move one unit-test cluster first and verify red**
-
-Start with `SettingsBackupActionsTest.kt`, `SettingsDriveBackupActionsTest.kt`, and `SettingsAppUpdateActionsTest.kt`. Change packages/imports only, then run:
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest --tests "com.streamvault.feature.settings.presentation.SettingsBackupActionsTest" --tests "com.streamvault.feature.settings.presentation.SettingsDriveBackupActionsTest" --tests "com.streamvault.feature.settings.presentation.SettingsAppUpdateActionsTest" --console=plain
-```
-
-Expected: compilation fails because production actions are still app-owned.
-
-- [ ] **Step 2: Move the matching production cluster and verify green**
-
-Use `git mv`; replace app update classes with `SettingsAppUpdatePort` value types and replace TV managers with `SettingsSurfaceRefreshPort`. Preserve state updates, coroutine launch order, partial-import checkpoint behavior, and messages.
-
-Run the same focused command. Expected: all focused tests pass.
-
-- [ ] **Step 3: Repeat test-first for remaining inventory tests**
-
-Move the remaining nine test files, run `:feature:settings:testDebugUnitTest` to observe missing production symbols, then move the corresponding production helpers. Do not weaken assertions or replace real state assertions with mock-interaction-only assertions.
-
-- [ ] **Step 4: Run the complete moved unit suite and app compile**
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest :app:compileDebugUnitTestKotlin :feature:settings:verifyFeatureSettingsBoundary --console=plain --warning-mode=none
-```
-
-Expected: all 12 moved test classes pass from the feature; boundary scan reports only ledger-approved module dependencies and zero forbidden source imports.
-
-- [ ] **Step 5: Commit state/action ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/settings app/src/test/java/com/streamvault/app/ui/screens/settings feature/settings
-git commit -m "refactor: move settings state and actions to feature"
-```
-
-### Task 7: Move `SettingsViewModel` and connect operational adapters
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsViewModel.kt` -> `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsViewModel.kt`
-- Modify: `app/src/main/java/com/streamvault/app/settings/AppSettingsBindings.kt`
-- Test: `feature/settings/src/test/java/com/streamvault/feature/settings/presentation/SettingsViewModelBoundaryTest.kt`
-
-**Interfaces:**
-- Consumes: Task 3 ports, Task 6 state/actions, existing Hilt bindings for domain/data/player dependencies.
-- Produces: feature-owned Hilt ViewModel with the same public actions and `StateFlow<SettingsUiState>`.
-
-- [ ] **Step 1: Write the constructor-boundary source test**
-
-```kotlin
-@Test
-fun viewModelUsesPortsInsteadOfAppImplementations() {
- val source = File("src/main/java/com/streamvault/feature/settings/presentation/SettingsViewModel.kt")
- assertThat(source.isFile).isTrue()
- val text = source.readText()
- assertThat(text).contains("SettingsSurfaceRefreshPort")
- assertThat(text).contains("SettingsDiagnosticsPort")
- assertThat(text).contains("SettingsAppUpdatePort")
- assertThat(text).doesNotContain("com.streamvault.app")
-}
-```
-
-- [ ] **Step 2: Run to verify red**
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest --tests "com.streamvault.feature.settings.presentation.SettingsViewModelBoundaryTest" --console=plain
-```
-
-Expected: failure because the feature ViewModel file does not exist.
-
-- [ ] **Step 3: Move the ViewModel mechanically**
-
-Preserve all methods, observer registration order, StateFlow sharing policies, initial values, coroutine scopes, and injected domain/data/player dependencies. Replace only app implementations with Task 3 ports and feature R/build-info values.
-
-- [ ] **Step 4: Verify Hilt and unit compilation**
-
-```powershell
-.\gradlew.bat :feature:settings:kspDebugKotlin :feature:settings:testDebugUnitTest :app:compileDebugKotlin --console=plain --warning-mode=none
-```
-
-Expected: Hilt resolves app adapter bindings at app assembly and the feature ViewModel compiles independently against interfaces.
-
-- [ ] **Step 5: Commit ViewModel ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/settings/SettingsViewModel.kt app/src/main/java/com/streamvault/app/settings feature/settings
-git commit -m "refactor: move settings view model to feature"
-```
-
-### Task 8: Move remaining Settings UI and locale resources
-
-**Files:**
-- Move: every remaining production path under `app/src/main/java/com/streamvault/app/ui/screens/settings/` listed in `validation/phase5_settings/source-inventory.txt` into `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/`, preserving the `parental/` destination already moved.
-- Create/Modify: `feature/settings/src/main/res/values/strings.xml`
-- Create/Modify: `feature/settings/src/main/res/values-ar/strings.xml`, `values-cs/strings.xml`, `values-da/strings.xml`, `values-de/strings.xml`, `values-el/strings.xml`, `values-es/strings.xml`, `values-fi/strings.xml`, `values-fr/strings.xml`, `values-hu/strings.xml`, `values-in/strings.xml`, `values-it/strings.xml`, `values-iw/strings.xml`, `values-ja/strings.xml`, `values-ko/strings.xml`, `values-nb/strings.xml`, `values-nl/strings.xml`, `values-pl/strings.xml`, `values-pt/strings.xml`, `values-ro/strings.xml`, `values-ru/strings.xml`, `values-sv/strings.xml`, `values-tr/strings.xml`, `values-uk/strings.xml`, `values-vi/strings.xml`, `values-zh/strings.xml`
-- Modify: corresponding app locale files only after reference scans prove each moved key is feature-exclusive.
-- Create: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsNavigationAndDialogTest.kt`
-- Modify/Split: `app/src/androidTest/java/com/streamvault/app/ui/PremiumRouteGoldenTest.kt`
-
-**Interfaces:**
-- Consumes: feature ViewModel/state/actions, core shell/UI primitives, platform host, app-supplied `List<UiDestination>` and route callback.
-- Produces: complete feature-owned Settings UI with unchanged focus, semantics, rows, dialogs, launchers, and visual resources.
-
-- [ ] **Step 1: Add a focused connected test before moving the root screen**
-
-Cover the Settings destination semantic, selected section focus, navigation between at least two sections, opening/dismissing one value dialog, and Back restoration. Run compile first:
-
-```powershell
-.\gradlew.bat :feature:settings:compileDebugAndroidTestKotlin --console=plain
-```
-
-Expected: compilation fails because `SettingsScreen` is not in the feature.
-
-- [ ] **Step 2: Move UI files mechanically**
-
-Use `git mv`. Replace app shell with `CoreAppScreenScaffold`, passed `UiDestination` values, and `onTopLevelRouteRequested`. Replace app Search/PIN/empty/time/device imports with Task 2/core equivalents. Pass `SettingsPlatformHost` for recording playback, backup files/share, crash sharing, removable storage, build info, and official-build status. Preserve every Activity Result contract and callback order.
-
-- [ ] **Step 3: Move resources locale by locale**
-
-Use `validation/phase5_settings/resource-inventory.txt` as the candidate set. For each key, scan all non-settings source/tests/resources before removing it from app:
-
-```powershell
-rg -n "R\.(string|plurals)\.<key>|name=\"<key>\"" app feature core benchmark -g '*.kt' -g '*.xml'
-```
-
-Copy the exact default and translated values. Keep shared keys in app or duplicate them when another owner remains. Do not rename keys or rewrite translations.
-
-- [ ] **Step 4: Move/split connected golden ownership**
-
-Move the Settings route portion of `saved_guide_and_settings_routes_matchGolden` into the feature connected test while leaving Guide coverage in app. Reuse the checked-in Settings baseline rather than recording a new self-baseline. Keep the recording-disabled missing-golden guard.
-
-- [ ] **Step 5: Compile and test the full UI**
-
-```powershell
-.\gradlew.bat :feature:settings:compileDebugKotlin :feature:settings:compileDebugAndroidTestKotlin :feature:settings:testDebugUnitTest :app:compileDebugKotlin --console=plain --warning-mode=none
-```
-
-Expected: all moved sources/resources compile and no `com.streamvault.app` import appears under feature main.
-
-- [ ] **Step 6: Commit UI/resources separately**
-
-```powershell
-git add app/src/main app/src/androidTest feature/settings/src/main feature/settings/src/androidTest
-git commit -m "refactor: move settings presentation to feature"
-```
-
-### Task 9: Move Settings graph registration and preserve route compatibility
-
-**Files:**
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/navigation/SettingsRoutePatterns.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/navigation/SettingsGraph.kt`
-- Create: `feature/settings/src/test/java/com/streamvault/feature/settings/navigation/SettingsRoutePatternsTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/graph/SystemGraph.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/FeatureGraphBoundaryTest.kt`
-- Test: existing `AppRouteCodecTest.kt` and `ExternalDestinationTest.kt`
-
-**Interfaces:**
-- Consumes: Task 3 platform host, Task 8 screens, `NavigationActions`, `AppDestination`, `UiDestination` list, app top-level route callback.
-- Produces: `SettingsRoutePatterns` and `registerSettingsGraph(actions, platformHost, navigationDestinations, onTopLevelRouteRequested, onTopLevelDestinationRequested)`.
-
-- [ ] **Step 1: Write route-pattern tests first**
-
-```kotlin
-@Test
-fun routePatternsRemainCompatible() {
- assertThat(SettingsRoutePatterns.SETTINGS).isEqualTo("settings")
- assertThat(SettingsRoutePatterns.SETTINGS_DESTINATION)
- .isEqualTo("settings?backupUri={backupUri}")
- assertThat(SettingsRoutePatterns.PARENTAL_CONTROL_GROUPS)
- .isEqualTo("parental_control_groups/{providerId}")
-}
-```
-
-- [ ] **Step 2: Run to verify red**
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest --tests "com.streamvault.feature.settings.navigation.SettingsRoutePatternsTest" --console=plain
-```
-
-Expected: unresolved `SettingsRoutePatterns`.
-
-- [ ] **Step 3: Implement route constants and controller-free graph**
-
-Copy the existing `SystemGraph` Settings and parental composable blocks. Preserve `backupUri` blank filtering, provider ID type, `dropUnlessResumed`, `launchSingleTop`, current route, add/edit callbacks, parental callbacks, and Back. Do not copy Downloads or Plugins.
-
-- [ ] **Step 4: Register the feature from `AppNavHost`**
-
-Build/pass current shell `UiDestination` values in app, supply `AppSettingsPlatformHost`, and call `registerSettingsGraph`. Keep the provider preview adapter pointing to the settings dialog. Remove only Settings and parental blocks/imports from `SystemGraph` after app compilation succeeds.
-
-- [ ] **Step 5: Extend graph-boundary coverage and verify**
-
-Add the settings navigation directory to `FeatureGraphBoundaryTest` and require `SettingsGraph.kt`. Run:
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest :app:testDebugUnitTest --tests "com.streamvault.app.navigation.AppRouteCodecTest" --tests "com.streamvault.app.navigation.ExternalDestinationTest" --tests "com.streamvault.app.navigation.FeatureGraphBoundaryTest" :app:assembleDebug --console=plain --warning-mode=none
-```
-
-Expected: route compatibility and feature graph tests pass; the app assembles with one Settings route owner.
-
-- [ ] **Step 6: Commit graph ownership**
-
-```powershell
-git add feature/settings/src/main/java/com/streamvault/feature/settings/navigation feature/settings/src/test/java/com/streamvault/feature/settings/navigation app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/navigation
-git commit -m "refactor: register settings graph from feature"
-```
-
-### Task 10: Remove legacy ownership and run automated structural gates
-
-**Files:**
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-- Create: `validation/phase5_settings/task10-automated-validation.md`
-- Modify: `app/build.gradle.kts` only for confirmed-obsolete dependencies/tasks.
-- Modify: `feature/settings/build.gradle.kts` for final exact dependency/runtime report wiring.
-
-**Interfaces:**
-- Consumes: completed feature ownership and inventory.
-- Produces: one production owner, exact transitional dependency evidence, source-count evidence, independent checks, app integration checks, and refreshed Graphify output.
-
-- [ ] **Step 1: Fail on legacy or forbidden ownership**
-
-Run:
-
-```powershell
-rg -n "com\.streamvault\.app\.ui\.screens\.settings" app feature core domain -g '*.kt' -g '*.java'
-rg -n "com\.streamvault\.app|NavHostController|NavController|MainActivity|com\.streamvault\.feature\.(provider|playback)" feature/settings/src/main -g '*.kt' -g '*.java'
-rg -n '^import com\.streamvault\.data\.' feature/settings/src/main -g '*.kt' | Sort-Object
-```
-
-Expected: first two scans return no results; every third-scan type matches the settings ledger exactly.
-
-- [ ] **Step 2: Remove only confirmed-obsolete app resources/dependencies**
-
-Check every candidate with `rg` and Gradle dependency reports. Do not remove `:data`, `:player`, provider, playback, Room, OkHttp, WorkManager, or other app dependencies while any app consumer remains.
-
-- [ ] **Step 3: Run feature checks**
-
-```powershell
-.\gradlew.bat :feature:settings:verifyFeatureSettingsBoundary :feature:settings:testDebugUnitTest :feature:settings:lintDebug :feature:settings:check :feature:settings:assembleDebug --console=plain --warning-mode=none
-```
-
-Expected: every command exits 0. Record test counts, lint warnings, boundary report, dependency list, and durations.
-
-- [ ] **Step 4: Run app and neighboring-feature integration checks**
-
-```powershell
-.\gradlew.bat :core:navigation:check :core:ui:check :domain:test :feature:playback:check :feature:provider:check :app:testDebugUnitTest :app:assembleDebug --console=plain --warning-mode=none
-```
-
-Expected: commands exit 0 or exact pre-existing failures are recorded with evidence and the gate remains open. Do not attribute an existing failure to extraction without a baseline comparison.
-
-- [ ] **Step 5: Prove compile isolation**
-
-Apply and revert a comment-only edit in a settings production file, run `:feature:settings:compileDebugKotlin :app:compileDebugKotlin --dry-run` and a real profiled build, and record executed Kotlin/KSP tasks. Confirm no `:feature:playback:compile*` or `:feature:provider:compile*` task executes because of the edit.
-
-- [ ] **Step 6: Refresh Graphify**
-
-```powershell
-graphify update .
-```
-
-Expected: graph rebuild succeeds and settings implementation nodes point to `feature/settings`, not the old app package. Record node/edge/community counts.
-
-- [ ] **Step 7: Commit cleanup/evidence**
-
-```powershell
-git add app feature/settings docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_settings graphify-out
-git commit -m "chore: verify settings feature ownership"
-```
-
-### Task 11: Connected acceptance, measurements, profiles, and final report
-
-**Files:**
-- Create: `validation/phase5_settings/task11-runtime-validation.md`
-- Create: `validation/phase5_settings/build-after/README.md`
-- Create: `validation/phase5_settings/profile-validation.md`
-- Create: `docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md`
-- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`
-
-**Interfaces:**
-- Consumes: installed debug app, feature/app connected suites, pre/post refs, baseline-profile producer, all prior evidence.
-- Produces: honest Settings extraction status, rollback SHA/commits, automated/runtime/performance/profile evidence, and explicit open gates.
-
-- [x] **Step 1: Run focused connected suites on the TV emulator**
-
-```powershell
-.\gradlew.bat :feature:settings:connectedDebugAndroidTest :feature:provider:connectedDebugAndroidTest :app:connectedDebugAndroidTest --console=plain --warning-mode=none
-```
-
-Record device/AVD/API, per-class counts, XML result paths, screenshots, and every failure. Isolate reruns when a mixed suite times out; do not erase the mixed-run result.
-
-- [ ] **Step 2: Exercise Settings navigation/focus/dialog behavior**
-
-On a fresh debug APK, record Settings entry, section navigation, selected-section focus, dialog open/dismiss, Back restoration, add/edit provider handoff, parental route/return, touch/mouse where available, RTL, reduced motion, and accessibility semantics. Sanitize logs and screenshots.
-
-- [ ] **Step 3: Exercise backup/restore and provider preview compatibility**
-
-Cover picker launch, managed local backup, folder flow, share, preview selection, conflict strategy, dismiss/confirm, partial-import checkpoint, restore synchronization chooser, and provider setup preview rendering. Cover USB/Drive/account/provider-completion only when hardware/accounts/test data are available; otherwise list each as open.
-
-- [ ] **Step 4: Exercise parental, recording, EPG, provider, and update paths**
-
-Record parental search/protection/hide/PIN/save/reset, recording folder/browser/playback callback, EPG source/assignment dialogs, provider management/sync dialogs, and update check/download/install states that are safe and available. Never perform credentialed or destructive external operations without the existing test fixture/explicit authority.
-
-- [ ] **Step 5: Capture five paired build samples**
-
-Follow `performance-protocol.md` on clean committed pre/post refs with identical commands and host state. Report all samples, median, p95, task sets, daemon/cache state, and whether the 25% source-edit / 20% test-compile targets were demonstrated. If a comparable pre-ref cannot be constructed, keep the performance gate open.
-
-- [x] **Step 6: Run profile regeneration and stale-descriptor checks**
-
-```powershell
-.\gradlew.bat :app:generateBaselineProfile verifyBaselineProfileSources :app:assembleBeta :app:assembleRelease --console=plain --warning-mode=none
-rg -n 'com/streamvault/app/ui/screens/settings|com\.streamvault\.app\.ui\.screens\.settings' app/src/main/generated/baselineProfiles app/build -g '*.txt' -g '*.prof' -g '*.map'
-```
-
-Expected: profile tasks pass and stale app-settings descriptors are absent. Preserve the existing physical-device/release-approval caveats.
-
-- [x] **Step 7: Write the settings report**
-
-`COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md` must include ownership, public boundary, source/resource/test counts, exact ledger entries, automated commands/results, connected/manual results, provider preview compatibility, performance samples, profile status, rollback instructions, Graphify counts, known existing failures, and every open gate. State structural completion separately from runtime/performance acceptance.
-
-- [x] **Step 8: Update roadmap/grand-plan status without closing unrelated gates**
-
-Link the settings plan/report. Preserve the playback and provider open-gate text. Do not mark Phase 5 complete because settings structure passes.
-
-- [x] **Step 9: Run final verification before any completion claim**
-
-```powershell
-git diff --check
-.\gradlew.bat :feature:settings:check :feature:provider:check :feature:playback:check :app:testDebugUnitTest :app:assembleDebug --console=plain --warning-mode=none
-graphify update .
-git status --short
-```
-
-Read the full output and report the actual result. Do not claim a pass for any command not run fresh.
-
-- [x] **Step 10: Commit report and final evidence**
-
-```powershell
-git add docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md validation/phase5_settings graphify-out
-git commit -m "docs: report settings feature extraction"
-```
-
-## Exit criteria
-
-- `:feature:settings` owns all 71 inventoried production paths, 12 inventoried unit-test paths, parental controls, backup preview, resources, connected tests, and Settings graph registration, subject to documented shared-resource exceptions.
-- `:app` owns only Settings platform adapters, route compatibility/external intents, root graph registration, and provider-to-settings preview adaptation.
-- Settings and parental route strings/arguments are unchanged.
-- Provider backup-preview request type and callback mapping are unchanged.
-- Feature boundary, independent tests, lint/check/assemble, app navigation tests, app unit tests, and app assembly have fresh evidence.
-- No feature main source imports app, root controllers, `MainActivity`, provider implementation, or playback implementation.
-- All temporary data types and the concrete player audit candidate are documented.
-- Connected/manual/performance/profile outcomes and unavailable gates are recorded without converting open gates into passes.
-- Graphify reflects feature ownership.
diff --git a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
deleted file mode 100644
index a24b8dc3..00000000
--- a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
+++ /dev/null
@@ -1,1464 +0,0 @@
-# Live Feature Module Extraction Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Extract Home Live TV, categories, EPG, and preview presentation into an independently compiled `:feature:live` module without changing behavior or creating a feature-to-feature dependency.
-
-**Architecture:** `:feature:live` owns its routes, screens, ViewModels, preview UI, resources, tests, and graph registration. `:app` remains the composition root and adapts app/Playback implementations through live-owned ports, builds player requests, and composes the Playback-owned MultiView planner.
-
-**Tech Stack:** Kotlin, Android library modules, Jetpack Compose/TV Material, Navigation Compose, Hilt/KSP, coroutines/Flow, JUnit/Truth/Mockito, Robolectric, AndroidX Compose UI tests, Gradle/Kover, ADB, Macrobenchmark/Baseline Profile, Graphify.
-
-**Spec:** `docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md`
-
-**Implementation status (2026-08-29):** Tasks 0–1, the preview/platform port
-portion of Tasks 2–4, the Live presentation primitive set, HomeUiState, and
-the pure Guide presentation models and HomeViewModel are complete and committed.
-Home/Guide screen and ViewModel ownership, feature-owned resource migration,
-golden/runtime/performance gates, and legacy app cleanup remain open; this plan does not
-claim the Live slice or Phase 5 complete.
-
-Status update (2026-08-29): `HomeViewModel`, the sidebar/preview surface, the
-loading/preview host supporting composables, the live source switcher, Home
-quick-filter panel/chip row, the reusable EPG guide shortcut chip, the shared
-EPG guide-now ticker/provider, EPG search field/row, Home reorder top bar,
-Home channel row surface, Home channel-results header, Home category sidebar
-header, channel-content state host, channel-list host, and category-list host
-and hidden category/channel dialogs, the category options dialog, the
-quick-filter add dialog, delete-group dialog, rename-group dialog, M3U category
-organizer dialog, M3U series-assignment dialogs, EPG search overlay, guide
-category picker, compact guide-program dialog, guide control rows, EPG preview
-pane, guide toolbar, guide message state, hero badge, timeline header, grid
-rows/cells, grid host, EPG content host, focus reconciliation, Home layout
-metrics, and Home parental-lock policy are now feature-owned, with the options
-overlay and EPG-match dialog also feature-owned
-and the EPG guide category/channel lock policies, category-selection fallback
-policy, and schedule metrics now feature-owned
-and their feature checks are green. Home screen/dialog composition, the
-remaining live cards/rows, complete locale resource migration, and acceptance
-gates remain open.
-
-The Live-browse portion of remote shortcut dispatch is now feature-owned in
-`presentation/remote/LiveRemoteShortcutDispatch.kt`; the app retains only
-player-wide shortcut dispatch and imports the Live handler API at the Home
-composition boundary. Focused feature and app dispatch tests are green.
-
-Home no longer imports the app `Routes` object: Guide navigation uses the
-feature-owned `LiveRoutePatterns.EPG`, while MultiView navigation is supplied
-as an app composition callback. Dialog composition therefore carries no
-MultiView route constant and remains behaviorally unchanged.
-
-The Home screen also consumes the `LiveHomeScaffoldContent` port. The app
-graph supplies the existing top-bar `AppScreenScaffold` adapter, leaving shell
-layout and destination configuration in the composition root while the Live
-surface moves toward feature ownership.
-
-Home no longer depends directly on the Playback feature for MultiView. The
-planner UI and queue lookup are supplied through `LiveMultiViewPlannerContent`
-and `isChannelQueuedForMultiView`; the app graph remains responsible for
-constructing `MultiViewViewModel` and `MultiViewPlannerDialog`.
-
-The Home dialog host is now feature-owned as `LiveHomeDialogsHost`. Its
-Playback-dependent planner and app-owned Add-to-Group dialog are both injected
-through Live contracts; the required dialog labels are present in the feature
-resource namespace. The app graph supplies the two adapters.
-
-Route patterns were subsequently moved behind `LiveRoutePatterns`; the app
-codec still owns encode/decode compatibility and no route behavior changed.
-The feature-owned `registerLiveGraph` now owns Live destination argument
-registration; the app graph supplies existing screen content and performs
-typed player-request mapping. Pure guide lookup/time-format and Guide
-mode/density/reminder-message seams are also feature-owned. Home
-screen/dialog/sidebar and resource ownership are still open.
-
-## Global Constraints
-
-- Preserve the current working tree and unrelated changes; never reset, clean, delete, or rewrite unrelated work.
-- Scope is only `:feature:live`: Home Live TV, categories/channels, EPG/guide, preview presentation, and their required composition seams.
-- Do not start Catalog or System extraction and do not reopen completed Settings extraction work without a demonstrated blocker.
-- `:feature:live` project dependencies must be exactly `:core:navigation`, `:core:ui`, `:domain`, temporary ledgered `:data`, and audited `:player`.
-- `:feature:live` must not import `com.streamvault.app`, `MainActivity`, `NavController`, `NavHostController`, or any `com.streamvault.feature.*` implementation package.
-- `:app` remains the owner of `AppNavHost`, `AppRouteCodec`, external intents, payload transport, platform adapters, player-request construction, launchers, and lifecycle.
-- Do not change preview preparation/reprime, handoff timeout/release, player recovery, timeshift, HLS fallback, focus, input, route, or callback behavior.
-- Move files with history where practical; keep contracts, mechanical moves, graph wiring, cleanup, profiles, and acceptance evidence independently revertible.
-- Add a failing focused test before each production behavior or boundary change, confirm the expected failure, implement the minimum change, and rerun focused plus neighboring tests.
-- Generated Baseline/Startup Profiles are regenerated by the existing producer and never hand-edited.
-- After modifying code files, run `graphify update .`.
-- Keep Playback, Provider, and Settings open gates in their existing reports; do not claim Phase 5 complete.
-
----
-
-### Task 0: Freeze inventory, rollback point, baseline, and acceptance obligations
-
-**Files:**
-- Create: `validation/phase5_live/task0-inventory.md`
-- Create: `validation/phase5_live/performance-before.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-
-**Interfaces:**
-- Consumes: the current committed tree before any live extraction change.
-- Produces: an exact source/resource/dependency/test inventory, rollback SHA, baseline commands/results, and explicit open-gate list used by every later task.
-
-- [x] **Step 1: Prove the worktree baseline and record the rollback SHA**
-
-Run:
-
-```powershell
-git status --short
-git rev-parse HEAD
-git log -5 --oneline --decorate
-```
-
-Expected: status contains no unexplained live-extraction changes. Record the complete output in `validation/phase5_live/task0-inventory.md`; do not alter or discard unrelated entries.
-
-- [x] **Step 2: Record the exact move unit and source counts**
-
-Run:
-
-```powershell
-rg --files app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg app/src/test/java/com/streamvault/app/ui/screens/home app/src/test/java/com/streamvault/app/ui/screens/epg
-Get-ChildItem app/src/main/java/com/streamvault/app/ui/screens/home,app/src/main/java/com/streamvault/app/ui/screens/epg -Filter *.kt | ForEach-Object { "{0}`t{1}" -f $_.FullName,(Get-Content $_.FullName).Count }
-```
-
-Expected: five Home production files, eight EPG production files, and four focused unit-test files are listed with their current line counts.
-
-- [x] **Step 3: Record imports, resources, routes, Hilt seams, and external consumers**
-
-Run:
-
-```powershell
-rg -n "^import com\.streamvault\.(app|feature|core|domain|data|player)" app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg
-rg -n "R\.(string|plurals|drawable|color|dimen|array)\.[A-Za-z0-9_]+" app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg
-rg -n "HomeScreen|HomeViewModel|FullEpgScreen|EpgViewModel|GuideDateTime|PlayerTransparentGuideOverlay" app/src/main app/src/test app/src/androidTest feature core
-rg -n "LIVE_TV_DESTINATION|EPG_DESTINATION|registerLiveGraph" app/src/main core/navigation/src/main
-```
-
-Expected: the inventory identifies every app import, the 196-key initial resource set, every external consumer, both route patterns, and preview/MultiView bindings.
-
-- [x] **Step 4: Run fresh pre-extraction deterministic checks**
-
-Run:
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.ui.screens.home.HomeViewModelTest" --tests "com.streamvault.app.ui.screens.epg.EpgViewModelTest" --tests "com.streamvault.app.ui.screens.epg.GuideDateTimeTest" --tests "com.streamvault.app.ui.screens.epg.ProgramReminderIssueMessageTest" :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: exit 0. Record exact test counts, duration, warnings, and any existing failure verbatim rather than attributing it to future extraction work.
-
-- [x] **Step 5: Capture five pre-extraction baseline samples**
-
-Use an isolated committed snapshot of the rollback SHA. For each of five runs, touch only `HomeScreen.kt` for the source scenario and `HomeViewModelTest.kt` for the test scenario, then run:
-
-```powershell
-./gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none --profile
-./gradlew.bat :app:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none --profile
-```
-
-Expected: `performance-before.md` contains five wall times, Gradle profile paths, executed task sets, median, average, and p95 for each scenario. Restore only the timestamp/content probe inside the isolated snapshot.
-
-- [x] **Step 6: Record transitional dependencies and open neighboring gates**
-
-Add a `:feature:live` section to the ledger naming `PreferencesRepository` and `ProviderSyncStateSource`, their exact source sites, current responsibility, and Phase 7 replacement direction. Record that Playback, Provider, and Settings acceptance/performance gates remain governed by their existing reports.
-
-- [x] **Step 7: Commit the inventory**
-
-```powershell
-git add validation/phase5_live/task0-inventory.md validation/phase5_live/performance-before.md docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
-git commit -m "docs(live): record phase 5 extraction baseline"
-```
-
----
-
-### Task 1: Create `:feature:live` and prove a fail-closed boundary
-
-**Files:**
-- Modify: `settings.gradle.kts`
-- Modify: `app/build.gradle.kts`
-- Create: `feature/live/build.gradle.kts`
-- Create: `feature/live/src/main/AndroidManifest.xml`
-- Create: `feature/live/src/main/res/values/strings.xml`
-- Create: `feature/live/src/test/resources/boundary-fixtures/AppPackageImport.kt`
-- Create: `feature/live/src/test/resources/boundary-fixtures/FullyQualifiedAppReference.kt`
-- Create: `feature/live/src/test/resources/boundary-fixtures/MainActivityReference.java`
-- Create: `feature/live/src/test/resources/boundary-fixtures/RootNavigation.kt`
-- Create: `feature/live/src/test/resources/boundary-fixtures/RootNavigation.java`
-- Create: `feature/live/src/test/resources/boundary-fixtures/PlaybackFeatureImport.kt`
-- Create: `feature/live/src/test/resources/boundary-fixtures/SettingsFeatureImport.java`
-- Create: `feature/live/src/test/resources/boundary-fixtures/ProviderFeatureImport.kt`
-- Modify: root Kover/coverage aggregation file used by current feature modules
-
-**Interfaces:**
-- Consumes: exact dependency policy from the spec.
-- Produces: `:feature:live` and `verifyFeatureLiveBoundary`, which rejects unapproved project dependencies and forbidden Kotlin/Java source references.
-
-- [x] **Step 1: Add the module scaffold and app dependency**
-
-Add `include(":feature:live")`, `implementation(project(":feature:live"))`, namespace `com.streamvault.feature.live`, `compileSdk = 36`, `minSdk = 25`, Java/Kotlin 17, Compose, Hilt/KSP, Kover, and the same test libraries/configuration used by `:feature:settings`.
-
-The only project dependencies in `feature/live/build.gradle.kts` are:
-
-```kotlin
-implementation(project(":core:navigation"))
-implementation(project(":core:ui"))
-implementation(project(":domain"))
-implementation(project(":data"))
-implementation(project(":player"))
-```
-
-- [x] **Step 2: Add a deliberate forbidden source probe**
-
-Create `feature/live/src/main/java/com/streamvault/feature/live/BoundaryProbe.kt`:
-
-```kotlin
-package com.streamvault.feature.live
-
-import com.streamvault.app.MainActivity
-
-internal typealias BoundaryProbe = MainActivity
-```
-
-- [x] **Step 3: Implement the boundary verifier and run RED**
-
-Use the Settings boundary task structure with these tokens:
-
-```kotlin
-val forbiddenFeatureLiveSourceTokens = listOf(
- "import com.streamvault.app",
- "com.streamvault.app",
- "import com.streamvault.feature.playback",
- "import com.streamvault.feature.provider",
- "import com.streamvault.feature.settings",
- "MainActivity",
- "NavHostController",
- "NavController",
-)
-```
-
-Run:
-
-```powershell
-./gradlew.bat :feature:live:verifyFeatureLiveBoundary --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: FAIL naming `BoundaryProbe.kt` and both the app import and `MainActivity` tokens.
-
-- [x] **Step 4: Remove only the probe and run GREEN**
-
-Delete `BoundaryProbe.kt` with `apply_patch`, then run the same command.
-
-Expected: PASS; the report lists exactly the five approved project dependencies, no main-source violations, and detections for all Kotlin/Java fixtures.
-
-- [x] **Step 5: Attach the verifier to module checks**
-
-Make `check` and all module `Test` tasks depend on `verifyFeatureLiveBoundary`. Add the feature to existing Kover aggregation without changing thresholds.
-
-- [x] **Step 6: Verify the empty module and app dependency graph**
-
-```powershell
-./gradlew.bat :feature:live:check :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: exit 0 and no compilation of Playback, Provider, or Settings source caused by live source.
-
-- [x] **Step 7: Commit the boundary**
-
-```powershell
-git add settings.gradle.kts app/build.gradle.kts feature/live
-git add build.gradle.kts
-git commit -m "build(live): add isolated feature module"
-```
-
----
-
-### Task 2: Add live route and playback-request contracts test-first
-
-**Files:**
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/navigation/LiveRoutePatterns.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/navigation/LivePlaybackRequests.kt`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/navigation/LiveRoutePatternsTest.kt`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/navigation/LivePlaybackRequestsTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/AppRouteCodecTest.kt`
-
-**Interfaces:**
-- Consumes: `AppDestination`, `Channel`, and `Program`.
-- Produces: exact route constants plus `LiveChannelPlaybackRequest` and `LiveArchivePlaybackRequest` for app-owned player mapping.
-
-- [x] **Step 1: Write route compatibility tests**
-
-```kotlin
-class LiveRoutePatternsTest {
- @Test fun `live route patterns remain compatibility stable`() {
- assertThat(LiveRoutePatterns.LIVE_TV).isEqualTo("live_tv")
- assertThat(LiveRoutePatterns.LIVE_TV_DESTINATION)
- .isEqualTo("live_tv?categoryId={categoryId}")
- assertThat(LiveRoutePatterns.EPG).isEqualTo("epg")
- assertThat(LiveRoutePatterns.EPG_DESTINATION).isEqualTo(
- "epg?categoryId={categoryId}&anchorTime={anchorTime}&favoritesOnly={favoritesOnly}"
- )
- }
-}
-```
-
-Run:
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.navigation.LiveRoutePatternsTest" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: FAIL because `LiveRoutePatterns` does not exist.
-
-- [x] **Step 2: Implement the exact route constants and run GREEN**
-
-Implement the four constants exactly as asserted. Rerun the focused test; expected PASS.
-
-- [x] **Step 3: Write playback-request value tests**
-
-Define tests that construct a real `Channel`/`Program` fixture and assert every field survives construction:
-
-```kotlin
-val request = LiveArchivePlaybackRequest(
- channel = channel,
- program = program,
- categoryId = 12L,
- isVirtual = true,
- combinedProfileId = 34L,
- returnDestination = AppDestination.Guide(12L, 1_700_000_000_000L, true),
-)
-assertThat(request.channel).isSameInstanceAs(channel)
-assertThat(request.program).isSameInstanceAs(program)
-assertThat(request.returnDestination).isEqualTo(AppDestination.Guide(12L, 1_700_000_000_000L, true))
-```
-
-Run the test and expect a missing-type compilation failure.
-
-The request value types were introduced with the feature contracts before this
-checkpoint. `LivePlaybackRequestContractTest` now locks channel and archive
-field identity, virtual/combined-source metadata, and Guide return-route
-preservation; the focused suite is green.
-
-- [x] **Step 4: Implement the immutable request values**
-
-```kotlin
-data class LiveChannelPlaybackRequest(
- val channel: Channel,
- val categoryId: Long?,
- val providerId: Long?,
- val isVirtual: Boolean,
- val combinedProfileId: Long?,
- val combinedSourceFilterProviderId: Long?,
- val returnDestination: AppDestination,
-)
-
-data class LiveArchivePlaybackRequest(
- val channel: Channel,
- val program: Program,
- val categoryId: Long,
- val isVirtual: Boolean,
- val combinedProfileId: Long?,
- val returnDestination: AppDestination,
-)
-```
-
-Rerun both feature tests; expected PASS.
-
-- [x] **Step 5: Make app compatibility constants delegate to the feature**
-
-Replace only the four duplicated app constants with `LiveRoutePatterns` references. Add assertions to `AppRouteCodecTest` for `AppDestination.LiveTv` and all Guide argument combinations.
-
-Run:
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest :app:testDebugUnitTest --tests "com.streamvault.app.navigation.AppRouteCodecTest" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS with unchanged encoded routes.
-
-- [x] **Step 6: Commit the contracts**
-
-```powershell
-git add feature/live/src/main/java/com/streamvault/feature/live/navigation feature/live/src/test/java/com/streamvault/feature/live/navigation app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt app/src/test/java/com/streamvault/app/navigation/AppRouteCodecTest.kt
-git commit -m "feat(live): define route and playback request contracts"
-```
-
----
-
-### Task 3: Define preview, surface, and MultiView ports
-
-**Files:**
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/api/LivePreviewPorts.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/api/LiveSurfaceRefreshPort.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/api/LiveMultiViewContracts.kt`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/api/LivePortContractTest.kt`
-
-**Interfaces:**
-- Consumes: `Channel`, `StreamInfo`, domain `Result`, `PlayerEngine`, Compose, and `Flow`.
-- Produces: `LivePreviewOrigin`, `LivePreviewSession`, `LivePreviewHandoffPort`, `LivePreviewStreamPreparer`, `LiveSurfaceRefreshPort`, `LiveMultiViewStatus`, `LiveMultiViewStatusPort`, and `LiveMultiViewPlannerContent`.
-
-- [x] **Step 1: Write the compile-contract test**
-
-The test provides fakes and verifies the desired APIs can be used without app or Playback imports:
-
-```kotlin
-private class FakeHandoffPort : LivePreviewHandoffPort {
- override val reverseHandoffOrigin = MutableStateFlow<LivePreviewOrigin?>(null)
- override fun registerPreviewSession(channel: Channel, streamInfo: StreamInfo, engine: PlayerEngine, origin: LivePreviewOrigin) = Unit
- override fun beginFullscreenHandoff(channelId: Long, engine: PlayerEngine?) = true
- override fun consumeReverseHandoff(origin: LivePreviewOrigin): LivePreviewSession? = null
- override fun clear(engine: PlayerEngine?) = Unit
-}
-
-@Test fun `multiview defaults preserve four slot layout`() {
- assertThat(LiveMultiViewStatus()).isEqualTo(LiveMultiViewStatus(channelCount = 0, slotCapacity = 4))
-}
-```
-
-Run the focused test; expected missing-contract compilation failure.
-
-- [x] **Step 2: Implement the preview contracts exactly as specified**
-
-Use `Flow<LivePreviewOrigin?>` for reverse notifications so adapters do not create a new unmanaged coroutine scope. Use domain `Result<StreamInfo>` for preparation results. Do not include timeout, retry, release, or player-policy methods.
-
-- [x] **Step 3: Implement surface and MultiView contracts**
-
-Use `Flow<LiveMultiViewStatus>` and the exact composable typealias from the spec. Keep `slotCapacity` defaulted to four, matching `MultiViewManager.MAX_SLOTS` without importing it.
-
-- [x] **Step 4: Run GREEN and boundary verification**
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.api.LivePortContractTest" :feature:live:verifyFeatureLiveBoundary --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS and no feature/app imports.
-
-- [x] **Step 5: Commit the ports**
-
-```powershell
-git add feature/live/src/main/java/com/streamvault/feature/live/api feature/live/src/test/java/com/streamvault/feature/live/api
-git commit -m "feat(live): add preview and platform ports"
-```
-
----
-
-### Task 4: Implement app adapters and Hilt bindings with delegation tests
-
-**Files:**
-- Create: `app/src/main/java/com/streamvault/app/live/AppLivePreviewHandoffAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/live/AppLivePreviewStreamPreparer.kt`
-- Create: `app/src/main/java/com/streamvault/app/live/AppLiveSurfaceRefreshAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/live/AppLiveMultiViewStatusAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/live/AppLiveModule.kt`
-- Create: `app/src/test/java/com/streamvault/app/live/AppLiveAdaptersTest.kt`
-
-**Interfaces:**
-- Consumes: Task 3 ports plus existing `LivePreviewHandoffManager`, `StreamVaultPluginManager`, `TvInputChannelSyncManager`, `MultiViewManager`, and `PreferencesRepository`.
-- Produces: singleton app bindings that delegate to current implementations without duplicating policy.
-
-- [x] **Step 1: Write failing stream and surface delegation tests**
-
-Use constructor seams accepting function references so the tests exercise real adapter code without mocking final implementation classes:
-
-```kotlin
-@Test fun `preview preparer returns plugin result unchanged`() = runTest {
- val expected = Result.Success(streamInfo)
- val adapter = AppLivePreviewStreamPreparer { expected }
- assertThat(adapter.prepare(streamInfo)).isSameInstanceAs(expected)
-}
-
-@Test fun `surface refresh delegates once`() = runTest {
- var calls = 0
- AppLiveSurfaceRefreshAdapter { calls++ }.refreshTvInputCatalog()
- assertThat(calls).isEqualTo(1)
-}
-```
-
-Run and expect missing adapters.
-
-- [x] **Step 2: Implement the two simple adapters and run GREEN**
-
-Production constructors inject the current app implementations; internal test constructors accept the narrow suspend functions. Preserve results/exceptions without translation.
-
-- [x] **Step 3: Write handoff mapping tests**
-
-Cover all mappings:
-
-```kotlin
-assertThat(adapter.mapOrigin(PreviewHandoffSource.HOME)).isEqualTo(LivePreviewOrigin.HOME)
-assertThat(adapter.mapOrigin(PreviewHandoffSource.GUIDE)).isEqualTo(LivePreviewOrigin.GUIDE)
-assertThat(adapter.mapOrigin(LivePreviewOrigin.HOME)).isEqualTo(PreviewHandoffSource.HOME)
-assertThat(adapter.mapOrigin(LivePreviewOrigin.GUIDE)).isEqualTo(PreviewHandoffSource.GUIDE)
-```
-
-Also register, begin, clear, and consume through a fake delegate, asserting channel IDs, engine identity, stream identity, origin, and boolean return values are unchanged.
-
-- [x] **Step 4: Implement the handoff adapter and run GREEN**
-
-The adapter must delegate to the injected singleton `LivePreviewHandoffManager`. It maps `reverseSessionFlow` to `Flow<LivePreviewOrigin?>` and maps a consumed session to `LivePreviewSession`; it must not create a second manager or reproduce release timers.
-
-- [x] **Step 5: Write failing MultiView status tests**
-
-Use `MutableStateFlow<List<Channel?>>` and `MutableStateFlow<Boolean>`:
-
-```kotlin
-val statuses = adapter.status.take(3).toList(mutableListOf())
-assertThat(statuses[0]).isEqualTo(LiveMultiViewStatus(0, 4))
-assertThat(statuses[1]).isEqualTo(LiveMultiViewStatus(1, 4))
-assertThat(statuses[2]).isEqualTo(LiveMultiViewStatus(1, 2))
-```
-
-Expected: FAIL before `AppLiveMultiViewStatusAdapter` exists.
-
-- [x] **Step 6: Implement MultiView mapping and Hilt bindings**
-
-Implement `status` as `combine(slots, centerTwoSlotLayout)` returning
-`LiveMultiViewStatus(slots.count { it != null }, if (centerTwoSlotLayout) 2 else 4)`.
-Bind all four ports in `AppLiveModule` with `@Binds`, `@Singleton`, and no business logic.
-
-- [x] **Step 7: Verify adapters and existing Playback handoff tests**
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.live.AppLiveAdaptersTest" :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.preview.LivePreviewHandoffManagerTest" :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; Playback manager timeout/release behavior remains covered by its existing suite.
-
-Checklist reconciliation (2026-08-30): the missing direct adapter cases were
-added test-first. RED failed at test compilation because the narrow delegate/
-Flow constructors did not exist. Minimal internal seams kept the Hilt
-production constructors unchanged. The four app adapter tests and the existing
-Playback handoff suite then passed together in 40s (163 actionable; 12
-executed, 2 from cache, 149 up-to-date).
-
-- [x] **Step 8: Commit the adapters**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/live app/src/test/java/com/streamvault/app/live
-git commit -m "feat(live): adapt app preview and multiview services"
-```
-
----
-
-### Task 5: Establish app-independent Live presentation primitives
-
-**Files:**
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveSelectionChipRow.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveCategoryRow.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelCard.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelProgressTicker.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveSourceSwitcher.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveFocusedMarqueeText.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveReorderTopBar.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelRowSurface.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/dialogs/LiveCategoryDialogs.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/model/GuideLookupKey.kt`
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/remote/LiveRemoteShortcutPolicy.kt`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/presentation/model/GuideLookupKeyTest.kt`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/presentation/remote/LiveRemoteShortcutPolicyTest.kt`
-- Create: `feature/live/src/androidTest/java/com/streamvault/feature/live/LivePresentationGoldenTest.kt`
-- Create: `feature/live/src/androidTest/assets/goldens/` checked-in PNG baselines
-
-**Interfaces:**
-- Consumes: existing app component behavior plus app-independent Core UI primitives.
-- Produces: live-local presentation APIs with no app or Catalog dependency; app originals remain for their current non-live consumers.
-
-- [x] **Step 1: Write failing pure model and remote-policy tests**
-
-Copy the current guide-key and remote-dispatch expectations before copying production code. Tests must cover provider/channel EPG lookup identity, red/green/yellow/blue key mapping, unmapped keys, and the existing shortcut profile behavior.
-
-Run:
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.presentation.model.GuideLookupKeyTest" --tests "com.streamvault.feature.live.presentation.remote.LiveRemoteShortcutPolicyTest" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: FAIL because live-owned implementations do not exist.
-
-- [x] **Step 2: Move live-only policies and run GREEN**
-
-Move `GuideLookupKey.kt` and the Live browse portion of `RemoteShortcutDispatch.kt` mechanically into the feature packages. Leave non-live remote helpers in `:app`. Preserve every key code and action result.
-
-The Live browse handler types, colour-key mapping, and dispatch function now
-live in `feature/live/.../presentation/remote/LiveRemoteShortcutDispatch.kt`.
-The app dispatcher retains player-only behavior and its existing tests import
-the feature API. `LiveRemoteShortcutDispatchTest` covers key mapping, channel
-dispatch, and category action rejection; both that suite and the existing app
-remote suite pass.
-
-- [x] **Step 3: Add failing connected/golden coverage for shared visuals**
-
-Render representative selected/unselected selection chips, locked/unlocked category rows, channel card progress, source switcher, reorder bar, and category dialog. Use the repository golden helper that fails when the checked-in baseline is absent.
-
-Run:
-
-```powershell
-./gradlew.bat :feature:live:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.feature.live.LivePresentationGoldenTest --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: FAIL on missing live presentation functions or missing checked-in goldens; never self-approve first-run images.
-
-- [x] **Step 4: Implement distinct live-local presentation equivalents**
-
-Copy rendering/focus/key/callback behavior from the app components, rename the public functions with the `Live` prefix shown in the file list, replace app shell/time/device/image imports with existing Core UI APIs, and reference `com.streamvault.feature.live.R`.
-
-Keep app originals unchanged for Dashboard, Movies, Series, Favorites, Search, and VOD. Do not make those packages depend on `:feature:live`.
-
-- [x] **Step 5: Review and check in golden baselines**
-
-Render at 1920x1080, compare against pre-move screenshots, inspect focus borders/text/spacing manually, then add the reviewed PNGs. Rerun the connected class; expected PASS with the repository missing-golden guard still active. Completed 2026-08-29: six feature baselines reviewed and `LivePresentationGoldenTest` passed 6/6. The app-owned `live_route_matchesGolden` baseline was separately reviewed and regenerated from a fresh capture after confirming identical layout/content; its non-recording assertion passed 1/1.
-
-- [x] **Step 6: Verify source boundary and app consumers**
-
-```powershell
-./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest :feature:live:lintDebug :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; Catalog/System app sources still compile against their existing app components.
-
-- [x] **Step 7: Commit presentation seams**
-
-```powershell
-git add feature/live/src/main feature/live/src/test feature/live/src/androidTest
-git commit -m "feat(live): add app-independent presentation primitives"
-```
-
----
-
-### Task 6: Move Home state, ViewModel, preview UI, tests, and screen
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/home/*.kt` to `feature/live/src/main/java/com/streamvault/feature/live/home/`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/home/HomeViewModelTest.kt` to `feature/live/src/test/java/com/streamvault/feature/live/home/HomeViewModelTest.kt`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/home/HomePreviewPortTest.kt`
-- Create: `feature/live/src/androidTest/java/com/streamvault/feature/live/home/HomeScreenBehaviorTest.kt`
-- Modify: `feature/live/src/main/res/values/strings.xml`
-- Create/modify: matching `feature/live/src/main/res/values-*/strings.xml` locale files
-
-**Interfaces:**
-- Consumes: Tasks 3-5 ports/components and current Home constructor/state/method behavior.
-- Produces: feature-owned `HomeViewModel`, `HomeUiState`, `HomePreviewUiState`, `HomeScreen`, dialogs, sidebars, resources, and independent tests.
-
-- [x] **Step 1: Move the Home tests first and verify RED**
-
-Change only package/imports needed for the feature test source set. Replace direct app/Playback implementation fixtures with fakes for the Task 3 ports while preserving every repository and state expectation.
-
-Run:
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.home.HomeViewModelTest" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: FAIL because feature-owned `HomeViewModel` is absent.
-
-Observed RED on 2026-08-29 after moving the test package: unresolved
-`HomeViewModel` and dependent members in the feature test source set.
-
-- [x] **Step 2: Move Home state/ViewModel mechanically**
-
-Move `HomePreviewUiState.kt` and `HomeViewModel.kt`; change packages and resources only. Replace:
-
-```text
-StreamVaultPluginManager -> LivePreviewStreamPreparer
-TvInputChannelSyncManager -> LiveSurfaceRefreshPort
-LivePreviewHandoffManager -> LivePreviewHandoffPort
-PreviewHandoffSource.HOME -> LivePreviewOrigin.HOME
-MultiViewManager slots/capacity -> LiveMultiViewStatusPort.status
-```
-
-Keep constructor order otherwise stable. Preserve the separate `_uiState` and `_previewUiState`, session versioning, job cancellation, player configuration, adaptive reprime delay, error strings, and engine identity checks.
-
-`HomeViewModel` now lives under `com.streamvault.feature.live.home`, uses the
-feature resource namespace, and keeps the existing port-based preview and
-surface-refresh seams. `HomeUiState` and `HomePreviewUiState` remain
-feature-owned.
-
-- [x] **Step 3: Add and run focused preview RED/GREEN tests**
-
-`HomePreviewPortTest` must assert:
-
-- successful preparation registers exactly one HOME session with the same channel, stream, and engine;
-- preparation error preserves its message and does not register;
-- `beginPreviewHandoff` delegates with the active channel/engine and clears local ownership only on success;
-- HOME reverse handoff resumes while GUIDE notification is ignored;
-- clearing preview delegates and releases exactly as before;
-- MultiView status maps count/capacity into `HomeUiState`.
-
-Run the focused test after each minimal adapter replacement. Expected: RED on the old direct implementation call, then PASS after the corresponding port call.
-
-Current moved Home coverage verifies HOME session registration, preparation
-error preservation, handoff success/failure, reverse-HOME versus GUIDE
-notifications, explicit clear/release, and MultiView status mapping in
-`HomeViewModelTest`. The assertions remain co-located with the moved ViewModel
-fixture until the later test-source cleanup split.
-
-- [x] **Step 4: Run the complete moved Home suite**
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.home.*" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS with the same behavioral assertions as the pre-extraction app suite.
-
-Observed GREEN on 2026-08-29 for `com.streamvault.feature.live.home.*`; the
-feature boundary verifier and app Kotlin/unit-test compilation also pass.
-
-- [x] **Step 5: Add Home screen behavior tests**
-
-Cover route category initialization, source/category/channel focus, quick-filter visibility, search, Back/dialog ordering, PIN unlock, preview placeholder/loading/error/render states, stable channel semantics, and planner callbacks. The planner fake records `pendingChannel`, dismiss, and launch events without importing Playback.
-
-Run `HomeScreenBehaviorTest` against the extracted Home hosts.
-
-`HomeScreenBehaviorTest` now provides 6 connected tests for channel-content
-loading/error/locked-empty/content branches, quick-filter callback delivery,
-and stable channel-list rendering/visible-window reporting. Together with
-`HomePresentationBehaviorTest`, this covers extracted Home presentation seams;
-the full ViewModel-driven Home journey (route focus, dialogs, PIN submission,
-preview transitions, and planner callbacks) remains fixture-dependent and open.
-
-- [x] **Step 6: Move Home UI and wire live-local/core components**
-
-Move `HomeScreen.kt`, `HomeScreenDialogs.kt`, and `HomeSidebarComponents.kt`. Replace app navigation strings with typed `AppDestination`, app shell with `CoreAppScreenScaffold`/`UiDestination`, device/time helpers with Core UI, and direct MultiView composables with `LiveMultiViewPlannerContent`.
-
-The first screen wiring checkpoint is complete: Home now calls the
-feature-owned `LiveSourceSwitcher`, `LiveQuickFiltersPanel` (including its
-`LiveSelectionChipRow`), `LiveGuideShortcutChip`, `LiveGuideSearchField` /
-`LiveGuideProgramSearchRow`, `LiveReorderTopBar`, and
-`LiveGuideNowProvider`/`currentLiveGuideNow`, and `LiveChannelRowSurface`,
-`LiveChannelResultsHeader`, passing app-localized labels/title
-formatting/accessibility text through explicit presentation parameters. Home
-also calls `LiveCategorySidebarHeader`, which owns source-switcher/search/
-quick-filter layout while receiving app callbacks and localized labels. The
-channel content state now calls `LiveChannelContentHost` for loading, error,
-locked-empty, and no-channel presentation while keeping the channel-list slot
-in the app. The list mechanics now call `LiveChannelListHost` for lazy-list
-state, visible-window/load-more reporting, reorder key handling, and drag
-auto-scroll while the app retains row presentation and channel actions. The
-category sidebar now calls `LiveCategoryListHost`, which owns category list
-container/key/content-type mechanics while the app retains category policy,
-focus transitions, and callbacks. The
-hidden category/channel dialogs now also live in `:feature:live`; `HomeScreen`
-supplies app-localized labels and retains the ViewModel callbacks while other
-app-specific dialogs remain in the composition root. The category options
-dialog follows the same contract: feature-owned UI receives a label bundle and
-the app retains policy/callback wiring. The
-quick-filter add dialog also owns its draft text and duplicate check while the
-app supplies the saved-filter snapshot and mutation callback. The
-delete-group dialog owns its interaction guard and presentation while the app
-supplies the already formatted group-specific copy and ViewModel callbacks.
-The rename-group dialog owns draft text, focus, and device sizing while the app
-supplies validation text and rename/cancel callbacks.
-The M3U category organizer likewise receives explicit labels and reports only
-the selected classification target to the app.
-The single-item and category-review series dialogs own draft normalization and
-assignment construction while the app retains repository mutations.
-The EPG search overlay owns modal/search presentation and focus behavior while
-Home/Guide callers supply localized labels and query callbacks.
-The guide category picker owns filtering, selected-first ordering, focus, and
-row presentation while the app supplies lock policy and callbacks. The compact
-guide-program dialog now owns modal/program presentation, timing/progress,
-details state, focus, and action affordances while the app supplies labels and
-playback/recording callbacks.
-The guide control rows (time paging, day selection, mode, density, view, and
-favorites) are also feature-owned; the options shell continues to supply labels
-and ViewModel callbacks from `:app`. The preview pane owns render-surface
-selection, placeholder/loading states, channel/program metadata, and progress
-presentation while the app supplies the player and focused data.
-The guide toolbar owns button layout and focus affordances while the app
-supplies category text and navigation callbacks.
-The guide message state owns centered empty/loading/error presentation and the
-optional action affordance while callers supply state-specific copy and action.
-The hero badge owns rounded highlight styling and text overflow presentation;
-callers supply the text and optional accent. Stable EPG channel-key generation
-and timeline marker calculation are feature-owned and covered by focused
-identity/timeline tests. The timeline header owns marker rendering and
-live-time presentation while the app supplies sizing and scroll state. Grid
-rows/cells and the grid host own guide row composition, sizing, scrolling, and
-focus behavior while the app supplies localized labels, guide data, and
-state/action callbacks. Focus reconciliation now resolves stale channel/program
-selection and current-program fallback behind a feature-owned pure contract.
-The EPG content host now owns loading, message, preview,
-toolbar, refresh, and grid composition while the app supplies the localized
-label bundles, content message, state, and action callbacks. The options
-overlay and EPG-match dialog likewise own their presentation and focus behavior
-while the app supplies localized labels and state/action callbacks.
-Home layout metrics now preserve the existing device/mode breakpoints behind a
-feature-owned pure contract while `HomeScreen` supplies the configuration and
-device inputs. Home parental-lock policy likewise preserves normalized unlock
-IDs and selected/source-category protection behind feature-owned pure
-predicates while the app supplies current state. EPG guide-channel lock policy
-now preserves the existing parental-control level, channel protection, and
-source-category protection behind feature-owned pure predicates; `EpgScreen`
-keeps its compatibility wrappers while supplying current state.
-The EPG category-selection fallback policy now preserves the existing
-All/Favorites/accessibility ordering and explicit-unlock behavior behind a
-feature-owned pure resolver; `EpgViewModel` delegates while retaining repository
-coordination.
-Guide schedule metrics (missing entries, channels with schedules, and upcoming
-data) are now feature-owned pure functions; `EpgViewModel` delegates while
-retaining data loading and state assembly.
-quick-filter key/selection rules are covered by `LiveQuickFiltersTest`. The
-mechanical screen move is now complete: `LiveHomeScreen` and
-`LiveHomeDialogsHost` are feature-owned under `:feature:live`, and the app
-graph supplies the shell, MultiView planner, and Add-to-Group dialog ports.
-The runtime Home route was smoke-checked on the emulator after the move. The
-full ViewModel-driven behavior test and exhaustive acceptance matrix remain
-open; the locale and feature-golden gates were completed separately. Do not
-treat this checkpoint as full Home or Live-slice acceptance.
-
-Preserve planner callback order:
-
-```text
-dismiss planner state -> dismiss channel dialog when present -> clear preview -> request AppDestination.MultiView
-```
-
-- [x] **Step 7: Move Home resources locale by locale**
-
-The default locale values for the moved Home screen/dialog surface are now
-present in `feature/live/src/main/res/values/strings.xml`, while app resources
-remain intact for other consumers. Copy exact values for every non-default
-`home_*`, `live_*`, preview, quick-filter, category/group, and Home-only dialog
-key, then run a comparison script before removing any app key. Completed
-2026-08-29: all 25 translated feature locale files were added and the audit
-reports zero feature missing/value-mismatch/unexpected keys; app copies remain
-because shared app consumers still use them.
-
-- [x] **Step 8: Run Home feature and app integration checks**
-
-```powershell
-./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.home.*" :feature:live:compileDebugAndroidTestKotlin :app:compileDebugKotlin :app:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; no app or Playback feature import exists under `feature/live/src/main`.
-
-- [x] **Step 9: Commit Home ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/home app/src/test/java/com/streamvault/app/ui/screens/home feature/live
-git commit -m "feat(live): move Home presentation into feature"
-```
-
----
-
-### Task 7: Move EPG state, ViewModel, preview, tests, and screen
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/epg/*.kt` to `feature/live/src/main/java/com/streamvault/feature/live/epg/`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/epg/*.kt` to `feature/live/src/test/java/com/streamvault/feature/live/epg/`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/epg/EpgPreviewPortTest.kt`
-- Create: `feature/live/src/androidTest/java/com/streamvault/feature/live/epg/EpgScreenBehaviorTest.kt`
-- Modify: `feature/live/src/main/res/values/strings.xml`
-- Create/modify: matching `feature/live/src/main/res/values-*/strings.xml` locale files
-
-**Interfaces:**
-- Consumes: Tasks 2-5 contracts/components and existing EPG repositories/managers/use cases.
-- Produces: feature-owned `EpgViewModel`, guide state/models, UI/grid/hero/controls/dialogs, preview UI, deferred overlay, resources, and independent tests.
-
-- [x] **Step 1: Move EPG unit tests first and verify RED**
-
-Move `EpgViewModelTest`, `GuideDateTimeTest`, and `ProgramReminderIssueMessageTest`; update packages and replace app/Playback fixtures with live-port fakes.
-
-Run:
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.epg.*" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: FAIL because feature-owned EPG production types are absent.
-
-The three existing EPG unit tests are now under
-`com.streamvault.feature.live.epg`; the feature EPG suite is green after the
-production move. A separate pre-move RED run was not required because the
-feature source move and package boundary were applied as one mechanical
-checkpoint.
-
-- [x] **Step 2: Move pure EPG state/date/message behavior and run GREEN subsets**
-
-Move `GuideDateTime.kt` and the state/model declarations from `EpgViewModel.kt` without changing constants/defaults. Run `GuideDateTimeTest` and `ProgramReminderIssueMessageTest`; expected PASS.
-
-- [x] **Step 3: Move `EpgViewModel` and replace implementation imports**
-
-Replace `StreamVaultPluginManager` with `LivePreviewStreamPreparer`,
-`LivePreviewHandoffManager` with `LivePreviewHandoffPort`, and GUIDE source
-values with `LivePreviewOrigin.GUIDE`. Preserve guide window constants, paging,
-prefetch jobs, search debounce, reminder/recording flow, override behavior,
-parental policy, preview engine configuration, and dispatchers.
-
-- [x] **Step 4: Add and run EPG preview port RED/GREEN tests**
-
-Assert successful/error preparation, GUIDE register/begin/reverse/clear behavior,
-HOME reverse notification rejection, active-session guards, playback/error flow
-collection, and local state transitions. Each test must fail on the missing port
-call before the minimal implementation change makes it pass.
-
-`EpgPreviewPortTest` now covers successful GUIDE registration, preparation-error
-preservation without registration, and accepted fullscreen handoff cleanup. The
-EPG playback-state collector was aligned with Home so a preparation error is not
-cleared by a concurrent non-error state emission.
-
-- [x] **Step 5: Run the complete EPG ViewModel suite**
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.epg.*" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS with no reduction in assertion count.
-
-Observed GREEN on 2026-08-29 for `com.streamvault.feature.live.epg.*`, with
-the feature boundary verifier and app Kotlin/unit-test compilation also
-passing.
-
-- [x] **Step 6: Add EPG screen behavior tests**
-
-Cover route initialization, horizontal and vertical movement, stable channel/program semantics, category/mode/density/favorites/search controls, time/day/prime-time jumps, preview focus and handoff, program dialog, EPG override, PIN flow, reminder permission callback, recording conflict, live/archive callbacks, and Back/top-navigation restoration.
-
-Run `EpgScreenBehaviorTest` against the extracted Guide hosts.
-
-`EpgScreenBehaviorTest` now provides 5 connected tests for Guide toolbar
-callback delivery, retry action, preview placeholder/no-schedule states, and
-channel/program identity callbacks. Together with
-`EpgPresentationBehaviorTest`, this covers extracted Guide presentation seams;
-the full ViewModel-driven Guide journey (movement, controls, dialogs, PIN,
-reminders/recording, archive, and Back restoration) remains fixture-dependent
-and open.
-
-- [x] **Step 7: Move EPG presentation and deferred overlay**
-
-Move the EPG screen, hero, ViewModel, and deferred player overlay into
-`feature/live/.../epg/`. Replace app shell/device/selection imports with the
-injected `LiveEpgScaffoldContent`, Core UI, and existing Live presentation
-components. The feature now uses `LiveRoutePatterns.epg(...)` for the stable
-Guide return route; the app graph remains responsible for decoding and
-mapping playback requests. The deferred `LivePlayerTransparentGuideOverlay`
-remains unreferenced, as before.
-
-Move `PlayerTransparentGuideOverlay` unchanged and keep it unreferenced; do not register it in Playback or the live graph.
-
-- [x] **Step 8: Move EPG resources locale by locale**
-
-The default locale now contains the EPG screen's `epg_*`, `guide_*`, archive,
-reminder, recording-conflict, notification-permission, and EPG-only shared
-values in `feature/live`. Completed 2026-08-29: all 25 translated feature
-locale files were added and the locale audit reports zero feature
-missing/value-mismatch/unexpected keys. App-key removal remains out of scope
-while shared consumers remain.
-
-- [x] **Step 9: Run EPG feature and app integration checks**
-
-```powershell
-./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.epg.*" :feature:live:compileDebugAndroidTestKotlin :app:compileDebugKotlin :app:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS with no app/feature implementation imports under live main source.
-
-- [x] **Step 10: Commit EPG ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/epg app/src/test/java/com/streamvault/app/ui/screens/epg feature/live
-git commit -m "feat(live): move EPG presentation into feature"
-```
-
----
-
-### Task 8: Move graph registration and preserve app player/MultiView composition
-
-**Files:**
-- Create: `feature/live/src/main/java/com/streamvault/feature/live/navigation/LiveGraph.kt`
-- Create: `feature/live/src/test/java/com/streamvault/feature/live/navigation/LiveGraphContractTest.kt`
-- Create: `app/src/main/java/com/streamvault/app/live/AppLivePlaybackRequestMapper.kt`
-- Create: `app/src/main/java/com/streamvault/app/live/AppLiveMultiViewPlanner.kt`
-- Create: `app/src/test/java/com/streamvault/app/live/AppLivePlaybackRequestMapperTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Delete after GREEN: `app/src/main/java/com/streamvault/app/navigation/graph/LiveGraph.kt`
-
-**Interfaces:**
-- Consumes: live route/request contracts, feature screens, `UiDestination`, app navigation adapters, and existing Playback planner.
-- Produces: controller-free `registerLiveGraph` called by `AppNavHost`, with field-for-field player request mapping and app-composed MultiView planner.
-
-- [x] **Step 1: Add graph contract coverage**
-
-Use `TestNavHostController`/Navigation testing to assert:
-
-- `live_tv` defaults `categoryId` to null and a supplied value survives;
-- `epg` defaults category/anchor to null and favorites to false;
-- supplied EPG arguments survive exactly;
-- Home channel callbacks emit `LiveChannelPlaybackRequest` with a typed Live return destination;
-- EPG live/archive callbacks emit the correct typed Guide return destination;
-- destination callbacks and MultiView planner callbacks do not expose a controller.
-
-Run the focused test; expected missing `registerLiveGraph` failure.
-
-`LiveGraphBehaviorTest` now runs connected on the TV emulator and verifies the
-Live category argument, Guide optional arguments, and typed channel/archive
-callback payloads. The test is green; a separate pre-implementation RED run
-was not needed because the feature graph was already present at this checkpoint.
-
-- [x] **Step 2: Implement feature graph registration minimally**
-
-Use the exact signature from the spec. Construct both `composable` destinations with current `NavType` and defaults. Call `HomeScreen` and `FullEpgScreen` directly. Do not import app route codecs or construct `PlayerNavigationRequest` in the feature.
-
-- [x] **Step 3: Write app player-mapping tests**
-
-For a channel request assert stream URL, title, EPG channel ID, internal ID,
-category fallback to `ChannelRepository.ALL_CHANNELS_ID`, provider, virtual,
-combined profile/source filter, `contentType = "LIVE"`, and return destination.
-
-For archive assert archive start/end/title, category/provider identity,
-`contentType = "LIVE"`, and Guide return destination. Include the existing
-`isArchivePlayable` rejection at the app callback boundary.
-
-`AppLivePlaybackRequestMapperTest` covers these fields and the rejection path;
-the first run was intentionally red until the mapper existed.
-
-- [x] **Step 4: Implement app request mapping and run GREEN**
-
-Delegate to the existing `playerNavigationRequest`/`toLivePlayerRequest`
-helpers so payload behavior stays app-owned. Do not duplicate codec or payload
-storage.
-
-- [x] **Step 5: Compose the existing MultiView planner in app**
-
-Implement `rememberAppLiveMultiViewPlannerContent()` as a composable provider
-that obtains the existing `MultiViewViewModel` in the destination composition
-and renders `MultiViewPlannerDialog(pendingChannel, onDismiss, onLaunch,
-viewModel)`. The feature supplies the state-clearing callbacks; the app content
-only renders Playback presentation.
-
-`AppLiveMultiViewPlanner.kt` now owns this adapter. It remembers the existing
-Playback ViewModel, exposes the planner content and queue predicate, and leaves
-all planner state/lifecycle behavior in Playback.
-
-- [x] **Step 6: Wire `AppNavHost` and verify RED-to-GREEN integration**
-
-Replace the app graph call with `com.streamvault.feature.live.navigation.registerLiveGraph`, pass `rememberAppDestinationItems(...)`, app player mapping callbacks, `onTopLevelDestinationRequested`, and planner content.
-
-First compile while the old app registration still exists and confirm the duplicate-route or duplicate-symbol problem is observable. Remove only the old `LiveGraph.kt`, then rerun.
-
-- [x] **Step 7: Run route, mapping, app navigation, and feature checks**
-
-```powershell
-./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.navigation.*" :app:testDebugUnitTest --tests "com.streamvault.app.live.AppLivePlaybackRequestMapperTest" --tests "com.streamvault.app.navigation.*" :feature:live:verifyFeatureLiveBoundary :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS with one production owner for each live destination.
-
-The route/mapping/navigation bundle passed on 2026-08-29, including the Live
-boundary verifier and app Kotlin compilation.
-
-- [x] **Step 8: Commit graph ownership**
-
-```powershell
-git add feature/live/src/main/java/com/streamvault/feature/live/navigation feature/live/src/test/java/com/streamvault/feature/live/navigation app/src/main/java/com/streamvault/app/live app/src/test/java/com/streamvault/app/live app/src/main/java/com/streamvault/app/navigation
-git commit -m "feat(live): register feature-owned navigation graph"
-```
-
-The graph contract, app player mapper, and MultiView composition adapter were
-committed together in `8a3e8cd1`.
-
----
-
-### Task 9: Remove legacy ownership and run structural/resource gates
-
-**Files:**
-- Modify: app and feature locale resource files containing the 196-key inventory
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-- Create: `validation/phase5_live/task9-resource-cleanup.md`
-- Create: `validation/phase5_live/task9-structural-verification.md`
-- Modify: app unit/connected test imports that legitimately follow moved ownership
-
-**Interfaces:**
-- Consumes: fully wired feature graph and moved tests/resources.
-- Produces: one live production owner, exact resource/dependency audit, and fresh automated verification evidence.
-
-- [x] **Step 1: Prove no legacy Home/EPG production remains**
-
-```powershell
-rg --files app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg
-rg -n "com\.streamvault\.app\.ui\.screens\.(home|epg)" app/src/main app/src/test app/src/androidTest feature core
-```
-
-Expected: the old directories are absent; any remaining string occurs only in generated profile output or recorded validation evidence and is handled in Task 11.
-
-- [x] **Step 2: Audit feature dependencies and forbidden imports**
-
-```powershell
-./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:dependencies --configuration debugRuntimeClasspath --no-daemon --console=plain --warning-mode=none
-rg -n "com\.streamvault\.(app|feature\.)|MainActivity|NavController|NavHostController" feature/live/src/main
-```
-
-Expected: boundary PASS; no forbidden source match; project dependencies match the five approved modules.
-
-- [x] **Step 3: Audit every temporary implementation import**
-
-```powershell
-rg -n "^import com\.streamvault\.data\." feature/live/src/main
-rg -n "^import com\.streamvault\.player\." feature/live/src/main
-```
-
-Update the ledger with exact type and source location. Remove only dependencies made obsolete by Tasks 3-8; retain `PreferencesRepository`, `ProviderSyncStateSource`, and player API imports with their recorded Phase 7 direction.
-
-- [x] **Step 4: Compare resources locale by locale before deletion**
-
-For every moved key, compare app and feature values, plurals, and formatting placeholders. Use `rg` across app/feature/core/benchmark/manifest/test sources before removing an app entry. Record moved, duplicated, retained, and removed counts in `task9-resource-cleanup.md`.
-
-Expected: no missing resource at compile time and no changed format argument ordering.
-Completed in `validation/phase5_live/task9-resource-cleanup.md`: the default
-245-key set and all translated app locales were compared for values and
-placeholders; two mojibake defaults were corrected in `feature/live`. The 25
-translated feature locale files now pass the feature-side parity fields. No app
-entries were deleted because shared consumers still require the app copies.
-
-- [x] **Step 5: Run the full focused structural bundle**
-
-```powershell
-./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest :feature:live:lintDebug :feature:live:compileDebugAndroidTestKotlin :feature:live:assembleDebug :app:compileDebugKotlin :app:compileDebugUnitTestKotlin :app:testDebugUnitTest :app:assembleDebug --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: exit 0. If a neighboring existing gate fails, record the exact task, file, diagnostic, and evidence that it is pre-existing; do not label the full bundle successful.
-
-- [x] **Step 6: Run neighboring feature checks separately**
-
-```powershell
-./gradlew.bat :feature:settings:check :feature:provider:check :feature:playback:check --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: record each result independently. The known Playback lint/open runtime gates remain Playback-owned unless the live diff demonstrably changes them.
-
-- [x] **Step 7: Refresh Graphify and verify ownership paths**
-
-```powershell
-graphify update .
-graphify query "Where are Home Live TV EPG and preview presentation owned after the feature live extraction?" --budget 3000
-```
-
-Expected: Home/EPG production nodes resolve under `feature/live`; app nodes represent composition/adapters; Playback owns handoff/MultiView implementation.
-
-- [x] **Step 8: Commit cleanup and structural evidence**
-
-```powershell
-git add app feature/live docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_live graphify-out
-git commit -m "refactor(live): remove legacy app presentation ownership"
-```
-
----
-
-### Task 10: Run connected Live/EPG and mandatory multi-channel playback acceptance
-
-**Files:**
-- Create: `validation/phase5_live/task10-connected-validation.md`
-- Create: `validation/phase5_live/task10-live-playback/`
-- Create: `validation/phase5_live/task10-screenshots/`
-- Modify: feature/app connected tests only when a test legitimately follows moved ownership
-
-**Interfaces:**
-- Consumes: installed debug app, API 36 TV emulator, at least two valid live HLS channels, and feature connected tests.
-- Produces: exact route/focus/EPG/preview/MultiView evidence plus two long-duration channel captures satisfying the repository protocol.
-
-- [x] **Step 1: Verify ADB and emulator readiness without clearing data**
-
-```powershell
-$env:ANDROID_HOME='E:\androidSdk'
-& "$env:ANDROID_HOME\platform-tools\adb.exe" devices -l
-& "$env:ANDROID_HOME\platform-tools\adb.exe" shell getprop sys.boot_completed
-& "$env:ANDROID_HOME\platform-tools\adb.exe" shell cmd package list packages | Select-String streamvault
-```
-
-Expected: one authorized boot-complete TV emulator and available package service. Record device/AVD/API/ABI; do not uninstall or clear user data.
-
-- [x] **Step 2: Run the complete feature connected suite**
-
-```powershell
-./gradlew.bat :feature:live:connectedDebugAndroidTest --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: all live feature connected tests pass. Record XML path, tests, failures, errors, skipped, and duration.
-
-- [x] **Step 3: Run app navigation/player seam connected tests**
-
-Run the repository's focused navigation, platform compatibility, Playback overlay, and golden test classes rather than treating the complete app suite as one opaque result. Record each class result independently.
-
-Expected: Live TV and EPG destinations open with argument compatibility; player and MultiView callbacks reach the existing destinations; any unrelated baseline failure is listed exactly.
-
-Recorded in `validation/phase5_live/task10-connected-validation.md`: AppNavigationContractTest 3/3 and PlatformCompatibilityMatrixTest 4/4 pass; the existing Live golden drift and PlayerSmokeTest's three pre-existing failures remain open neighboring gates.
-
-The complete feature suite was rerun on 2026-08-29 after the resource parity
-fix: the original extracted suite passed 13/13. After adding the Home and EPG
-screen-host behavior classes, the final full run passed 24/24 with zero
-failures, errors, or skips. The result XML is under
-`feature/live/build/outputs/androidTest-results/connected/debug/`.
-
-- [ ] **Step 4: Perform manual Live TV and EPG journeys**
-
-Using D-pad first, then available touch/mouse paths, cover source/category switching, category/channel search, quick filters, hidden channels/categories, favorites, reorder, PIN, repeated focus, preview replacement, fullscreen/back handoff, MultiView planner, EPG horizontal/vertical movement, paging, search, density/mode/favorites, reminders, recording conflict where fixtures allow, archive launch, RTL, reduced motion, semantics, and Back restoration.
-
-Capture named 1920x1080 screenshots and sanitized logs. Record unavailable fixture-dependent actions as open.
-
-Completed partial planner coverage on 2026-08-29: the seeded emulator exposed
-`All Channels`, so `01 00s Replay` was long-pressed, added to the split-screen
-planner, assigned to slot 1, launched, and returned with Back. Evidence is in
-`validation/phase5_live/task10-multiview/`. The remaining archive playback
-branch remains fixture-dependent because the loaded provider does not expose
-replay metadata. A follow-up device pass now records Arabic
-RTL rendering for Live TV and Guide, a reduced-motion D-pad smoke check with
-animation scales at zero, and D-pad reachability for Program Search and Guide
-Options. D-pad activation plus ADB text input now covers category search and
-All Channels search; the quick-filter form accepts input and enables Save. A
-follow-up saved `Movies`, verified it after force-stop/relaunch, and removed it
-through Settings, restoring the empty-filter state.
-Guide Program Search was also activated and accepted `Movies`; the dialog was
-dismissed and Live TV restored, but its visible rows still reported `No
-schedule`, so a distinct filtered-result assertion remained unavailable on that
-fixture.
-
-On 2026-09-02, a temporary local XMLTV source matched seven programmes to the
-cached Xtream/M3U channels and closed the remaining Guide branches. Search for
-`VIP` returned fixture programmes and restored focus to the selected channel
-after dismissal (`build/guide-search-vip-fixture.png`,
-`build/guide-search-focus-before.png`, `build/guide-search-focus-after.png`).
-Future-program recording succeeded after exact-alarm access was enabled, and
-two overlapping cross-provider schedules produced the Recording Conflict
-dialog (`build/guide-recording-conflict.png`); all temporary scheduled rows were
-cancelled afterward. The `-3h` window rendered an archive fixture, but the
-provider had no replay metadata, so activation returned Home and archive
-playback remains open. Existing `task10-multiview` evidence covers empty and
-populated planner entry, placement, removal, replacement, Clear All, two-slot
-launch, and Back restoration; no additional MultiView path was left open in this
-run. The XMLTV source and assignments were deleted after the pass and provider
-Guide policies were restored to Auto.
-
-Follow-up on 2026-08-29 also added and removed two fixture channels from
-Favorites and entered populated Favorites reorder mode before restoring the
-device to zero favorites. The activated-input follow-up populated and saved a
-quick filter, verified it after process restart, and removed it through the
-existing Settings management dialog so no persistent filter remained. Device
-evidence is under `validation/phase5_live/task11-fixture-flows/`.
-Hidden category/channel paths were exercised and
-restored. The Movies `Lock Group` action also opened the focused `Enter PIN`
-keypad; the configured PIN was unavailable during that early pass, so Back
-canceled without changing the lock state. A later provider-backed pass saved
-PIN `1234` and successfully unlocked a temporarily locked category. Favorite
-movement and the Save Order callback were exercised in a reversible round trip
-that restored the original order and zero favorites; only archive playback
-remains open in the fixture-dependent Guide matrix.
-
-The planner edge follow-up then populated two slots, removed slot 2, replaced
-an occupied slot 1 with the pending channel, and exercised Clear All before
-restoring Live TV with zero active slots. Evidence is under
-`validation/phase5_live/task10-multiview/`.
-
-A subsequent pass launched the populated two-slot configuration with `00s
-Replay` and `3ABN Dare To Dream Network`, confirmed both channel labels on the
-MultiView surface, then reopened the planner and used Clear All. The final Live
-TV state had no split badge, zero active slots, Favorites `0`, and All Channels
-`1,467`; evidence is in `two-slot-placed.*`, `two-slot-launched.*`, and
-`two-slot-cleared.*` under `validation/phase5_live/task10-multiview/`.
-
-- [x] **Step 5: Capture channel 1 at two-second cadence**
-
-Create an explicit directory such as `validation/phase5_live/task10-live-playback/channel-1/`. After selecting and naming the channel, run 61 captures:
-
-```powershell
-$adb='E:\androidSdk\platform-tools\adb.exe'
-0..60 | ForEach-Object {
- $index='{0:D2}' -f $_
- & $adb exec-out screencap -p > "validation/phase5_live/task10-live-playback/channel-1/frame_$index.png"
- Start-Sleep -Seconds 2
-}
-```
-
-Expected: 61 nonempty PNGs spanning approximately two minutes.
-
-- [x] **Step 6: Prove channel 1 progression and health**
-
-Compute SHA-256 hashes, unique-hash count, media session, and log scans:
-
-```powershell
-Get-FileHash validation/phase5_live/task10-live-playback/channel-1/frame_*.png -Algorithm SHA256 | Group-Object Hash | Measure-Object
-& $adb shell dumpsys media_session > validation/phase5_live/task10-live-playback/channel-1/media-session.txt
-& $adb logcat -d -v time > validation/phase5_live/task10-live-playback/channel-1/logcat.txt
-rg -n "fatal-error|live-recovery selected|live-recovery no-candidate|prepare resolvedStreamType=MPEG_TS_LIVE|source-malformed live-ts-fallback|Player stuck|state=ERROR" validation/phase5_live/task10-live-playback/channel-1/logcat.txt
-rg -n "retry category=|first-frame-success|prepare resolvedStreamType=HLS|read-progress streamType=HLS" validation/phase5_live/task10-live-playback/channel-1/logcat.txt
-```
-
-Expected: frames continue changing, media session is `PLAYING` with `error=null`, HLS evidence exists, and no fatal/stuck/unintended fallback match exists.
-
-- [x] **Step 7: Repeat the full capture for a different live channel**
-
-Use `channel-2/`, clear logcat immediately before starting, and repeat Steps 5-6 without shortening the window. Prefer a different provider/source characteristic when available.
-
-- [x] **Step 8: Record acceptance honestly**
-
-For both channels record name, provider, URL redaction policy, 61 screenshot count, two-second interval, unique hash count, first/last timestamps, media-session state/error, HLS prepare/read/first-frame lines, recovery lines, and every fatal/stuck/fallback match.
-
-Passing requires both channels to satisfy all criteria. A failed or externally expired stream is recorded as a failed/unavailable gate and replaced only if the report preserves the original attempt.
-
-- [ ] **Step 9: Commit runtime evidence separately**
-
-```powershell
-git add validation/phase5_live feature/live/src/androidTest app/src/androidTest
-git commit -m "test(live): record feature runtime acceptance"
-```
-
----
-
-### Task 11: Capture build isolation, regenerate profiles, and write the live report
-
-**Files:**
-- Create: `validation/phase5_live/performance-after.md`
-- Create: `validation/phase5_live/profile-validation.md`
-- Create: `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md`
-- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`
-- Modify: generated profile sources only through `:app:generateBaselineProfile`
-
-**Interfaces:**
-- Consumes: committed post-extraction ref and all Tasks 0-10 evidence.
-- Produces: five-pair build comparison, task-isolation proof, regenerated profile evidence, final ownership report, and explicit remaining gates without a Phase 5 completion claim.
-
-- [x] **Step 1: Capture five post-extraction live source-edit samples**
-
-In an isolated snapshot of the committed post-extraction ref, touch only
-`feature/live/src/main/java/com/streamvault/feature/live/home/HomeScreen.kt`
-and run five times:
-
-```powershell
-./gradlew.bat :feature:live:compileDebugKotlin --no-daemon --console=plain --warning-mode=none --profile
-```
-
-Record wall time, profile path, task states, median, average, and p95. Prove no
-`:feature:playback`, `:feature:provider`, or `:feature:settings` Kotlin compile
-task executes.
-
-Recorded in `validation/phase5_live/performance-after.md`: five successful
-post-extraction Live source-edit samples (median 12.828s; setup outlier
-42.404s). The formal paired pre/post target remains open because the available
-pre record is a no-change app baseline rather than an identical source-edit
-snapshot.
-
-- [x] **Step 2: Capture five post-extraction moved-test samples**
-
-Touch only `feature/live/src/test/java/com/streamvault/feature/live/home/HomeViewModelTest.kt` and run five times:
-
-```powershell
-./gradlew.bat :feature:live:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none --profile
-```
-
-Compute the same statistics and compare against Task 0. Report outliers and cache/setup state; do not claim the 20% target from incomparable samples.
-
-Recorded in `validation/phase5_live/performance-after.md`: five successful
-post-extraction Live test-edit samples (median 12.583s; setup outlier
-49.658s). No performance target is claimed without a comparable pre-edit
-snapshot.
-
-- [ ] **Step 3: Capture clean and warm guardrails**
-
-In isolated pre/post snapshots with equivalent Gradle/SDK/temp storage, run clean debug and warm no-change `:app:assembleDebug`. Record executed/from-cache/up-to-date task counts, median where repeated, and comparability limitations.
-
-Current-checkout guardrail update (2026-08-30): the documented clean debug
-command passed in 4m 46s (209 actionable; 136 executed, 73 from cache). Five
-warm no-change samples all passed with a 13.150s median and 13.394s average;
-each had 1 executed and 197 up-to-date tasks. The clean result is 111.1% slower
-than the Phase 0 profiled clean baseline and does not meet the 10% guardrail.
-After the adapter checklist seam was completed, the final-tree clean rerun
-passed in 1m 01s (95 executed, 114 from cache) and five final-tree warm samples
-passed with a 13.690s median and 13.984s average. The 3.7x clean-run spread
-reflects materially different cache states. The step remains open because no
-equivalent isolated pre-Live/post-Live clean pair exists. Evidence is in
-`validation/phase5_live/performance-after.md`.
-
-Current-tree follow-up (2026-09-01): the clean guardrail was rerun successfully
-and two additional warm no-change `:app:assembleDebug --profile` samples passed
-at 48.435s and 20.162s. The formal paired target remains open because the
-available pre-extraction record is still no-change rather than an equivalent
-source-edit snapshot.
-
-- [x] **Step 4: Regenerate Baseline/Startup Profiles**
-
-```powershell
-./gradlew.bat :app:generateBaselineProfile --no-daemon --console=plain --warning-mode=none
-./gradlew.bat verifyBaselineProfileSources :app:assembleBeta :app:assembleRelease --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: producer and packaging pass. Record test counts, durations, generated rule counts, APK/AAB packaging evidence, and any unavailable physical-device gate.
-
-Retry update (2026-08-30): after starting the seeded `Television_1080p` API 36
-AVD, the producer passed in 13m 45s. Both `BaselineProfileGenerator` tests
-passed; eight separate macrobenchmark tests were skipped by configuration.
-The independent source/Beta/Release command then passed in 3m 41s with 48,627
-baseline and 31,990 startup rules. Earlier native-memory and no-device
-failures remain recorded as historical attempts; no profile source was
-hand-edited.
-
-Current-tree retry (2026-09-01): `:app:generateBaselineProfile` passed in
-25m 13s, and the independent source/Beta/Release command passed in 10m 27s
-with 49,409 baseline and 32,151 startup rules. Both profile-generator tests
-passed, the eight separate macrobenchmark tests were skipped by configuration,
-and no profile source was hand-edited.
-
-Post-reboot direct-run update (2026-09-01):
-`:benchmark:connectedNonMinifiedReleaseAndroidTest` passed in 23m 59s with
-10 tests total, 0 failures, 0 errors, and 8 skipped. The two
-`BaselineProfileGenerator` tests passed; all eight `StreamVaultMacrobenchmark`
-cases were skipped by instrumentation configuration, so this does not close
-the FrameTiming/navigation performance gate.
-
-- [x] **Step 5: Scan profile descriptors**
-
-```powershell
-rg -n "com/streamvault/app/ui/screens/(home|epg)" app/src/main/generated/baselineProfiles
-rg -n "com/streamvault/feature/live" app/src/main/generated/baselineProfiles
-```
-
-Expected: zero stale app Home/EPG descriptors and nonzero feature/live descriptors. If stale descriptors remain, rerun generation from a clean installed target rather than editing text manually.
-
-Retry scan (2026-08-30): the regenerated sources satisfy freshness with zero
-stale app Home/EPG matches and 1,544 baseline / 43 startup `feature/live`
-matches. Details and hashes are in `validation/phase5_live/profile-validation.md`.
-
-Current-tree scan (2026-09-01): the regenerated sources contain zero stale app
-Home/EPG matches and 1,533 baseline / 43 startup `feature/live` matches.
-
-- [x] **Step 6: Write the live execution report**
-
-The report must include:
-
-- ownership, dependency, resource, source/test count, graph, and route evidence;
-- delivered commit list and rollback SHA;
-- exact automated, connected, manual, two-channel playback, performance, and profile commands/results;
-- channel names, screenshot count/interval/unique hashes, media-session results, and sanitized log findings;
-- every unavailable, failed, neighboring, physical-device, provider, archive, recording, or performance gate;
-- explicit statements that Catalog/System were not started and Playback,
- Provider, and Settings reports remain authoritative for their open gates;
-- explicit statement that Phase 5 is not complete.
-
-- [x] **Step 7: Update roadmap and architecture status**
-
-Link the live spec, plan, report, and validation artifacts. Mark only evidence-backed live items complete. Leave later slices and all unrelated open gates unchanged.
-
-- [x] **Step 8: Run final fresh verification**
-
-```powershell
-./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:check :feature:live:compileDebugAndroidTestKotlin :app:testDebugUnitTest :app:assembleDebug verifyBaselineProfileSources --no-daemon --console=plain --warning-mode=none
-graphify update .
-git status --short
-git diff --check
-```
-
-Expected: report actual exit codes and failures. A completion claim is permitted only if the full command passes and Tasks 10-11 evidence satisfies the spec; otherwise state the exact open live gates.
-
-- [ ] **Step 9: Commit report and generated evidence**
-
-```powershell
-git add docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md validation/phase5_live app/src/main/generated/baselineProfiles graphify-out
-git commit -m "docs(live): report phase 5 feature extraction"
-```
-
-## Exit Criteria
-
-- `:feature:live` owns Home Live TV and EPG presentation, ViewModels/state, dialogs, preview UI, resources, tests, and graph registration.
-- `:app` owns only live composition adapters, player-request mapping, MultiView planner composition, route compatibility, platform/lifecycle entry points, and root graph registration.
-- The feature has no app, root-controller, activity, or feature-implementation import and only the five approved project dependencies.
-- Preview handoff uses the same Playback singleton through the app adapter; no timeout/release/recovery policy is duplicated or changed.
-- Home and EPG unit/connected tests run from `:feature:live`; app navigation/player seam tests remain app-owned.
-- A live-only source/test edit does not compile unrelated feature source, with five-pair measurements recorded honestly.
-- At least two live channels satisfy the required long-duration screenshot/hash/media-session/log protocol, or the exact live acceptance gate remains explicitly open.
-- Generated profiles contain feature/live descriptors and no stale app Home/EPG descriptors.
-- `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md`, the transitional ledger, roadmap, architecture plan, validation artifacts, and Graphify output reflect actual evidence.
-- Catalog and System remain untouched, neighboring feature gates remain separate, and no Phase 5 completion claim is made.
diff --git a/docs/superpowers/plans/2026-08-28-settings-runtime-and-performance-completion.md b/docs/superpowers/plans/2026-08-28-settings-runtime-and-performance-completion.md
deleted file mode 100644
index 4eaaae46..00000000
--- a/docs/superpowers/plans/2026-08-28-settings-runtime-and-performance-completion.md
+++ /dev/null
@@ -1,182 +0,0 @@
-# Settings Runtime and Performance Completion Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Close every Settings-slice gate that can be completed safely in the current development environment while preserving the existing checkout and keeping Phase 7 and later feature slices out of scope.
-
-**Architecture:** Keep `:feature:settings` as the presentation owner and `:app` as the composition root for platform adapters, route decoding, launchers, lifecycle, and external callbacks. Complete remaining evidence through isolated committed snapshots for performance and non-destructive TV journeys; add deterministic coverage only for a confirmed Settings behavior gap.
-
-**Tech Stack:** Kotlin, Jetpack Compose for TV, Android instrumentation, Gradle 8.12, PowerShell, `E:\androidSdk`, Graphify, Git committed snapshots.
-
-**Spec:** `docs/superpowers/specs/2026-08-27-phase-5-settings-feature-extraction-design.md`
-
-## Global Constraints
-
-- Preserve the current working tree; do not reset, clean, delete, or mix unrelated changes.
-- Do not start the later live, catalog, or system extraction slices.
-- Do not remove the nine temporary `:data` dependencies or `player.AudioCompatibilityMemoryStore` without domain-facing replacements.
-- Do not use credentials, accounts, USB/Drive, or destructive restore operations without explicit fixtures and authority.
-- Use `E:\androidSdk` for connected validation and keep existing playback/provider failures separately attributed.
-- Use TDD for any production behavior change: failing test first, then minimal implementation, then green verification.
-- After code changes, run `graphify update .`; finish with `git diff --check` and `git status --short`.
-
-### Task 1: Complete the Settings dependency audit
-
-**Files:**
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`
-- Read: `feature/settings/src/main/java/com/streamvault/feature/settings`
-
-**Interfaces:**
-- Consumes: the existing nine-entry `:data` ledger and the concrete `AudioCompatibilityMemoryStore` audit candidate.
-- Produces: exact source locations, current presentation responsibility, and a contract-ready removal direction for every temporary dependency.
-
-- [x] **Step 1: Enumerate exact imports and source locations**
-
-```powershell
-rg -n "data\.local\.dao|data\.local\.entity|data\.preferences\.DatabaseMaintenanceSnapshot|data\.preferences\.PreferencesRepository|data\.sync\.ProviderSyncCommands|data\.sync\.SyncRepairSection|player\.AudioCompatibilityMemoryStore" feature/settings/src/main/java
-```
-
-Expected: exactly the nine ledgered `:data` types plus `player.AudioCompatibilityMemoryStore`, with no new implementation dependencies.
-
-- [x] **Step 2: Classify each use without changing production code**
-
-For every result, record the owning Settings file, whether the use is state observation, action dispatch, formatting, or playback compatibility, and the domain-facing contract/model needed before removal. Confirm no `:feature:provider`, `:feature:playback`, or app-package import is introduced.
-
-- [x] **Step 3: Update and verify the ledger**
-
-Add source locations and explicit “contract not present; removal remains Phase 7” status to the existing table. Re-run the enumeration and inspect the diff. Expected: the same ten implementation references, documentation only, and no dependency removal.
-
-### Task 2: Run safe remaining TV journeys
-
-**Files:**
-- Create or update: `validation/phase5_settings/manual_journeys/` artifacts
-- Modify: `validation/phase5_settings/task11-runtime-validation.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`
-
-**Interfaces:**
-- Consumes: installed `com.streamvault.app.debug`, seeded public provider fixture, `emulator-5554`, and existing Settings route.
-- Produces: screenshots, exact UI/log outcomes, and explicit blockers for operations requiring authority or missing fixtures.
-
-- [x] **Step 1: Launch without clearing app data**
-
-```powershell
-$env:ANDROID_HOME = 'E:\androidSdk'
-& 'E:\androidSdk\platform-tools\adb.exe' -s emulator-5554 shell am start -W -n com.streamvault.app.debug/com.streamvault.app.MainActivity
-```
-
-Expected: `com.streamvault.app.debug/com.streamvault.app.MainActivity` is foregrounded and prior seeded state remains.
-
-- [x] **Step 2: Exercise parental controls without changing protected state**
-
-Navigate to Privacy and the parental-control entry with the D-pad. Open protection-level and PIN dialogs, inspect focus and Back dismissal, and do not enter a new PIN, save, reset, or hide content. Capture a binary-safe screenshot and record the focused UI node plus foreground activity.
-
-- [x] **Step 3: Create one local export fixture only if the UI offers a picker-free safe export**
-
-Use Settings backup export only when it writes an app-owned local export without credentials or external storage. Inspect the local-backup listing and preview. Do not import, restore, delete, or overwrite state. If export requires a picker or external authority, record the exact blocker.
-
-- [x] **Step 4: Exercise diagnostics, recording, and EPG presentation callbacks safely**
-
-Open the provider diagnostics panel, recording storage/browser controls, and EPG source/assignment dialogs. Do not add credentials, create recordings, select an external file, or invoke a player handoff. Record whether each action is reachable and capture screenshots for reachable states.
-
-- [x] **Step 5: Verify runtime evidence and record blockers**
-
-Use `uiautomator dump`, `dumpsys activity`, and bounded logcat extracts for each journey. Add exact outcomes to both reports. Keep credentialed provider flows, USB/Drive, destructive restore, and unavailable diagnostics actions open when they cannot be safely exercised.
-
-### Task 3: Add deterministic coverage for any confirmed Settings gap
-
-**Files:**
-- Test: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsConnectedBehaviorTest.kt`
-- Modify: production Settings source only if a new test demonstrates a defect
-
-**Interfaces:**
-- Consumes: the confirmed behavior gap from Task 2 and existing feature test fixtures.
-- Produces: one focused regression test per confirmed gap, with no unrelated refactor.
-
-- [x] **Step 1: Write the smallest regression test first**
-
-Use the existing `SettingsConnectedBehaviorTest` fixture style. Assert user-visible semantics or callback/state behavior rather than implementation details. If the manual journey finds no defect, add no production code and record that existing coverage is sufficient.
-
-- [x] **Step 2: Run the focused test**
-
-```powershell
-$env:ANDROID_HOME = 'E:\androidSdk'
-.\gradlew.bat :feature:settings:connectedDebugAndroidTest --tests "com.streamvault.feature.settings.presentation.SettingsConnectedBehaviorTest" --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: the focused test suite passes, or a new regression case fails for the confirmed defect before implementation.
-
-- [x] **Step 3: Implement the minimal fix only for a real failing behavior**
-
-Follow the TDD red-green cycle, preserve existing route/callback contracts, and avoid Phase 7 dependency changes.
-
-- [x] **Step 4: Run the focused Settings gates**
-
-```powershell
-.\gradlew.bat :feature:settings:verifyFeatureSettingsBoundary :feature:settings:testDebugUnitTest :feature:settings:lintDebug :feature:settings:compileDebugAndroidTestKotlin :feature:settings:connectedDebugAndroidTest --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: all Settings-specific tasks pass; unrelated app/player/provider failures remain separately documented.
-
-### Task 4: Capture comparable incremental-build samples
-
-**Files:**
-- Create: `validation/phase5_settings/performance-samples-2026-08-28.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`
-
-**Interfaces:**
-- Consumes: committed pre-extraction ref `e12f816f`, committed post-extraction ref `cf468d3e`, identical host/SDK/Gradle settings, and `validation/phase5_settings/performance-protocol.md`.
-- Produces: five comparable source-edit pairs, five comparable test-edit pairs, clean/warm guardrails, task sets, profile paths, medians, p95 values, and an honest target result.
-
-- [x] **Step 1: Create isolated committed snapshots outside the checkout**
-
-Use two detached Git worktrees under a unique system temporary directory. Do not change the current checkout, do not reset it, and leave the measurement snapshots intact rather than deleting them. Verify each snapshot is clean before building.
-
-- [x] **Step 2: Establish identical SDK, Gradle, daemon, and warm-cache state**
-
-In each snapshot set `ANDROID_HOME=E:\androidSdk`, use the repository Gradle wrapper, keep worker/cache settings unchanged, and run the protocol's clean and warm `:app:assembleDebug --profile` guardrails. Record command output, wall time, and profile path.
-
-- [x] **Step 3: Run five source-edit pairs**
-
-Add the same comment-only edit to the pre-ref app Settings production file and the post-ref feature Settings production file. Run the protocol's compile command five times on each ref, recording wall time, executed/up-to-date tasks, Kotlin/KSP tasks, and profile path. Revert only the temporary snapshot edit after its five runs.
-
-- [x] **Step 4: Run five test-edit pairs**
-
-Add the same comment-only edit to the pre-ref Settings unit test and the post-ref moved Settings unit test. Run the protocol's unit-test compilation command five times on each ref and record the same evidence. Revert only the temporary snapshot edit after its five runs.
-
-- [x] **Step 5: Summarize results without overstating targets**
-
-Compute median and p95 for each side and scenario. Demonstrate the 25% source-edit and 20% test-compile targets only if the clean committed pairs support them; otherwise keep the gate open and state why.
-
-### Task 5: Final verification and reporting
-
-**Files:**
-- Modify: `validation/phase5_settings/task11-runtime-validation.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`
-- Update: `graphify-out/` through `graphify update .`
-
-**Interfaces:**
-- Consumes: all task artifacts and command results.
-- Produces: final Settings-slice status with no false completion claim.
-
-- [x] **Step 1: Run the focused final verification**
-
-```powershell
-$env:ANDROID_HOME = 'E:\androidSdk'
-.\gradlew.bat :feature:settings:verifyFeatureSettingsBoundary :feature:settings:testDebugUnitTest :feature:settings:lintDebug :feature:settings:compileDebugAndroidTestKotlin :app:compileDebugKotlin :app:testDebugUnitTest --no-daemon --console=plain --warning-mode=none
-```
-
-- [x] **Step 2: Refresh Graphify after source changes**
-
-```powershell
-graphify update .
-```
-
-- [x] **Step 3: Check diff hygiene and status**
-
-```powershell
-git diff --check
-git status --short
-```
-
-Expected: no whitespace errors, only intentional Settings-slice/source-seam/report artifacts, and no current-checkout reset or cleanup.
diff --git a/docs/superpowers/plans/2026-09-02-catalog-feature-extraction.md b/docs/superpowers/plans/2026-09-02-catalog-feature-extraction.md
deleted file mode 100644
index 1073b437..00000000
--- a/docs/superpowers/plans/2026-09-02-catalog-feature-extraction.md
+++ /dev/null
@@ -1,1273 +0,0 @@
-# Catalog Feature Extraction Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Extract Dashboard, Movies, Series, VOD, Favorites, Search, and Catalog detail presentation into an independently compiled `:feature:catalog` module without changing behavior.
-
-**Architecture:** `:feature:catalog` owns Catalog routes, screens, ViewModels, presentation components, resources, and tests. `:app` remains the composition root and adapts app-update, plugin preparation, download-service, Cast, navigation payload, player-request, Settings-dialog, and shell implementations through Catalog-owned ports and callbacks. The feature depends only on `:core:navigation`, `:core:ui`, `:domain`, and the temporarily allowed `:data` module.
-
-**Tech Stack:** Kotlin, Android Gradle Plugin, Jetpack Compose/TV Material, Navigation Compose, Hilt/KSP, Coroutines/Flow, JUnit, Truth, Mockito, Robolectric, Compose UI testing, Macrobenchmark, Kover, and Graphify.
-
-**Spec:** `docs/superpowers/specs/2026-09-02-phase-5-catalog-feature-extraction-design.md`
-
-## Global Constraints
-
-- Preserve all existing route strings, arguments, return destinations, saved-state presentation hints, focus, test tags, semantics, lazy keys/content types, UI output, and callback order.
-- Do not redesign the UI, convert screens to Views, add a Favorites route, adopt Paging, or change filtering, grouping, ranking, hydration, playback, Cast, download, update, plugin, or provider-sync policy.
-- `:feature:catalog` project dependencies must be exactly `:core:navigation`, `:core:ui`, `:domain`, and `:data`.
-- `:feature:catalog` must not import `com.streamvault.app`, `MainActivity`, `NavController`, `NavHostController`, `:player`, or any `com.streamvault.feature.*` implementation package.
-- `:app` owns player-request construction, route compatibility, payload transport, Settings-dialog composition, app-update/install policy, platform services, and the root navigation host.
-- `PreferencesRepository` and `ProviderSyncStateSource` are temporary Catalog-to-data imports; record every source site in `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`.
-- Keep app resources until no remaining app, test, benchmark, manifest, or sibling-feature reference exists; preserve every locale value and formatting argument.
-- Add a focused failing test before each contract or behavior change, run it red, implement the minimum change, then run focused and neighboring tests.
-- Do not claim Catalog or Phase 5 completion when any required build, connected, device, performance, profile, or resource gate is unavailable or failing.
-- Do not close Playback, Provider, Settings, or Live gates from this slice.
-- Run `graphify update .` after code changes.
-
-## Execution status (2026-09-03)
-
-Tasks 0–12 are implemented and their evidence is recorded under
-`validation/phase5_catalog/`. Task 13 structural/build-isolation and profile
-work is also recorded there. The available seeded Home/Live/Movies/Series/
-Search smoke pass is documented. A temporary local Xtream fixture follow-up
-also exercised VOD/series details, episodes, saved filters, and cross-type
-Search in the production activity; its semantic evidence is in
-`validation/phase5_catalog/task14-xtream-fixture-journeys.md`. The checked-in
-`tools/catalog_xtream_fixture.py` now provides a rerunnable development seed,
-and `tools/catalog_connected_validation.py` provides a semantic ADB journey
-for the fixture-backed Home/Movies/Series/detail/favorite/saved/Search path,
-Movies full-library entry/back, the `Load more (60/63)` → `Pagination Movie 63`
-second-page transition with Infinite scroll restored on, the `Pagination Series
-63` second-page transition, Movie/Series Favorites browse reorder
-save/persistence/restore, and the Settings-owned Dashboard shelf
-customization cancel/save/reset flow. Download completion is now covered by
-the fixture-backed production Downloads journey. RTL/large-text semantics and
- the reduced-motion Catalog instrumentation run also pass. The same 7-test
- Catalog instrumentation suite passes with AOSP TalkBack enabled, but the
- fixture-driven production TalkBack traversal loses semantic D-pad focus in
- the current ADB harness. Cast receiver chooser, the remaining production
- accessibility journey, cache-equivalent performance, and repository-wide
- app lint remain open.
-A focused Dashboard macrobenchmark rerun now passes after public-M3U
-live-channel activity populates a scrollable seeded Home shelf, but it is
-diagnostic after-run evidence rather than the required cache-equivalent paired
-comparison. The paired Dashboard benchmark is explicitly deferred until the
-computer/device has capacity for the baseline and current runs. These
-limitations are documented in
-`docs/COMPOSE_REDUCTION_PHASE5_CATALOG_REPORT.md`. Do not interpret this
-status as completion of Phase 5.
-
----
-
-### Task 0: Freeze Catalog inventory, rollback point, and before measurements
-
-**Files:**
-- Create: `validation/phase5_catalog/task0-inventory.md`
-- Create: `validation/phase5_catalog/source-inventory.txt`
-- Create: `validation/phase5_catalog/project-imports.txt`
-- Create: `validation/phase5_catalog/resource-inventory.txt`
-- Create: `validation/phase5_catalog/test-inventory.txt`
-- Create: `validation/phase5_catalog/performance-before.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-
-**Interfaces:**
-- Consumes: the clean pre-extraction checkout and the acceptance requirements in the spec.
-- Produces: a reproducible ownership/resource/test baseline, five source-edit samples, five test-compile samples, and the initial Catalog transitional-dependency ledger.
-
-- [ ] **Step 1: Confirm the rollback point and clean ownership baseline**
-
-Run:
-
-```powershell
-New-Item -ItemType Directory -Force validation/phase5_catalog | Out-Null
-git status --short
-git rev-parse HEAD
-git branch --show-current
-rg --files app/src/main/java/com/streamvault/app/ui/screens/dashboard app/src/main/java/com/streamvault/app/ui/screens/movies app/src/main/java/com/streamvault/app/ui/screens/series app/src/main/java/com/streamvault/app/ui/screens/vod app/src/main/java/com/streamvault/app/ui/screens/favorites app/src/main/java/com/streamvault/app/ui/screens/search | Sort-Object | Set-Content validation/phase5_catalog/source-inventory.txt
-```
-
-Expected: the working tree is clean before measurement, the branch is `feature/improveCompose`, and the inventory contains 21 production files unless a newer committed change is explicitly explained in `task0-inventory.md`.
-
-- [ ] **Step 2: Record imports, resources, tests, routes, and consumers**
-
-Run:
-
-```powershell
-$catalogRoots = @(
- 'app/src/main/java/com/streamvault/app/ui/screens/dashboard',
- 'app/src/main/java/com/streamvault/app/ui/screens/movies',
- 'app/src/main/java/com/streamvault/app/ui/screens/series',
- 'app/src/main/java/com/streamvault/app/ui/screens/vod',
- 'app/src/main/java/com/streamvault/app/ui/screens/favorites',
- 'app/src/main/java/com/streamvault/app/ui/screens/search'
-)
-rg -n '^import com\.streamvault\.(app|feature|core|domain|data|player)' $catalogRoots | Sort-Object | Set-Content validation/phase5_catalog/project-imports.txt
-rg -n 'R\.(string|plurals|drawable|color|dimen|array)\.[A-Za-z0-9_]+' $catalogRoots | Sort-Object | Set-Content validation/phase5_catalog/resource-inventory.txt
-rg --files app/src/test app/src/androidTest | rg -i '(dashboard|catalog|movie|movies|series|vod|favorites|search|PremiumRouteGoldenTest)' | Sort-Object | Set-Content validation/phase5_catalog/test-inventory.txt
-rg -n 'DashboardScreen|MoviesScreen|MovieDetailScreen|SeriesScreen|SeriesDetailScreen|VodScreen|FavoritesScreen|SearchScreen|registerHomeGraph|registerCatalogGraph' app feature core benchmark docs | Sort-Object | Set-Content validation/phase5_catalog/consumer-inventory.txt
-```
-
-Expected: app, Playback, and Settings couplings match the spec; Favorites has no registered route; the four golden names are present in the app mixed golden suite.
-
-- [ ] **Step 3: Record temporary data imports in the ledger**
-
-Add a `:feature:catalog` section naming:
-
-```text
-PreferencesRepository
- Current sites: MoviesViewModel, MovieDetailViewModel, SeriesViewModel,
- SeriesDetailViewModel, VodViewModel, FavoritesViewModel, DashboardViewModel.
- Current responsibility: persisted browse, variant, parental, dashboard,
- search-adjacent, and display preferences.
- Phase 7 direction: replace with focused domain-facing preference contracts.
-
-ProviderSyncStateSource
- Current site: DashboardViewModel.
- Current responsibility: provider-specific synchronization status.
- Phase 7 direction: expose a domain-facing synchronization-status contract.
-```
-
-Also state that Catalog does not gain a `:player` or sibling-feature dependency.
-
-- [ ] **Step 4: Capture the pre-extraction focused test/build baseline**
-
-Run:
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests 'com.streamvault.app.ui.screens.search.SearchViewModelTest' --tests 'com.streamvault.app.ui.screens.movies.MovieDetailViewModelCastingTest' --tests 'com.streamvault.app.ui.screens.series.SeriesDetailViewModelCastingTest' --tests 'com.streamvault.app.ui.screens.dashboard.DashboardHomeShelvesTest' --tests 'com.streamvault.app.navigation.CatalogRouteResolverTest' :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS. Record command, commit, Java/Gradle versions, daemon/cache state, duration, and any pre-existing warnings in `task0-inventory.md`.
-
-- [ ] **Step 5: Capture five source-edit and five test-compile samples**
-
-Use a reversible whitespace-only edit in `DashboardHomeShelves.kt`, run `:app:compileDebugKotlin --profile` five times from an equivalent warm state, restore the file after each run, then repeat with a whitespace-only edit in `DashboardHomeShelvesTest.kt` and `:app:compileDebugUnitTestKotlin --profile`.
-
-```powershell
-git diff -- app/src/main/java/com/streamvault/app/ui/screens/dashboard/DashboardHomeShelves.kt app/src/test/java/com/streamvault/app/ui/screens/dashboard/DashboardHomeShelvesTest.kt
-./gradlew.bat :app:compileDebugKotlin --profile --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :app:compileDebugUnitTestKotlin --profile --no-daemon --console=plain --warning-mode=none
-git diff --check
-```
-
-Expected: ten comparable samples are recorded in `performance-before.md`; both touched files finish byte-identical to `HEAD`; no measurement edit is committed.
-
-- [ ] **Step 6: Commit the inventory**
-
-```powershell
-git add validation/phase5_catalog docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
-git commit -m 'docs(catalog): record phase 5 extraction baseline'
-```
-
----
-
-### Task 1: Create `:feature:catalog` with a fail-closed boundary
-
-**Files:**
-- Modify: `settings.gradle.kts`
-- Modify: `app/build.gradle.kts`
-- Create: `feature/catalog/build.gradle.kts`
-- Create: `feature/catalog/src/main/AndroidManifest.xml`
-- Create: `feature/catalog/src/test/java/com/streamvault/feature/catalog/CatalogModuleBoundaryTest.kt`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/AppPackageImport.kt`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/FullyQualifiedAppReference.kt`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/MainActivityReference.java`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/RootNavigation.kt`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/RootNavigation.java`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/PlaybackFeatureImport.kt`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/SettingsFeatureImport.java`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/LiveFeatureImport.kt`
-- Create: `feature/catalog/src/test/resources/boundary-fixtures/PlayerModuleImport.java`
-
-**Interfaces:**
-- Consumes: existing `:feature:live` Android-library and boundary-task conventions.
-- Produces: an empty Compose/Hilt Catalog library and `verifyFeatureCatalogBoundary` enforcing the exact dependency/source policy.
-
-- [ ] **Step 1: Register the module and app dependency**
-
-Add:
-
-```kotlin
-// settings.gradle.kts
-include(":feature:catalog")
-
-// app/build.gradle.kts dependencies
-implementation(project(":feature:catalog"))
-```
-
-Create the manifest:
-
-```xml
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
-```
-
-- [ ] **Step 2: Add the library build with exact approved dependencies**
-
-Mirror `feature/live/build.gradle.kts` for SDK 36, min SDK 25, Java/Kotlin 17, Compose, Hilt/KSP, Kover, unit, and connected-test libraries. Use exactly:
-
-```kotlin
-val allowedProjectDependencies = setOf(
- ":core:navigation",
- ":core:ui",
- ":domain",
- ":data",
-)
-
-dependencies {
- implementation(project(":core:navigation"))
- implementation(project(":core:ui"))
- implementation(project(":domain"))
- implementation(project(":data"))
-}
-```
-
-Do not add `:player` or any `:feature:*` dependency.
-
-- [ ] **Step 3: Implement and prove the boundary verifier red**
-
-Use these source tokens in `verifyFeatureCatalogBoundary`:
-
-```kotlin
-val forbiddenFeatureCatalogSourceTokens = listOf(
- "import com.streamvault.app",
- "com.streamvault.app",
- "import com.streamvault.player",
- "com.streamvault.player",
- "import com.streamvault.feature.playback",
- "com.streamvault.feature.playback",
- "import com.streamvault.feature.provider",
- "com.streamvault.feature.provider",
- "import com.streamvault.feature.settings",
- "com.streamvault.feature.settings",
- "import com.streamvault.feature.live",
- "com.streamvault.feature.live",
- "MainActivity",
- "NavHostController",
- "NavController",
-)
-```
-
-Temporarily create `feature/catalog/src/main/java/com/streamvault/feature/catalog/BoundaryProbe.kt` containing `import com.streamvault.app.MainActivity`, then run:
-
-```powershell
-./gradlew.bat :feature:catalog:verifyFeatureCatalogBoundary --no-daemon --console=plain
-```
-
-Expected: FAIL naming both the app-package and `MainActivity` tokens. Delete the probe after the red run.
-
-- [ ] **Step 4: Add fixtures and boundary unit coverage**
-
-Each fixture must contain its named forbidden reference. `CatalogModuleBoundaryTest` reads the generated report and asserts the exact dependency list, no main-source violations, and detection of Kotlin and Java fixtures for app, player, Playback, Provider, Settings, Live, activity, and root-controller categories.
-
-Run:
-
-```powershell
-./gradlew.bat :feature:catalog:verifyFeatureCatalogBoundary :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.CatalogModuleBoundaryTest' --no-daemon --console=plain
-```
-
-Expected: PASS; `feature/catalog/build/reports/feature-catalog-boundary/report.txt` names exactly four project dependencies.
-
-- [ ] **Step 5: Commit the module boundary**
-
-```powershell
-git add settings.gradle.kts app/build.gradle.kts feature/catalog
-git commit -m 'feat(catalog): add feature module boundary'
-```
-
----
-
-### Task 2: Add Catalog route and integration contracts test-first
-
-**Files:**
-- Create: `feature/catalog/src/main/java/com/streamvault/feature/catalog/navigation/CatalogRoutePatterns.kt`
-- Create: `feature/catalog/src/main/java/com/streamvault/feature/catalog/api/CatalogFeatureContracts.kt`
-- Create: `feature/catalog/src/main/java/com/streamvault/feature/catalog/api/CatalogPlatformPorts.kt`
-- Create: `feature/catalog/src/test/java/com/streamvault/feature/catalog/navigation/CatalogRoutePatternsTest.kt`
-- Create: `feature/catalog/src/test/java/com/streamvault/feature/catalog/api/CatalogFeatureContractsTest.kt`
-
-**Interfaces:**
-- Consumes: Core UI Compose types plus domain `StreamInfo`, `Result`, and `AppHomeDashboardShelf`.
-- Produces: the exact route constants, shell/customization slots, platform/preparation/download/update/Cast ports, and Catalog-owned event models defined by the spec.
-
-- [ ] **Step 1: Write route-pattern tests and run red**
-
-Test exact values:
-
-```kotlin
-@Test fun `catalog route values preserve app compatibility`() {
- assertThat(CatalogRoutePatterns.HOME).isEqualTo("home")
- assertThat(CatalogRoutePatterns.MOVIES).isEqualTo("movies")
- assertThat(CatalogRoutePatterns.SERIES).isEqualTo("series")
- assertThat(CatalogRoutePatterns.VOD).isEqualTo("vod")
- assertThat(CatalogRoutePatterns.SEARCH_DESTINATION).isEqualTo("search?query={query}")
- assertThat(CatalogRoutePatterns.MOVIE_DETAIL)
- .isEqualTo("movie_detail/{movieId}?returnRoute={returnRoute}")
- assertThat(CatalogRoutePatterns.SERIES_DETAIL)
- .isEqualTo("series_detail/{seriesId}?returnRoute={returnRoute}")
-}
-```
-
-Run:
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.navigation.CatalogRoutePatternsTest' --no-daemon --console=plain
-```
-
-Expected: FAIL because `CatalogRoutePatterns` does not exist.
-
-- [ ] **Step 2: Implement route constants**
-
-Create the object exactly as specified in the design, including both presentation-hint keys.
-
-```kotlin
-object CatalogRoutePatterns {
- const val HOME = "home"
- const val MOVIES = "movies"
- const val SERIES = "series"
- const val VOD = "vod"
- const val SEARCH = "search"
- const val SEARCH_DESTINATION = "search?query={query}"
- const val MOVIE_DETAIL = "movie_detail/{movieId}?returnRoute={returnRoute}"
- const val SERIES_DETAIL = "series_detail/{seriesId}?returnRoute={returnRoute}"
- const val MOVIE_DETAIL_PRESENTATION_HINT_KEY = "movie_detail_presentation_hint"
- const val SERIES_DETAIL_PRESENTATION_HINT_KEY = "series_detail_presentation_hint"
-}
-```
-
-- [ ] **Step 3: Write contract usability tests and run red**
-
-Create fakes that implement `CatalogPlatformHost`, `CatalogStreamPreparer`, `CatalogDownloadStarter`, `CatalogCastPort`, and `CatalogAppUpdatePort`. Assert that a `CatalogCastRequest` preserves every field and that `CatalogCastStartResult`, `CatalogCastPlaybackEvent`, `CatalogUiEvent`, and update-action variants are exhaustive.
-
-```kotlin
-@Test fun `cast request preserves feature owned presentation inputs`() {
- val streamInfo = StreamInfo(url = "https://example.test/movie.m3u8")
- val request = CatalogCastRequest(streamInfo, "Title", "Subtitle", "art", 42_000L)
- assertThat(request.streamInfo).isEqualTo(streamInfo)
- assertThat(request.startPositionMs).isEqualTo(42_000L)
- assertThat(request.subtitle).isEqualTo("Subtitle")
-}
-```
-
-Expected: FAIL because the contracts do not exist.
-
-- [ ] **Step 4: Implement the contracts**
-
-Implement the signatures from the spec. `CatalogScaffoldContent` contains exactly `currentDestination: AppDestination`, `title`, `subtitle`, `CatalogNavigationChrome`, `topBarVisible`, `compactHeader`, `showScreenHeader`, and `ColumnScope` content. It does not expose header, action, modifier, or padding slots because no current Catalog root passes them.
-
-- [ ] **Step 5: Run green and boundary checks**
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.api.*' --tests 'com.streamvault.feature.catalog.navigation.*' :feature:catalog:verifyFeatureCatalogBoundary --no-daemon --console=plain
-```
-
-Expected: PASS with no forbidden source or dependency reference.
-
-- [ ] **Step 6: Commit the contracts**
-
-```powershell
-git add feature/catalog
-git commit -m 'feat(catalog): define routes and integration ports'
-```
-
----
-
-### Task 3: Implement app adapters and Hilt bindings with delegation tests
-
-**Files:**
-- Create: `app/src/main/java/com/streamvault/app/catalog/AppCatalogStreamPreparer.kt`
-- Create: `app/src/main/java/com/streamvault/app/catalog/AppCatalogDownloadStarter.kt`
-- Create: `app/src/main/java/com/streamvault/app/catalog/AppCatalogCastPort.kt`
-- Create: `app/src/main/java/com/streamvault/app/catalog/AppCatalogUpdatePort.kt`
-- Create: `app/src/main/java/com/streamvault/app/di/AppCatalogModule.kt`
-- Modify: `app/src/main/java/com/streamvault/app/MainActivity.kt`
-- Test: `app/src/test/java/com/streamvault/app/catalog/AppCatalogAdaptersTest.kt`
-
-**Interfaces:**
-- Consumes: Task 2 ports, `StreamVaultPluginManager`, `DownloadForegroundService`, Playback Cast factory/coordinator, `PreferencesRepository`, app update policy, and `AppUpdateInstaller`.
-- Produces: app-owned implementations bound to the four injectable Catalog ports plus `MainActivity : CatalogPlatformHost`.
-
-- [ ] **Step 1: Write adapter delegation tests and run red**
-
-Cover the following cases with concrete Mockito/Robolectric fakes:
-
-```kotlin
-@Test
-fun `stream preparer delegates without rewriting result`() = runTest {
- val input = StreamInfo(url = "https://example.test/input.m3u8")
- val output = StreamInfo(url = "https://example.test/prepared.m3u8")
- whenever(pluginManager.preparePlaybackStreamInfo(input)).thenReturn(Result.success(output))
-
- assertThat(adapter.prepare(input)).isEqualTo(Result.success(output))
- verify(pluginManager).preparePlaybackStreamInfo(input)
-}
-
-@Test
-fun `download starter forwards successful string id to foreground service`() {
- adapter.startDownload("download-42")
-
- val intent = shadowOf(applicationContext).nextStartedService
- assertThat(intent.component?.className).isEqualTo(DownloadForegroundService::class.java.name)
- assertThat(intent.getStringExtra("download_id")).isEqualTo("download-42")
-}
-```
-
-The Cast test supplies one factory/coordinator result for each `CastStartResult`,
-asserts every `CatalogCastRequest` field reaching the factory, and asserts the
-ordered mapped lifecycle events. The update test supplies each
-`AppUpdateActionState`, asserts the same-named `CatalogUpdateAction`, and
-verifies `installDownloadedUpdate("sha-256")` receives `"sha-256"` unchanged.
-
-Use constructor-injected function delegates around static/service entry points so tests do not launch Android services. Run:
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests 'com.streamvault.app.catalog.AppCatalogAdaptersTest' --no-daemon --console=plain
-```
-
-Expected: FAIL because adapter classes do not exist.
-
-- [ ] **Step 2: Implement preparation and download adapters**
-
-```kotlin
-@Singleton
-class AppCatalogStreamPreparer @Inject constructor(
- private val pluginManager: StreamVaultPluginManager,
-) : CatalogStreamPreparer {
- override suspend fun prepare(streamInfo: StreamInfo): Result<StreamInfo> =
- pluginManager.preparePlaybackStreamInfo(streamInfo)
-}
-
-@Singleton
-class AppCatalogDownloadStarter @Inject constructor(
- @ApplicationContext private val context: Context,
-) : CatalogDownloadStarter {
- override fun startDownload(downloadId: String) {
- DownloadForegroundService.startDownload(context, downloadId)
- }
-}
-```
-
-- [ ] **Step 3: Implement Cast mapping without leaking Playback types**
-
-`AppCatalogCastPort.startCasting` must call the existing `CastMediaRequestFactory.buildFromStreamInfo`, then `CastPlaybackCoordinator.startCasting`, and map:
-
-```text
-STARTED -> CatalogCastStartResult.Started
-ROUTE_SELECTION_REQUIRED -> CatalogCastStartResult.RouteSelectionRequired
-UNAVAILABLE -> CatalogCastStartResult.Unavailable
-UNSUPPORTED/build failure-> CatalogCastStartResult.Unsupported(CatalogMessage.CastUnsupported)
-```
-
-Map coordinator lifecycle events to `RouteSelectionCancelled` or `Finished(succeeded, message)` without exposing Playback resource IDs.
-
-- [ ] **Step 4: Implement update mapping**
-
-`AppCatalogUpdatePort.notice` combines the five existing cached release flows with `AppUpdateInstaller.downloadState`, applies `isRemoteVersionNewer` and `latestAppUpdateAction`, and maps every `AppUpdateActionState` by name to `CatalogUpdateAction`. `installDownloadedUpdate` delegates the supplied SHA unchanged.
-
-- [ ] **Step 5: Bind injectable ports and implement the activity host**
-
-```kotlin
-@Module
-@InstallIn(SingletonComponent::class)
-abstract class AppCatalogModule {
- @Binds @Singleton abstract fun bindStreamPreparer(impl: AppCatalogStreamPreparer): CatalogStreamPreparer
- @Binds @Singleton abstract fun bindDownloadStarter(impl: AppCatalogDownloadStarter): CatalogDownloadStarter
- @Binds @Singleton abstract fun bindCastPort(impl: AppCatalogCastPort): CatalogCastPort
- @Binds @Singleton abstract fun bindUpdatePort(impl: AppCatalogUpdatePort): CatalogAppUpdatePort
-}
-```
-
-Add `CatalogPlatformHost` to `MainActivity`'s implemented interfaces and delegate `openCastRouteChooser()` to the existing method without changing it.
-
-- [ ] **Step 6: Run focused and app compilation checks**
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests 'com.streamvault.app.catalog.AppCatalogAdaptersTest' :feature:catalog:verifyFeatureCatalogBoundary :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; the Catalog feature remains sibling-feature independent.
-
-- [ ] **Step 7: Commit adapters**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/catalog app/src/main/java/com/streamvault/app/di/AppCatalogModule.kt app/src/main/java/com/streamvault/app/MainActivity.kt app/src/test/java/com/streamvault/app/catalog
-git commit -m 'feat(catalog): adapt app platform services'
-```
-
----
-
-### Task 4: Establish Catalog resource and localization ownership
-
-**Files:**
-- Create: `feature/catalog/src/main/res/values/strings.xml`
-- Create locale strings: `feature/catalog/src/main/res/values-ar/strings.xml`, `values-cs/strings.xml`, `values-da/strings.xml`, `values-de/strings.xml`, `values-el/strings.xml`, `values-es/strings.xml`, `values-fi/strings.xml`, `values-fr/strings.xml`, `values-hu/strings.xml`, `values-in/strings.xml`, `values-it/strings.xml`, `values-iw/strings.xml`, `values-ja/strings.xml`, `values-ko/strings.xml`, `values-nb/strings.xml`, `values-nl/strings.xml`, `values-pl/strings.xml`, `values-pt/strings.xml`, `values-ro/strings.xml`, `values-ru/strings.xml`, `values-sv/strings.xml`, `values-tr/strings.xml`, `values-uk/strings.xml`, `values-vi/strings.xml`, and `values-zh/strings.xml` under `feature/catalog/src/main/res/`
-- Create plural resources: `feature/catalog/src/main/res/values/plurals.xml`, `values-ar/plurals.xml`, `values-cs/plurals.xml`, `values-da/plurals.xml`, `values-de/plurals.xml`, `values-el/plurals.xml`, `values-es/plurals.xml`, `values-fi/plurals.xml`, `values-fr/plurals.xml`, `values-hu/plurals.xml`, `values-in/plurals.xml`, `values-it/plurals.xml`, `values-iw/plurals.xml`, `values-ja/plurals.xml`, `values-ko/plurals.xml`, `values-nb/plurals.xml`, `values-nl/plurals.xml`, `values-pl/plurals.xml`, `values-pt/plurals.xml`, `values-ro/plurals.xml`, `values-ru/plurals.xml`, `values-sv/plurals.xml`, `values-tr/plurals.xml`, `values-uk/plurals.xml`, `values-vi/plurals.xml`, and `values-zh/plurals.xml` under `feature/catalog/src/main/res/`
-- Create: `validation/phase5_catalog/locale_audit.ps1`
-- Create: `validation/phase5_catalog/task4-locale-resources.md`
-
-**Interfaces:**
-- Consumes: Task 0 resource inventory and all app locale files.
-- Produces: a feature namespace containing every resource needed by moved Catalog source/tests with exact locale parity.
-
-- [ ] **Step 1: Write the locale audit and prove it reports missing keys**
-
-The PowerShell audit must parse XML by resource type/name, compare the Catalog default key set against every app locale containing that key, and report `missing`, `valueMismatch`, `formatMismatch`, and `unexpected` counts. Before copying resources, run:
-
-```powershell
-powershell -ExecutionPolicy Bypass -File validation/phase5_catalog/locale_audit.ps1
-```
-
-Expected: nonzero missing keys and exit code 1.
-
-- [ ] **Step 2: Copy exact Catalog resource values**
-
-Copy all keys referenced by Task 0 production/tests plus Cast/download messages mapped in Tasks 2-3. Preserve `%1$s`, `%1$d`, plural quantities, escaped apostrophes, newlines, and translatable flags. Use `com.streamvault.feature.catalog.R` in moved code; do not use app resource aliases.
-
-- [ ] **Step 3: Run locale audit green**
-
-```powershell
-powershell -ExecutionPolicy Bypass -File validation/phase5_catalog/locale_audit.ps1
-./gradlew.bat :feature:catalog:processDebugResources :feature:catalog:verifyFeatureCatalogBoundary --no-daemon --console=plain
-```
-
-Expected: exit code 0; all four audit counts are zero; Android resource processing passes.
-
-- [ ] **Step 4: Commit resource ownership**
-
-```powershell
-git add feature/catalog/src/main/res validation/phase5_catalog/locale_audit.ps1 validation/phase5_catalog/task4-locale-resources.md
-git commit -m 'feat(catalog): add localized feature resources'
-```
-
----
-
-### Task 5: Move Catalog-specific presentation primitives
-
-**Files:**
-- Create under `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/components/`: `CatalogCards.kt`, `CatalogCategoryRow.kt`, `CatalogContinueWatchingRow.kt`, `CatalogSelectionChipRow.kt`, `CatalogSavedCategoryContextCard.kt`, `CatalogSavedCategoryShortcutsRow.kt`, `CatalogReorderTopBar.kt`, `CatalogChannelProgressTicker.kt`, `CatalogBrowseScaffold.kt`, `CatalogInfiniteScrollEffect.kt`, `CatalogVodChrome.kt`, `CatalogVodClassicBrowser.kt`, `CatalogExternalRatingsStrip.kt`, `CatalogEpisodeRowCard.kt`, `CatalogGroupDialogs.kt`
-- Create: `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/time/CatalogTimeFormatting.kt`
-- Test: `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/CatalogPresentationPrimitivesTest.kt`
-- Test: `feature/catalog/src/androidTest/java/com/streamvault/feature/catalog/presentation/CatalogPresentationBehaviorTest.kt`
-
-**Interfaces:**
-- Consumes: Task 4 resources and existing app Catalog-only component behavior.
-- Produces: app-independent feature-local rendering primitives used by every moved Catalog screen.
-
-- [ ] **Step 1: Add focused pure tests and run red**
-
-Cover the shared ticker/progress calculation, stable semantic key construction, VOD selection-chip identity, duration formatting, and infinite-scroll threshold decision. Preserve current edge cases: missing program, zero duration, negative position, mixed provider IDs, empty lists, and a load request already in progress.
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.CatalogPresentationPrimitivesTest' --no-daemon --console=plain
-```
-
-Expected: FAIL because feature-local primitives do not exist.
-
-- [ ] **Step 2: Copy behavior into focused feature files**
-
-Copy only the Catalog-consumed declarations from the current app files. Keep parameters, defaults, modifiers, keys, `contentType`, focus properties, test tags, semantics, colors, sizes, and callback order unchanged. Rename public declarations with `Catalog` prefixes only where needed to avoid accidental app/shared ownership; update moved call sites in Tasks 6-9.
-
-- [ ] **Step 3: Remove app-specific dependencies from the copies**
-
-Use:
-
-```kotlin
-import com.streamvault.core.ui.device.rememberIsTelevisionDevice
-import com.streamvault.core.ui.time.LocalUiTimeFormat
-import com.streamvault.core.ui.time.createDateTimeFormat
-```
-
-Keep the millisecond position formatter feature-local. Replace app shell/resource/navigation imports with Task 2 slots, Task 4 resources, Core UI types, or explicit callbacks. Do not import another feature.
-
-- [ ] **Step 4: Add connected behavior coverage**
-
-Render representative channel/movie/series cards, category row, selection chips, and VOD browse actions with fakes. Assert focusability, click callback count, selected semantics, stable tags, and D-pad activation.
-
-```powershell
-./gradlew.bat :feature:catalog:compileDebugAndroidTestKotlin :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.*' :feature:catalog:verifyFeatureCatalogBoundary --no-daemon --console=plain
-```
-
-Expected: PASS and no app/sibling-feature import.
-
-- [ ] **Step 5: Commit primitives**
-
-```powershell
-git add feature/catalog/src/main feature/catalog/src/test feature/catalog/src/androidTest
-git commit -m 'feat(catalog): move presentation primitives'
-```
-
----
-
-### Task 6: Move Movies, Series, and combined VOD browsing
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/movies/MoviesViewModel.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/movies/MoviesViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/movies/MoviesScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/movies/MoviesScreen.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/series/SeriesViewModel.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/series/SeriesViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/series/SeriesScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/series/SeriesScreen.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/vod/VodViewModel.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/vod/VodViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/vod/VodScreenCommon.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/vod/VodScreenCommon.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/vod/VodScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/vod/VodScreen.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/vod/VodReorderHelpers.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/vod/VodReorderHelpers.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/vod/VodFavoriteHelpers.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/vod/VodFavoriteHelpers.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/vod/VodCatalogBuilders.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/vod/VodCatalogBuilders.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/vod/VodBrowseStateHelpers.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/vod/VodBrowseStateHelpers.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/graph/CatalogGraph.kt`
-- Test: `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/vod/CatalogVodHelpersTest.kt`
-
-**Interfaces:**
-- Consumes: Task 2 `CatalogScaffoldContent`, Task 4 resources, Task 5 primitives, existing repositories/use cases, and temporary `PreferencesRepository`.
-- Produces: app-independent Movies, Series, and VOD browse screens while the app graph temporarily registers them.
-
-- [ ] **Step 1: Add pure VOD helper characterization tests and run them before moves**
-
-Cover preview/search catalog construction, group membership, favorite marking, category selection, load-limit increments, reorder movement/save order, filter changes, and sort changes using the current public/internal behavior.
-
-```powershell
-./gradlew.bat :app:compileDebugUnitTestKotlin --no-daemon --console=plain
-```
-
-Expected: existing app compilation passes before ownership changes.
-
-- [ ] **Step 2: Move VOD helpers and ViewModel, then run feature tests**
-
-Update packages to `com.streamvault.feature.catalog.presentation.vod`, resource imports to Catalog R, and imports to Task 5 components. Preserve every function signature used by Movies/Series.
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.vod.*' :feature:catalog:compileDebugKotlin --no-daemon --console=plain
-```
-
-Expected: PASS.
-
-- [ ] **Step 3: Move Movies and Series browse ViewModels**
-
-Change only package/import ownership. Keep state-flow topology, `WhileSubscribed` values, hydration windows, filters, sort order, grouped variants, favorite/group operations, and message behavior unchanged.
-
-- [ ] **Step 4: Move browse screens behind the scaffold slot**
-
-Add a required `scaffold: CatalogScaffoldContent` parameter to `MoviesScreen`, `SeriesScreen`, and `VodScreen`. Replace `AppScreenScaffold` calls with that slot, pass `AppDestination.Movies`, `AppDestination.Series`, or `AppDestination.Vod`, and use `CatalogNavigationChrome.TopBar`. Remove the raw `onNavigate` and `currentRoute` parameters because these screens use them only for the app shell.
-
-- [ ] **Step 5: Keep the app graph compiling through temporary imports**
-
-Update only screen imports and pass an app scaffold lambda that delegates to the unchanged `AppScreenScaffold`. Do not move graph ownership yet.
-
-```powershell
-./gradlew.bat :feature:catalog:verifyFeatureCatalogBoundary :feature:catalog:testDebugUnitTest :feature:catalog:compileDebugKotlin :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; old app browse files are absent; routes still resolve through the app graph.
-
-- [ ] **Step 6: Commit browse ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/navigation/graph/CatalogGraph.kt feature/catalog app/src/main/java/com/streamvault/app/ui/screens/movies app/src/main/java/com/streamvault/app/ui/screens/series app/src/main/java/com/streamvault/app/ui/screens/vod
-git commit -m 'feat(catalog): move browse presentation'
-```
-
----
-
-### Task 7: Move movie and series detail flows behind Catalog ports
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/movies/MovieDetailViewModel.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/movies/MovieDetailViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/movies/MovieDetailScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/movies/MovieDetailScreen.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/series/SeriesDetailViewModel.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/series/SeriesDetailViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/series/SeriesDetailScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/series/SeriesDetailScreen.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/movies/MovieDetailViewModelCastingTest.kt` -> `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/movies/MovieDetailViewModelCastingTest.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/series/SeriesDetailViewModelCastingTest.kt` -> `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/series/SeriesDetailViewModelCastingTest.kt`
-- Create: `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/CatalogDownloadBehaviorTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/graph/CatalogGraph.kt`
-
-**Interfaces:**
-- Consumes: Task 2 ports/events/keys, Task 3 app bindings, Task 4 messages, and Task 5 detail components/formatting.
-- Produces: app- and Playback-independent detail ViewModels/screens preserving grouped hints, Cast, copy, download, favorite, ratings, and return behavior.
-
-- [ ] **Step 1: Rewrite Cast tests against Catalog contracts and run red**
-
-Replace Playback fakes with a `FakeCatalogCastPort`. Preserve assertions for resume positions, titles/subtitles, artwork, route chooser events, unsupported/unavailable messages, session failure, load success/failure, cancellation, and `isCasting` reset.
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.movies.MovieDetailViewModelCastingTest' --tests 'com.streamvault.feature.catalog.presentation.series.SeriesDetailViewModelCastingTest' --no-daemon --console=plain
-```
-
-Expected: FAIL while ViewModels still depend on Playback contracts.
-
-- [ ] **Step 2: Replace direct plugin and Cast implementations**
-
-Inject `CatalogStreamPreparer` and `CatalogCastPort`. Build `CatalogCastRequest` from the same `StreamInfo`, title, subtitle, artwork, live flag implication, and start position. Preserve the current report-mode state machine and emit `CatalogUiEvent` instead of Playback `CastUiEvent` or resource IDs.
-
-- [ ] **Step 3: Replace Context/service download behavior and test it**
-
-Change `downloadMovie(context)` and `downloadEpisode(context, episode)` to context-free methods. Keep `DownloadManager.enqueueDownload` and request fields unchanged. On success call `CatalogDownloadStarter.startDownload(id)` and emit `ShowMessage(DownloadStarted)`; map error/no-URL to the matching Catalog messages.
-
-```kotlin
-verify(downloadStarter).startDownload(downloadId)
-assertThat(events.first()).isEqualTo(CatalogUiEvent.ShowMessage(CatalogMessage.DownloadStarted))
-```
-
-- [ ] **Step 4: Replace MainActivity discovery in detail screens**
-
-Add `platformHost: CatalogPlatformHost?` to both detail screens. Collect `CatalogUiEvent`; call `platformHost?.openCastRouteChooser()` for chooser events and render feature-owned message strings for message events. Keep clipboard and trailer intents at the screen boundary using Android framework APIs.
-
-- [ ] **Step 5: Move presentation-hint key ownership**
-
-Read `CatalogRoutePatterns.MOVIE_DETAIL_PRESENTATION_HINT_KEY` and `SERIES_DETAIL_PRESENTATION_HINT_KEY` from `SavedStateHandle`. Update app payload code to use those constants without changing where hints are copied.
-
-- [ ] **Step 6: Update temporary app graph imports and verify**
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.movies.*' --tests 'com.streamvault.feature.catalog.presentation.series.*' :feature:catalog:verifyFeatureCatalogBoundary :app:testDebugUnitTest --tests 'com.streamvault.app.navigation.*' :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; feature source has no `MainActivity`, app service/plugin, or Playback import.
-
-- [ ] **Step 7: Commit detail ownership**
-
-```powershell
-git add feature/catalog app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/ui/screens/movies app/src/test/java/com/streamvault/app/ui/screens/series app/src/main/java/com/streamvault/app/ui/screens/movies app/src/main/java/com/streamvault/app/ui/screens/series
-git commit -m 'feat(catalog): move media detail presentation'
-```
-
----
-
-### Task 8: Move Dashboard with update and Settings composition seams
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/dashboard/DashboardViewModel.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/dashboard/DashboardViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/dashboard/DashboardScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/dashboard/DashboardScreen.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/dashboard/DashboardHomeShelves.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/dashboard/DashboardHomeShelves.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/dashboard/DashboardHomeShelvesTest.kt` -> `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/dashboard/DashboardHomeShelvesTest.kt`
-- Create: `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/dashboard/DashboardUpdatePortTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/graph/HomeGraph.kt`
-
-**Interfaces:**
-- Consumes: `CatalogAppUpdatePort`, `CatalogDashboardShelfCustomizationContent`, `CatalogScaffoldContent`, Task 5 media components, and existing domain/data dependencies.
-- Produces: a feature-owned Home/Dashboard screen with no Settings or app-update implementation dependency.
-
-- [ ] **Step 1: Characterize update mapping at the Dashboard boundary and run red**
-
-Use a fake `CatalogAppUpdatePort` to assert notice collection, all five action values, SHA forwarding on install, success message, error message, and `userMessageShown` clearing.
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.dashboard.DashboardUpdatePortTest' --no-daemon --console=plain
-```
-
-Expected: FAIL because Dashboard still injects app update implementations.
-
-- [ ] **Step 2: Move Dashboard ViewModel and replace update imports**
-
-Inject `CatalogAppUpdatePort`, combine `notice` at the same point in the existing Dashboard flow, and delegate install with the current notice SHA. Keep all shelf limits, provider/combined-profile logic, recording IDs, parental filtering, category pinning, synchronization state, feature selection, and message behavior unchanged.
-
-- [ ] **Step 3: Move Dashboard rendering behind the two composition slots**
-
-Add required `scaffold` and `dashboardShelfCustomizationContent` parameters. Replace `onNavigate: (String) -> Unit` and `currentRoute: String` with `onDestinationRequested: (AppDestination) -> Unit`; pass `AppDestination.Home` to the scaffold. Map every former `Routes` call exactly: Settings to `AppDestination.Settings()`, Live to `AppDestination.LiveTv(categoryId)`, Movies to `AppDestination.Movies`, and Series to `AppDestination.Series`. Replace the direct Settings dialog call with:
-
-```kotlin
-dashboardShelfCustomizationContent(
- uiState.homeDashboardShelves,
- { showHomeCustomizationDialog = false },
- { shelves ->
- viewModel.setHomeDashboardShelves(shelves)
- showHomeCustomizationDialog = false
- },
-)
-```
-
-Use Core UI device/time contracts and Catalog media components. Preserve shelf order, keys, content types, scroll states, and focus behavior.
-
-- [ ] **Step 4: Adapt the app Home graph temporarily**
-
-Import the feature Dashboard screen, pass `AppScreenScaffold`, and render `DashboardShelfCustomizationDialog` only inside the app-supplied customization lambda.
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.dashboard.*' :feature:catalog:verifyFeatureCatalogBoundary :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; `feature/catalog/src/main` has no Settings or app-update import.
-
-- [ ] **Step 5: Commit Dashboard ownership**
-
-```powershell
-git add feature/catalog app/src/main/java/com/streamvault/app/navigation/graph/HomeGraph.kt app/src/main/java/com/streamvault/app/ui/screens/dashboard app/src/test/java/com/streamvault/app/ui/screens/dashboard
-git commit -m 'feat(catalog): move dashboard presentation'
-```
-
----
-
-### Task 9: Move Search and Favorites
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/search/SearchScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/search/SearchScreen.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/search/SearchViewModelTest.kt` -> `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/search/SearchViewModelTest.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/favorites/FavoritesViewModel.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/favorites/FavoritesViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/favorites/FavoritesScreen.kt` -> `feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/favorites/FavoritesScreen.kt`
-- Create: `feature/catalog/src/test/java/com/streamvault/feature/catalog/presentation/favorites/FavoritesViewModelTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/graph/CatalogGraph.kt`
-
-**Interfaces:**
-- Consumes: Task 2 scaffold/navigation callbacks, Task 4 resources, Task 5 cards/chips/ticker, domain repositories/managers, and temporary Preferences.
-- Produces: app-independent Search and Favorites presentation; Favorites remains intentionally unregistered.
-
-- [ ] **Step 1: Move Search tests and prove package transition red**
-
-Update the test package/import to the feature namespace before moving production. Run:
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.search.SearchViewModelTest' --no-daemon --console=plain
-```
-
-Expected: FAIL because `SearchViewModel` is still app-owned.
-
-- [ ] **Step 2: Move Search production and preserve independent failure behavior**
-
-Move the ViewModel and screen together, add the scaffold slot, pass `AppDestination.Search()` to it, remove the raw `onNavigate` and `currentRoute` parameters, and replace app cards, ticker, device, and resources. Preserve query initialization, trimming, recent-query deduplication/cap, per-section errors, recording/scheduled badges, parental PIN flow, focus restoration, tab state, and search result keys.
-
-- [ ] **Step 3: Add Favorites ViewModel characterization coverage**
-
-Cover preset/provider-scope selection, section construction, managed groups, reorder start/move/save/cancel, history mapping, global shelf title/subtitle, and user-message clearing.
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.favorites.FavoritesViewModelTest' --no-daemon --console=plain
-```
-
-Expected: FAIL before Favorites production moves.
-
-- [ ] **Step 4: Move Favorites without creating a route**
-
-Move production, add the scaffold slot plus `currentDestination: AppDestination` and `onDestinationRequested: (AppDestination) -> Unit`, and replace app chips/dialogs/resources with Catalog/Core equivalents. Convert the raw Series-detail string action to `AppDestination.SeriesDetail(item.favorite.contentId)`. Do not add a composable destination or `AppDestination` variant.
-
-- [ ] **Step 5: Update the temporary Search registration and verify**
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.presentation.search.*' --tests 'com.streamvault.feature.catalog.presentation.favorites.*' :feature:catalog:verifyFeatureCatalogBoundary :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; all six accepted app screen directories are now empty/absent.
-
-- [ ] **Step 6: Commit Search and Favorites ownership**
-
-```powershell
-git add feature/catalog app/src/main/java/com/streamvault/app/navigation/graph/CatalogGraph.kt app/src/main/java/com/streamvault/app/ui/screens/search app/src/main/java/com/streamvault/app/ui/screens/favorites app/src/test/java/com/streamvault/app/ui/screens/search
-git commit -m 'feat(catalog): move search and favorites presentation'
-```
-
----
-
-### Task 10: Move graph registration and preserve app navigation mapping
-
-**Files:**
-- Create: `feature/catalog/src/main/java/com/streamvault/feature/catalog/navigation/CatalogGraph.kt`
-- Create: `feature/catalog/src/test/java/com/streamvault/feature/catalog/navigation/CatalogGraphTest.kt`
-- Create: `feature/catalog/src/androidTest/java/com/streamvault/feature/catalog/navigation/CatalogGraphBehaviorTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationKeys.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigationPayloads.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigation.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/NavControllerNavigator.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/CatalogRouteResolverTest.kt`
-- Delete: `app/src/main/java/com/streamvault/app/navigation/graph/HomeGraph.kt`
-- Delete: `app/src/main/java/com/streamvault/app/navigation/graph/CatalogGraph.kt`
-
-**Interfaces:**
-- Consumes: Tasks 2-9 screens/contracts and existing app route/player/payload helpers.
-- Produces: controller-free `registerCatalogGraph` called once by `AppNavHost`, with all app-only work supplied through callbacks.
-
-- [ ] **Step 1: Write feature graph tests and run red**
-
-Build a test `NavHost` and assert registration/callback behavior for Home, Movies, Series, VOD, Search with empty and nonempty query, Movie Detail, Series Detail, default `returnRoute`, hint consumption, back/return, and screen callback forwarding. Assert no Favorites destination is registered.
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.navigation.CatalogGraphTest' :feature:catalog:compileDebugAndroidTestKotlin --no-daemon --console=plain
-```
-
-Expected: FAIL because feature graph registration does not exist.
-
-- [ ] **Step 2: Implement controller-free graph registration**
-
-Use this callback shape, adding no app types:
-
-```kotlin
-fun NavGraphBuilder.registerCatalogGraph(
- actions: NavigationActions,
- platformHost: CatalogPlatformHost?,
- scaffold: CatalogScaffoldContent,
- dashboardShelfCustomizationContent: CatalogDashboardShelfCustomizationContent,
- onTopLevelDestinationRequested: (AppDestination) -> Unit,
- onOpenMovieDetail: (Movie, AppDestination) -> Unit,
- onOpenSeriesDetail: (Series, AppDestination) -> Unit,
- onPlayChannel: (Channel, CatalogChannelPlaybackContext) -> Unit,
- onPlayMovie: (Movie, AppDestination) -> Unit,
- onPlayEpisode: (Episode, AppDestination) -> Unit,
- onPlayHistory: (PlaybackHistory, AppDestination) -> Unit,
- consumeMoviePresentationHint: (NavBackStackEntry) -> Unit,
- consumeSeriesPresentationHint: (NavBackStackEntry) -> Unit,
-)
-```
-
-Define `CatalogChannelPlaybackContext` in `CatalogFeatureContracts.kt` with `categoryId`, `providerId`, `isVirtual`, `combinedProfileId`, and `returnDestination`. Reproduce the existing Home/Catalog graph branches field-for-field.
-
-- [ ] **Step 3: Alias app route patterns to feature constants**
-
-Keep `AppRouteCodec` authoritative for encoding/decoding, but set Home/Movies/Series/VOD/Search/detail constants from `CatalogRoutePatterns`. Import feature-owned hint keys in payload/navigation code and remove duplicate app constants.
-
-- [ ] **Step 4: Wire AppNavHost callbacks to existing app helpers**
-
-Replace `registerHomeGraph` plus the app `registerCatalogGraph` with one feature call. Map:
-
-```text
-onOpenMovieDetail -> CatalogDetailNavigationActions.openMovieDetail
-onOpenSeriesDetail -> CatalogDetailNavigationActions.openSeriesDetail
-onPlayChannel -> existing toLivePlayerRequest + actions.openPlayer
-onPlayMovie -> existing toPlayerNavigationRequest + actions.openPlayer
-onPlayEpisode -> existing toPlayerNavigationRequest + actions.openPlayer
-onPlayHistory -> current ContentType branch from HomeGraph/CatalogGraph
-consume hints -> AppNavigationPayloads consume functions
-scaffold -> AppRouteCodec.encode(currentDestination) + AppScreenScaffold
-customization -> Settings DashboardShelfCustomizationDialog
-```
-
-Pass `MainActivity` as `CatalogPlatformHost?` through the existing AppNavigation/AppNavHost composition path.
-
-- [ ] **Step 5: Run feature graph and app compatibility tests**
-
-```powershell
-./gradlew.bat :feature:catalog:testDebugUnitTest --tests 'com.streamvault.feature.catalog.navigation.*' :feature:catalog:compileDebugAndroidTestKotlin :app:testDebugUnitTest --tests 'com.streamvault.app.navigation.*' :feature:catalog:verifyFeatureCatalogBoundary :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS; app route strings and return behavior are unchanged; old app graph files are absent.
-
-- [ ] **Step 6: Commit graph ownership**
-
-```powershell
-git add feature/catalog app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/navigation
-git commit -m 'feat(catalog): register feature navigation graph'
-```
-
----
-
-### Task 11: Move Catalog goldens, remove legacy ownership, and prove structural cleanup
-
-**Files:**
-- Create: `feature/catalog/src/androidTest/java/com/streamvault/feature/catalog/CatalogPresentationGoldenTest.kt`
-- Move four files: `app/src/androidTest/assets/ui-goldens/route_{dashboard_default,movies_landing,series_detail,search_results}.png` -> `feature/catalog/src/androidTest/assets/ui-goldens/`
-- Modify: `app/src/androidTest/java/com/streamvault/app/ui/PremiumRouteGoldenTest.kt`
-- Delete Catalog-only declarations/files under `app/src/main/java/com/streamvault/app/ui/components/` after consumer proof
-- Modify app locale resources only for keys proven Catalog-exclusive
-- Create: `validation/phase5_catalog/task11-resource-cleanup.md`
-- Create: `validation/phase5_catalog/task11-structural-verification.md`
-
-**Interfaces:**
-- Consumes: feature-owned screens/components/resources and the existing four reviewed baselines.
-- Produces: independent Catalog golden coverage, no legacy app Catalog presentation, and a documented resource/component residue.
-
-- [ ] **Step 1: Split four golden cases into the Catalog suite**
-
-Move the exact fixture setup and assertions for Dashboard, Movies landing, Series detail, and Search results. Keep theme, density, viewport, font scale, locale, fake data, test tag `golden`, and baseline names unchanged.
-
-```powershell
-./gradlew.bat :feature:catalog:compileDebugAndroidTestKotlin :app:compileDebugAndroidTestKotlin --no-daemon --console=plain
-```
-
-Expected: PASS; the app mixed suite no longer contains those four methods.
-
-- [ ] **Step 2: Prove app Catalog screen ownership is gone**
-
-```powershell
-rg -n 'package com\.streamvault\.app\.ui\.screens\.(dashboard|movies|series|vod|favorites|search)' app/src/main app/src/test
-rg -n 'import com\.streamvault\.app|com\.streamvault\.feature\.(playback|provider|settings|live)|MainActivity|NavHostController|NavController' feature/catalog/src/main
-```
-
-Expected: first command has no production/test ownership matches; second command has no matches.
-
-- [ ] **Step 3: Remove Catalog-only app component declarations after consumer scans**
-
-For every Task 5 source declaration, run repository-wide symbol searches. Delete the app declaration/file only when every remaining production consumer is Catalog-owned. Keep `AppShellNavigation.kt` and any declaration still used by Downloads, Plugins, app routes, tests, or another feature. Record each moved, deleted, duplicated, and retained component with consumer evidence in `task11-structural-verification.md`.
-
-- [ ] **Step 4: Remove only proven-exclusive app resources**
-
-For every Catalog resource key, search app/feature/core/domain/data/player/benchmark source and manifests. Remove an app key only when no non-Catalog consumer remains. Re-run both Android resource processors and the locale audit.
-
-```powershell
-powershell -ExecutionPolicy Bypass -File validation/phase5_catalog/locale_audit.ps1
-./gradlew.bat :feature:catalog:processDebugResources :app:processDebugResources --no-daemon --console=plain
-```
-
-Expected: PASS; the report lists any intentional duplicated keys and why they remain.
-
-- [ ] **Step 5: Run structural/build gates**
-
-```powershell
-./gradlew.bat :feature:catalog:verifyFeatureCatalogBoundary :feature:catalog:testDebugUnitTest :feature:catalog:lintDebug :feature:catalog:compileDebugAndroidTestKotlin :feature:catalog:assembleDebug :app:compileDebugKotlin :app:compileDebugUnitTestKotlin :app:testDebugUnitTest :app:assembleDebug --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS. Record exact exit codes and warnings.
-
-- [ ] **Step 6: Commit cleanup and golden ownership**
-
-```powershell
-git add feature/catalog app/src/main app/src/test app/src/androidTest validation/phase5_catalog
-git commit -m 'test(catalog): complete ownership and golden migration'
-```
-
----
-
-### Task 12: Run connected Catalog acceptance and device journeys
-
-**Files:**
-- Create: `validation/phase5_catalog/task12-connected-validation.md`
-- Create: `validation/phase5_catalog/task12-device-journeys.md`
-- Create: `validation/phase5_catalog/task12_screenshots/`
-- Create: `tools/catalog_xtream_fixture.py`
-- Create: `tools/tests/test_catalog_xtream_fixture.py`
-- Create: `tools/catalog_connected_validation.py`
-- Create: `tools/tests/test_catalog_connected_validation.py`
-
-**Interfaces:**
-- Consumes: Task 11 assembled app/feature tests and an available API 36 TV emulator with seeded data.
-- Produces: connected, focus/input, route, visual, and end-to-end Catalog evidence with explicit unavailable/failure reporting.
-
-For the deterministic fixture-backed semantic subset, start
-`python tools/catalog_xtream_fixture.py --port 8765`, install a debug APK
-configured with the four `xtream.dev.*` entries from `docs/DEV_SEEDING.md`,
-then run:
-
-```powershell
-python tools/catalog_connected_validation.py --adb E:\androidSdk\platform-tools\adb.exe --serial emulator-5554
-```
-
-The harness writes UIAutomator XML and `report.json` under the
-ignored `build/catalog-validation` directory. It never edits
-`local.properties` or claims download/Cast receiver success.
-
-- [ ] **Step 1: Verify device/package state**
-
-```powershell
-$adb = "$env:ANDROID_HOME\platform-tools\adb.exe"
-& $adb devices -l
-& $adb shell getprop sys.boot_completed
-& $adb shell cmd package list packages | Select-String streamvault
-```
-
-Expected: one authorized booted target. Record serial, API, form factor, density, locale, animation scales, and installed variant.
-
-- [ ] **Step 2: Run focused Catalog connected suites**
-
-```powershell
-./gradlew.bat :feature:catalog:connectedDebugAndroidTest --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: Catalog graph, behavior, and four golden cases pass. Record test counts and any fixture limitations separately.
-
-- [ ] **Step 3: Run app navigation/platform compatibility suites**
-
-Use instrumentation runner filters for the existing app navigation, platform compatibility, and remaining app golden classes rather than treating the entire app suite as one opaque result. Record every class and count in `task12-connected-validation.md`.
-
-- [ ] **Step 4: Exercise seeded TV journeys**
-
-Capture screenshots and sanitized logcat for:
-
-```text
-Dashboard: shelves, vertical/horizontal focus, customization open/save/cancel.
-Movies: category, search launch, filter, sort, load-more, reorder, detail, Back.
-Series: category, filter, sort, load-more, detail, season/episode focus, Back.
-VOD: mixed movie/series rows and both detail branches.
-Search: typing, recent query, tabs, channel/movie/series result activation.
-Details: favorite, variant, copy URL, download enqueue, Cast chooser/cancel.
-Favorites: direct test-host rendering and reorder/save/cancel because no route exists.
-```
-
-Expected: no crash, stuck focus, lost top navigation, wrong return destination, duplicate callback, incorrect list identity, or new error state.
-
-- [ ] **Step 5: Exercise phone/tablet and remaining accessibility variants when available**
-
-Run representative browse/detail/search journeys in touch mode, phone/tablet
-profiles, and through an accessibility service when available. The Catalog
-behavior test covers RTL/large-text semantics, the connected suite has passed
-with animations disabled and with AOSP TalkBack enabled, and the fixture
-journey has exposed a TalkBack-sensitive semantic D-pad harness limitation;
-retain that evidence rather than treating it as a production accessibility
-pass. If a device/configuration is unavailable, record it as unavailable
-rather than passed.
-
-- [ ] **Step 6: Capture and scan logs**
-
-```powershell
-& $adb logcat -d -v time > validation/phase5_catalog/task12-logcat.txt
-rg -n 'FATAL EXCEPTION|AndroidRuntime|Process: com\.streamvault|IllegalStateException|ClassNotFoundException|NoSuchMethodError|Resources\$NotFoundException' validation/phase5_catalog/task12-logcat.txt
-```
-
-Expected: no Catalog-caused fatal/runtime/resource failure. Sanitize provider credentials, URLs, tokens, MAC addresses, and personal paths before committing evidence.
-
-- [ ] **Step 7: Commit connected evidence**
-
-```powershell
-git add validation/phase5_catalog/task12-connected-validation.md validation/phase5_catalog/task12-device-journeys.md validation/phase5_catalog/task12_screenshots
-git commit -m 'test(catalog): record connected acceptance'
-```
-
----
-
-### Task 13: Prove build isolation, benchmark Dashboard, refresh profiles, and report
-
-**Files:**
-- Create: `validation/phase5_catalog/performance-after.md`
-- Create: `validation/phase5_catalog/profile-validation.md`
-- Create: `docs/COMPOSE_REDUCTION_PHASE5_CATALOG_REPORT.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md`
-- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-- Modify: generated profile outputs only through the existing generator workflow
-
-**Interfaces:**
-- Consumes: Task 0 before data and Tasks 1-12 implementation/evidence.
-- Produces: comparable after measurements, unrelated-feature isolation proof, profile/package evidence, graph refresh, and an evidence-bounded Catalog report.
-
-- [ ] **Step 1: Capture five after source-edit and test-compile samples**
-
-Repeat Task 0's protocol using a reversible whitespace-only edit in feature-owned `DashboardHomeShelves.kt` and its feature test. Run:
-
-```powershell
-./gradlew.bat :feature:catalog:compileDebugKotlin --profile --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :feature:catalog:compileDebugUnitTestKotlin --profile --no-daemon --console=plain --warning-mode=none
-```
-
-Record raw values, min/median/max, task sets, cache state, and comparison limitations in `performance-after.md`.
-
-- [ ] **Step 2: Prove unrelated feature Kotlin isolation**
-
-For one representative Catalog-only source edit, capture `--dry-run` and actual task output. Assert no `:feature:playback:compile*Kotlin`, `:feature:provider:compile*Kotlin`, `:feature:settings:compile*Kotlin`, or `:feature:live:compile*Kotlin` task executes.
-
-```powershell
-./gradlew.bat :app:assembleDebug --dry-run --console=plain > validation/phase5_catalog/catalog-edit-dry-run.txt
-./gradlew.bat :app:assembleDebug --console=plain --warning-mode=none > validation/phase5_catalog/catalog-edit-task-output.txt
-```
-
-Expected: Catalog and required app integration tasks run; sibling feature Kotlin compilation does not.
-
-- [ ] **Step 3: Run clean/warm and packaging guardrails**
-
-```powershell
-./gradlew.bat clean :app:assembleDebug --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :app:assembleDebug --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :app:assembleBeta :app:assembleRelease --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: PASS. Record duration and artifact sizes; compare clean-build regression against the plan's 5% guardrail with measurement noise disclosed.
-
-- [ ] **Step 4: Run the Dashboard Macrobenchmark comparison (deferred)**
-
-Run the existing seeded `dashboardVerticalScroll` benchmark with the same emulator/device, iteration count, compilation mode, and package used by the baseline. Record frame count and P50/P90/P99 overrun metrics before/after. Do not infer a runtime win from unmatched device/build conditions.
-
-This gate is intentionally deferred in the current Catalog continuation because
-the computer is under heavy load. The diagnostic after-run benchmark evidence
-already recorded in `performance-after.md` is not a substitute for the paired
-comparison; resume this step only when the baseline and current runs can be
-completed on the same device under stable load.
-
-- [ ] **Step 5: Regenerate and inspect profiles**
-
-Run the existing baseline-profile generator, then build release. Search generated sources/output for stale app Catalog descriptors and new feature Catalog descriptors.
-
-```powershell
-./gradlew.bat :benchmark:pixel2Api36Setup:generateBaselineProfile :app:assembleRelease --no-daemon --console=plain --warning-mode=none
-rg -n 'com/streamvault/app/ui/screens/(dashboard|movies|series|vod|favorites|search)' app/src benchmark build
-rg -n 'com/streamvault/feature/catalog' app/src benchmark build
-```
-
-Expected: generator/build pass, stale app Catalog descriptors are absent from fresh generated profile sources, and feature Catalog descriptors are present. Record device and skipped macrobenchmark tests.
-
-- [ ] **Step 6: Run the final automated matrix**
-
-```powershell
-./gradlew.bat :core:navigation:test :core:ui:testDebugUnitTest :domain:test :data:testDebugUnitTest :feature:catalog:verifyFeatureCatalogBoundary :feature:catalog:testDebugUnitTest :feature:catalog:lintDebug :feature:catalog:compileDebugAndroidTestKotlin :feature:catalog:assembleDebug :app:testDebugUnitTest :app:lintDebug :app:assembleDebug :app:assembleBeta :app:assembleRelease --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: report actual results. Existing failures must include test/task, message, reproduction, and proof they predate or are unrelated; they cannot be reported as passes.
-
-- [ ] **Step 7: Refresh the architecture graph**
-
-```powershell
-graphify update .
-git status --short
-```
-
-Expected: graph output reflects `:feature:catalog`; include generated graph changes only according to repository convention and record the refresh result.
-
-- [ ] **Step 8: Write and self-audit the Catalog report**
-
-The report must include ownership before/after, commit/task sequence, dependencies and ports, source/resource/test counts, locale audit, unit/lint/assemble results, connected/device journeys, four goldens, build samples, isolation task set, benchmark metrics, profile evidence, artifact sizes, existing/open failures, unavailable gates, rollback point, and the statement that other Phase 5 reports remain authoritative.
-
-Update the roadmap and governing plan only for evidence-backed Catalog status. Do not mark Phase 5 complete or System started.
-
-- [ ] **Step 9: Commit final evidence and documentation**
-
-```powershell
-git add docs validation/phase5_catalog graphify-out app/src/main/baseline-prof.txt app/src/main/startup-prof.txt
-git commit -m 'docs(catalog): report phase 5 feature extraction'
-```
-
-If generated profile paths differ, stage only files produced by the verified generator and list their actual paths in `profile-validation.md`.
-
----
-
-### Task 14: Exercise deterministic Xtream VOD pagination and Settings controls
-
-**Files:**
-- Create: `tools/catalog_xtream_fixture.py`
-- Create: `tools/catalog_connected_validation.py`
-- Create: `validation/phase5_catalog/task14-xtream-fixture-journeys.md`
-- Test: `tools/tests/test_catalog_xtream_fixture.py`
-
-**Interfaces:**
-- Consumes: the existing debug `xtream.dev.*` provider hooks and production TV
- navigation/activity.
-- Produces: a local-only Xtream fixture with one live channel, 63 movies, 63
- series, detail metadata, and two episodes per series; a semantic ADB journey
- that proves the fixture-backed Catalog and Settings paths without seeding
- application state or changing production provider behavior.
-
-- [x] **Step 1: Add deterministic fixture data and contract tests**
-
- Keep the first two movie/series titles stable for detail and Search checks;
- place generated items in pagination categories and assert the 63-item shape
- in the fixture unit test. The fixture uses an ephemeral port in unit tests
- and port 8765 only for the emulator's `10.0.2.2` host mapping.
-
-- [x] **Step 2: Add the semantic connected journey**
-
- Prove Home/Movies/Series/detail/favorite/saved/Search, Movies full-library
- entry/back, Settings Infinite scroll off, `Load more (60/63)` activation
- through `Pagination Movie 63`, restoration of Infinite scroll on, Dashboard
- customization cancel/save/reset, and Movie/Series Favorites browse reorder
- with save, persistence, and restore. The journey also downloads `Fixture Movie
- One` and proves the production Downloads card reaches `Completed` with an
- output path. Persist UIAutomator snapshots and a JSON report under ignored
- `build/` output.
-
-- [x] **Step 3: Run the TV journey and record bounded evidence**
-
- The API 36 AOSP TV run passed 7/7 feature connected tests and the latest
- fixture-backed semantic journey in
- `build/catalog-validation-download-completion-retry`. It proved Movie and
- Series selected-library pagination, Favorites browse reorder persistence, and
- fixture-backed movie download completion. A focused direct host test also
- rendered the real Favorites composable and verified Activity Back cancels
- reorder without introducing a production route. The fixture was stopped and
- its temporary local properties were removed after validation.
-
-- [ ] **Step 4: Finish the remaining Catalog acceptance gates**
-
- Execute the Cast receiver chooser, touch/phone/tablet and remaining
- production accessibility variants. The cache-equivalent Dashboard
- performance comparison is deferred until the benchmark environment has
- stable capacity; keep app lint and other Phase 5 gates separate from Catalog
- ownership.
-
-## Exit Criteria
-
-- `:feature:catalog` owns Dashboard, Movies, Series, VOD, Favorites, Search, detail presentation, route registration, feature-local components, resources, tests, and goldens.
-- `:app` owns only Catalog composition adapters, player-request mapping, payload compatibility, shell/Settings composition, platform services, external intents, and root graph registration.
-- The Catalog boundary reports exactly four approved project dependencies and zero forbidden main-source references.
-- Feature tests run independently, all structural/build/resource gates have recorded outcomes, and a Catalog-only edit does not compile sibling feature Kotlin source.
-- Routes, arguments, presentation hints, return destinations, focus, input, semantics, lazy identity, visual output, Cast/download/update behavior, and callback order remain equivalent.
-- Transitional data imports, duplicated resources, measurement limitations, unavailable devices, and all failing gates are explicitly documented.
diff --git a/docs/superpowers/plans/2026-09-04-system-feature-extraction.md b/docs/superpowers/plans/2026-09-04-system-feature-extraction.md
deleted file mode 100644
index 4917845a..00000000
--- a/docs/superpowers/plans/2026-09-04-system-feature-extraction.md
+++ /dev/null
@@ -1,1367 +0,0 @@
-# System Feature Module Extraction Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Extract Welcome, Downloads, and Plugins presentation into an independently compiled `:feature:system` module without changing routes, startup, download, plugin, focus, or UI behavior.
-
-**Architecture:** `:feature:system` owns System route patterns and controller-free graph registration, the three screens and ViewModels, feature resources, neutral plugin API models, and feature tests. `:app` remains the root navigation/platform composition root and retains plugin discovery/IPC/provider/playback infrastructure, Android startup coordination, route compatibility, top-level shell composition, and platform adapters. The feature depends only on `:core:navigation`, `:core:ui`, and `:domain`; app-only sync progress, build configuration, and plugin operations cross narrow feature-owned ports.
-
-**Tech Stack:** Kotlin, Android Gradle Plugin, Jetpack Compose/TV Material, Navigation Compose, Hilt/KSP, Coroutines/Flow, Kotlin serialization, Coil, JUnit4, Truth, Mockito-Kotlin, Robolectric, Compose UI testing, Macrobenchmark/Baseline Profile, Kover, Gradle boundary tasks, ADB, and Graphify.
-
-**Spec:** `docs/superpowers/specs/2026-08-24-phase-5-feature-module-extraction-design.md`
-
-## Global Constraints
-
-- Preserve the intentional working tree; never reset, clean, delete, overwrite, or stage unrelated changes.
-- This is a behavior-preserving Phase 5 extraction: preserve `welcome`, `downloads`, and `plugins` route strings; startup redirect and pop-up behavior; launcher timing; focus; semantics; test tags; lazy keys; UI text; callbacks; persistence; and error/result handling.
-- Do not redesign the UI, convert a surface to Views, change download scheduling/storage policy, change plugin IPC/discovery/activation/provider/playback policy, or alter startup destination policy.
-- `:feature:system` project dependencies must be exactly `:core:navigation`, `:core:ui`, and `:domain`.
-- `:feature:system` must not import `com.streamvault.app`, `com.streamvault.data`, `com.streamvault.player`, `MainActivity`, `NavController`, `NavHostController`, or another `com.streamvault.feature.*` implementation package.
-- `:app` retains `StreamVaultPluginManager`, `PluginMessengerClient`, `PluginWorkCoordinator`, `PluginPlaybackRouting`, plugin provider ownership/persistence, startup reconciliation, Cast/playback adaptation, `AppRouteCodec`, `AppNavHost`, Android services, and manifest entry points.
-- Move the Android-independent plugin manifest/configuration/value types and `StreamVaultPluginContract` into the feature API; app plugin infrastructure consumes those types through the existing app-to-feature dependency direction.
-- Welcome consumes sync progress and development seed configuration through `SystemWelcomePort`; the feature must not gain a direct `:data` or app `BuildConfig` dependency.
-- Plugins consumes app plugin operations through `SystemPluginManagementPort`; the adapter delegates without adding retries, caching, validation, logging, or result rewriting.
-- Downloads continues to consume the domain `DownloadManager`; Android document-picker, URI permission, external playback intent, and resource lookup behavior remains byte-for-byte equivalent where practical.
-- Keep shared app resources in `:app` while any app, manifest, service, benchmark, or sibling feature still references them. Copy or move only the exact feature-owned values required to compile `com.streamvault.feature.system.R`, preserving every locale value and formatting argument.
-- Use history-preserving moves where practical. Keep contract additions, app adapters, mechanical source moves, navigation cutover, and cleanup in separate commits.
-- Add a focused failing test before each new contract or behavior seam, observe the expected failure, implement the minimum change, and rerun focused plus neighboring tests. Existing behavior may first be locked with passing characterization tests before a mechanical move.
-- The module is justified only if post-extraction measurements show a System-only edit is at least 25% faster and its unit-test compile is at least 20% faster than the paired pre-extraction samples, sibling feature Kotlin compilation is absent, clean/warm builds are no more than 10% slower, and startup is no more than 5% slower. Record measurement noise and do not claim the gate when runs are not comparable.
-- This slice does not satisfy or close existing Playback, Provider, Settings, Live, Catalog, physical-device, accessibility-service, or performance gates.
-- The long-duration Live TV protocol is not required unless implementation changes player composition, playback preparation, recovery, lifecycle, surfaces, overlays, or plugin playback routing. If any such change becomes necessary, stop and split it into a separate bug-fix scope with the repository's two-channel protocol.
-- Run `graphify update .` after code changes and before the final report.
-
-## Planned File Structure
-
-```text
-feature/system/
- build.gradle.kts
- src/main/AndroidManifest.xml
- src/main/java/com/streamvault/feature/system/
- api/
- SystemFeatureContracts.kt # shell callback type
- SystemPluginManagementPort.kt # plugin DTOs and app-operation port
- SystemWelcomePort.kt # sync progress and dev-seed inputs
- navigation/
- SystemGraph.kt # Welcome, Downloads, Plugins destinations
- SystemRoutePatterns.kt # exact route constants
- presentation/
- welcome/WelcomeScreen.kt # route wrapper, state rendering, ViewModel
- downloads/DownloadsUiState.kt
- downloads/DownloadsViewModel.kt
- downloads/DownloadsScreen.kt
- plugins/PluginsViewModel.kt
- plugins/PluginsScreen.kt
- src/main/res/values*/strings.xml # exact System presentation resources
- src/test/... # boundary, route, model, and ViewModel tests
- src/androidTest/... # route behavior and reviewed goldens
-
-app/src/main/java/com/streamvault/app/system/
- AppSystemBindings.kt # Hilt bindings for both feature ports
- AppSystemPluginManagementAdapter.kt # delegates to app plugin runtime
- AppSystemWelcomeAdapter.kt # maps BuildConfig and SyncProgressBus
-```
-
-The existing app plugin runtime remains under `app/plugins`. Only neutral types move to `feature/system/api`; no feature implementation depends on another feature.
-
----
-
-### Task 0: Freeze System inventory, rollback point, and before measurements
-
-**Files:**
-- Create: `validation/phase5_system/task0-inventory.md`
-- Create: `validation/phase5_system/source-inventory.txt`
-- Create: `validation/phase5_system/project-imports.txt`
-- Create: `validation/phase5_system/resource-inventory.txt`
-- Create: `validation/phase5_system/test-inventory.txt`
-- Create: `validation/phase5_system/consumer-inventory.txt`
-- Create: `validation/phase5_system/performance-before.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-
-**Interfaces:**
-- Consumes: the current pre-extraction checkout, Phase 5 roadmap, accepted Phase 5 design, and existing feature reports.
-- Produces: exact ownership/resource/test baselines, rollback SHA, five source-edit samples, five unit-test-compile samples, and an explicit statement that System adds no direct `:data` dependency.
-
-- [x] **Step 1: Capture branch, rollback SHA, and working-tree ownership**
-
-Run:
-
-```powershell
-New-Item -ItemType Directory -Force validation/phase5_system | Out-Null
-git status --short --branch
-git rev-parse HEAD
-git branch --show-current
-$systemFiles = @(
- 'app/src/main/java/com/streamvault/app/ui/screens/welcome/WelcomeScreen.kt',
- 'app/src/main/java/com/streamvault/app/ui/screens/downloads/DownloadsUiState.kt',
- 'app/src/main/java/com/streamvault/app/ui/screens/downloads/DownloadsViewModel.kt',
- 'app/src/main/java/com/streamvault/app/ui/screens/downloads/DownloadsScreen.kt',
- 'app/src/main/java/com/streamvault/app/ui/screens/plugins/PluginsViewModel.kt',
- 'app/src/main/java/com/streamvault/app/ui/screens/plugins/PluginsScreen.kt',
- 'app/src/main/java/com/streamvault/app/navigation/graph/WelcomeGraph.kt',
- 'app/src/main/java/com/streamvault/app/navigation/graph/SystemGraph.kt'
-)
-$systemFiles | Set-Content validation/phase5_system/source-inventory.txt
-$systemFiles | ForEach-Object { "$(Get-Content -LiteralPath $_ | Measure-Object -Line | Select-Object -ExpandProperty Lines)`t$_" }
-```
-
-Expected: eight production files totaling 2,248 physical lines at planning time. Record fresh counts if the committed checkout differs, and explain every pre-existing dirty path without altering it.
-
-- [x] **Step 2: Record imports, resources, tests, routes, and consumers**
-
-Run:
-
-```powershell
-$systemRoots = @(
- 'app/src/main/java/com/streamvault/app/ui/screens/welcome',
- 'app/src/main/java/com/streamvault/app/ui/screens/downloads',
- 'app/src/main/java/com/streamvault/app/ui/screens/plugins'
-)
-rg -n '^import com\.streamvault\.(app|feature|core|domain|data|player)' $systemRoots -g '*.kt' | Sort-Object | Set-Content validation/phase5_system/project-imports.txt
-rg -o 'R\.(string|plurals|drawable|color|dimen|array)\.[A-Za-z0-9_]+' $systemRoots -g '*.kt' | ForEach-Object { ($_ -split ':')[-1] } | Sort-Object -Unique | Set-Content validation/phase5_system/resource-inventory.txt
-rg --files app/src/test app/src/androidTest | rg -i '(welcome|downloads|plugins|plugin)' | Sort-Object | Set-Content validation/phase5_system/test-inventory.txt
-rg -n 'WelcomeScreen|WelcomeViewModel|DownloadsScreen|DownloadsViewModel|PluginsScreen|PluginsViewModel|registerWelcomeGraph|registerSystemGraph|StreamVaultPluginContract|InstalledStreamVaultPlugin' app feature core domain data benchmark docs | Sort-Object | Set-Content validation/phase5_system/consumer-inventory.txt
-```
-
-Expected: the resource inventory contains 33 exact string references; Welcome directly imports app `BuildConfig`, app `R`, and `SyncProgressBus`; Downloads imports app `R` and app shell; Plugins imports app routes, app shell, and app plugin runtime models/manager. The only focused existing System-adjacent unit tests are app plugin runtime/model tests, so new presentation characterization tests are required.
-
-- [x] **Step 3: Record the dependency decision in the transitional ledger**
-
-Add a `:feature:system` section stating:
-
-```text
-Approved project dependencies: :core:navigation, :core:ui, :domain.
-Direct :data imports: none.
-App adapters: SystemWelcomePort maps SyncProgressBus and app BuildConfig;
-SystemPluginManagementPort delegates to StreamVaultPluginManager and
-ProviderSourceRegistry.
-Phase 7 follow-up: keep these ports narrow; do not move plugin IPC, provider
-ownership, playback routing, or Android startup infrastructure into the feature.
-```
-
-- [x] **Step 4: Capture a focused pre-extraction build baseline**
-
-Run:
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests 'com.streamvault.app.plugins.StreamVaultPluginOwnerTest' --tests 'com.streamvault.app.plugins.PluginPlaybackRoutingTest' :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: record the actual result, Gradle/JDK versions, daemon/cache state, duration, warnings, and any pre-existing failures in `task0-inventory.md`; a failing existing gate is recorded rather than relabeled as passing.
-
-- [x] **Step 5: Capture five source-edit and five unit-test-compile samples**
-
-Use a reversible whitespace-only edit in `WelcomeScreen.kt` for the source samples and `StreamVaultPluginOwnerTest.kt` for the test samples. Restore each file byte-identically after every run.
-
-```powershell
-./gradlew.bat :app:compileDebugKotlin --profile --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :app:compileDebugUnitTestKotlin --profile --no-daemon --console=plain --warning-mode=none
-git diff -- app/src/main/java/com/streamvault/app/ui/screens/welcome/WelcomeScreen.kt app/src/test/java/com/streamvault/app/plugins/StreamVaultPluginOwnerTest.kt
-git diff --check
-```
-
-Expected: ten comparable samples with raw duration, min/median/max, executed task set, and cache state are recorded in `performance-before.md`; both measurement files finish byte-identical to the rollback SHA and no measurement edit is committed.
-
-- [x] **Step 6: Commit only baseline evidence**
-
-```powershell
-git add validation/phase5_system docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
-git commit -m 'docs(system): record phase 5 extraction baseline'
-```
-
----
-
-### Task 1: Add characterization coverage for existing System behavior
-
-**Files:**
-- Create: `app/src/test/java/com/streamvault/app/ui/screens/welcome/WelcomeViewModelTest.kt`
-- Create: `app/src/test/java/com/streamvault/app/ui/screens/downloads/DownloadsViewModelTest.kt`
-- Create: `app/src/test/java/com/streamvault/app/ui/screens/plugins/PluginsViewModelTest.kt`
-- Create: `app/src/test/java/com/streamvault/app/ui/screens/plugins/PluginConfigurationDraftTest.kt`
-
-**Interfaces:**
-- Consumes: existing app-owned ViewModels and current plugin/download/domain contracts.
-- Produces: behavior locks for provider detection/progress cutoff, download observation/actions/folder handling, plugin discovery/enable/configuration flows, and plugin draft validation/serialization.
-
-- [x] **Step 1: Characterize Welcome provider and progress behavior**
-
-Create a coroutine test using `StandardTestDispatcher`, a fake `ProviderRepository`, a mocked `ValidateAndAddProvider`, and a real `SyncProgressBus`. Assert:
-
-```kotlin
-@Test
-fun providerObservationPublishesPresenceAndStopsWelcomeProgress() = runTest {
- providers.value = emptyList()
- val viewModel = createViewModel()
- advanceUntilIdle()
- assertThat(viewModel.hasProviders.value).isFalse()
-
- providers.value = listOf(providerFixture(id = 7L))
- advanceUntilIdle()
- assertThat(viewModel.hasProviders.value).isTrue()
- assertThat(viewModel.syncProgress.value).isNull()
-}
-```
-
-Also assert that an existing provider suppresses both Xtream and M3U development seed calls. The current checkout's debug BuildConfig includes an M3U validation seed, so the characterization must reflect the actual baseline rather than assume all development values are blank.
-
-- [x] **Step 2: Characterize Downloads state and commands**
-
-Use a fake `DownloadManager` backed by `MutableStateFlow`s and Robolectric `ApplicationProvider`. Assert observation clears loading, resume/delete use the selected ID, confirmation state is cleared before deletion, playback stops the manager before returning a resolvable view intent, and a missing `outputUri` returns `null` without stopping playback.
-
-```kotlin
-@Test
-fun confirmDeleteClearsDialogAndDeletesSelectedItem() = runTest {
- val item = downloadFixture(id = "download-7")
- val viewModel = createViewModel()
- viewModel.showDeleteConfirm(item)
- viewModel.confirmDelete()
- advanceUntilIdle()
- assertThat(viewModel.uiState.value.deleteConfirmItem).isNull()
- assertThat(downloadManager.deletedIds).containsExactly("download-7")
-}
-```
-
-- [x] **Step 3: Characterize Plugins discovery and configuration behavior**
-
-Mock `StreamVaultPluginManager` and `ProviderSourceRegistry`. Assert refresh publishes plugins and sources, blank URL produces the exact current message, enable passes progress through unchanged and refreshes both lists, activity configuration calls `openPluginConfiguration`, host-schema configuration loads draft values, required blank fields block save, numeric/boolean values serialize with their current JSON primitive types, and refresh-after-action reloads configuration.
-
-```kotlin
-@Test
-fun requiredBlankConfigurationFieldBlocksSave() = runTest {
- whenever(pluginManager.loadPluginConfiguration(plugin)).thenReturn(
- Result.success(requiredTextConfiguration(plugin))
- )
- val viewModel = createViewModel()
- viewModel.openPluginConfiguration(plugin)
- advanceUntilIdle()
- viewModel.updateConfigurationValue("token", "")
- viewModel.savePluginConfiguration()
- assertThat(viewModel.uiState.value.configuration?.validationErrors)
- .containsEntry("token", "Token is required")
- verify(pluginManager, never()).savePluginConfiguration(any(), any())
-}
-```
-
-- [x] **Step 4: Run the characterization bundle**
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests 'com.streamvault.app.ui.screens.welcome.WelcomeViewModelTest' --tests 'com.streamvault.app.ui.screens.downloads.DownloadsViewModelTest' --tests 'com.streamvault.app.ui.screens.plugins.PluginsViewModelTest' --tests 'com.streamvault.app.ui.screens.plugins.PluginConfigurationDraftTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: all characterization tests pass against the pre-extraction implementation. Record any test that exposes an existing defect and keep the defect outside this extraction unless separately approved.
-
-- [x] **Step 5: Commit the behavior locks**
-
-```powershell
-git add app/src/test/java/com/streamvault/app/ui/screens/welcome app/src/test/java/com/streamvault/app/ui/screens/downloads app/src/test/java/com/streamvault/app/ui/screens/plugins
-git commit -m 'test(system): lock existing presentation behavior'
-```
-
----
-
-### Task 2: Create `:feature:system` with a fail-closed boundary
-
-**Files:**
-- Modify: `build.gradle.kts`
-- Modify: `settings.gradle.kts`
-- Modify: `app/build.gradle.kts`
-- Create: `feature/system/build.gradle.kts`
-- Create: `feature/system/src/main/AndroidManifest.xml`
-- Create: `feature/system/src/test/java/com/streamvault/feature/system/SystemModuleBoundaryTest.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/AppPackageImport.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/FullyQualifiedAppReference.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/MainActivityReference.java`
-- Create: `feature/system/src/test/resources/boundary-fixtures/RootNavigation.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/RootNavigation.java`
-- Create: `feature/system/src/test/resources/boundary-fixtures/DataImport.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/PlayerImport.java`
-- Create: `feature/system/src/test/resources/boundary-fixtures/PlaybackFeatureImport.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/ProviderFeatureImport.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/SettingsFeatureImport.java`
-- Create: `feature/system/src/test/resources/boundary-fixtures/LiveFeatureImport.kt`
-- Create: `feature/system/src/test/resources/boundary-fixtures/CatalogFeatureImport.java`
-
-**Interfaces:**
-- Consumes: the exact dependency policy in Global Constraints.
-- Produces: registered `:feature:system`, `verifyFeatureSystemBoundary`, and fixture-tested rejection of app, data, player, controller, and sibling-feature implementation references.
-
-- [x] **Step 1: Write the failing module-boundary test**
-
-```kotlin
-class SystemModuleBoundaryTest {
- @Test
- fun systemModuleDeclaresOnlyApprovedProjectDependencies() {
- val buildFile = File("build.gradle.kts")
- assertThat(buildFile.isFile).isTrue()
- val text = buildFile.readText()
- assertThat(text).contains("verifyFeatureSystemBoundary")
- assertThat(text).contains("implementation(project(\":core:navigation\"))")
- assertThat(text).contains("implementation(project(\":core:ui\"))")
- assertThat(text).contains("implementation(project(\":domain\"))")
- assertThat(text).doesNotContain("project(\":app\")")
- assertThat(text).doesNotContain("project(\":data\")")
- assertThat(text).doesNotContain("project(\":player\")")
- assertThat(text).doesNotContain("project(\":feature:")
- }
-}
-```
-
-- [x] **Step 2: Run RED before module registration**
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.SystemModuleBoundaryTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: Gradle fails because project `:feature:system` is not registered.
-
-- [x] **Step 3: Register and configure the module**
-
-Add `include(":feature:system")` to `settings.gradle.kts`, `implementation(project(":feature:system"))` to `:app`, and `kover(project(":feature:system"))` to the root coverage aggregation without changing thresholds. Model the Android library configuration on `feature/catalog/build.gradle.kts` with namespace `com.streamvault.feature.system`, compileSdk 36, minSdk 25, Java/Kotlin 17, Compose, Kotlin serialization, Hilt/KSP, Kover, and Compose compiler reports.
-
-Use exactly:
-
-```kotlin
-val allowedProjectDependencies = setOf(
- ":core:navigation",
- ":core:ui",
- ":domain",
-)
-```
-
-Apply `libs.plugins.kotlin.serialization` because the moved plugin manifest/configuration types retain `@Serializable`. Declare only the external libraries required by the current sources: Compose BOM/UI/Material3/TV Foundation/TV Material, Material icons, Activity Compose, lifecycle runtime/viewmodel Compose, Navigation Compose, Hilt, Hilt Navigation Compose, coroutines, Kotlin serialization JSON, Coil Compose, Core KTX, JUnit, Truth, Mockito-Kotlin, Robolectric, AndroidX test runner/ext, Navigation testing, and Compose UI test JUnit4.
-
-- [x] **Step 4: Add the boundary task and fixtures**
-
-Use this token list in `feature/system/build.gradle.kts`:
-
-```kotlin
-val forbiddenFeatureSystemSourceTokens = listOf(
- "import com.streamvault.app",
- "com.streamvault.app",
- "import com.streamvault.data",
- "import com.streamvault.player",
- "import com.streamvault.feature.playback",
- "import com.streamvault.feature.provider",
- "import com.streamvault.feature.settings",
- "import com.streamvault.feature.live",
- "import com.streamvault.feature.catalog",
- "MainActivity",
- "NavHostController",
- "NavController",
-)
-```
-
-Scan Kotlin and Java main sources and fixtures, write `build/reports/feature-system-boundary/report.txt`, require the project dependency set to equal `allowedProjectDependencies`, require zero main-source violations, and require every fixture category above. Make `check` and every module `Test` task depend on `verifyFeatureSystemBoundary`.
-
-- [x] **Step 5: Run GREEN and inspect the report**
-
-```powershell
-./gradlew.bat :feature:system:verifyFeatureSystemBoundary :feature:system:testDebugUnitTest --no-daemon --console=plain --warning-mode=none
-Get-Content feature/system/build/reports/feature-system-boundary/report.txt
-```
-
-Expected: exactly `:core:navigation,:core:ui,:domain`, zero main-source violations, and all app/data/player/controller/sibling fixtures listed.
-
-- [x] **Step 6: Commit the module boundary**
-
-```powershell
-git add build.gradle.kts settings.gradle.kts app/build.gradle.kts feature/system
-git commit -m 'build(system): add isolated feature module'
-```
-
----
-
-### Task 3: Define System route, shell, Welcome, and plugin contracts test-first
-
-**Files:**
-- Create: `feature/system/src/main/java/com/streamvault/feature/system/navigation/SystemRoutePatterns.kt`
-- Create: `feature/system/src/main/java/com/streamvault/feature/system/api/SystemFeatureContracts.kt`
-- Create: `feature/system/src/main/java/com/streamvault/feature/system/api/SystemWelcomePort.kt`
-- Create: `feature/system/src/main/java/com/streamvault/feature/system/api/SystemPluginManagementPort.kt`
-- Move: `app/src/main/java/com/streamvault/app/plugins/PluginModels.kt` to `feature/system/src/main/java/com/streamvault/feature/system/api/SystemPluginModels.kt`
-- Move: `app/src/main/java/com/streamvault/app/plugins/StreamVaultPluginContract.kt` to `feature/system/src/main/java/com/streamvault/feature/system/api/StreamVaultPluginContract.kt`
-- Move: `app/src/test/java/com/streamvault/app/plugins/StreamVaultPluginOwnerTest.kt` to `feature/system/src/test/java/com/streamvault/feature/system/api/StreamVaultPluginOwnerTest.kt`
-- Modify: app plugin runtime sources/tests that consume the moved types
-- Create: `feature/system/src/test/java/com/streamvault/feature/system/navigation/SystemRoutePatternsTest.kt`
-- Create: `feature/system/src/test/java/com/streamvault/feature/system/api/SystemPluginModelsTest.kt`
-
-**Interfaces:**
-- Consumes: `AppDestination`, `NavigationActions`, domain `Result`, `ProviderSource`, `Section`, Flow, Compose `ColumnScope`, Android `Uri`, and JSON values.
-- Produces: exact route constants, `SystemScaffoldContent`, `SystemWelcomePort`, neutral plugin types, and `SystemPluginManagementPort` used by all later tasks.
-
-- [x] **Step 1: Write failing route and model tests**
-
-```kotlin
-@Test
-fun systemRoutesPreserveCompatibilityStrings() {
- assertThat(SystemRoutePatterns.WELCOME).isEqualTo("welcome")
- assertThat(SystemRoutePatterns.DOWNLOADS).isEqualTo("downloads")
- assertThat(SystemRoutePatterns.PLUGINS).isEqualTo("plugins")
-}
-
-@Test
-fun pluginOwnerKeyIsBundleSafeAndUnambiguous() {
- val left = StreamVaultPluginOwner("ab", "c", "d").toBundleSafeKey()
- val right = StreamVaultPluginOwner("a", "bc", "d").toBundleSafeKey()
- assertThat(left).isNotEqualTo(right)
- assertThat(left).isEqualTo("2:ab1:c1:d")
-}
-```
-
-- [x] **Step 2: Run RED**
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.navigation.SystemRoutePatternsTest' --tests 'com.streamvault.feature.system.api.SystemPluginModelsTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation fails because the route and API types do not exist.
-
-- [x] **Step 3: Implement the exact route and shell contracts**
-
-```kotlin
-object SystemRoutePatterns {
- const val WELCOME = "welcome"
- const val DOWNLOADS = "downloads"
- const val PLUGINS = "plugins"
-}
-
-typealias SystemScaffoldContent = @Composable (
- currentDestination: AppDestination,
- title: String,
- subtitle: String?,
- compactHeader: Boolean,
- showScreenHeader: Boolean,
- content: @Composable ColumnScope.() -> Unit,
-) -> Unit
-```
-
-- [x] **Step 4: Implement the Welcome port**
-
-```kotlin
-data class WelcomeDevProviderConfig(
- val xtreamServer: String = "",
- val xtreamUsername: String = "",
- val xtreamPassword: String = "",
- val xtreamName: String = "",
- val m3uUrl: String = "",
- val m3uName: String = "",
-)
-
-data class WelcomeSyncProgress(
- val section: Section,
- val current: Int,
- val total: Int,
- val currentLabel: String,
- val itemsIndexed: Int,
-)
-
-interface SystemWelcomePort {
- val syncProgress: Flow<WelcomeSyncProgress?>
- val devProviderConfig: WelcomeDevProviderConfig
-}
-```
-
-- [x] **Step 5: Move neutral plugin models and implement the operation port**
-
-Use `git mv` for `PluginModels.kt`, `StreamVaultPluginContract.kt`, and `StreamVaultPluginOwnerTest.kt`; change their packages to `com.streamvault.feature.system.api`; and add explicit imports to `StreamVaultPluginManager`, `PluginMessengerClient`, `PluginPlaybackRouting`, and app plugin tests. Preserve every serialization name, default, enum value, owner-key encoding, capability check, and configuration constant. Then define:
-
-```kotlin
-interface SystemPluginManagementPort {
- suspend fun discoverPlugins(): List<InstalledStreamVaultPlugin>
- suspend fun providerSources(): List<ProviderSource>
- suspend fun installApkFromUri(uri: Uri): Result<Unit>
- suspend fun installApkFromUrl(url: String): Result<Unit>
- suspend fun setPluginEnabled(
- plugin: InstalledStreamVaultPlugin,
- enabled: Boolean,
- onProgress: (String) -> Unit,
- ): PluginActionResult
- fun openPluginConfiguration(plugin: InstalledStreamVaultPlugin): PluginActionResult
- suspend fun loadPluginConfiguration(plugin: InstalledStreamVaultPlugin): Result<PluginConfigurationSnapshot>
- suspend fun loadPluginConfigurationValues(plugin: InstalledStreamVaultPlugin): Result<JsonObject>
- suspend fun savePluginConfiguration(plugin: InstalledStreamVaultPlugin, valuesJson: String): PluginActionResult
- suspend fun runPluginConfigurationAction(plugin: InstalledStreamVaultPlugin, actionId: String): PluginActionResult
-}
-```
-
-Keep `StreamVaultPluginContract` in the same feature API package so `StreamVaultPluginManifest` derived properties and app IPC code share one source of truth.
-
-- [x] **Step 6: Run GREEN and boundary verification**
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.navigation.SystemRoutePatternsTest' --tests 'com.streamvault.feature.system.api.SystemPluginModelsTest' --tests 'com.streamvault.feature.system.api.StreamVaultPluginOwnerTest' :feature:system:verifyFeatureSystemBoundary :app:testDebugUnitTest --tests 'com.streamvault.app.plugins.PluginPlaybackRoutingTest' :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: feature route/model tests, the moved owner test, remaining app plugin runtime tests, and app compilation pass; the boundary report remains clean.
-
-- [x] **Step 7: Commit the contracts**
-
-```powershell
-git add feature/system app/src/main/java/com/streamvault/app/plugins app/src/test/java/com/streamvault/app/plugins
-git commit -m 'feat(system): define feature contracts and routes'
-```
-
----
-
-### Task 4: Implement app adapters and Hilt bindings
-
-**Files:**
-- Create: `app/src/main/java/com/streamvault/app/system/AppSystemWelcomeAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/system/AppSystemPluginManagementAdapter.kt`
-- Create: `app/src/main/java/com/streamvault/app/system/AppSystemBindings.kt`
-- Create: `app/src/test/java/com/streamvault/app/system/AppSystemWelcomeAdapterTest.kt`
-- Create: `app/src/test/java/com/streamvault/app/system/AppSystemPluginManagementAdapterTest.kt`
-
-**Interfaces:**
-- Consumes: Task 3 ports/models, `SyncProgressBus`, app `BuildConfig`, `StreamVaultPluginManager`, and `ProviderSourceRegistry`.
-- Produces: Hilt-provided `SystemWelcomePort` and `SystemPluginManagementPort` with delegation-equivalent behavior.
-
-- [x] **Step 1: Write failing Welcome adapter tests**
-
-Assert that all six BuildConfig-derived fields map without normalization and that aggregate progress maps only the representative progress fields:
-
-```kotlin
-@Test
-fun progressMappingPreservesRepresentativeSnapshot() = runTest {
- val bus = SyncProgressBus()
- val adapter = AppSystemWelcomeAdapter(bus, devConfig)
- val observed = async { adapter.syncProgress.filterNotNull().first() }
- val session = bus.begin(providerId = 7L)
- bus.emit(session, SyncProgress(Section.VOD, 2, 5, "Movies", 44))
- assertThat(observed.await()).isEqualTo(
- WelcomeSyncProgress(Section.VOD, 2, 5, "Movies", 44)
- )
-}
-```
-
-Expose an internal constructor taking `WelcomeDevProviderConfig` for tests; the injected constructor builds that value from the exact six app BuildConfig fields.
-
-- [x] **Step 2: Write failing plugin adapter delegation tests**
-
-Mock the manager and registry. Verify every port method forwards the same plugin, URI, URL, JSON string, action ID, enabled flag, and progress callback exactly once and returns the identical result object. Include discovery and provider source delegation.
-
-```kotlin
-@Test
-fun enableDelegatesPluginFlagAndProgressCallback() = runTest {
- val callback: (String) -> Unit = mock()
- val expected = PluginActionResult(true, "Enabled")
- whenever(manager.setPluginEnabled(plugin, true, callback)).thenReturn(expected)
- assertThat(adapter.setPluginEnabled(plugin, true, callback)).isSameInstanceAs(expected)
- verify(manager).setPluginEnabled(plugin, true, callback)
-}
-```
-
-- [x] **Step 3: Run RED**
-
-```powershell
-./gradlew.bat :app:testDebugUnitTest --tests 'com.streamvault.app.system.AppSystemWelcomeAdapterTest' --tests 'com.streamvault.app.system.AppSystemPluginManagementAdapterTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation fails because adapters and bindings do not exist.
-
-- [x] **Step 4: Implement Welcome mapping and Hilt binding**
-
-`AppSystemWelcomeAdapter.syncProgress` must be a pure `map` of `SyncProgressBus.aggregate`:
-
-```kotlin
-override val syncProgress: Flow<WelcomeSyncProgress?> = syncProgressBus.aggregate.map { aggregate ->
- aggregate?.representative?.progress?.let { progress ->
- WelcomeSyncProgress(
- section = progress.section,
- current = progress.current,
- total = progress.total,
- currentLabel = progress.currentLabel,
- itemsIndexed = progress.itemsIndexed,
- )
- }
-}
-```
-
-Bind it as a singleton `SystemWelcomePort` in `AppSystemBindings`.
-
-- [x] **Step 5: Implement plugin delegation and Hilt binding**
-
-Implement `AppSystemPluginManagementAdapter` as one-line delegation per method. It must not catch exceptions, change dispatcher, re-run discovery, or alter messages. Bind it as singleton `SystemPluginManagementPort`.
-
-- [x] **Step 6: Run GREEN and neighboring plugin tests**
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.api.StreamVaultPluginOwnerTest' :app:testDebugUnitTest --tests 'com.streamvault.app.system.AppSystemWelcomeAdapterTest' --tests 'com.streamvault.app.system.AppSystemPluginManagementAdapterTest' --tests 'com.streamvault.app.plugins.PluginPlaybackRoutingTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: adapters, the feature-owned owner test, and remaining app plugin runtime tests pass.
-
-- [x] **Step 7: Commit adapters and bindings**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/system app/src/test/java/com/streamvault/app/system
-git commit -m 'refactor(system): bridge app startup and plugin services'
-```
-
----
-
-### Task 5: Move Welcome presentation and preserve startup behavior
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/welcome/WelcomeScreen.kt` to `feature/system/src/main/java/com/streamvault/feature/system/presentation/welcome/WelcomeScreen.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/welcome/WelcomeViewModelTest.kt` to `feature/system/src/test/java/com/streamvault/feature/system/presentation/welcome/WelcomeViewModelTest.kt`
-- Create: `feature/system/src/androidTest/java/com/streamvault/feature/system/presentation/welcome/WelcomePresentationTest.kt`
-- Create/Modify: `feature/system/src/main/res/values*/strings.xml`
-
-**Interfaces:**
-- Consumes: `SystemWelcomePort`, `ProviderRepository`, `ValidateAndAddProvider`, feature resources, and navigation callbacks supplied later by `SystemGraph`.
-- Produces: app-independent `WelcomeViewModel`, `WelcomeScreen`, and state-based `WelcomeContent` with unchanged seed/progress/redirect behavior.
-
-- [x] **Step 1: Add failing port-driven seed tests**
-
-Move the characterization test package first and replace app BuildConfig setup with a fake `SystemWelcomePort`. Add exact Xtream precedence and M3U fallback tests:
-
-```kotlin
-@Test
-fun xtreamDevConfigTakesPrecedenceOverM3uConfig() = runTest {
- welcomePort.devProviderConfig = WelcomeDevProviderConfig(
- xtreamServer = "https://xtream.example",
- xtreamUsername = "user",
- xtreamPassword = "pass",
- xtreamName = "Seeded Xtream",
- m3uUrl = "https://m3u.example/list.m3u",
- m3uName = "Seeded M3U",
- )
- createViewModel()
- advanceUntilIdle()
- verify(validateAndAddProvider).loginXtream(
- XtreamProviderSetupCommand(
- serverUrl = "https://xtream.example",
- username = "user",
- password = "pass",
- name = "Seeded Xtream",
- xtreamFastSyncEnabled = true,
- )
- )
- verify(validateAndAddProvider, never()).addM3u(any())
-}
-```
-
-- [x] **Step 2: Run RED**
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.presentation.welcome.WelcomeViewModelTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation fails because Welcome production code is not feature-owned and does not consume `SystemWelcomePort`.
-
-- [x] **Step 3: Move Welcome and replace app/data dependencies**
-
-Use `git mv`, change package/R imports, inject `SystemWelcomePort`, replace `SyncProgressAggregate` with `WelcomeSyncProgress`, and read seed values from `welcomePort.devProviderConfig`. Preserve:
-
-```kotlin
-combine(welcomePort.syncProgress, acceptingProgress) { progress, accept ->
- if (accept) progress else null
-}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), null)
-```
-
-Keep Xtream-first/M3U-second seed order, default names, provider observation, and the first non-null provider-state progress cutoff unchanged.
-
-- [x] **Step 4: Extract a state rendering seam without moving effects**
-
-Keep state collection and startup `LaunchedEffect` in `WelcomeScreen`. Extract only the existing `Box`/card branch into:
-
-```kotlin
-@Composable
-internal fun WelcomeContent(
- hasProviders: Boolean?,
- syncProgress: WelcomeSyncProgress?,
- onNavigateToHome: () -> Unit,
- onNavigateToSetup: () -> Unit,
-)
-```
-
-This seam is for connected rendering tests; no callback or effect moves into it.
-
-- [x] **Step 5: Copy exact Welcome resources for every locale**
-
-Copy the existing values for these keys into matching feature `values*` files:
-
-```text
-app_name
-welcome_loading_title
-welcome_loading_subtitle
-sync_items_indexed_format
-welcome_tagline
-welcome_subtitle
-welcome_setup_provider
-welcome_setup_later
-sync_section_live
-sync_section_vod
-sync_section_series
-```
-
-Retain app copies while app/manifest/sibling references remain. Do not move `welcome_bg.png`; it is not referenced by the current Welcome source, and dead-resource cleanup is outside this extraction.
-
-- [x] **Step 6: Add connected rendering assertions**
-
-Render `WelcomeContent` for `false`, `null`, and active progress. Assert setup/later controls, loading title/subtitle, determinate progress text, and both callbacks. Capture screenshots only after assertions pass.
-
-- [x] **Step 7: Run GREEN**
-
-```powershell
-./gradlew.bat :feature:system:verifyFeatureSystemBoundary :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.presentation.welcome.WelcomeViewModelTest' :feature:system:compileDebugAndroidTestKotlin :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: Welcome tests and both module/app compilation pass with no forbidden import.
-
-- [x] **Step 8: Commit Welcome ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/welcome app/src/test/java/com/streamvault/app/ui/screens/welcome feature/system
-git commit -m 'refactor(system): move welcome presentation'
-```
-
----
-
-### Task 6: Move Downloads presentation and preserve platform actions
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/downloads/DownloadsUiState.kt` to `feature/system/src/main/java/com/streamvault/feature/system/presentation/downloads/DownloadsUiState.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/downloads/DownloadsViewModel.kt` to `feature/system/src/main/java/com/streamvault/feature/system/presentation/downloads/DownloadsViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/downloads/DownloadsScreen.kt` to `feature/system/src/main/java/com/streamvault/feature/system/presentation/downloads/DownloadsScreen.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/downloads/DownloadsViewModelTest.kt` to `feature/system/src/test/java/com/streamvault/feature/system/presentation/downloads/DownloadsViewModelTest.kt`
-- Create: `feature/system/src/androidTest/java/com/streamvault/feature/system/presentation/downloads/DownloadsPresentationTest.kt`
-- Create/Modify: `feature/system/src/main/res/values*/strings.xml`
-
-**Interfaces:**
-- Consumes: domain `DownloadManager`, Android application context, `SystemScaffoldContent`, and feature resources.
-- Produces: app-independent Downloads state, actions, launcher handling, rendering, and tests.
-
-- [x] **Step 1: Add failing formatting and platform-action tests**
-
-Expose the current file-size formatter as internal and add boundary cases:
-
-```kotlin
-@Test
-fun fileSizeFormattingPreservesBinaryThresholds() {
- assertThat(formatDownloadFileSize(1023)).isEqualTo("1023 B")
- assertThat(formatDownloadFileSize(1024)).isEqualTo("1 KB")
- assertThat(formatDownloadFileSize(1024L * 1024)).isEqualTo("1 MB")
- assertThat(formatDownloadFileSize(1024L * 1024 * 1024)).isEqualTo("1 GB")
-}
-```
-
-Retain the Task 1 tests for null/resolvable playback URI, playback-stop ordering, resume, delete, confirmation, folder intent action, persisted URI flags, display-name lookup, and messages.
-
-- [x] **Step 2: Run RED**
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.presentation.downloads.DownloadsViewModelTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation fails because Downloads sources are not feature-owned.
-
-- [x] **Step 3: Move Downloads and replace app shell/resources**
-
-Use `git mv`, change packages and `R` imports, and replace direct `AppScreenScaffold` use with injected `SystemScaffoldContent`. Preserve `ActivityResultContracts.OpenDocumentTree`, `takePersistableUriPermission` flags, `Intent.ACTION_VIEW`, `video/*`, `FLAG_GRANT_READ_URI_PERMISSION`, manager call order, snackbar effect, adaptive grid thresholds, status colors/labels, progress calculation, and delete dialog behavior.
-
-The public entry point becomes:
-
-```kotlin
-@Composable
-fun DownloadsScreen(
- scaffold: SystemScaffoldContent,
- viewModel: DownloadsViewModel = hiltViewModel(),
-)
-```
-
-It invokes the scaffold with `AppDestination.Downloads`, title `R.string.nav_downloads`, TopBar behavior supplied by the app closure, `compactHeader = true`, and `showScreenHeader = false`.
-
-- [x] **Step 4: Add a state rendering seam**
-
-Keep activity result registration, context launch, snackbar effect, and ViewModel collection in `DownloadsScreen`. Extract the scaffold body and dialog into:
-
-```kotlin
-@Composable
-internal fun DownloadsContent(
- uiState: DownloadsUiState,
- scaffold: SystemScaffoldContent,
- onChangeFolder: () -> Unit,
- onOpen: (DownloadItem) -> Unit,
- onResume: (DownloadItem) -> Unit,
- onDelete: (DownloadItem) -> Unit,
- onConfirmDelete: () -> Unit,
- onDismissDelete: () -> Unit,
-)
-```
-
-- [x] **Step 5: Copy exact Downloads resources for every locale**
-
-Copy these exact keys and formatting arguments:
-
-```text
-nav_downloads
-download_folder_default
-download_folder_change
-downloads_loading
-downloads_empty_title
-downloads_empty_hint
-downloads_no_thumb
-downloads_item_title
-download_resume
-download_delete
-downloads_status_completed
-downloads_status_downloading
-downloads_status_failed
-downloads_status_pending
-downloads_status_paused
-downloads_status_cancelled
-downloads_delete_confirm_title
-downloads_delete_confirm_msg
-downloads_delete_confirm_delete
-downloads_deleted
-downloads_resumed
-settings_cancel
-```
-
-Keep app copies needed by the foreground service, Catalog, Settings, manifests, notifications, or navigation shell.
-
-- [x] **Step 6: Add connected rendering and action assertions**
-
-Render loading, empty, downloading, failed, completed, and delete-confirmation states. Assert folder action, completed-card open, failed-card resume, delete confirmation/dismissal, progress percentage, stable card key, and snackbar clearing. Capture empty/completed screenshots for review.
-
-- [x] **Step 7: Run GREEN**
-
-```powershell
-./gradlew.bat :feature:system:verifyFeatureSystemBoundary :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.presentation.downloads.DownloadsViewModelTest' :feature:system:compileDebugAndroidTestKotlin :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: Downloads unit/compile gates pass and no app/data/player/sibling feature reference appears in feature source.
-
-- [x] **Step 8: Commit Downloads ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/downloads app/src/test/java/com/streamvault/app/ui/screens/downloads feature/system
-git commit -m 'refactor(system): move downloads presentation'
-```
-
----
-
-### Task 7: Move Plugins presentation through the feature port
-
-**Files:**
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/plugins/PluginsViewModel.kt` to `feature/system/src/main/java/com/streamvault/feature/system/presentation/plugins/PluginsViewModel.kt`
-- Move: `app/src/main/java/com/streamvault/app/ui/screens/plugins/PluginsScreen.kt` to `feature/system/src/main/java/com/streamvault/feature/system/presentation/plugins/PluginsScreen.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/plugins/PluginsViewModelTest.kt` to `feature/system/src/test/java/com/streamvault/feature/system/presentation/plugins/PluginsViewModelTest.kt`
-- Move: `app/src/test/java/com/streamvault/app/ui/screens/plugins/PluginConfigurationDraftTest.kt` to `feature/system/src/test/java/com/streamvault/feature/system/presentation/plugins/PluginConfigurationDraftTest.kt`
-- Create: `feature/system/src/androidTest/java/com/streamvault/feature/system/presentation/plugins/PluginsPresentationTest.kt`
-
-**Interfaces:**
-- Consumes: `SystemPluginManagementPort`, `SystemScaffoldContent`, feature-owned neutral plugin models, and core UI primitives.
-- Produces: app-independent Plugins ViewModel/rendering with unchanged plugin operations and configuration behavior.
-
-- [x] **Step 1: Change moved tests to the port and run RED**
-
-Replace manager/registry mocks with one `SystemPluginManagementPort` mock while retaining every Task 1 assertion and the existing exception-to-message behavior.
-
-```kotlin
-@Test
-fun enablePassesProgressAndPublishesUnchangedResultMessage() = runTest {
- whenever(port.setPluginEnabled(eq(plugin), eq(true), any())).thenAnswer { invocation ->
- invocation.getArgument<(String) -> Unit>(2)("Syncing plugin provider...")
- PluginActionResult(true, "Plugin enabled")
- }
- whenever(port.discoverPlugins()).thenReturn(listOf(plugin.copy(enabled = true)))
- whenever(port.providerSources()).thenReturn(listOf(providerSource))
- val viewModel = createViewModel()
- viewModel.setPluginEnabled(plugin, true)
- advanceUntilIdle()
- assertThat(viewModel.uiState.value.userMessage).isEqualTo("Plugin enabled")
- assertThat(viewModel.uiState.value.syncProgress).isNull()
-}
-```
-
-Run:
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.presentation.plugins.PluginsViewModelTest' --tests 'com.streamvault.feature.system.presentation.plugins.PluginConfigurationDraftTest' --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation fails because Plugins sources are not feature-owned and still depend on app types.
-
-- [x] **Step 2: Move Plugins and replace runtime imports**
-
-Use `git mv`, change packages, inject only `SystemPluginManagementPort`, replace `pluginManager` and `providerSourceRegistry` calls with the corresponding port methods, and import plugin models from `feature.system.api`. Preserve existing `runCatching` sites, loading flags, exact user messages, refresh sequencing, configuration validation, JSON numeric/boolean conversion, dirty-state calculation, and action refresh behavior.
-
-- [x] **Step 3: Replace app route/shell imports**
-
-Remove `Routes`, `AppNavigationChrome`, and `AppScreenScaffold`. The public entry becomes:
-
-```kotlin
-@Composable
-fun PluginsScreen(
- scaffold: SystemScaffoldContent,
- modifier: Modifier = Modifier,
- viewModel: PluginsViewModel = hiltViewModel(),
-)
-```
-
-Invoke the scaffold with `AppDestination.Plugins`, the exact existing title/subtitle, `compactHeader = true`, and `showScreenHeader = true`. Preserve APK picker MIME order, URL dialog focus/keyboard behavior, switch semantics, owner bundle-safe lazy key, button enabled states, field rendering, and all current hard-coded plugin UI text.
-
-- [x] **Step 4: Add a state rendering seam**
-
-Keep picker registration, snackbar effect, dialog visibility state, and ViewModel collection in `PluginsScreen`. Extract the current scaffold content into:
-
-```kotlin
-@Composable
-internal fun PluginsContent(
- uiState: PluginsUiState,
- scaffold: SystemScaffoldContent,
- showInstallUrlDialog: Boolean,
- onShowInstallUrlDialog: () -> Unit,
- onDismissInstallUrlDialog: () -> Unit,
- onInstallFromFile: () -> Unit,
- actions: PluginsActions,
-)
-```
-
-Define `PluginsActions` as an internal immutable callback holder matching every existing ViewModel action; do not add policy to it.
-
-- [x] **Step 5: Add connected Plugins coverage**
-
-Render empty, discovered, busy enable/disable, install URL, partial discovery, and host-schema configuration states. Assert install/refresh/configure/enable callbacks, required-field indication, boolean/select/text/password rendering, save enablement, action progress, Back, and snackbar clearing. Capture empty and configuration screenshots for review.
-
-- [x] **Step 6: Run GREEN and app plugin regression tests**
-
-```powershell
-./gradlew.bat :feature:system:verifyFeatureSystemBoundary :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.presentation.plugins.PluginsViewModelTest' --tests 'com.streamvault.feature.system.presentation.plugins.PluginConfigurationDraftTest' --tests 'com.streamvault.feature.system.api.StreamVaultPluginOwnerTest' :feature:system:compileDebugAndroidTestKotlin :app:testDebugUnitTest --tests 'com.streamvault.app.plugins.PluginPlaybackRoutingTest' :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: feature Plugins/model tests, remaining app plugin runtime tests, boundary verification, and app compilation pass.
-
-- [x] **Step 7: Commit Plugins ownership**
-
-```powershell
-git add app/src/main/java/com/streamvault/app/ui/screens/plugins app/src/test/java/com/streamvault/app/ui/screens/plugins feature/system app/src/main/java/com/streamvault/app/plugins app/src/test/java/com/streamvault/app/plugins
-git commit -m 'refactor(system): move plugins presentation'
-```
-
----
-
-### Task 8: Move graph registration and cut AppNavHost over to the feature
-
-**Files:**
-- Create: `feature/system/src/main/java/com/streamvault/feature/system/navigation/SystemGraph.kt`
-- Create: `feature/system/src/test/java/com/streamvault/feature/system/navigation/SystemGraphTest.kt`
-- Create: `feature/system/src/androidTest/java/com/streamvault/feature/system/navigation/SystemRouteGraphBehaviorTest.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/AppRouteCodecTest.kt`
-- Modify: `app/src/test/java/com/streamvault/app/navigation/FeatureGraphBoundaryTest.kt`
-- Modify: `app/build.gradle.kts`
-- Delete after cutover: `app/src/main/java/com/streamvault/app/navigation/graph/WelcomeGraph.kt`
-- Delete after cutover: `app/src/main/java/com/streamvault/app/navigation/graph/SystemGraph.kt`
-
-**Interfaces:**
-- Consumes: `SystemRoutePatterns`, `SystemScaffoldContent`, `NavigationActions`, Welcome startup callback, and the three feature screens.
-- Produces: one controller-free feature graph registered by `AppNavHost`, with the app route codec remaining compatibility owner.
-
-- [x] **Step 1: Write failing route-set and connected graph tests**
-
-```kotlin
-@Test
-fun systemGraphRouteSetPreservesExistingDestinations() {
- assertThat(systemGraphRoutes()).containsExactly(
- "welcome",
- "downloads",
- "plugins",
- ).inOrder()
-}
-```
-
-The connected test creates a `TestNavHostController`, registers `SystemGraph` with fake content/scaffold callbacks, navigates all three routes, and asserts each destination renders. For Welcome, assert Setup invokes:
-
-```kotlin
-actions.navigate(
- AppDestination.ProviderSetup(),
- NavigationOptions(popUpTo = AppDestination.Welcome, inclusive = true),
-)
-```
-
-and Home invokes `onStartupNavigationRequested(AppDestination.Welcome)` only when the existing screen callback fires.
-
-- [x] **Step 2: Run RED**
-
-```powershell
-./gradlew.bat :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.navigation.SystemGraphTest' :feature:system:compileDebugAndroidTestKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation fails because feature `SystemGraph` does not exist.
-
-- [x] **Step 3: Implement controller-free graph registration**
-
-```kotlin
-fun NavGraphBuilder.registerSystemGraph(
- actions: NavigationActions,
- startupReady: Boolean,
- onStartupNavigationRequested: (AppDestination) -> Unit,
- scaffold: SystemScaffoldContent,
-) {
- composable(SystemRoutePatterns.WELCOME) {
- WelcomeScreen(
- onNavigateToHome = dropUnlessResumed {
- onStartupNavigationRequested(AppDestination.Welcome)
- },
- startupReady = startupReady,
- onNavigateToSetup = dropUnlessResumed {
- actions.navigate(
- AppDestination.ProviderSetup(),
- NavigationOptions(popUpTo = AppDestination.Welcome, inclusive = true),
- )
- },
- )
- }
- composable(SystemRoutePatterns.DOWNLOADS) { DownloadsScreen(scaffold = scaffold) }
- composable(SystemRoutePatterns.PLUGINS) { PluginsScreen(scaffold = scaffold) }
-}
-```
-
-Keep the exact `dropUnlessResumed` placement from the existing Welcome graph.
-
-- [x] **Step 4: Add the app scaffold adapter and route aliases**
-
-In `AppNavHost`, create:
-
-```kotlin
-private fun appSystemScaffold(
- onTopLevelDestinationRequested: (AppDestination) -> Unit,
-): SystemScaffoldContent = { destination, title, subtitle, compactHeader, showScreenHeader, content ->
- AppScreenScaffold(
- currentRoute = AppRouteCodec.encode(destination),
- onNavigate = { route -> AppRouteCodec.decode(route)?.let(onTopLevelDestinationRequested) },
- title = title,
- subtitle = subtitle,
- navigationChrome = AppNavigationChrome.TopBar,
- compactHeader = compactHeader,
- showScreenHeader = showScreenHeader,
- content = content,
- )
-}
-```
-
-Use `SystemRoutePatterns.WELCOME` as `NavHost.startDestination` and call the feature `registerSystemGraph` once with the app scaffold closure. Keep `AppRouteCodec` as encoder/decoder and make its Welcome/Downloads/Plugins pattern constants alias the feature-owned constants.
-
-- [x] **Step 5: Remove legacy app graph ownership and update boundary guards**
-
-Delete both app graph files only after feature graph and app compilation succeed. Update `VerifyFeatureNavigationBoundaryTask` so app-local expected files contain only `LiveGraph.kt`; update `FeatureGraphBoundaryTest` to scan `feature/system/.../navigation`, require `SystemGraph.kt`, and no longer require `WelcomeGraph.kt` under app.
-
-- [x] **Step 6: Run GREEN and navigation regressions**
-
-```powershell
-./gradlew.bat :feature:system:verifyFeatureSystemBoundary :feature:system:testDebugUnitTest --tests 'com.streamvault.feature.system.navigation.SystemGraphTest' :feature:system:compileDebugAndroidTestKotlin :app:testDebugUnitTest --tests 'com.streamvault.app.navigation.AppRouteCodecTest' --tests 'com.streamvault.app.navigation.FeatureGraphBoundaryTest' --tests 'com.streamvault.app.navigation.AppNavigationCoordinatorTest' :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: exact route compatibility, startup callback behavior, graph boundary, and app compilation pass with one owner for each System destination.
-
-- [x] **Step 7: Commit navigation cutover**
-
-```powershell
-git add feature/system app/src/main/java/com/streamvault/app/navigation app/src/test/java/com/streamvault/app/navigation app/build.gradle.kts
-git commit -m 'refactor(system): register feature-owned navigation'
-```
-
----
-
-### Task 9: Remove legacy ownership and run structural/resource gates
-
-**Files:**
-- Create: `validation/phase5_system/task9-structural-verification.md`
-- Create: `validation/phase5_system/task9-resource-cleanup.md`
-- Modify: app/feature resource files only where the ownership audit proves safe
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-
-**Interfaces:**
-- Consumes: Tasks 2-8 feature implementation and Task 0 inventories.
-- Produces: one production owner per System presentation/route/type, exact dependency/resource evidence, and independent feature checks.
-
-- [x] **Step 1: Prove old presentation and graph paths are absent**
-
-```powershell
-Test-Path app/src/main/java/com/streamvault/app/ui/screens/welcome
-Test-Path app/src/main/java/com/streamvault/app/ui/screens/downloads
-Test-Path app/src/main/java/com/streamvault/app/ui/screens/plugins
-Test-Path app/src/main/java/com/streamvault/app/navigation/graph/WelcomeGraph.kt
-Test-Path app/src/main/java/com/streamvault/app/navigation/graph/SystemGraph.kt
-rg -n 'package com\.streamvault\.app\.ui\.screens\.(welcome|downloads|plugins)|fun NavGraphBuilder\.registerWelcomeGraph' app feature
-```
-
-Expected: all `Test-Path` results are false and no legacy package/registration definition remains.
-
-- [x] **Step 2: Prove app plugin runtime remains app-owned**
-
-```powershell
-rg --files app/src/main/java/com/streamvault/app/plugins | Sort-Object
-rg -n 'class StreamVaultPluginManager|class PluginMessengerClient|class PluginWorkCoordinator|fun playbackCandidates' app/src/main/java/com/streamvault/app/plugins
-rg -n 'class StreamVaultPluginManager|PluginMessengerClient|PluginWorkCoordinator|fun playbackCandidates' feature/system/src/main
-```
-
-Expected: manager, messenger, work coordinator, and playback routing remain under app; none is defined by the feature. Neutral manifest/configuration models and `StreamVaultPluginContract` have a single feature API definition.
-
-- [x] **Step 3: Run dependency and forbidden-reference gates**
-
-```powershell
-./gradlew.bat :feature:system:verifyFeatureSystemBoundary :feature:system:dependencies :feature:system:testDebugUnitTest :feature:system:lintDebug :feature:system:assembleDebug --no-daemon --console=plain --warning-mode=none
-rg -n 'com\.streamvault\.(app|data|player|feature\.(playback|provider|settings|live|catalog))|MainActivity|NavHostController|NavController' feature/system/src/main
-```
-
-Expected: boundary report lists exactly three project dependencies, all feature gates pass, and the source scan returns no matches.
-
-- [x] **Step 4: Audit locale/resource parity**
-
-For each of the 33 Task 0 resource references, compare default and every existing localized value between app and feature. Record missing locale files, duplicate shared keys, formatting placeholders, and retained app consumers.
-
-```powershell
-rg -n '<string name="(app_name|welcome_|sync_items_indexed_format|sync_section_|nav_downloads|download_folder_|downloads_|download_resume|download_delete|settings_cancel)' app/src/main/res feature/system/src/main/res -g '*.xml'
-./gradlew.bat :feature:system:lintDebug :app:lintDebug --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: no feature `Resources.NotFoundException` risk, all formatting placeholders match, and keys are removed from app only when the consumer inventory proves no app/sibling/manifest/service use.
-
-- [x] **Step 5: Run focused and neighboring JVM/build gates**
-
-```powershell
-./gradlew.bat :core:navigation:test :core:ui:testDebugUnitTest :domain:test :feature:system:testDebugUnitTest :app:testDebugUnitTest :feature:system:assembleDebug :app:assembleDebug --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: report actual results with test/task names. Any existing failure must include reproduction and evidence that it predates or is unrelated to System extraction.
-
-- [x] **Step 6: Update ledger and commit structural evidence**
-
-Confirm the ledger states zero direct feature-to-data imports and names both app adapters. Then:
-
-```powershell
-git add validation/phase5_system docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md app/src/main/res feature/system/src/main/res
-git commit -m 'test(system): verify ownership and resources'
-```
-
----
-
-### Task 10: Run connected System acceptance and review goldens
-
-**Files:**
-- Create: `feature/system/src/androidTest/java/com/streamvault/feature/system/SystemPresentationGoldenTest.kt`
-- Create: `feature/system/src/androidTest/java/com/streamvault/feature/system/test/GoldenCapture.kt`
-- Create: `feature/system/src/androidTest/assets/ui-goldens/welcome_no_provider.png`
-- Create: `feature/system/src/androidTest/assets/ui-goldens/welcome_syncing.png`
-- Create: `feature/system/src/androidTest/assets/ui-goldens/downloads_empty.png`
-- Create: `feature/system/src/androidTest/assets/ui-goldens/downloads_completed.png`
-- Create: `feature/system/src/androidTest/assets/ui-goldens/plugins_empty.png`
-- Create: `feature/system/src/androidTest/assets/ui-goldens/plugins_configuration.png`
-- Create: `validation/phase5_system/task10-connected-validation.md`
-- Create: `validation/phase5_system/task10-device-journeys.md`
-- Create: `validation/phase5_system/task10-screenshots/`
-
-**Interfaces:**
-- Consumes: the feature rendering seams, feature graph, app navigation integration, a booted authorized emulator/device, and deterministic fake states.
-- Produces: reviewed visual parity, route/focus/action evidence, and explicit unavailable device/accessibility gates.
-
-- [x] **Step 1: Add six golden cases and missing-golden guard**
-
-Use the same pixel capture/diff convention as Catalog. Render at 1920x1080 with the app theme and deterministic fake data. The test must fail when a named baseline is absent and compare all six exact names above after review.
-
-- [x] **Step 2: Run recording mode, inspect every image, then run comparison mode**
-
-```powershell
-./gradlew.bat :feature:system:connectedDebugAndroidTest -PsystemGoldens.record=true --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :feature:system:connectedDebugAndroidTest --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: manually inspect text, spacing, focus border, progress, dialog sizing, download card/status, plugin controls, and configuration fields before accepting baselines. Comparison mode passes all six cases plus the missing-golden guard.
-
-- [x] **Step 3: Run app startup and top-level route journeys**
-
-On the API 36 Television 1080p emulator, validate:
-
-```text
-Welcome/no provider: Setup Provider, Set up later, remote focus, click, Back.
-Welcome/existing provider: loading/progress, startupReady false/true, one redirect.
-Configured landing: Downloads and Plugins open directly from startup preference.
-Downloads: empty, active progress, failed resume, completed external playback,
-folder picker cancel/select, delete cancel/confirm, snackbar, top navigation, Back.
-Plugins: empty/discovered/partial states, refresh, URL dialog cancel/submit,
-local picker cancel, enable/disable progress, activity configuration launch,
-host-schema required/boolean/select/number/password/save/refresh/action/Back.
-```
-
-Expected: no duplicate navigation, crash, lost focus, stuck dialog, changed callback order, missing resource, wrong route, or changed plugin/download result text.
-
-- [x] **Step 4: Exercise TV remote, touch, RTL, large text, reduced motion, and accessibility variants**
-
-Run the deterministic presentation tests under RTL, font scale 1.3, animations disabled, and available TalkBack/accessibility service. Exercise touch/mouse activation on a phone/tablet profile when available. Record unavailable devices/services as unavailable, not passing.
-
-- [x] **Step 5: Capture and sanitize logs**
-
-```powershell
-$adb = "$env:ANDROID_HOME\platform-tools\adb.exe"
-& $adb logcat -c
-& $adb logcat -d -v time > validation/phase5_system/task10-logcat.txt
-rg -n 'FATAL EXCEPTION|AndroidRuntime|Process: com\.streamvault|IllegalStateException|ClassNotFoundException|NoSuchMethodError|Resources\$NotFoundException|ActivityNotFoundException|SecurityException' validation/phase5_system/task10-logcat.txt
-```
-
-Expected: no System-caused fatal/runtime/resource/launcher failure. Remove provider credentials, plugin URLs/tokens, file URIs, MAC addresses, and personal paths before committing evidence.
-
-- [x] **Step 6: Record why Live long-duration validation is not triggered**
-
-In `task10-connected-validation.md`, state that app plugin runtime, playback candidate selection, Cast URL rewrite, stream preparation, player composition, lifecycle, surfaces, and recovery were unchanged. If evidence contradicts that statement, do not waive live validation; split the playback-affecting change and run the full two-channel protocol.
-
-- [x] **Step 7: Commit connected evidence and reviewed baselines**
-
-```powershell
-git add feature/system/src/androidTest validation/phase5_system/task10-connected-validation.md validation/phase5_system/task10-device-journeys.md validation/phase5_system/task10-screenshots
-git commit -m 'test(system): record connected acceptance'
-```
-
----
-
-### Task 11: Prove build value, refresh profiles/graph, and write the System report
-
-**Files:**
-- Create: `validation/phase5_system/performance-after.md`
-- Create: `validation/phase5_system/profile-validation.md`
-- Create: `docs/COMPOSE_REDUCTION_PHASE5_SYSTEM_REPORT.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md`
-- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`
-- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
-- Modify: generated baseline/startup profile outputs only through the existing generator workflow
-- Modify: `graphify-out/` through `graphify update .`
-
-**Interfaces:**
-- Consumes: Task 0 paired baseline and Tasks 1-10 implementation/evidence.
-- Produces: the required optional-module value decision, final verification matrix, profile/package evidence, refreshed graph, System report, and evidence-backed Phase 5 status.
-
-- [x] **Step 1: Capture five after source-edit and unit-test-compile samples**
-
-Repeat Task 0's protocol with reversible whitespace-only edits in feature-owned `WelcomeScreen.kt` and `WelcomeViewModelTest.kt`:
-
-```powershell
-./gradlew.bat :feature:system:compileDebugKotlin --profile --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :feature:system:compileDebugUnitTestKotlin --profile --no-daemon --console=plain --warning-mode=none
-git diff -- feature/system/src/main/java/com/streamvault/feature/system/presentation/welcome/WelcomeScreen.kt feature/system/src/test/java/com/streamvault/feature/system/presentation/welcome/WelcomeViewModelTest.kt
-```
-
-Expected: five comparable samples for each scenario; record raw values, min/median/max, task sets, cache state, and measurement noise. Both files finish byte-identical to their committed state.
-
-- [x] **Step 2: Prove sibling-feature Kotlin isolation**
-
-With one reversible System-only source edit, capture dry-run and actual task output:
-
-```powershell
-./gradlew.bat :app:assembleDebug --dry-run --console=plain > validation/phase5_system/system-edit-dry-run.txt
-./gradlew.bat :app:assembleDebug --console=plain --warning-mode=none > validation/phase5_system/system-edit-task-output.txt
-rg -n ':feature:(playback|provider|settings|live|catalog):compile.*Kotlin' validation/phase5_system/system-edit-task-output.txt
-```
-
-Expected: System and required app integration/package tasks run; no sibling feature Kotlin compile task executes.
-
-- [x] **Step 3: Run clean/warm/startup guardrails and make the value decision**
-
-```powershell
-./gradlew.bat clean :app:assembleDebug --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :app:assembleDebug --no-daemon --console=plain --warning-mode=none
-./gradlew.bat :app:assembleBeta :app:assembleRelease --no-daemon --console=plain --warning-mode=none
-```
-
-Measure cold startup to Welcome and warm startup to configured Downloads and Plugins using the existing Macrobenchmark/startup workflow. Compare paired medians against:
-
-```text
-System source edit: at least 25% faster.
-System unit-test compile: at least 20% faster.
-Sibling feature Kotlin compilation: absent.
-Clean and warm builds: no more than 10% slower.
-Startup: no more than 5% slower.
-```
-
-If comparable evidence misses a threshold beyond measured noise, mark `:feature:system` unjustified, stop before reporting it accepted, and use the Task 0 rollback SHA plus the commit sequence to prepare a normal revert review. Do not use `git reset --hard` or delete uncommitted user work.
-
-- [x] **Step 4: Regenerate and inspect baseline/startup profiles**
-
-```powershell
-./gradlew.bat :benchmark:pixel2Api36Setup:generateBaselineProfile :app:assembleRelease --no-daemon --console=plain --warning-mode=none
-rg -n 'com/streamvault/app/ui/screens/(welcome|downloads|plugins)' app/src benchmark build
-rg -n 'com/streamvault/feature/system' app/src benchmark build
-```
-
-Expected: generator and release build results are recorded; fresh profile sources contain no stale app System descriptors and contain nonzero feature System descriptors when those flows are covered. Record skipped benchmark methods and unavailable physical-device approval separately.
-
-Recorded (2026-09-05): the supported `:app:copyBaselineProfileIntoSrc` workflow
-promoted fresh sources with 49,059 baseline rules and 30,237 startup rules;
-both source scans contain feature System descriptors and no stale app System
-descriptors. The explicit Macrobenchmark rerun completed 8/8 tests with 0
-failures and 0 skipped on the API 36 TV emulator. Physical-device, accessibility
-service, and authorized production-provider/plugin approval remain open.
-
-- [x] **Step 5: Run the final automated matrix**
-
-```powershell
-./gradlew.bat :core:navigation:test :core:ui:testDebugUnitTest :domain:test :feature:system:verifyFeatureSystemBoundary :feature:system:testDebugUnitTest :feature:system:lintDebug :feature:system:compileDebugAndroidTestKotlin :feature:system:assembleDebug :app:testDebugUnitTest :app:lintDebug :app:assembleDebug :app:assembleBeta :app:assembleRelease --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: report actual task/test counts and failures. Existing failures must name the task, test, message, reproduction, and evidence of prior existence; unavailable gates remain open.
-
-- [x] **Step 6: Refresh Graphify and inspect ownership**
-
-```powershell
-graphify update .
-graphify explain 'SystemGraph'
-graphify path 'AppNavHost' 'PluginsScreen'
-git status --short
-```
-
-Expected: graph output resolves feature-owned System graph/screens and app-owned adapters/plugin manager, with no feature-to-app edge from System implementation.
-
-- [x] **Step 7: Write and self-audit the System report**
-
-`COMPOSE_REDUCTION_PHASE5_SYSTEM_REPORT.md` must include:
-
-```text
-rollback SHA and commit sequence
-ownership before/after and exact source/test/resource counts
-three-dependency boundary report and zero forbidden references
-Welcome and plugin port signatures plus app adapter ownership
-proof plugin IPC/provider/playback runtime remained in app
-route/startup/landing compatibility evidence
-locale/resource parity and retained duplicate-resource reasons
-unit/lint/assemble/connected/golden results
-TV/touch/RTL/large-text/reduced-motion/accessibility evidence
-five paired source and test compile samples
-sibling feature task-isolation evidence
-clean/warm/startup guardrails and optional-module value decision
-profile regeneration and artifact results
-known failures, unavailable gates, and follow-up ownership
-```
-
-Update the roadmap from `System remains unstarted` only with actual evidence. Update the governing plan's Phase 5 status without closing unrelated open gates or claiming the full modernization complete.
-
-- [x] **Step 8: Run documentation consistency checks**
-
-```powershell
-rg -n 'System remains unstarted|:feature:system|WelcomeGraph.kt|SystemGraph.kt|ui/screens/(welcome|downloads|plugins)' docs app feature graphify-out
-git diff --check
-```
-
-Expected: historical plans/reports remain untouched; current roadmap/report/architecture status agrees with source ownership and recorded evidence; no whitespace error is reported.
-
-- [x] **Step 9: Commit final evidence and documentation**
-
-```powershell
-git add docs/COMPOSE_REDUCTION_PHASE5_SYSTEM_REPORT.md docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_system graphify-out app/src/main/generated/baselineProfiles
-git commit -m 'docs(system): report phase 5 feature extraction'
-```
-
-Stage only profile files produced by the verified generator. If generated paths differ, record and stage those exact paths instead.
-
-## Exit Criteria
-
-- `:feature:system` owns Welcome, Downloads, Plugins, their ViewModels/state/rendering, controller-free route registration, neutral plugin API models/contracts, feature resources, unit tests, connected tests, and reviewed goldens.
-- `:app` owns the root navigation host/codec, shell composition, app adapters, BuildConfig, sync bus implementation, plugin manager/IPC/work/provider/playback infrastructure, Android services, and manifest entry points.
-- The System boundary reports exactly `:core:navigation`, `:core:ui`, and `:domain`, with zero forbidden main-source references and fixture coverage for app/data/player/controllers/all sibling features.
-- `welcome`, `downloads`, and `plugins` routes, startup redirect/pop behavior, configured landing destinations, focus, semantics, launcher behavior, UI text, lazy identity, download actions, plugin operations, configuration JSON, callback order, and error/result messages are equivalent.
-- Feature tests run independently; System and app build gates have recorded outcomes; a System-only edit does not compile sibling feature Kotlin source.
-- Paired measurements meet the optional-module value thresholds or the extraction is explicitly rejected and prepared for normal review/revert without destructive workspace operations.
-- Resource ownership, locale parity, build/runtime/profile evidence, known failures, unavailable devices, and all remaining Phase 5 gates are documented accurately.
-- Graphify output reflects feature-owned System presentation and app-owned platform/plugin runtime boundaries.
diff --git a/docs/superpowers/plans/2026-09-05-phase6-backup-import-views-experiment.md b/docs/superpowers/plans/2026-09-05-phase6-backup-import-views-experiment.md
deleted file mode 100644
index e496ce0e..00000000
--- a/docs/superpowers/plans/2026-09-05-phase6-backup-import-views-experiment.md
+++ /dev/null
@@ -1,451 +0,0 @@
-# Phase 6 Backup Import Views Experiment Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Build a reversible Compose-versus-classic-Views experiment for the backup-import preview surface and produce a measured keep-or-drop decision.
-
-**Architecture:** Keep `BackupImportPreviewDialog` and all existing backup state/actions unchanged as the Compose baseline. Add an XML/classic-Views dialog in `:feature:settings` that consumes the same `BackupPreview`, `BackupImportPlan`, and callbacks, then exercise both implementations through a debug-only deterministic host activity and paired Macrobenchmark journeys. Do not wire Views into the real Settings flow until the experiment report proves it is worth keeping.
-
-**Tech Stack:** Kotlin/JVM 17, Android SDK 36/min SDK 25, Android Views/XML, existing `:feature:settings` and `:app` modules, View Binding, JUnit4/Truth/Robolectric, Compose instrumentation, Espresso, Macrobenchmark/UiAutomator, API 36 TV emulator, and Graphify.
-
-**Spec:** `docs/superpowers/specs/2026-09-05-phase6-backup-import-views-experiment-design.md`
-
-## Global Constraints
-
-- Preserve `BackupPreview`, `BackupImportPlan`, `SettingsBackupActions`, `SettingsViewModel`, and backup execution behavior exactly.
-- Keep the current Compose dialog as the production/default path throughout this experiment.
-- The debug benchmark host must use a deterministic in-memory fixture and must not access network, database, file-picker, Drive, or provider-sync code.
-- The Views candidate must preserve TV focus, D-pad navigation, Back behavior, accessibility roles, RTL behavior, large-text layout, and disabled-import behavior.
-- Use the existing API 36 `AOSP_TV_on_x86` / `Television_1080p` emulator for connected and Macrobenchmark validation; diagnostic emulator measurements are not physical-device release claims.
-- Run `graphify update .` after modifying Kotlin, XML, Gradle, manifest, or other code/resource files.
-- Do not delete or replace the Compose implementation before the benchmark and connected acceptance gates pass.
-
-### Task 1: Add a deterministic debug benchmark host with the Compose baseline
-
-**Files:**
-- Create: `app/src/debug/AndroidManifest.xml`
-- Create: `app/src/debug/java/com/streamvault/app/benchmark/BackupPreviewBenchmarkFixture.kt`
-- Create: `app/src/debug/java/com/streamvault/app/benchmark/BackupPreviewBenchmarkActivity.kt`
-- Create: `app/src/androidTest/java/com/streamvault/app/benchmark/BackupPreviewBenchmarkActivityTest.kt`
-
-**Interfaces:**
-- Produces `com.streamvault.app.benchmark.BackupPreviewBenchmarkActivity` with explicit presentation extra `presentation=compose`.
-- Produces fixture values containing non-zero counts/conflicts and a default `BackupImportPlan` with at least one enabled section.
-- The activity exposes the visible title `Review Backup Import` and version subtitle to UiAutomator/Espresso.
-
-- [ ] **Step 1: Write the failing host test**
-
-Create an Android test that launches the debug-only activity with `presentation=compose`, waits for `Review Backup Import`, and asserts the preview title and one summary label are visible through UiAutomator. UiAutomator is required for the Compose baseline because the text is exposed through Compose semantics rather than native `TextView` children.
-
-```kotlin
-@RunWith(AndroidJUnit4::class)
-class BackupPreviewBenchmarkActivityTest {
- @Test
- fun composeModeRendersDeterministicPreview() {
- val intent = Intent(
- ApplicationProvider.getApplicationContext(),
- BackupPreviewBenchmarkActivity::class.java,
- ).putExtra(BackupPreviewBenchmarkActivity.EXTRA_PRESENTATION, "compose")
-
- ActivityScenario.launch<BackupPreviewBenchmarkActivity>(intent).use {
- val device = UiDevice.getInstance(
- InstrumentationRegistry.getInstrumentation(),
- )
- assertThat(device.wait(Until.hasObject(By.text("Review Backup Import")), 20_000L))
- .isTrue()
- assertThat(device.hasObject(By.text("Preferences"))).isTrue()
- }
- }
-}
-```
-
-- [ ] **Step 2: Run the focused test and verify it fails for the missing activity**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:connectedDebugAndroidTest `
- '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.benchmark.BackupPreviewBenchmarkActivityTest' `
- --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation or test-discovery failure because the debug activity and fixture do not exist.
-
-- [ ] **Step 3: Add the fixture and Compose-only activity**
-
-Implement a fixture factory returning one stable `BackupPreview` and `BackupImportPlan`. The activity must parse the presentation extra, render the current `BackupImportPreviewDialog` inside `StreamVaultTheme`, and keep a local `mutableStateOf(BackupImportPlan)` so toggle/strategy callbacks update the rendered Compose state. Use no ViewModel or Hilt dependency.
-
-```kotlin
-internal const val EXTRA_PRESENTATION = "presentation"
-internal const val PRESENTATION_COMPOSE = "compose"
-internal const val PRESENTATION_VIEWS = "views"
-
-private var plan by mutableStateOf(BackupPreviewBenchmarkFixture.plan)
-
-BackupImportPreviewDialog(
- preview = BackupPreviewBenchmarkFixture.preview,
- plan = plan,
- onDismiss = ::finish,
- onStrategySelected = { plan = plan.copy(conflictStrategy = it) },
- onImportPreferencesChanged = { plan = plan.copy(importPreferences = it) },
- onImportProvidersChanged = { plan = plan.copy(importProviders = it) },
- onImportSavedLibraryChanged = { plan = plan.copy(importSavedLibrary = it) },
- onImportPlaybackHistoryChanged = { plan = plan.copy(importPlaybackHistory = it) },
- onImportMultiViewChanged = { plan = plan.copy(importMultiViewPresets = it) },
- onImportRecordingSchedulesChanged = { plan = plan.copy(importRecordingSchedules = it) },
- onConfirm = { finish() },
-)
-```
-
-Register the activity only in `app/src/debug/AndroidManifest.xml` with an explicit action and `android:exported="true"` so the benchmark instrumentation can launch it. The Views mode may fail with a clear unsupported-mode exception until Task 3.
-
-- [ ] **Step 4: Run the focused test and verify it passes**
-
-Run the same connected test command. Expected: the Compose host test passes on the API 36 TV emulator.
-
-- [ ] **Step 5: Commit the baseline host**
-
-```powershell
-git add app/src/debug app/src/androidTest/java/com/streamvault/app/benchmark
-git commit -m "test: add compose backup preview benchmark host"
-```
-
-### Task 2: Add the classic Views layout and controller with unit coverage
-
-**Files:**
-- Modify: `feature/settings/build.gradle.kts: buildFeatures`
-- Create: `feature/settings/src/main/res/layout/settings_backup_import_preview_views.xml`
-- Create: `feature/settings/src/main/res/values/settings_backup_preview_views.xml`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/BackupImportPreviewViewController.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/BackupImportPreviewViewDialog.kt`
-- Create: `feature/settings/src/test/java/com/streamvault/feature/settings/presentation/BackupImportPreviewViewControllerTest.kt`
-
-**Interfaces:**
-
-```kotlin
-class BackupImportPreviewViewController(
- private val binding: SettingsBackupImportPreviewViewsBinding,
- private val callbacks: Callbacks,
-) {
- data class Callbacks(
- val onDismiss: () -> Unit,
- val onStrategySelected: (BackupConflictStrategy) -> Unit,
- val onImportPreferencesChanged: (Boolean) -> Unit,
- val onImportProvidersChanged: (Boolean) -> Unit,
- val onImportSavedLibraryChanged: (Boolean) -> Unit,
- val onImportPlaybackHistoryChanged: (Boolean) -> Unit,
- val onImportMultiViewChanged: (Boolean) -> Unit,
- val onImportRecordingSchedulesChanged: (Boolean) -> Unit,
- val onConfirm: () -> Unit,
- )
-
- fun render(preview: BackupPreview, plan: BackupImportPlan, isImporting: Boolean)
- fun requestInitialFocus(): Boolean
-}
-
-class BackupImportPreviewViewDialog(
- context: Context,
- callbacks: BackupImportPreviewViewController.Callbacks,
-) {
- fun show(preview: BackupPreview, plan: BackupImportPlan, isImporting: Boolean = false)
- fun render(preview: BackupPreview, plan: BackupImportPlan, isImporting: Boolean)
- fun dismiss()
-}
-```
-
-- [ ] **Step 1: Write failing controller tests**
-
-Use the existing Robolectric dependency and a minimal test `Activity` to inflate the binding. Cover these observable behaviors: preview labels/counts render, Import is disabled when no section is enabled, strategy selection invokes the callback, and a switch invokes the matching callback.
-
-```kotlin
-@Test
-fun renderDisablesImportWhenNoSectionIsSelected() {
- controller.render(preview, BackupImportPlan(), isImporting = false)
-
- assertThat(binding.confirmButton.isEnabled).isFalse()
-}
-
-@Test
-fun strategySelectionEmitsReplaceExisting() {
- controller.render(preview, BackupImportPlan(), isImporting = false)
-
- binding.replaceExistingButton.performClick()
-
- assertThat(selectedStrategy).isEqualTo(BackupConflictStrategy.REPLACE_EXISTING)
-}
-```
-
-- [ ] **Step 2: Run the unit tests and verify they fail**
-
-Run:
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest `
- --tests 'com.streamvault.feature.settings.presentation.BackupImportPreviewViewControllerTest' `
- --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: compilation failure because View Binding, the XML IDs, and the controller do not exist.
-
-- [ ] **Step 3: Enable View Binding and add the XML surface**
-
-Set `viewBinding = true` alongside the existing `compose = true` flag. Create the layout with stable IDs for the title/subtitle, six summary rows, two strategy controls, six switches, the scroll container, the scroll hint, and Cancel/Import buttons. Use standard Android focusable controls and a feature-local dialog style with transparent window background, rounded surface, existing StreamVault colors, and TV-sized padding.
-
-The layout must keep the body inside a bounded `ScrollView`, put the first strategy control at the start of the focus order, and place the footer buttons after the body. All user-facing text must come from the existing `feature/settings` string resources.
-
-- [ ] **Step 4: Implement the controller and dialog wrapper**
-
-Implement `render` as the single state-to-Views update point. Clear and reinstall checked-change listeners before assigning switch state, update summary text/counts from `BackupPreview`, derive Import enabled state from the six plan flags, disable all interactive controls while importing, and expose callbacks without calling domain or ViewModel code.
-
-Implement the dialog wrapper with `android.app.Dialog` and the View Binding layout. Match the Compose dialog's TV dimensions (`0.58f` width and `0.78f` height on TV), use a bounded body, request initial focus after show, delay interaction enablement by 500 ms, and allow Back/outside dismissal only after that guard is released. The wrapper must expose `render` so the debug host can update the same dialog after a callback.
-
-- [ ] **Step 5: Run the focused unit tests and verify they pass**
-
-Run the same `:feature:settings:testDebugUnitTest --tests ...BackupImportPreviewViewControllerTest` command. Expected: all controller tests pass.
-
-- [ ] **Step 6: Commit the Views surface**
-
-```powershell
-git add feature/settings/build.gradle.kts feature/settings/src/main/res feature/settings/src/main/java/com/streamvault/feature/settings/presentation/BackupImportPreviewViewController.kt feature/settings/src/main/java/com/streamvault/feature/settings/presentation/BackupImportPreviewViewDialog.kt feature/settings/src/test/java/com/streamvault/feature/settings/presentation/BackupImportPreviewViewControllerTest.kt
-git commit -m "feat: add views backup import preview experiment"
-```
-
-### Task 3: Add the Views benchmark mode and paired connected behavior tests
-
-**Files:**
-- Modify: `app/src/debug/java/com/streamvault/app/benchmark/BackupPreviewBenchmarkActivity.kt`
-- Create: `app/src/androidTest/java/com/streamvault/app/benchmark/BackupPreviewPresentationMatrixTest.kt`
-- Create: `app/src/androidTest/java/com/streamvault/app/benchmark/BackupPreviewViewGoldenCapture.kt`
-- Create: `app/src/androidTest/assets/ui-goldens/backup_preview_views.png` after visual review
-
-**Interfaces:**
-- `presentation=views` launches `BackupImportPreviewViewDialog` with the same fixture and callback state updates as Compose mode.
-- The connected matrix test can select `compose` or `views`, drive the same D-pad/toggle/Back path, and assert visible state through Espresso or UiAutomator.
-
-- [ ] **Step 1: Add failing Views-mode and behavior tests**
-
-Extend the host test to launch `presentation=views` and assert the same title, summary label, disabled Import state, strategy change, switch change, and Back dismissal. Keep Compose and Views assertions in the same test class so the interaction matrix remains visibly paired.
-
-```kotlin
-@Test
-fun viewsModeSupportsImportPlanInteraction() {
- launchMode("views")
-
- onView(withId(R.id.replaceExistingButton)).perform(click())
- onView(withId(R.id.importProvidersSwitch)).perform(click())
- onView(withId(R.id.cancelButton)).perform(click())
-
- onView(withText("Review Backup Import")).check(doesNotExist())
-}
-```
-
-- [ ] **Step 2: Run the connected matrix and verify Views mode fails before wiring**
-
-Run:
-
-```powershell
-.\gradlew.bat :app:connectedDebugAndroidTest `
- '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.benchmark.BackupPreviewPresentationMatrixTest' `
- --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: Compose mode passes and Views mode fails because the activity still rejects or does not render the Views presentation.
-
-- [ ] **Step 3: Wire Views mode to the same local state contract**
-
-Create the `BackupImportPreviewViewDialog` from the activity, provide the same callbacks used by Compose, update the local `BackupImportPlan` in each callback, and call `dialog.render(...)` after every update. Keep `isImporting=false` for the deterministic host; import execution is not part of this experiment.
-
-- [ ] **Step 4: Add connected behavior and accessibility assertions**
-
-Assert both modes for visible title/counts, selected conflict strategy, switch state, Import enabled/disabled state, Back dismissal, and focus progression. Use `contentDescription`/text-role assertions for Views and existing Compose semantics assertions for Compose. Add RTL and large-font configuration coverage to the host test if the connected runner supports the repository's existing locale/font setup; otherwise run the ADB configuration checks manually and record their output in the report.
-
-- [ ] **Step 5: Capture and review the Views golden**
-
-Use `UiDevice.takeScreenshot()` after the dialog reaches its first stable frame. Save the reviewed output as `app/src/androidTest/assets/ui-goldens/backup_preview_views.png`; compare it side-by-side with a Compose capture at the same 1920x1080 emulator configuration. Reject the candidate if the dialog is clipped, focus styling is absent, footer actions are hidden, or text/counts differ.
-
-- [ ] **Step 6: Run the connected tests and verify they pass**
-
-Run the same focused connected command. Expected: both modes pass the behavior matrix and the reviewed Views capture is stable.
-
-- [ ] **Step 7: Commit the paired host tests**
-
-```powershell
-git add app/src/debug/java/com/streamvault/app/benchmark/BackupPreviewBenchmarkActivity.kt app/src/androidTest/java/com/streamvault/app/benchmark app/src/androidTest/assets/ui-goldens/backup_preview_views.png
-git commit -m "test: exercise backup preview compose and views modes"
-```
-
-### Task 4: Add paired Macrobenchmark journeys
-
-**Files:**
-- Modify: `benchmark/src/main/java/com/streamvault/benchmark/BenchmarkConfig.kt`
-- Modify: `benchmark/src/main/java/com/streamvault/benchmark/StreamVaultMacrobenchmark.kt`
-
-**Interfaces:**
-- `launchBackupPreviewMode(mode: String)` starts the debug host explicitly and waits for `Review Backup Import`.
-- `exerciseBackupPreview()` drives the identical focus, strategy, toggle, and Back journey for either presentation.
-- Four benchmark methods report separate Compose/Views initial-display and interaction results.
-
-- [ ] **Step 1: Add the benchmark helper tests/build checks first**
-
-Add compile-visible constants and helper signatures, then run the benchmark Kotlin compilation so missing activity names, imports, and Macrobenchmark APIs fail before the full connected run.
-
-```powershell
-.\gradlew.bat :benchmark:compileBenchmarkBenchmarkKotlin `
- --no-daemon --console=plain --warning-mode=none
-```
-
-Expected before implementation: failure for the missing `launchBackupPreviewMode` and `exerciseBackupPreview` helpers.
-
-- [ ] **Step 2: Implement explicit host launch and deterministic interaction**
-
-Add the activity component name and mode extra in `BenchmarkConfig.kt`. Launch with `startActivityAndWait(Intent)` or the existing `UiDevice` shell pattern, wait for the title, move focus with D-pad, select the alternate strategy, toggle a section, verify Import becomes enabled, and press Back after returning focus to Cancel.
-
-Keep all fixed delays and timeouts in `BenchmarkConfig.kt`; do not add coordinate taps or network waits. Use resource IDs for Views only where necessary and text/description selectors for the shared visible contract.
-
-- [ ] **Step 3: Add paired benchmark methods**
-
-Add Compose and Views interaction methods using `FrameTimingMetric()` and a trace marker for the measured mode. Add Compose and Views initial-display methods using the same cold/warm policy and startup metric supported by the current Macrobenchmark dependency. If `MemoryUsageMetric` is available in the resolved dependency, include it in both interaction methods; otherwise capture PSS in the validation step using `adb shell dumpsys meminfo` and record that the metric was external.
-
-```kotlin
-@Test
-fun backupPreviewComposeInteraction() = measureBackupPreviewInteraction("compose")
-
-@Test
-fun backupPreviewViewsInteraction() = measureBackupPreviewInteraction("views")
-
-private fun measureBackupPreviewInteraction(mode: String) = benchmarkRule.measureRepeated(
- packageName = SEEDED_DEBUG_PACKAGE,
- metrics = listOf(FrameTimingMetric()),
- startupMode = StartupMode.WARM,
- iterations = BENCHMARK_ITERATIONS,
- setupBlock = { launchBackupPreviewMode(mode) },
-) {
- exerciseBackupPreview()
-}
-```
-
-- [ ] **Step 4: Compile and run the focused benchmark selector**
-
-Run:
-
-```powershell
-.\gradlew.bat :benchmark:connectedBenchmarkBenchmarkAndroidTest `
- '-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=Macrobenchmark' `
- '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.benchmark.StreamVaultMacrobenchmark#backupPreviewComposeInteraction' `
- --no-daemon --console=plain --warning-mode=none
-
-.\gradlew.bat :benchmark:connectedBenchmarkBenchmarkAndroidTest `
- '-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=Macrobenchmark' `
- '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.benchmark.StreamVaultMacrobenchmark#backupPreviewViewsInteraction' `
- --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: each selector completes the configured repeated iterations and writes Macrobenchmark output under `benchmark/build/outputs`.
-
-- [ ] **Step 5: Commit the benchmark journeys**
-
-```powershell
-git add benchmark/src/main/java/com/streamvault/benchmark/BenchmarkConfig.kt benchmark/src/main/java/com/streamvault/benchmark/StreamVaultMacrobenchmark.kt
-git commit -m "perf: benchmark backup preview compose and views"
-```
-
-### Task 5: Run the full experiment gates and document the decision
-
-**Files:**
-- Create: `docs/COMPOSE_REDUCTION_PHASE6_BACKUP_VIEWS_REPORT.md`
-- Modify: none unless a test or benchmark defect is found
-
-**Interfaces:**
-- Consumes focused unit-test results, connected behavior/golden results, Macrobenchmark outputs, and external PSS samples.
-- Produces a checked-in report with device/configuration, iteration count, Compose and Views medians/P95s, functional results, visual review, and the keep/drop decision.
-
-- [ ] **Step 1: Run focused unit and module validation**
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest `
- --tests 'com.streamvault.feature.settings.presentation.BackupImportPreviewViewControllerTest' `
- :feature:settings:verifyFeatureSettingsBoundary `
- :feature:settings:lintDebug `
- --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: the new controller tests, feature boundary, and lint pass. Existing unrelated baseline findings remain governed by the repository lint baseline.
-
-- [ ] **Step 2: Run the paired connected behavior suite**
-
-```powershell
-.\gradlew.bat :app:connectedDebugAndroidTest `
- '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.benchmark.BackupPreviewPresentationMatrixTest' `
- --no-daemon --console=plain --warning-mode=none
-```
-
-Expected: Compose and Views modes pass the behavior matrix, the dialog can be dismissed, and the reviewed 1920x1080 output remains visually equivalent.
-
-- [ ] **Step 3: Capture paired external PSS samples when the device is idle**
-
-For each mode, launch the debug host, wait five seconds, and record the target process line:
-
-```powershell
-adb shell dumpsys meminfo com.streamvault.app.debug | Select-String 'TOTAL PSS'
-```
-
-Use the same fresh-process/reset policy for both modes and record at least five samples per mode. Report median PSS; do not compare one cold sample to one warm sample.
-
-- [ ] **Step 4: Run the complete focused Macrobenchmark pair**
-
-Run both interaction selectors from Task 4 and the two initial-display selectors. Save the generated result paths and extract median/P95 frame timing, startup timing, and memory metrics when present.
-
-- [ ] **Step 5: Apply the decision rule**
-
-Keep Views only when it improves a primary performance metric by approximately 10% or more across repeated paired runs, introduces no material P95/memory regression, passes the complete behavior/focus/accessibility/RTL/large-text/visual matrix, and leaves a comprehensible host boundary. Otherwise mark the candidate dropped and keep Compose as the production choice.
-
-- [ ] **Step 6: Write the experiment report with actual evidence**
-
-The report must include:
-
-```markdown
-# Phase 6 Backup Import Views Experiment Report
-
-## Environment
-- Commit:
-- Device/API/resolution:
-- APK variant and compilation mode:
-- Iterations per mode:
-
-## Results
-| Mode | Initial display median/P95 | Interaction frame median/P95 | Median PSS | Functional result |
-|---|---:|---:|---:|---|
-
-## Behavior and visual review
-
-## Decision
-
-## Follow-up
-```
-
-Replace every field with the actual recorded value before committing. If Views is dropped, explicitly record why and do not start production integration. If Views wins, record that production wiring requires a separate reviewed change which keeps Compose behind the rollback path.
-
-- [ ] **Step 7: Update the graph and verify the final tree**
-
-Run:
-
-```powershell
-graphify update .
-.\gradlew.bat :feature:settings:testDebugUnitTest :app:testDebugUnitTest :app:assembleDebug `
- --no-daemon --console=plain --warning-mode=none
-git diff --check
-git status --short
-```
-
-Expected: Graphify reflects the new experiment code, focused unit tests and debug assembly pass, no whitespace errors exist, and only intended files are modified.
-
-- [ ] **Step 8: Commit the report and graph refresh**
-
-```powershell
-git add docs/COMPOSE_REDUCTION_PHASE6_BACKUP_VIEWS_REPORT.md graphify-out
-git commit -m "docs: record phase 6 backup views experiment"
-```
-
-## Execution boundary
-
-This plan intentionally ends after the keep/drop decision. If Views wins, create a follow-up implementation plan for the real Settings integration, development switch, connected Settings journey, and removal of the Compose path after a release-like validation pass. If Views does not win, retain the report and use it to choose the next Phase 6 candidate without carrying experimental code forward.
diff --git a/docs/superpowers/plans/2026-09-05-settings-data-boundary.md b/docs/superpowers/plans/2026-09-05-settings-data-boundary.md
deleted file mode 100644
index a647ff46..00000000
--- a/docs/superpowers/plans/2026-09-05-settings-data-boundary.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# Settings Data Boundary Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Remove all direct `:data` dependencies and imports from `:feature:settings` without changing settings behavior.
-
-**Architecture:** Settings consumes focused domain contracts. The existing preferences implementation adopts the preference contract, while a data adapter maps Room/sync implementation types into domain operational snapshots.
-
-**Tech Stack:** Kotlin, Coroutines Flow, Hilt, Room, DataStore, JUnit, Truth, Mockito-Kotlin, Gradle Kotlin DSL.
-
-**Spec:** `docs/superpowers/specs/2026-09-05-settings-data-boundary-design.md`
-
-## Global Constraints
-
-- Preserve preference keys, defaults, persisted encodings, and all user-facing settings behavior.
-- `:feature:settings` may depend on `:domain`, `:core:ui`, `:core:navigation`, and `:player`, but not `:data`.
-- Presentation sources must not reference `com.streamvault.data`.
-- Room, DataStore, and concrete provider sync types remain in `:data`.
-
----
-
-### Task 1: Enforce the final settings boundary
-
-**Files:**
-- Modify: `feature/settings/build.gradle.kts`
-- Create: `feature/settings/src/test/resources/boundary-fixtures/DataImport.kt`
-- Modify: `feature/settings/src/test/java/com/streamvault/feature/settings/SettingsModuleBoundaryTest.kt`
-
-**Interfaces:**
-- Consumes: existing `verifyFeatureSettingsBoundary` task.
-- Produces: failing tests/fixtures that define the final build guard before production migration begins.
-
-- [ ] Add a failing fixture/assertion requiring detection of `com.streamvault.data` and requiring the build file to omit `project(":data")`.
-- [ ] Run `:feature:settings:verifyFeatureSettingsBoundary` and confirm it fails on the current dependency.
-- [ ] Leave enforcement changes staged for Task 4, where the migrated production sources can satisfy them.
-
-### Task 2: Introduce the settings preferences contract
-
-**Files:**
-- Create: `domain/src/main/java/com/streamvault/domain/settings/SettingsPreferences.kt`
-- Create: `domain/src/main/java/com/streamvault/domain/settings/DatabaseMaintenanceSnapshot.kt`
-- Modify: `data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt`
-- Modify: settings production files importing `PreferencesRepository`
-- Modify: settings tests importing `PreferencesRepository`
-
-**Interfaces:**
-- Consumes: existing domain preference value types and existing `PreferencesRepository` behavior.
-- Produces: `SettingsPreferences`, implemented by `PreferencesRepository`, with every stream/command actually consumed by settings.
-
-- [ ] Add a compile-time contract test that assigns a settings preference fake to constructors/helpers currently typed as `PreferencesRepository`; confirm compilation fails because `SettingsPreferences` does not exist.
-- [ ] Declare `SettingsPreferences` with the exact Flow properties and suspend functions referenced under `feature/settings/src/main`.
-- [ ] Move `DatabaseMaintenanceSnapshot` to `domain.settings` and make `PreferencesRepository : SettingsPreferences`, adding `override` to implemented members.
-- [ ] Replace production and test constructor/helper types with `SettingsPreferences`.
-- [ ] Run `:domain:test :data:compileDebugKotlin :feature:settings:compileDebugKotlin :feature:settings:compileDebugUnitTestKotlin` and fix contract-shape mismatches without changing behavior.
-
-### Task 3: Introduce the settings operations contract
-
-**Files:**
-- Create: `domain/src/main/java/com/streamvault/domain/settings/SettingsOperations.kt`
-- Create: `data/src/main/java/com/streamvault/data/settings/SettingsOperationsImpl.kt`
-- Create: `data/src/main/java/com/streamvault/data/di/SettingsDataModule.kt`
-- Modify: `feature/settings/.../SettingsViewModel.kt`
-- Modify: `feature/settings/.../SettingsDerivedStateObservers.kt`
-- Modify: `feature/settings/.../SettingsObserverRegistrations.kt`
-- Modify: `feature/settings/.../SettingsSyncActions.kt`
-- Modify: `feature/settings/.../SettingsOperationalModels.kt`
-- Modify: affected settings tests
-
-**Interfaces:**
-- Produces: `SettingsOperations.observeProgramCount(providerId): Flow<Int>`, `observeXtreamIndexJobs()`, `observeIncompleteXtreamLiveOnboarding()`, `syncProvider(providerId, force)`, `retryProviderSection(providerId, section, onProgress)`, `rebuildXtreamIndex(providerId, onProgress)`, and `scheduleBackgroundEpgSync(providerId)` using `SettingsSyncSection` and immutable domain snapshots.
-
-- [ ] Add failing domain/feature tests for operational snapshot mapping and sync-section delegation.
-- [ ] Define domain snapshots and `SettingsSyncSection` without Room annotations or data imports.
-- [ ] Implement `SettingsOperationsImpl` by delegating to the existing DAOs and `ProviderSyncCommands`, mapping every field and sync section explicitly.
-- [ ] Bind the implementation with Hilt and replace DAO/sync injections and helper parameters in settings.
-- [ ] Move entity-to-UI conversion to domain-snapshot-to-UI conversion and migrate tests.
-- [ ] Run focused settings and data adapter tests until green.
-
-### Task 4: Remove the data dependency and verify the checkpoint
-
-**Files:**
-- Modify: `feature/settings/build.gradle.kts`
-- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`
-- Update: `graphify-out/`
-
-**Interfaces:**
-- Consumes: Tasks 1-3.
-- Produces: final dependency direction `:feature:settings -> :domain <- :data`.
-
-- [ ] Remove `implementation(project(":data"))` and enable source-level data-package rejection.
-- [ ] Confirm `rg -n "com\\.streamvault\\.data" feature/settings/src/main` returns no matches.
-- [ ] Run `:domain:test :data:testDebugUnitTest :feature:settings:testDebugUnitTest :app:assembleDebug` and confirm exit code 0.
-- [ ] Run `git diff --check` and independently review the boundary, mappings, and behavior compatibility.
-- [ ] Update the Phase 7 execution state and run `graphify update .`.
diff --git a/docs/superpowers/plans/2026-09-06-playback-data-boundary.md b/docs/superpowers/plans/2026-09-06-playback-data-boundary.md
deleted file mode 100644
index ef8445b0..00000000
--- a/docs/superpowers/plans/2026-09-06-playback-data-boundary.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# Playback data-boundary cleanup implementation plan
-
-> Execute this plan task-by-task with test-first changes and a verification checkpoint after each boundary seam.
-
-## Task 1: Make the playback boundary red
-
-Files:
-
-- `feature/playback/build.gradle.kts`
-- `feature/playback/src/test/resources/boundary-fixtures/*`
-
-Changes:
-
-- remove `:data` from the approved project dependency set and implementation dependencies;
-- add forbidden data-package tokens and Kotlin/Java fixtures;
-- require the new fixture violations in the boundary assertion;
-- keep the typed configuration-cache-safe task shape.
-
-Test first:
-
-- run `:feature:playback:verifyFeaturePlaybackBoundary`; it must fail against the current dependency/import state.
-
-## Task 2: Introduce the player-preferences domain seam
-
-Files:
-
-- `domain/src/main/java/com/streamvault/domain/settings/PlayerPreferences.kt`
-- `data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt`
-- `app/src/main/java/com/streamvault/app/di/RepositoryModule.kt`
-- playback preference consumers and their tests
-
-Changes:
-
-- declare the missing player/multiview API on `PlayerPreferences`;
-- implement/bind it from `PreferencesRepository`;
-- migrate playback consumers and tests from the concrete repository to the interface.
-
-Verification:
-
-- `:feature:playback:testDebugUnitTest` and the focused multiview/player tests pass;
-- `rg` finds no `PreferencesRepository` import in playback main or test sources.
-
-## Task 3: Introduce the provider playback domain seam
-
-Files:
-
-- domain provider contract and failure types;
-- app playback adapter and Hilt binding;
-- `PlayerContentResolver`, `PlayerProviderCoordinator`, and related tests.
-
-Changes:
-
-- expose `ResolvedPlayback` through a domain `PlayerPlaybackResolver` result API;
-- translate data resolver metadata and known data exceptions in the app adapter;
-- preserve content-resolution success, credential-failure, Stalker-resolution-failure, internal-URL, and direct-URL paths.
-
-Verification:
-
-- focused resolver/coordinator tests pass;
-- playback main/test sources contain no data-package imports.
-
-## Task 4: Move the fallback URL token seam to domain
-
-Files:
-
-- domain internal playback URL codec;
-- `PlayerAlternateStreamSupport` and its tests.
-
-Changes:
-
-- replace direct Xtream factory/token imports with the domain codec;
-- preserve all existing fallback URL selection behavior and expected URL strings.
-
-Verification:
-
-- alternate-stream tests pass;
-- no `XtreamUrlFactory` or `XtreamStreamKind` imports remain in playback.
-
-## Task 5: Boundary and repository verification
-
-Commands:
-
-```text
-graphify update .
-./gradlew :feature:playback:verifyFeaturePlaybackBoundary --configuration-cache
-./gradlew :feature:playback:testDebugUnitTest :domain:test :data:testDebugUnitTest :feature:settings:testDebugUnitTest :player:testDebugUnitTest :feature:live:testDebugUnitTest :app:assembleDebug --console=plain --no-daemon
-git diff --check
-```
-
-Acceptance:
-
-- playback project dependencies are exactly the four approved modules;
-- playback source has no `com.streamvault.data` imports;
-- focused and full verification pass;
-- Phase 7 plan documents the removed transitional edge.
diff --git a/docs/superpowers/plans/2026-09-06-player-capability-boundary.md b/docs/superpowers/plans/2026-09-06-player-capability-boundary.md
deleted file mode 100644
index c3c694f3..00000000
--- a/docs/superpowers/plans/2026-09-06-player-capability-boundary.md
+++ /dev/null
@@ -1,590 +0,0 @@
-# Player Capability Boundary Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Remove Media3-shaped values and direct Media3 dependencies from playback presentation while preserving every player behavior.
-
-**Architecture:** Keep `PlayerEngine` in `:player` as the approved capability API and keep Media3 conversion inside that module. Presentation sends nullable subtitle text and consumes a player-owned PCM encoding enum; the playback boundary task prevents concrete-engine and Media3 references from returning.
-
-**Tech Stack:** Kotlin, Android, Media3 1.9.2, Compose, Coroutines, JUnit 4, Truth, Robolectric, Gradle Kotlin DSL
-
-**Spec:** `docs/superpowers/specs/2026-09-06-player-capability-boundary-design.md`
-
-## Global Constraints
-
-- Do not change preparation, retries, recovery selection, timeshift, media sessions, render surfaces, track selection, audio focus, or transport policy.
-- A non-null, non-blank injected subtitle string displays one cue; null or blank clears injected subtitles.
-- Only Media3 `C.ENCODING_PCM_16BIT` maps to `PlayerPcmEncoding.PCM_16_BIT`; every other value maps to `UNSUPPORTED`.
-- `:feature:playback/src/main` must contain no `Media3PlayerEngine` or `androidx.media3` references.
-- `:feature:playback` must have no direct Media3 Gradle dependency.
-- Keep `:feature:playback -> :player`; do not create a new API module.
-- Use TDD and commit each independently reviewable task.
-- Run `graphify update .` after code changes.
-- Do not report player acceptance complete without the required multi-channel long-duration Live TV evidence.
-
-## File map
-
-- `player/src/main/java/com/streamvault/player/PlayerEngine.kt`: presentation-facing capability signatures.
-- `player/src/main/java/com/streamvault/player/LiveAudioTap.kt`: player-owned PCM buffer and encoding model.
-- `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt`: Media3 subtitle adaptation.
-- `player/src/main/java/com/streamvault/player/ui/PlayerViewBinder.kt`: internal conversion from nullable text to Media3 cues.
-- `player/src/main/java/com/streamvault/player/playback/LiveAudioTapAudioSink.kt`: Media3-to-player PCM encoding mapping.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/translation/LiveTranslationSession.kt`: capability-only translation consumer.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerLiveTranslationActions.kt`: nullable-text clear call.
-- `feature/playback/build.gradle.kts`: direct dependency removal and automated boundary enforcement.
-- `feature/playback/src/test/resources/boundary-fixtures/`: source guard regression fixtures.
-- `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`: checkpoint evidence and remaining Phase 7 scope.
-
----
-
-### Task 1: Define the player boundary regression in red
-
-**Files:**
-
-- Modify: `feature/playback/src/test/java/com/streamvault/feature/playback/PlaybackModuleBoundaryTest.kt`
-- Create: `feature/playback/src/test/resources/boundary-fixtures/Media3EngineImport.kt`
-- Create: `feature/playback/src/test/resources/boundary-fixtures/Media3FullyQualifiedReference.java`
-
-**Interfaces:**
-
-- Consumes: existing `fixtureViolations` field from the playback boundary report.
-- Produces: executable requirements for detecting `Media3PlayerEngine` and `androidx.media3` source references.
-
-- [ ] **Step 1: Add source fixtures**
-
-```kotlin
-package fixtures
-
-import com.streamvault.player.Media3PlayerEngine
-```
-
-```java
-package fixtures;
-
-final class Media3FullyQualifiedReference {
- androidx.media3.common.Player player;
-}
-```
-
-- [ ] **Step 2: Add failing boundary assertions**
-
-Extend `boundary guard rejects Kotlin and Java app and root navigation fixtures`:
-
-```kotlin
-assertThat(fixtureViolations)
- .contains("Media3EngineImport.kt:3: Media3PlayerEngine")
-assertThat(fixtureViolations)
- .contains("Media3FullyQualifiedReference.java:4: androidx.media3")
-```
-
-Also add a build-file assertion that reads `build.gradle.kts` from the module
-root and requires the eventual absence of `implementation(libs.media3.exoplayer)`:
-
-```kotlin
-@Test
-fun `playback feature does not declare Media3 directly`() {
- val buildFile = java.io.File("build.gradle.kts").readText()
- assertThat(buildFile).doesNotContain("implementation(libs.media3.exoplayer)")
-}
-```
-
-- [ ] **Step 3: Run the focused test to prove red**
-
-Run:
-
-```powershell
-.\gradlew.bat :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.PlaybackModuleBoundaryTest" --console=plain --no-daemon
-```
-
-Expected: FAIL because the current guard does not report either new fixture and the build file still declares Media3 ExoPlayer.
-
-- [ ] **Step 4: Commit the red contract**
-
-```powershell
-git add feature/playback/src/test/java/com/streamvault/feature/playback/PlaybackModuleBoundaryTest.kt feature/playback/src/test/resources/boundary-fixtures
-git commit -m "test(playback): define Media3 boundary red"
-```
-
----
-
-### Task 2: Replace cue exposure with a subtitle-text capability
-
-**Files:**
-
-- Modify: `player/src/main/java/com/streamvault/player/PlayerEngine.kt`
-- Modify: `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt`
-- Modify: `player/src/main/java/com/streamvault/player/ui/PlayerViewBinder.kt`
-- Create: `player/src/test/java/com/streamvault/player/ui/PlayerInjectedSubtitleTest.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/translation/LiveTranslationSession.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerLiveTranslationActions.kt`
-
-**Interfaces:**
-
-- Consumes: `PlayerEngine` and the existing internal Media3 `Cue` rendering behavior.
-- Produces: `PlayerEngine.setInjectedSubtitleText(text: String?)` with null/blank clear semantics.
-
-- [ ] **Step 1: Write failing subtitle conversion tests**
-
-Add an internal mapper beside `PlayerViewBinder` and test its required result:
-
-```kotlin
-package com.streamvault.player.ui
-
-import com.google.common.truth.Truth.assertThat
-import org.junit.Test
-
-class PlayerInjectedSubtitleTest {
- @Test
- fun `non-blank text maps to exactly one cue`() {
- val cues = buildInjectedSubtitleCues("Translated line")
-
- assertThat(cues).hasSize(1)
- assertThat(cues.single().text.toString()).isEqualTo("Translated line")
- }
-
- @Test
- fun `null and blank text clear cues`() {
- assertThat(buildInjectedSubtitleCues(null)).isEmpty()
- assertThat(buildInjectedSubtitleCues(" ")).isEmpty()
- }
-}
-```
-
-- [ ] **Step 2: Run the player test to prove red**
-
-Run:
-
-```powershell
-.\gradlew.bat :player:testDebugUnitTest --tests "com.streamvault.player.ui.PlayerInjectedSubtitleTest" --console=plain --no-daemon
-```
-
-Expected: compilation FAIL because `buildInjectedSubtitleCues` does not exist.
-
-- [ ] **Step 3: Implement the minimal player-side conversion**
-
-In `PlayerViewBinder.kt` add:
-
-```kotlin
-internal fun buildInjectedSubtitleCues(text: String?): List<Cue> =
- text?.takeIf(String::isNotBlank)
- ?.let { listOf(Cue.Builder().setText(it).build()) }
- .orEmpty()
-```
-
-Replace binder set/clear methods with:
-
-```kotlin
-fun setInjectedSubtitleText(text: String?) {
- injectedSubtitleCues = buildInjectedSubtitleCues(text)
- applyInjectedCues(boundPlayerView)
-}
-```
-
-Replace both methods in `PlayerEngine` with:
-
-```kotlin
-fun setInjectedSubtitleText(text: String?)
-```
-
-Implement in `Media3PlayerEngine` by delegating unchanged to the binder. Change
-its internal reset paths from `clearInjectedSubtitleCues()` to
-`setInjectedSubtitleText(null)`.
-
-- [ ] **Step 4: Migrate presentation call sites**
-
-In `LiveTranslationSession`, replace cue construction and clearing with:
-
-```kotlin
-private fun renderCaption(text: String) {
- playerEngine.setInjectedSubtitleText(text)
-}
-
-private fun clearCues() {
- playerEngine.setInjectedSubtitleText(null)
-}
-```
-
-In `PlayerLiveTranslationActions`, clear with:
-
-```kotlin
-playerEngine.setInjectedSubtitleText(null)
-```
-
-Remove the Media3 `Cue` import. Do not yet remove the file-level `UnstableApi` or
-Media3 `C` import; Task 3 removes the remaining audio leak.
-
-- [ ] **Step 5: Run focused player and translation tests**
-
-Run:
-
-```powershell
-.\gradlew.bat :player:testDebugUnitTest --tests "com.streamvault.player.ui.PlayerInjectedSubtitleTest" --console=plain --no-daemon
-.\gradlew.bat :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.translation.LiveTranslationCaptionPacingTest" --console=plain --no-daemon
-```
-
-Expected: PASS. Task 1's complete boundary test remains intentionally red until Task 4 activates the full guard and removes the dependency.
-
-- [ ] **Step 6: Commit the subtitle capability**
-
-```powershell
-git add player/src/main feature/playback/src/main player/src/test/java/com/streamvault/player/ui/PlayerInjectedSubtitleTest.kt
-git commit -m "refactor(player): expose subtitle text capability"
-```
-
----
-
-### Task 3: Replace Media3 PCM encoding with a player-owned model
-
-**Files:**
-
-- Modify: `player/src/main/java/com/streamvault/player/LiveAudioTap.kt`
-- Modify: `player/src/main/java/com/streamvault/player/playback/LiveAudioTapAudioSink.kt`
-- Create: `player/src/test/java/com/streamvault/player/playback/PlayerPcmEncodingTest.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/translation/LiveTranslationSession.kt`
-- Create: `feature/playback/src/test/java/com/streamvault/feature/playback/translation/LiveTranslationPcmConversionTest.kt`
-
-**Interfaces:**
-
-- Consumes: Media3 integer encoding only inside `:player`.
-- Produces: `PlayerPcmEncoding`, `LiveAudioPcmBuffer.encoding: PlayerPcmEncoding`, and an internal translation conversion test seam.
-
-- [ ] **Step 1: Write failing Media3 mapping tests**
-
-```kotlin
-package com.streamvault.player.playback
-
-import androidx.media3.common.C
-import com.google.common.truth.Truth.assertThat
-import com.streamvault.player.PlayerPcmEncoding
-import org.junit.Test
-
-class PlayerPcmEncodingTest {
- @Test
- fun `16 bit Media3 PCM maps to player 16 bit encoding`() {
- assertThat(toPlayerPcmEncoding(C.ENCODING_PCM_16BIT))
- .isEqualTo(PlayerPcmEncoding.PCM_16_BIT)
- }
-
- @Test
- fun `all other Media3 encodings map to unsupported`() {
- assertThat(toPlayerPcmEncoding(C.ENCODING_PCM_FLOAT))
- .isEqualTo(PlayerPcmEncoding.UNSUPPORTED)
- assertThat(toPlayerPcmEncoding(C.ENCODING_INVALID))
- .isEqualTo(PlayerPcmEncoding.UNSUPPORTED)
- }
-}
-```
-
-- [ ] **Step 2: Run the mapping test to prove red**
-
-Run:
-
-```powershell
-.\gradlew.bat :player:testDebugUnitTest --tests "com.streamvault.player.playback.PlayerPcmEncodingTest" --console=plain --no-daemon
-```
-
-Expected: compilation FAIL because the enum and mapper do not exist.
-
-- [ ] **Step 3: Add the player-owned model and mapping**
-
-In `LiveAudioTap.kt` define:
-
-```kotlin
-enum class PlayerPcmEncoding {
- PCM_16_BIT,
- UNSUPPORTED
-}
-```
-
-Change `LiveAudioPcmBuffer.encoding` to `PlayerPcmEncoding`. In
-`LiveAudioTapAudioSink.kt` define:
-
-```kotlin
-internal fun toPlayerPcmEncoding(encoding: Int): PlayerPcmEncoding =
- if (encoding == C.ENCODING_PCM_16BIT) {
- PlayerPcmEncoding.PCM_16_BIT
- } else {
- PlayerPcmEncoding.UNSUPPORTED
- }
-```
-
-Map the configured encoding before validating and constructing the buffer. Keep
-the existing early return for unsupported encoding, invalid sample rate/channel
-count, and empty consumption range.
-
-- [ ] **Step 4: Write a failing feature conversion test**
-
-Make both `ConvertedPcmChunk` and `convertToPcm16Mono16k` internal, then test the
-defensive check directly:
-
-```kotlin
-@Test
-fun `translation rejects unsupported player PCM encoding`() {
- val result = convertToPcm16Mono16k(
- buffer = LiveAudioPcmBuffer(
- data = byteArrayOf(0, 0),
- presentationTimeUs = 0,
- sampleRate = 16_000,
- channelCount = 1,
- encoding = PlayerPcmEncoding.UNSUPPORTED
- ),
- fallbackStartMs = 0
- )
-
- assertThat(result).isNull()
-}
-```
-
-Also test a two-byte `PCM_16_BIT` sample returns non-null data and preserves the
-existing fallback start time:
-
-```kotlin
-@Test
-fun `translation accepts player 16 bit PCM`() {
- val result = convertToPcm16Mono16k(
- buffer = LiveAudioPcmBuffer(
- data = byteArrayOf(1, 0),
- presentationTimeUs = 0,
- sampleRate = 16_000,
- channelCount = 1,
- encoding = PlayerPcmEncoding.PCM_16_BIT
- ),
- fallbackStartMs = 123
- )
-
- assertThat(result).isNotNull()
- assertThat(result!!.data).isEqualTo(byteArrayOf(1, 0))
- assertThat(result.startMs).isEqualTo(123)
-}
-```
-
-- [ ] **Step 5: Migrate translation off Media3**
-
-Replace the `C.ENCODING_PCM_16BIT` comparison with:
-
-```kotlin
-buffer.encoding != PlayerPcmEncoding.PCM_16_BIT
-```
-
-Remove the Media3 `C` import and file-level `UnstableApi` annotation from
-`LiveTranslationSession.kt`.
-
-- [ ] **Step 6: Run focused PCM and translation tests**
-
-Run:
-
-```powershell
-.\gradlew.bat :player:testDebugUnitTest --tests "com.streamvault.player.playback.PlayerPcmEncodingTest" --console=plain --no-daemon
-.\gradlew.bat :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.translation.*" --console=plain --no-daemon
-```
-
-Expected: PASS for player mapping and all translation tests.
-
-- [ ] **Step 7: Commit the PCM capability model**
-
-```powershell
-git add player/src/main player/src/test feature/playback/src/main feature/playback/src/test/java/com/streamvault/feature/playback/translation
-git commit -m "refactor(player): own live audio encoding model"
-```
-
----
-
-### Task 4: Activate enforcement and close checkpoint 3
-
-**Files:**
-
-- Modify: `feature/playback/build.gradle.kts`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerScreen.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/multiview/MultiViewScreen.kt`
-- Modify: `feature/playback/src/test/java/com/streamvault/feature/playback/PlaybackModuleBoundaryTest.kt`
-- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`
-
-**Interfaces:**
-
-- Consumes: player-owned subtitle and PCM capabilities from Tasks 2 and 3.
-- Produces: enforced Media3-free playback presentation source and dependency boundary.
-
-- [ ] **Step 1: Expand the production and fixture source guard**
-
-Add these tokens to `forbiddenFeaturePlaybackSourceTokens`:
-
-```kotlin
-"Media3PlayerEngine",
-"androidx.media3"
-```
-
-Extend `requiredFixtureViolations` with the exact Task 1 fixture findings:
-
-```kotlin
-"Media3EngineImport.kt:3: Media3PlayerEngine",
-"Media3FullyQualifiedReference.java:4: androidx.media3"
-```
-
-Rename the task description and success message from app-only wording to
-presentation-implementation boundary wording. Keep existing app/navigation
-tokens and fixtures.
-
-- [ ] **Step 2: Enforce absence of direct Media3 dependencies**
-
-Collect direct external dependencies without resolving transitive dependencies:
-
-```kotlin
-val directMedia3Dependencies = configurations
- .flatMap { configuration ->
- configuration.dependencies
- .filterIsInstance<org.gradle.api.artifacts.ExternalModuleDependency>()
- .filter { dependency -> dependency.group == "androidx.media3" }
- .map { dependency -> "${dependency.group}:${dependency.name}" }
- }
- .toSet()
-
-check(directMedia3Dependencies.isEmpty()) {
- ":feature:playback must not declare Media3 directly; found ${directMedia3Dependencies.sorted()}"
-}
-```
-
-Write `directMedia3Dependencies` into the boundary report and assert it is empty
-in `PlaybackModuleBoundaryTest`.
-
-- [ ] **Step 3: Remove remaining presentation annotations and dependency**
-
-Remove Media3 `UnstableApi` imports/annotations from `PlayerScreen.kt` and
-`MultiViewScreen.kt`. Remove:
-
-```kotlin
-implementation(libs.media3.exoplayer)
-```
-
-from `feature/playback/build.gradle.kts`. Do not remove Cast or Android media
-router dependencies.
-
-- [ ] **Step 4: Run the boundary contract from Task 1**
-
-Run:
-
-```powershell
-.\gradlew.bat :feature:playback:verifyFeaturePlaybackBoundary :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.PlaybackModuleBoundaryTest" --console=plain --no-daemon
-```
-
-Expected: PASS, including both new fixture findings, empty production findings,
-and no direct Media3 dependency.
-
-- [ ] **Step 5: Run full automated verification**
-
-Run:
-
-```powershell
-.\gradlew.bat :player:testDebugUnitTest :feature:playback:testDebugUnitTest :feature:live:testDebugUnitTest :app:assembleDebug --console=plain --no-daemon
-```
-
-Expected: BUILD SUCCESSFUL and zero failed tests.
-
-- [ ] **Step 6: Refresh the graph and inspect repository state**
-
-Run:
-
-```powershell
-graphify update .
-git diff --check
-git status --short
-rg -n -F -e "Media3PlayerEngine" -e "androidx.media3" feature/playback/src/main
-```
-
-Expected: graph update succeeds; diff check is clean; `rg` reports no matches.
-
-- [ ] **Step 7: Update Phase 7 documentation**
-
-Add checkpoint 3 to the architecture plan with:
-
-- `PlayerEngine` is the approved presentation capability API;
-- nullable subtitle text and player-owned PCM encoding replace Media3 values;
-- `:feature:playback` has no direct Media3 dependency or source references;
-- the automated boundary rejects future regressions;
-- automated verification results;
-- Live TV validation status stated accurately.
-
-- [ ] **Step 8: Commit checkpoint 3**
-
-```powershell
-git add feature/playback player docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md graphify-out
-git commit -m "refactor(playback): enforce player capability boundary"
-```
-
----
-
-### Task 5: Perform playback acceptance validation
-
-**Files:**
-
-- Create: `validation/phase7_player_capability/README.md`
-- Create: `validation/phase7_player_capability/live-validation.log` only after sanitizing secrets and provider URLs.
-
-**Interfaces:**
-
-- Consumes: checkpoint 3 APK and an emulator/device with at least two working live channels.
-- Produces: auditable player acceptance evidence; no production code.
-
-- [ ] **Step 1: Install the verified debug APK and clear log history**
-
-```powershell
-$adb = (Get-Command adb -ErrorAction Stop).Source
-& $adb install -r app\build\outputs\apk\debug\app-debug.apk
-& $adb logcat -c
-```
-
-Expected: install succeeds. Navigate through the app to the first available live
-channel and record its displayed name in the validation README.
-
-- [ ] **Step 2: Capture 61 frames for the first channel**
-
-```powershell
-$captureRoot = Join-Path $env:TEMP "streamvault_phase7_player_channel_1"
-New-Item -ItemType Directory -Force -Path $captureRoot | Out-Null
-0..60 | ForEach-Object {
- $name = "frame_{0:D2}.png" -f $_
- & $adb exec-out screencap -p > (Join-Path $captureRoot $name)
- Start-Sleep -Seconds 2
-}
-```
-
-Expected: 61 screenshots spanning roughly two minutes.
-
-- [ ] **Step 3: Verify first-channel progression and health**
-
-```powershell
-$hashes = Get-ChildItem $captureRoot -Filter *.png | Get-FileHash -Algorithm SHA256
-$hashes.Hash | Sort-Object -Unique | Measure-Object
-& $adb shell dumpsys media_session | Select-String -Pattern "package=com.streamvault.app","state=PlaybackState","error=" -Context 0,3
-& $adb logcat -d -v time > (Join-Path $env:TEMP "streamvault_phase7_player_channel_1.log")
-rg -n "fatal-error|live-recovery selected|live-recovery no-candidate|prepare resolvedStreamType=MPEG_TS_LIVE|source-malformed live-ts-fallback|Player stuck|state=ERROR" (Join-Path $env:TEMP "streamvault_phase7_player_channel_1.log")
-rg -n "retry category=|first-frame-success|prepare resolvedStreamType=HLS|read-progress streamType=HLS" (Join-Path $env:TEMP "streamvault_phase7_player_channel_1.log")
-```
-
-Expected: hashes continue changing through the capture, media session remains
-PLAYING with `error=null`, no fatal/stuck/unintended MPEG-TS fallback appears,
-and HLS prepare/read/first-frame or valid recovery evidence is present.
-
-- [ ] **Step 4: Repeat for a second channel**
-
-Navigate to a different working live channel, record its displayed name, clear
-logcat, and repeat Steps 2-3 using paths ending in `channel_2`. Do not reuse the
-first channel's evidence.
-
-- [ ] **Step 5: Sanitize and record results**
-
-Create `validation/phase7_player_capability/README.md` containing each channel
-name, 61 screenshot count, two-second cadence, unique hash count, media-session
-state/error, and log findings. Copy only relevant sanitized log lines to
-`live-validation.log`; remove credentials, tokens, query strings, and provider
-URLs.
-
-If no device or two working channels are available, record the exact missing
-prerequisite in the README and leave acceptance open. Never substitute build,
-install, launch, or a short visual check for this gate.
-
-- [ ] **Step 6: Commit evidence**
-
-```powershell
-git add validation/phase7_player_capability docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md
-git commit -m "test(playback): record player boundary acceptance"
-```
diff --git a/docs/superpowers/plans/2026-09-08-multiple-themes.md b/docs/superpowers/plans/2026-09-08-multiple-themes.md
deleted file mode 100644
index 88e62d0a..00000000
--- a/docs/superpowers/plans/2026-09-08-multiple-themes.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# Multiple Themes Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans (inline execution is approved for this branch). Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Add three selectable palette themes, persist the choice, apply it at both app entry points, expose it in Settings, and round-trip it through portable backups.
-
-**Architecture:** The domain defines stable theme IDs and fallback parsing. DataStore and the existing SettingsPreferences/snapshot flow carry the enum; core UI resolves the ID into a state-backed palette facade and Material TV color scheme without taking a dependency on domain. MainActivity and TvInputSetupActivity pass the persisted storage ID into StreamVaultTheme.
-
-**Tech Stack:** Kotlin/JVM, Android DataStore Preferences, Jetpack Compose for TV, Material 3 TV, existing JUnit/Truth/robolectric test setup.
-
-**Spec:** `docs/superpowers/specs/2026-09-08-multiple-themes-design.md`
-
-## Global Constraints
-
-- `classic_blue` is the default and preserves the existing palette.
-- `m3_purple` is palette-only; typography, shapes, spacing, layout, and behavior remain shared.
-- `light` uses a light Material color scheme; typography, shapes, spacing, layout, and behavior remain shared.
-- Invalid or missing theme values fall back to `classic_blue`.
-- Core UI must remain independent of `:domain`, `:data`, `:app`, and feature modules.
-- Portable backups must include the theme and restore it tolerantly.
-- Write tests before production code for each new behavior and run the smallest targeted test task after each cycle.
-
----
-
-### Task 1: Domain theme ID model
-
-**Files:**
-- Create: `domain/src/main/java/com/streamvault/domain/model/AppTheme.kt`
-- Test: `domain/src/test/java/com/streamvault/domain/model/AppThemeTest.kt`
-
-**Interfaces:**
-- Produces `AppTheme.CLASSIC_BLUE`, `AppTheme.M3_PURPLE`, `AppTheme.LIGHT`, `AppTheme.DEFAULT`, `AppTheme.storageValue`, and `AppTheme.fromStorage(value: String?): AppTheme`.
-
-- [ ] **Step 1: Write the failing tests** for stable IDs, case-insensitive parsing, and fallback for null/unknown/blank input.
-- [ ] **Step 2: Run `:domain:test` for `AppThemeTest` and confirm the failure is caused by the missing model.**
-- [ ] **Step 3: Add the enum with explicit storage values and a tolerant parser.**
-- [ ] **Step 4: Re-run the focused test and confirm it passes.**
-
-### Task 2: Core UI palette resolver and reactive theme
-
-**Files:**
-- Create or modify: `core/ui/src/main/java/com/streamvault/core/ui/design/AppPalette.kt`
-- Modify: `core/ui/src/main/java/com/streamvault/core/ui/design/AppColors.kt`
-- Modify: `core/ui/src/main/java/com/streamvault/core/ui/theme/Color.kt`
-- Modify: `core/ui/src/main/java/com/streamvault/core/ui/theme/Theme.kt`
-- Test: `core/ui/src/test/java/com/streamvault/core/ui/design/AppPaletteTest.kt`
-
-**Interfaces:**
-- Produces `AppPalette.forTheme(themeId: String): AppPalette` and `StreamVaultTheme(themeId: String = "classic_blue", content: @Composable () -> Unit)`.
-
-- [ ] **Step 1: Write failing palette tests** proving classic blue retains the current brand/surface colors, M3 purple changes the primary/surface colors, light uses light surfaces/dark text, and an unknown ID resolves to classic blue.
-- [ ] **Step 2: Run `:core:ui:testDebugUnitTest` for the palette test and confirm the expected missing-symbol failure.**
-- [ ] **Step 3: Implement the three complete palettes and state-backed `AppColors` getters.**
-- [ ] **Step 4: Change top-level color aliases to computed getters and build the appropriate dark or light Material TV color scheme from the selected palette.**
-- [ ] **Step 5: Re-run the focused core UI test and `:core:ui:check` to verify both behavior and the existing module boundary.**
-
-### Task 3: Persist theme through the settings contract and DataStore
-
-**Files:**
-- Modify: `domain/src/main/java/com/streamvault/domain/settings/SettingsPreferences.kt`
-- Modify: `data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt`
-- Test: `data/src/test/java/com/streamvault/data/preferences/PreferencesRepositoryThemeTest.kt`
-
-**Interfaces:**
-- Adds `SettingsPreferences.appTheme: Flow<AppTheme>` and `setAppTheme(theme: AppTheme)`.
-- Stores the value under the stable DataStore key `app_theme` with default `classic_blue`.
-
-- [ ] **Step 1: Write a repository test** for default theme and persisted theme round-trip using the existing DataStore test pattern.
-- [ ] **Step 2: Run the focused data test and confirm the contract/key is missing.**
-- [ ] **Step 3: Add the contract property/setter and DataStore implementation.**
-- [ ] **Step 4: Re-run the focused data test.**
-
-### Task 4: Settings snapshot, ViewModel setter, and selector dialog
-
-**Files:**
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPreferenceModels.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsUiStateModel.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsStateBindings.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPreferenceSnapshotMapper.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsViewModel.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsScreenDialogState.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsBrowsingSection.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsContentPane.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsScreenDialogs.kt`
-- Modify: `feature/settings/src/main/res/values/strings.xml`
-- Tests: existing settings snapshot/contract tests plus a focused selector state test if needed by the existing patterns.
-
-**Interfaces:**
-- Adds `SettingsUiState.appTheme: AppTheme` and a `SettingsViewModel.setAppTheme(theme: AppTheme)` command.
-- Adds a saved `showThemeDialog` flag and a selector row in the existing Browsing category.
-
-- [ ] **Step 1: Update existing snapshot tests/fixtures first** so they assert the default theme and fail until the flow is wired.
-- [ ] **Step 2: Run the focused settings tests and confirm the new field is not propagated.**
-- [ ] **Step 3: Thread `appTheme` through snapshot defaults, combine bindings, mapper, and ViewModel setter.**
-- [ ] **Step 4: Add localized labels and a TV-friendly single-choice dialog using the existing dialog/state patterns.**
-- [ ] **Step 5: Add the selector row in the Browsing settings section and connect it through `SettingsContentPane`/`SettingsScreenDialogs`.**
-- [ ] **Step 6: Run the focused settings unit tests and the feature boundary verification.**
-
-### Task 5: Apply the selected theme at app entry points
-
-**Files:**
-- Modify: `app/src/main/java/com/streamvault/app/MainActivity.kt`
-- Modify: `app/src/main/java/com/streamvault/app/tvinput/TvInputSetupActivity.kt`
-
-- [ ] **Step 1: Add entry-point tests or update existing Compose smoke fixtures** to pass a selected theme ID into `StreamVaultTheme`.
-- [ ] **Step 2: Collect `preferencesRepository.appTheme` in both activities and pass `themeId = appTheme.storageValue`.**
-- [ ] **Step 3: Run the relevant app compile/unit target and verify no stale `StreamVaultTheme` call sites are broken.**
-
-### Task 6: Portable backup and restore
-
-**Files:**
-- Modify: `data/src/main/java/com/streamvault/data/manager/PreferenceBackupRegistry.kt`
-- Modify: `data/src/main/java/com/streamvault/data/manager/BackupManagerImpl.kt`
-- Modify: `data/src/test/java/com/streamvault/data/manager/PreferenceBackupRegistryTest.kt`
-- Modify: `data/src/test/java/com/streamvault/data/manager/BackupManagerImplTest.kt` only where existing snapshot expectations require it.
-
-- [ ] **Step 1: Add a failing registry assertion** that `app_theme` is portable and `appTheme` is admitted as a global backup key.
-- [ ] **Step 2: Run the focused registry test and confirm the key is not yet admitted.**
-- [ ] **Step 3: Export `appTheme` in both backup snapshot builders and restore it through `AppTheme.fromStorage`/`setAppTheme`.**
-- [ ] **Step 4: Re-run registry and targeted backup tests, including malformed-value coverage.**
-
-### Task 7: Integration verification and graph refresh
-
-**Files:**
-- Modify: `docs/superpowers/plans/2026-09-08-multiple-themes.md` to mark completed steps.
-- Generated: `graphify-out/` via `graphify update .`.
-
-- [ ] **Step 1: Run domain, core UI, settings, and targeted data unit tests.**
-- [ ] **Step 2: Run `:app:compileDebugKotlin` or the narrowest successful app verification target.**
-- [ ] **Step 3: Run `graphify update .` from the worktree root.**
-- [ ] **Step 4: Inspect `git diff`, `git status`, and the final test output for accidental scope, stale files, or generated changes.**
diff --git a/docs/superpowers/plans/2026-09-11-preferred-text-language.md b/docs/superpowers/plans/2026-09-11-preferred-text-language.md
deleted file mode 100644
index 65095b3c..00000000
--- a/docs/superpowers/plans/2026-09-11-preferred-text-language.md
+++ /dev/null
@@ -1,178 +0,0 @@
-# Preferred Subtitle-Language Auto-Selection Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task with verification checkpoints.
-
-**Goal:** Use Media3 1.11's stable text-language selection parameters as the automatic fallback for a saved VOD subtitle-language preference while preserving StreamVault's existing per-title track ID/label overrides and disabled-subtitle behavior.
-
-**Architecture:** Keep `VodTrackPreferences` and `VodTrackPreferenceResolver` as the app-owned persistence and exact-track layer. Add a small pure policy that translates the saved subtitle preference into Media3 text parameters (`preferredTextLanguage`, `selectTextByDefault`, and text enabled/disabled), then apply that policy when the player initializes and when VOD preferences are applied. No new UI or persistence schema is needed because develop already provides the subtitle preference picker and storage.
-
-**Tech Stack:** Kotlin, Media3 1.11 `TrackSelectionParameters.Builder`, JUnit/Truth, existing Android player module.
-
-**Spec:** `docs/upgrade.txt`, section “Media3 1.10.x findings” → “Existing app functions worth evaluating against 1.10 APIs” (preferred subtitle-language selection).
-
-## Global Constraints
-
-- Preserve explicit disabled-subtitle choices.
-- Preserve exact saved track ID/label matching and language-family fallback.
-- Do not enable subtitles for live playback when no VOD preference is supplied.
-- Do not add a new dependency or expose Media3 types through `:feature:playback`.
-- Keep external subtitle loading and the existing subtitle picker behavior unchanged.
-
----
-
-### Task 1: Define the Media3 text-selection policy
-
-**Files:**
-- Create: `player/src/main/java/com/streamvault/player/tracks/PreferredTextTrackPolicy.kt`
-- Test: `player/src/test/java/com/streamvault/player/tracks/PreferredTextTrackPolicyTest.kt`
-
-**Interfaces:**
-- Consumes: nullable `VodTrackPreferences`.
-- Produces: an internal immutable policy containing `preferredLanguageTag: String?`, `selectTextByDefault: Boolean`, and `textDisabled: Boolean`.
-
-- [x] **Step 1: Write the failing tests**
-
-Cover these exact cases:
-
-```kotlin
-@Test
-fun `no VOD preference keeps text disabled`() {
- assertThat(resolvePreferredTextTrackPolicy(null)).isEqualTo(
- PreferredTextTrackPolicy(preferredLanguageTag = null, selectTextByDefault = false, textDisabled = true)
- )
-}
-
-@Test
-fun `saved subtitle language enables Media3 automatic text selection`() {
- val preferences = VodTrackPreferences(
- subtitle = VodTrackPreference(language = "en-US", label = "English")
- )
-
- assertThat(resolvePreferredTextTrackPolicy(preferences)).isEqualTo(
- PreferredTextTrackPolicy(preferredLanguageTag = "en-US", selectTextByDefault = true, textDisabled = false)
- )
-}
-
-@Test
-fun `explicitly disabled subtitles stay disabled`() {
- val preferences = VodTrackPreferences(
- subtitle = VodTrackPreference(language = "en", disabled = true)
- )
-
- assertThat(resolvePreferredTextTrackPolicy(preferences)).isEqualTo(
- PreferredTextTrackPolicy(preferredLanguageTag = null, selectTextByDefault = false, textDisabled = true)
- )
-}
-
-@Test
-fun `label-only preference waits for the app-owned exact-track override`() {
- val preferences = VodTrackPreferences(
- subtitle = VodTrackPreference(label = "Commentary")
- )
-
- assertThat(resolvePreferredTextTrackPolicy(preferences)).isEqualTo(
- PreferredTextTrackPolicy(preferredLanguageTag = null, selectTextByDefault = false, textDisabled = true)
- )
-}
-```
-
-- [x] **Step 2: Run the policy test and verify it fails**
-
-Run:
-
-```text
-.\gradlew.bat :player:testDebugUnitTest --tests com.streamvault.player.tracks.PreferredTextTrackPolicyTest --no-daemon
-```
-
-Expected: compilation failure because `PreferredTextTrackPolicy` and `resolvePreferredTextTrackPolicy` do not exist yet.
-
-- [x] **Step 3: Implement the minimal policy**
-
-Normalize blank language values to `null`. Return disabled text unless the subtitle preference exists, is not disabled, and contains a nonblank language. Do not infer a language from the label; the existing resolver owns that exact-match behavior.
-
-- [x] **Step 4: Run the policy test and verify it passes**
-
-Run the same Gradle command and expect all four tests to pass.
-
-### Task 2: Apply the policy without changing custom precedence
-
-**Files:**
-- Modify: `player/src/main/java/com/streamvault/player/tracks/PlayerTrackController.kt`
-- Test: `player/src/test/java/com/streamvault/player/tracks/PlayerTrackControllerSelectionTest.kt`
-
-**Interfaces:**
-- Consumes: `resolvePreferredTextTrackPolicy(vodTrackPreferences)` from Task 1.
-- Produces: Media3 parameters with preferred text language only as fallback; `TrackSelectionOverride` remains authoritative when a saved track resolves.
-
-- [x] **Step 1: Write the failing controller-policy assertions**
-
-Add pure assertions around the policy-to-parameter decisions (without constructing a real player): a language preference must enable automatic text selection, a disabled preference must disable text, and a missing preference must remain disabled. Keep exact track resolver tests unchanged.
-
-- [x] **Step 2: Run the focused controller tests and verify the new assertions fail**
-
-Run:
-
-```text
-.\gradlew.bat :player:testDebugUnitTest --tests com.streamvault.player.tracks.PlayerTrackControllerSelectionTest --no-daemon
-```
-
-Expected: the new assertions fail before the controller applies the Media3 policy.
-
-- [x] **Step 3: Apply Media3 parameters**
-
-In `applyInitialParameters`, after clearing text overrides, apply:
-
-```kotlin
-val textPolicy = resolvePreferredTextTrackPolicy(vodTrackPreferences)
-setPreferredTextLanguage(textPolicy.preferredLanguageTag)
-setSelectTextByDefault(textPolicy.selectTextByDefault)
-setTrackTypeDisabled(C.TRACK_TYPE_TEXT, textPolicy.textDisabled)
-```
-
-In `applyVodTrackPreferences`, apply the same preferred-language/default flags before the existing subtitle branch. Preserve the existing branch that resolves ID/language/label and installs an override; preserve its behavior of disabling text when an explicitly saved language/track cannot be resolved. This keeps the Media3 preference from selecting an arbitrary language when the app-owned preference has no match.
-
-- [x] **Step 4: Run focused tests and verify they pass**
-
-Run the policy and controller tests together:
-
-```text
-.\gradlew.bat :player:testDebugUnitTest --tests com.streamvault.player.tracks.PreferredTextTrackPolicyTest --tests com.streamvault.player.tracks.PlayerTrackControllerSelectionTest --no-daemon
-```
-
-### Task 3: Update the audit and run integration verification
-
-**Files:**
-- Modify: `docs/upgrade.txt`
-
-- [x] **Step 1: Mark the preferred subtitle-language item complete**
-
-Change the 1.10 “Preferred subtitle-language selection” item from `ADD` to `DONE`, explain that Media3 text parameters are now the automatic language fallback, and retain the custom persisted ID/label resolver for precedence and provider compatibility. Remove it from the remaining backlog.
-
-- [x] **Step 2: Refresh the code graph**
-
-Run:
-
-```text
-graphify update .
-```
-
-- [x] **Step 3: Run the combined verification**
-
-Run:
-
-```text
-.\gradlew.bat :player:testDebugUnitTest :feature:playback:testDebugUnitTest :app:assembleDebug --no-daemon
-```
-
-Expected: build success, zero failures/errors in player and playback tests, and the existing feature-playback boundary check remains successful.
-
-- [x] **Step 4: Check the final diff**
-
-Run:
-
-```text
-git diff --check
-git diff --name-only --diff-filter=U
-```
-
-Expected: no whitespace errors and no unmerged paths.
diff --git a/docs/superpowers/plans/2026-09-11-vod-overlay-chapters.md b/docs/superpowers/plans/2026-09-11-vod-overlay-chapters.md
deleted file mode 100644
index 8d2f50de..00000000
--- a/docs/superpowers/plans/2026-09-11-vod-overlay-chapters.md
+++ /dev/null
@@ -1,312 +0,0 @@
-# VOD Overlay and Chapter Navigation Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Replace the existing VOD playback control card with the approved cinematic, video-first overlay and add Media3 1.11 chapter navigation while preserving all current VOD capabilities and leaving live TV controls unchanged.
-
-**Architecture:** Keep Media3 extraction behind the `:player` `PlayerEngine` boundary. Normalize Media3 `Chapter` metadata into an app-owned `PlayerChapter` state, derive current/previous/next behavior with pure feature-layer policies, and render the new VOD overlay through focused Compose components and exclusive side-sheet state. The existing live overlay remains in place; only the non-live VOD branch is replaced after parity tests pass.
-
-**Tech Stack:** Kotlin, Coroutines `StateFlow`, Media3 1.11.0, Jetpack Compose, Compose for TV, Android instrumentation golden tests, Robolectric/JUnit unit tests, Gradle.
-
-**Spec:** `docs/superpowers/specs/2026-09-11-vod-overlay-chapters-design.md`
-
-## Global Constraints
-
-- Media3 remains at `1.11.0`; do not introduce a second Media3 version or a new playback stack.
-- `:feature:playback` must not import `androidx.media3.*`; Media3 types stay in `:player`.
-- Live TV and live-timeshift controls must retain their current behavior and existing goldens.
-- VOD controls use semantic app theme colors and existing localization patterns; no parallel hard-coded palette.
-- Every new production behavior is developed test-first: observe a failing test, implement the smallest change, then refactor only while green.
-- Chapters are source metadata only; do not add provider APIs, chapter editing, chapter downloads, or Cast chapter support.
-- Existing VOD capabilities remain reachable: tracks, episodes, external player, speed, A/V sync, timers, Cast, picture-in-picture, mute, aspect ratio, and quality.
-
----
-
-### Task 1: Add the app-owned chapter model and pure Media3 metadata normalization
-
-**Files:**
-- Create: `player/src/main/java/com/streamvault/player/PlayerChapter.kt`
-- Create: `player/src/main/java/com/streamvault/player/ChapterMetadataMapper.kt`
-- Test: `player/src/test/java/com/streamvault/player/ChapterMetadataMapperTest.kt`
-
-**Interfaces:**
-- Produces `data class PlayerChapter(index: Int, title: String, startTimeMs: Long, endTimeMs: Long?)`.
-- Produces `internal fun mapChapterMetadata(metadata: Metadata?, windowOffsetMs: Long, durationMs: Long): List<PlayerChapter>`.
-- Media3 chapter input is `androidx.media3.extractor.metadata.Chapter`; feature code will consume only `PlayerChapter`.
-
-- [x] **Step 1: Write failing mapper tests.**
-
- Cover unordered entries, period-to-window offset subtraction, hidden entries, unset/negative starts, missing titles (`Chapter N`), missing ends derived from the next entry or duration, duplicate entries, and duration clamping. Build test entries with `Chapter.Builder` and `Label`/`Cue` values available in Media3 1.11.
-
-- [x] **Step 2: Run the mapper tests and verify the expected missing-symbol failure.**
-
- Run:
-
- ```powershell
- .\gradlew.bat :player:testDebugUnitTest --tests com.streamvault.player.ChapterMetadataMapperTest --no-daemon
- ```
-
- Expected: compilation fails because `PlayerChapter` and `mapChapterMetadata` do not exist.
-
-- [x] **Step 3: Implement the immutable model and mapper.**
-
- Flatten `Metadata` entries, filter hidden/unset data, subtract `windowOffsetMs`, sort by start, deduplicate by normalized start/title, derive missing ends, clamp to `durationMs` when positive, and assign one-based indexes after filtering. Return an empty list for null metadata or malformed input.
-
-- [x] **Step 4: Run the mapper tests and verify they pass.**
-
- Re-run the focused command. Expected: all mapper tests pass with no playback-side effects.
-
-- [x] **Step 5: Refactor only while green and commit the isolated task.**
-
- ```powershell
- git add player/src/main/java/com/streamvault/player/PlayerChapter.kt player/src/main/java/com/streamvault/player/ChapterMetadataMapper.kt player/src/test/java/com/streamvault/player/ChapterMetadataMapperTest.kt
- git commit -m "feat: normalize Media3 VOD chapters"
- ```
-
-### Task 2: Publish chapter state from the player engine
-
-**Files:**
-- Modify: `player/src/main/java/com/streamvault/player/PlayerEngine.kt`
-- Modify: `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt`
-- Modify: player fake/test engines identified by compilation after the interface change
-- Test: `player/src/test/java/com/streamvault/player/Media3PlayerEngineChapterTest.kt` or the existing engine test fixture location
-
-**Interfaces:**
-- Adds `val chapters: StateFlow<List<PlayerChapter>>` to `PlayerEngine`.
-- `Media3PlayerEngine` owns a `MutableStateFlow<List<PlayerChapter>>`, clears it at prepare/stop/release, and updates it from `Tracks` metadata and current timeline.
-
-- [x] **Step 1: Add a failing contract test for initial and reset state.**
-
- Assert a fake engine exposes an empty chapter list before preparation and after `stop`/`release`. Add a test fixture that supplies a `Tracks` object containing a `Format` with `Metadata` chapter entries and expects normalized chapters.
-
-- [x] **Step 2: Run the focused player tests to verify the missing contract failure.**
-
- Run:
-
- ```powershell
- .\gradlew.bat :player:testDebugUnitTest --tests '*Chapter*' --no-daemon
- ```
-
- Expected: compile failures for the missing `PlayerEngine.chapters` contract and production publication.
-
-- [x] **Step 3: Add the state contract and lifecycle publication.**
-
- Add the `StateFlow` to the interface and all fakes. In `Media3PlayerEngine`, invoke the mapper from `onTracksChanged` using the selected media-period metadata and `Timeline.Window.positionInFirstPeriodUs`. Refresh after timeline changes, clear stale state before a new media item, and never throw when metadata is absent.
-
-- [x] **Step 4: Run player chapter tests and the existing player suite.**
-
- ```powershell
- .\gradlew.bat :player:testDebugUnitTest --tests '*Chapter*' --no-daemon
- .\gradlew.bat :player:testDebugUnitTest --no-daemon
- ```
-
- Expected: chapter tests and all existing player tests pass.
-
-- [x] **Step 5: Commit only the engine contract/publication changes.**
-
- ```powershell
- git add player/src/main/java/com/streamvault/player/PlayerEngine.kt player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt player/src/test
- git commit -m "feat: expose VOD chapters from player engine"
- ```
-
-### Task 3: Add pure chapter navigation and VOD action policies
-
-**Files:**
-- Create: `feature/playback/src/main/java/com/streamvault/feature/playback/player/VodChapterNavigation.kt`
-- Create: `feature/playback/src/main/java/com/streamvault/feature/playback/player/VodOverlayState.kt`
-- Test: `feature/playback/src/test/java/com/streamvault/feature/playback/player/VodChapterNavigationTest.kt`
-- Test: `feature/playback/src/test/java/com/streamvault/feature/playback/player/VodOverlayStateTest.kt`
-
-**Interfaces:**
-- Produces `const val CHAPTER_RESTART_THRESHOLD_MS = 3_000L`.
-- Produces `fun currentChapter(chapters: List<PlayerChapter>, positionMs: Long): PlayerChapter?`.
-- Produces `fun previousChapterTarget(chapters: List<PlayerChapter>, positionMs: Long): Long?`.
-- Produces `fun nextChapterTarget(chapters: List<PlayerChapter>, positionMs: Long): Long?`.
-- Produces `data class VodOverlayState(... chapters: List<PlayerChapter>, currentChapter: PlayerChapter?, canShowChapterAction: Boolean, canSeekPreviousChapter: Boolean, canSeekNextChapter: Boolean, ...)`.
-
-- [x] **Step 1: Write failing policy tests.**
-
- Assert current chapter at boundaries, previous-chapter restart when more than three seconds into the current chapter, previous-chapter navigation when within three seconds, first/last chapter disabling, gaps, and empty chapters. Add overlay-action tests for movie versus series episode, missing tracks, cast-connected state, and hidden chapter action.
-
-- [x] **Step 2: Run focused feature tests and verify they fail for missing policies.**
-
- ```powershell
- .\gradlew.bat :feature:playback:testDebugUnitTest --tests '*VodChapterNavigationTest' --tests '*VodOverlayStateTest' --no-daemon
- ```
-
-- [x] **Step 3: Implement the smallest pure policies.**
-
- Keep chapter math independent of Compose and player implementations. Use window-relative `startTimeMs`, preserve the three-second threshold, and make action visibility depend on content type, chapter availability, track counts, and Cast state.
-
-- [x] **Step 4: Run focused tests and the existing playback unit suite.**
-
- Expected: all new policy tests pass and no existing playback tests regress.
-
-- [x] **Step 5: Commit the pure policies.**
-
- ```powershell
- git add feature/playback/src/main/java/com/streamvault/feature/playback/player/VodChapterNavigation.kt feature/playback/src/main/java/com/streamvault/feature/playback/player/VodOverlayState.kt feature/playback/src/test
- git commit -m "feat: add VOD chapter navigation policy"
- ```
-
-### Task 4: Build the new standalone VOD overlay composition
-
-**Files:**
-- Create: `feature/playback/src/main/java/com/streamvault/feature/playback/player/VodPlayerControlsOverlay.kt`
-- Create: `feature/playback/src/main/java/com/streamvault/feature/playback/player/VodTimeline.kt`
-- Create: `feature/playback/src/main/java/com/streamvault/feature/playback/player/VodTransportControls.kt`
-- Create: `feature/playback/src/main/java/com/streamvault/feature/playback/player/VodChapterSheet.kt`
-- Create: `feature/playback/src/main/java/com/streamvault/feature/playback/player/VodPlaybackSettingsSheet.kt`
-- Test: `feature/playback/src/androidTest/java/com/streamvault/feature/playback/player/VodPlayerControlsOverlayGoldenTest.kt`
-- Test fixture/goldens: `feature/playback/src/androidTest/assets/ui-goldens/player_controls_overlay_vod_*.png`
-
-**Interfaces:**
-- `VodPlayerControlsOverlay` consumes `VodOverlayState`, playback position/duration, `SeekPreviewState`, focus requesters, and callbacks for every preserved VOD action.
-- `VodTimeline` consumes chapters/current chapter and emits position changes plus scrubbing lifecycle.
-- `VodChapterSheet` consumes `List<PlayerChapter>` and a selected index and emits seek/dismiss events.
-- `VodPlaybackSettingsSheet` consumes action availability/state and emits existing action callbacks.
-
-- [x] **Step 1: Add failing Compose/golden fixtures for the approved visual states.**
-
- Create deterministic preview state and assertions for no-chapter controls, chapter controls, seeking preview, chapter sheet, settings sheet, and focus on the primary action. Replace the old VOD golden expectation only in the new test fixture; retain live goldens.
-
-- [x] **Step 2: Run the new golden tests and verify missing-composable failures.**
-
- Run:
-
- ```powershell
- .\gradlew.bat :feature:playback:connectedDebugAndroidTest --tests '*VodPlayerControlsOverlayGoldenTest' --no-daemon
- ```
-
- Expected: compilation fails because the new overlay composables do not exist.
-
-- [x] **Step 3: Implement the visual hierarchy.**
-
- Use a bottom `Brush.verticalGradient` over the video, title/current chapter metadata, elapsed/remaining time, full-width chapter-aware timeline, centered transport, and compact contextual actions. Use semantic theme colors, localized strings, minimum 48 dp targets, explicit focus properties, and no floating VOD card.
-
-- [x] **Step 4: Implement the chapter sheet and settings sheet.**
-
- Use the existing exclusive modal pattern, dim the video, focus the current chapter/settings row, restore focus to the originating action on dismissal, and delegate detail actions to existing track/speed/timer dialogs.
-
-- [x] **Step 5: Run and review the new golden states at TV and compact widths.**
-
- Expected: the approved visual direction is visible, no controls clip, focus rings are high contrast, and the chapter list is readable from TV distance.
-
-- [x] **Step 6: Commit the standalone UI slice.**
-
- ```powershell
- git add feature/playback/src/main/java/com/streamvault/feature/playback/player/Vod*.kt feature/playback/src/androidTest
- git commit -m "feat: add cinematic VOD controls and chapter sheets"
- ```
-
-### Task 5: Wire the new overlay into the player screen and preserve capability parity
-
-**Files:**
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerControlsOverlayHost.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerScreen.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerModalState.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerModalHosts.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerBackNavigationPolicy.kt`
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerViewModel.kt` or the existing action-support file for chapter seeks
-- Test: existing and new `PlayerModalStateTest`, `PlayerBackNavigationPolicyTest`, `PlayerOverlayItemKeysTest`, and chapter wiring tests
-
-**Interfaces:**
-- `PlayerControlsOverlayHost` collects `playerEngine.chapters`, derives `VodOverlayState`, and passes callbacks into `VodPlayerControlsOverlay`.
-- Add `PlayerModal.ChapterSelection` and `PlayerModal.PlaybackSettings` only if the existing modal state needs explicit ownership beyond the sheet composables.
-- Add `PlayerViewModel.seekToPreviousChapter()` and `seekToNextChapter()` wrappers that call the pure targets and existing `seekTo`.
-
-- [x] **Step 1: Write failing wiring tests.**
-
- Assert chapter modal/back transitions, focus restoration state, previous/next chapter callbacks, and VOD-only gating. Assert live content continues to select the existing live overlay path.
-
-- [x] **Step 2: Run focused feature tests and verify the missing state/callback failures.**
-
-- [x] **Step 3: Wire chapter state and all existing VOD callbacks.**
-
- Keep `contentType == LIVE` on the existing live branch. For VOD/movie/series episode, replace `PlayerVodInfo` with `VodPlayerControlsOverlay`, pass the existing track, timer, Cast, PiP, aspect ratio, external-player, and episode callbacks, and hide chapter actions while Cast is connected.
-
-- [x] **Step 4: Implement back/focus/auto-hide integration.**
-
- Ensure opening a sheet suspends auto-hide, Back closes detail then sheet then controls, and changing media clears chapters without leaving stale focus or current-chapter text.
-
-- [x] **Step 5: Run feature playback tests and screenshot tests.**
-
- ```powershell
- .\gradlew.bat :feature:playback:testDebugUnitTest --no-daemon
- .\gradlew.bat :feature:playback:connectedDebugAndroidTest --tests '*VodPlayerControlsOverlayGoldenTest' --no-daemon
- ```
-
-- [x] **Step 6: Commit the wiring slice.**
-
- ```powershell
- git add feature/playback/src/main/java/com/streamvault/feature/playback/player feature/playback/src/test feature/playback/src/androidTest
- git commit -m "feat: wire VOD overlay chapters into playback"
- ```
-
-### Task 6: Remove the obsolete VOD overlay path and finish strings/documentation
-
-**Files:**
-- Modify: `feature/playback/src/main/java/com/streamvault/feature/playback/player/overlay/PlayerControlsChrome.kt`
-- Modify: `feature/playback/src/main/res/values/playback_player_strings.xml`
-- Modify: localized playback string resources where the existing localization workflow requires regenerated entries
-- Modify: `docs/upgrade.txt`
-- Delete only after parity: the old private `PlayerVodInfo` and VOD-only helper code inside `PlayerControlsChrome.kt`
-
-- [ ] **Step 1: Add failing guardrail coverage for the obsolete VOD path.**
-
- Assert the live branch still resolves to the existing live controls and that no production VOD composition references `PlayerVodInfo` after the new path is wired.
-
-- [ ] **Step 2: Remove the old VOD branch and add localized copy.**
-
- Add strings for chapters, chapter counts, previous/next chapter, current chapter, settings groups, and accessibility labels. Remove dead VOD-only layout helpers while preserving shared live helpers.
-
-- [ ] **Step 3: Replace the old VOD golden and run UI verification.**
-
- Review controls, seeking, chapters, settings, compact, RTL, and live goldens. The old card must no longer be rendered.
-
-- [x] **Step 4: Update `docs/upgrade.txt`.**
-
- Mark the VOD chapter navigation item `DONE`, describe the new UI entry points, and leave sliding-window preloading and telemetry-driven follow-ups pending.
-
-- [ ] **Step 5: Commit the cleanup/documentation slice.**
-
- ```powershell
- git add feature/playback/src/main feature/playback/src/test feature/playback/src/androidTest docs/upgrade.txt
- git commit -m "feat: complete VOD overlay and chapter navigation"
- ```
-
-### Task 7: Run graph and full verification
-
-**Files:**
-- Modify generated graph output through the `graphify update .` command only.
-
-- [ ] **Step 1: Run targeted verification.**
-
- ```powershell
- .\gradlew.bat :player:testDebugUnitTest :feature:playback:testDebugUnitTest :app:assembleDebug --no-daemon
- ```
-
-- [ ] **Step 2: Update the project graph after code changes.**
-
- ```powershell
- graphify update .
- ```
-
-- [ ] **Step 3: Run repository-wide unit tests and inspect the result.**
-
- ```powershell
- .\gradlew.bat testDebugUnitTest --no-daemon
- ```
-
- Expected: all repository unit tests pass; configuration-cache warnings are acceptable only if Gradle exits successfully.
-
-- [ ] **Step 4: Run `git diff --check` and verify no unmerged paths.**
-
- ```powershell
- git diff --check
- git diff --name-only --diff-filter=U
- ```
-
-- [ ] **Step 5: Report the worktree state without merging it.**
-
- Confirm the implementation remains in `chore/media3-1.11-upgrade`, the original `develop` checkout is untouched, and provide the user the test commands/results and any device-validation gap.
diff --git a/docs/superpowers/plans/2026-09-13-frame-extractor-thumbnail-pilot.md b/docs/superpowers/plans/2026-09-13-frame-extractor-thumbnail-pilot.md
deleted file mode 100644
index d0233610..00000000
--- a/docs/superpowers/plans/2026-09-13-frame-extractor-thumbnail-pilot.md
+++ /dev/null
@@ -1,210 +0,0 @@
-# FrameExtractor VOD Thumbnail Pilot Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Add a Media3 `FrameExtractor` backend for VOD seek thumbnails while preserving the current `MediaMetadataRetriever` implementation as a safe fallback until device coverage and performance are proven.
-
-**Architecture:** Keep the Media3 implementation inside `:player`, behind a small player-side thumbnail-extraction interface. The feature module continues to use `PlayerThumbnailCoordinator`, which tries Media3 first and falls back to the existing provider when Media3 cannot support or decode a request. Reuse the existing stream-resolution and custom data-source path so headers, proxy settings, TLS policy, and bounded timeouts remain consistent with playback.
-
-**Tech Stack:** Kotlin, AndroidX Media3 1.11.0 `media3-inspector-frame`, Media3 `MediaSource.Factory`, OkHttp-backed `DataSource.Factory`, coroutines, Hilt, JUnit/Truth/Mockito, Android device validation.
-
-**Spec:** `docs/upgrade.txt`, the `ADD - Media3 FrameExtractor pilot for VOD seek thumbnails` item.
-
-## Global Constraints
-
-- Scope is this one upgrade item only. Do not implement sliding-window preloading, custom variant ordering, Cast migration, or embedded-subtitle recovery in this change.
-- Do not remove or rewrite the existing `SeekThumbnailProvider` until the device/performance gate at the end of this plan passes.
-- Do not add Media3 imports to `:feature:playback`; that module's existing boundary check must continue to pass.
-- Do not route thumbnail transfers through foreground bitrate/accounting listeners. Thumbnail requests use the existing preload data-source profile and remain bounded/cancellable.
-- Do not attempt live, RTSP, MPEG-TS live, DRM, or otherwise unknown streams in the Media3 pilot. Live seek-preview behavior remains disabled as it is today.
-- Preserve the current 10-second bucket, 480-pixel maximum preview width, 120 ms seek debounce, six-frame thumbnail preload, request-version checks, cache clearing, and lifecycle cancellation behavior.
-- Keep logs sanitized: record backend, stream class, result, duration, position bucket, and failure category; never record authorization headers, cookies, tokens, or complete signed URLs.
-- Existing unrelated worktree changes in catalog files are out of scope and must remain untouched.
-
-## Existing Code to Preserve
-
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/SeekThumbnailProvider.kt` remains the legacy backend and keeps its current URL support rules, cache, timeout, and bitmap scaling behavior.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerThumbnailCoordinator.kt` remains the feature boundary; its implementation will become the backend selector.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerPlaybackPreferenceActions.kt` remains responsible for seek-preview debounce, six-position preloading, request cancellation, and stale-result protection.
-- `player/src/main/java/com/streamvault/player/playback/PlayerDataSourceFactoryProvider.kt` remains the source of request headers, user-agent handling, proxy/TLS policy, and timeout profiles.
-- `player/src/main/java/com/streamvault/player/playback/PlayerMediaSourceFactory.kt` remains the source of Media3 media-format selection and extractor configuration.
-
-## Implementation Steps
-
-- [x] **Step 1: Add the player-side thumbnail extraction contract and VOD request context.**
-
- **Files:**
-
- - Add `player/src/main/java/com/streamvault/player/playback/FrameThumbnailExtractor.kt`.
- - Cover the contract through the concrete provider tests in Step 3; no standalone contract test is needed.
-
- **Changes:**
-
- - Define `FrameThumbnailRequest` with the resolved `StreamInfo` and an explicit `isLive` value supplied by the feature. The explicit content classification is required because the current resolver treats several adaptive stream classes as live-capable even when the current item is VOD.
- - Define `FrameThumbnailExtractor` with these operations:
-
- ```kotlin
- interface FrameThumbnailExtractor {
- fun supports(request: FrameThumbnailRequest): Boolean
- suspend fun loadFrame(request: FrameThumbnailRequest, positionMs: Long): Bitmap?
- fun clearCache()
- }
- ```
-
- - Keep this separate from `PlayerEngine`; thumbnail extraction is an auxiliary preview concern and must not become part of the foreground playback lifecycle or engine API.
- - Document that implementations must return `null` for unsupported/failed extraction and must not throw a thumbnail failure into foreground playback.
-
- **Tests:** Verify that the request carries stream metadata and explicit live/VOD state without introducing a Media3 dependency into feature code.
-
-- [x] **Step 2: Refactor `PlayerMediaSourceFactory` so the same media-source rules can be supplied to `FrameExtractor`.**
-
- **Files:**
-
- - Modify `player/src/main/java/com/streamvault/player/playback/PlayerMediaSourceFactory.kt`.
- - Extend `player/src/test/java/com/streamvault/player/playback/PlayerMediaSourceFactoryTest.kt`.
-
- **Changes:**
-
- - Extract the existing stream-type branch that creates HLS, DASH, Smooth Streaming, progressive, MPEG-TS, RTSP, and default factories into a reusable `MediaSource.Factory` builder.
- - Keep `create(...)` behavior unchanged by having it obtain the reusable factory and then call `createMediaSource(mediaItemFor(streamInfo))`.
- - Make the existing `MediaItem` construction reusable inside `:player` through an appropriately scoped `mediaItemFor(streamInfo)` helper. Preserve media ID, title metadata, and existing DRM configuration for normal playback.
- - Make the reusable factory accept the existing `preload` argument so frame extraction receives `PlayerTimeoutProfile.PRELOAD` and does not attach foreground transfer listeners.
- - Preserve the current progressive extractor flags and CEA subtitle formats. Do not introduce a second media-format selection table for thumbnails.
- - Use the same `PlayerRetryPolicy` plumbing for the factory. The thumbnail provider will still enforce its shorter outer operation timeout, so a source failure returns control to the coordinator quickly.
- - Keep RTSP and MPEG-TS live branches available to normal playback but make them unreachable from the Media3 thumbnail provider through its support policy.
-
- **Tests:** Confirm existing media-source tests still pass and add assertions that the reusable factory receives the expected resolved type, preload mode, and media item URI/media ID. Keep the MPEG-TS playback policy tests intact.
-
-- [x] **Step 3: Add the Media3 `FrameExtractor` implementation and dependency.**
-
- **Files:**
-
- - Modify `gradle/libs.versions.toml` to add `media3-inspector-frame` using the existing `media3` version reference.
- - Modify `player/build.gradle.kts` to add `implementation(libs.media3.inspector.frame)`.
- - Add `player/src/main/java/com/streamvault/player/playback/Media3FrameThumbnailExtractor.kt`.
- - Add `player/src/test/java/com/streamvault/player/playback/Media3FrameThumbnailExtractorTest.kt`.
-
- **Support policy:**
-
- - Return `false` when the request is live, has a blank/invalid URL, contains DRM, or resolves to `MPEG_TS_LIVE`, `RTSP`, or `UNKNOWN`.
- - Return `true` for non-live `PROGRESSIVE`, `HLS`, `DASH`, and `SMOOTH_STREAMING` requests. Explicit stream type takes precedence through the existing `StreamTypeResolver` behavior.
- - Keep support policy deterministic and side-effect free; it must not open a network connection.
-
- **Extraction behavior:**
-
- - Build the `MediaItem` and reusable `MediaSource.Factory` from `PlayerMediaSourceFactory`, passing `preload = true` so all existing request properties and bounded preload timeouts are reused.
- - Build `FrameExtractor` with `FrameExtractor.Builder(context, mediaItem)`, supply the custom `MediaSource.Factory`, and set `SeekParameters.CLOSEST_SYNC` for seek-bar previews. Exact frame precision is not required by the existing UI, while closest-sync avoids unnecessary decode work.
- - Use the existing 10-second bucket and a cache key based on the stable media identity plus bucket position, rather than the raw signed URL. Keep cache entries bounded with an Android `LruCache`.
- - Run `build`, `getFrame`, and `close` on a single background extraction dispatcher so one `FrameExtractor` instance is never accessed from multiple application threads. Create a short-lived extractor per request, close it in `finally`, and do not retain decoder sessions across stream changes.
- - Await the returned `ListenableFuture<FrameExtractor.Frame>` without adding a new foreground dependency. Cancel the future when the coroutine is cancelled, and wrap the operation in the existing 8-second thumbnail timeout.
- - Read `FrameExtractor.Frame.bitmap`, scale it using the same 480-pixel maximum used by the legacy provider, cache the scaled bitmap, and return `null` for cancellation, timeout, unsupported format, network, decoder, or other extraction failures.
- - Emit sanitized diagnostic events for support decisions, cache hits/misses, success latency, timeout, cancellation, and failure category. Include whether the request used Media3 and the resolved stream class.
-
- **Tests:**
-
- - Test support decisions for VOD progressive, VOD HLS, VOD DASH, VOD Smooth Streaming, live content, RTSP, MPEG-TS live, unknown, DRM, blank, and malformed URLs.
- - Test bucketed cache-key behavior and that a cached frame avoids a second extraction.
- - Test bitmap downscaling does not exceed 480 pixels on the long edge.
- - Test extraction failure, timeout, and coroutine cancellation return `null` and release/cancel the extractor operation. Use a small injectable test seam for the future/session boundary if direct `FrameExtractor` construction cannot be exercised in a JVM test.
- - Do not make JVM tests depend on a real provider URL or a decoder installed on the developer machine.
-
-- [x] **Step 4: Turn `PlayerThumbnailCoordinator` into the Media3-first/legacy-fallback selector.**
-
- **Files:**
-
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerThumbnailCoordinator.kt`.
- - Add `feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerThumbnailCoordinatorTest.kt`.
-
- **Changes:**
-
- - Inject both the player-side `FrameThumbnailExtractor` and the existing `SeekThumbnailProvider`.
- - Keep the legacy URL available to the coordinator because the current resolved `StreamInfo` may not exist briefly during startup. When resolved info is available, pass it to Media3; if its URL differs from the preview URL, use a copy with the current preview URL while preserving headers, stream type, proxy, TLS, and DRM metadata.
- - Preserve the existing feature-facing operations, extending them only with optional resolved stream info and explicit live state:
-
- ```kotlin
- internal fun supportsFrameExtraction(
- streamUrl: String,
- streamInfo: StreamInfo?,
- isLive: Boolean
- ): Boolean
-
- internal suspend fun loadFrame(
- streamUrl: String,
- streamInfo: StreamInfo?,
- isLive: Boolean,
- positionMs: Long
- ): Bitmap?
- ```
-
- - Selection order is: Media3 support and successful extraction, then legacy support and extraction. If Media3 is unsupported or returns `null`, record the reason and allow the legacy provider to preserve current behavior.
- - `clearCache()` must clear both backends.
- - Do not expose a user-facing setting in this pilot. The fallback is the rollback path while the backend is being measured.
-
- **Tests:** Verify Media3 success prevents a legacy call, Media3 unsupported/failure invokes legacy when supported, neither backend returns `null`, and cache clearing reaches both implementations. Verify the current URL and stream metadata are forwarded correctly.
-
-- [x] **Step 5: Connect the coordinator to seek preview and thumbnail preloading without changing UI behavior.**
-
- **Files:**
-
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerPlaybackPreferenceActions.kt`.
- - Extend `feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerPlaybackPreferenceActionsTest.kt` only where the coordinator call signature requires it.
-
- **Changes:**
-
- - Add one private helper that builds the current thumbnail request inputs from `currentResolvedPlaybackUrl`/`currentStreamUrl`, `currentResolvedStreamInfo`, and `currentContentType == ContentType.LIVE`.
- - Pass those same inputs to both `updateSeekPreview` and `startThumbnailPreload`; do not reconstruct stream metadata differently in the two paths.
- - Keep the current early return for live content, 120 ms debounce, request-version guard, six planned positions, sequential preloading, in-flight key tracking, and lifecycle cancellation unchanged.
- - Keep the legacy URL-only path available when no resolved `StreamInfo` is present so startup and transient resolution states do not regress.
- - Keep `PlayerViewModel` lifecycle cleanup unchanged; its existing thumbnail job cancellation and cache clearing should now clean both backends through the coordinator.
-
- **Tests:** Retain the existing preload-position and preload-key tests. Add coverage that VOD calls use the resolved stream metadata, live calls do not start extraction, and a late Media3 result cannot overwrite a newer seek-preview request.
-
-- [x] **Step 6: Verify module boundaries, build output, and fallback behavior.**
-
- **Commands:**
-
- ```powershell
- .\gradlew.bat :player:testDebugUnitTest --tests "com.streamvault.player.playback.*FrameThumbnail*" --tests "com.streamvault.player.playback.PlayerMediaSourceFactoryTest" --no-daemon --console=plain
- .\gradlew.bat :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.player.PlayerThumbnailCoordinatorTest" --tests "com.streamvault.feature.playback.player.PlayerPlaybackPreferenceActionsTest" --no-daemon --console=plain
- .\gradlew.bat :player:compileDebugKotlin :feature:playback:compileDebugKotlin verifyFeaturePlaybackBoundary --no-daemon --console=plain
- .\gradlew.bat :app:testDebugUnitTest --no-daemon --console=plain
- ```
-
- **Checks:**
-
- - Confirm the dependency resolves to Media3 1.11.0 and the feature boundary reports no forbidden Media3 reference.
- - Confirm no foreground playback transfer listener receives thumbnail bytes.
- - Confirm rapid scrubbing cancels or supersedes old extraction and no stale bitmap updates the current preview.
- - Confirm a forced Media3 failure logs a sanitized fallback event and the old provider still produces the preview where it previously did.
- - Run `git diff --check` and review the diff to ensure only the planned player/thumbnail files, dependency catalog, tests, and documentation are changed.
-
-- [ ] **Step 7: Run the device/content pilot and record the decision.**
-
- **Validation matrix:**
-
- - One local or bundled progressive VOD file.
- - One remote progressive VOD URL that requires the app's custom headers or user-agent behavior.
- - One VOD HLS item.
- - One VOD DASH item.
- - One Smooth Streaming item if the app has a real supported source.
- - The affected Android device/content combination from the original report, if it is VOD and not live/DRM.
-
- **For each item:** Scrub to 0 seconds, 10 seconds, 60 seconds, and near the end; record whether a frame appears, Media3 extraction latency, cache-hit behavior, fallback usage, and any decoder/network error. Repeat rapid scrubbing to verify cancellation. Verify normal foreground playback remains unaffected while thumbnails load.
-
- **Acceptance gate before removing the legacy provider:**
-
- - Every supported non-live content class in the matrix returns correct frames on the target device, or the unsupported class is explicitly documented.
- - No Media3 thumbnail request exceeds the 8-second bound; no decoder/session work remains after cancellation or stream change.
- - Media3 does not increase the legacy baseline failure rate and does not make median or p95 extraction latency more than 20% worse on the same content/device matrix.
- - No playback error, stuck-player event, header/proxy regression, or foreground bitrate-accounting change is observed.
- - Logs are sanitized and include enough evidence to distinguish Media3 success, Media3 failure with legacy fallback, and legacy-only extraction.
-
- **Documentation:** Append the measured matrix, device/content identifiers, fallback counts, latency summary, and the keep/remove decision to the relevant `FrameExtractor` item in `docs/upgrade.txt`. Leave the item marked as an active pilot if any acceptance gate remains open.
-
-## Reference
-
-Media3 documents `FrameExtractor` as an `@UnstableApi` that extracts decoded frames from a `MediaItem`; its API exposes `getFrame(positionMs)`, requires `close()`, and recommends `CLOSEST_SYNC` when exact precision is unnecessary. The extracted bitmap is available as `FrameExtractor.Frame.bitmap`: [FrameExtractor API](https://developer.android.com/reference/androidx/media3/inspector/frame/FrameExtractor), [FrameExtractor.Frame API](https://developer.android.com/reference/androidx/media3/inspector/frame/FrameExtractor.Frame).
-
-## Completion Definition
-
-The implementation is complete only when Steps 1–6 are implemented and verified, Step 7 has real device/content evidence, and `docs/upgrade.txt` records whether the legacy implementation remains required. Until then, this plan intentionally leaves the old `MediaMetadataRetriever` path in place.
diff --git a/docs/superpowers/plans/2026-09-13-settings-redesign.md b/docs/superpowers/plans/2026-09-13-settings-redesign.md
deleted file mode 100644
index d260e787..00000000
--- a/docs/superpowers/plans/2026-09-13-settings-redesign.md
+++ /dev/null
@@ -1,646 +0,0 @@
-# StreamVault Settings Redesign Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use `superpowers:subagent-driven-development` (recommended) or `superpowers:executing-plans` to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Replace the current flat, difficult-to-scan Settings UI with a TV-first, accessible, visually coherent settings system in which every existing option has a logical home and can be reached predictably with a D-pad.
-
-**Architecture:** Keep the existing preference storage, defaults, backup schema, and `SettingsViewModel` behavior intact during the UI migration. Replace integer-selected monolithic lists with stable typed destinations, a reusable master/detail shell, small domain pages, a searchable settings catalog, and one typed modal state. Migrate one domain at a time so every phase remains usable and testable.
-
-**Tech Stack:** Kotlin, Jetpack Compose, Compose for TV Material 3, Hilt, StateFlow, Android resources, Compose UI tests, Android TV emulator screenshot tests.
-
-**Spec:** This file; sections “Product decision” through “State, error, and destructive-action behavior” are the UX specification implemented by the task plan.
-
-## Global Constraints
-
-- StreamVault remains TV-first; phone and tablet layouts remain supported.
-- Preserve every existing setting, stored preference key, default value, provider behavior, and backup/import field unless this plan explicitly says the UI label or location changes.
-- Preserve the existing `settings?backupUri=...` entry path and route it directly to Backup & Restore review without exposing internal destination indexes.
-- Do not reset or migrate user preferences merely because their screen location changes.
-- All controls must support D-pad, keyboard, mouse, touch, RTL, and accessibility services.
-- All new user-facing text must come from Android string resources; remove existing hard-coded Settings copy while each page is migrated.
-- A setting must never change merely because it receives focus.
-- Destructive actions require confirmation and must name the affected data.
-- Advanced playback controls remain available but must not dominate the normal path.
-- Every completed phase must compile, pass its focused tests, and leave Settings fully navigable.
-
----
-
-## 1. Current-state audit
-
-The problem is structural, not cosmetic.
-
-- `SettingsPlaybackSection.kt` is about 700 lines and renders roughly 37 controls in one continuous list.
-- `SettingsBrowsingSection.kt` is about 600 lines and mixes app navigation, Live TV browsing, guide behavior, Movies/Series behavior, sorting, theme, language, time format, and twelve remote-button assignments.
-- Dividers are the main grouping device. They do not provide a name, purpose, or orientation when the user scrolls into the middle of a page.
-- The left rail uses one-character pseudo-icons (`P`, `>`, `#`, `L`, and similar), which look unfinished and do not provide reliable semantic meaning.
-- The screen subtitle is always the provider subtitle rather than describing the selected destination.
-- `SettingsContentPane.kt` switches on integer positions, so navigation identity depends on list order.
-- `SettingsScreenDialogState.kt` holds dozens of independent Boolean dialog flags. Illegal combinations are possible and focus restoration is difficult to reason about.
-- The graph identifies `SettingsViewModel` and `PreferencesRepository` as god nodes with 112 and 120 connections respectively. A full persistence rewrite during a visual redesign would create unnecessary risk.
-- Existing connected tests cover basic rail selection, RTL availability, several dialogs, and a few accessibility semantics, but do not prove full D-pad traversal, focus restoration, page hierarchy, large text, or that every preference remains reachable.
-- Some EPG UI copy and playback labels are hard-coded English, so localization is incomplete.
-- Static screenshots and the running emulator show a visually sparse but cognitively dense list: there is little page identity, weak hierarchy, long horizontal eye travel, and no indication of where the user is within a long domain.
-
-## 2. Product decision
-
-### Recommended: two-level master/detail Settings
-
-Keep a persistent domain rail on TV. Selecting a domain opens a compact overview of named subpages. Selecting a subpage opens its focused detail page in the right pane. The active page title, description, and breadcrumb remain visible while its rows scroll.
-
-Why this is the right fit:
-
-- It preserves the fast left/right D-pad mental model already used by the app.
-- It reduces every detail page to a comprehensible group instead of hiding organization in dividers.
-- It makes expert playback controls available without making first-time users parse them.
-- It supports direct search results and future deep links because every destination and item has a stable ID.
-- It can be introduced domain by domain without changing preference persistence.
-
-### Rejected alternatives
-
-1. **Keep the flat pages and add section headers.** Lowest implementation cost, but Playback would still be a very long page and Browsing would still combine unrelated concepts.
-2. **Replace everything with a tile-only Settings home.** Attractive at first glance, but repetitive Back navigation and loss of a persistent orientation anchor make it slower on a D-pad.
-3. **Search-first Settings.** Useful as a supplement, but poor as the primary model because users should be able to discover available controls without knowing their names.
-
-## 3. Target information architecture
-
-```text
-Settings
-├── Sources & Guide
-│ ├── Providers
-│ ├── Combined sources
-│ ├── Guide sources
-│ ├── Provider assignments & guide policies
-│ ├── Guide time shift
-│ └── Source compatibility & diagnostics [Advanced]
-├── Playback
-│ ├── General playback
-│ ├── Live TV playback & timeshift
-│ ├── Audio, subtitles & translation
-│ ├── Picture, quality & network
-│ ├── Controls, timers & multiview
-│ └── Playback compatibility [Advanced]
-├── Live TV
-│ ├── Browsing layout
-│ ├── Categories & quick filters
-│ ├── Channel numbering & grouping
-│ └── Guide defaults
-├── Movies & Series
-│ ├── Library layout
-│ ├── Loading & search
-│ ├── Duplicates & variants
-│ └── Playback behavior
-├── App & Remote
-│ ├── Home & top navigation
-│ ├── Appearance & language
-│ └── Remote shortcuts
-├── Privacy & Parental
-│ ├── Parental controls
-│ └── Privacy & history
-├── Recording
-│ ├── Recording overview
-│ ├── Storage
-│ ├── Recording defaults
-│ └── Scheduled recordings
-├── Backup & Restore
-│ ├── Local backups
-│ ├── USB backups [when available]
-│ └── Google Drive backup [when available]
-└── About & Support
- ├── App updates
- ├── Crash reports
- └── Version, project links & support
-```
-
-The nine rail domains fit the product better than the current eight because the current “Browsing” bucket is removed. Subpages are displayed as overview cards in the right pane, not as more rail rows.
-
-## 4. Complete setting relocation map
-
-No existing user-facing preference is dropped. Dynamic provider, recording, backup, and EPG records stay with their owning domain.
-
-### 4.1 Current Playback page
-
-| New page | Existing controls moved there |
-|---|---|
-| General playback | Keep screen on during playback; player Back button; system media session; external playback; default playback speed |
-| Live TV playback & timeshift | Live clock; clock position; clock size; clock font; timeshift; timeshift depth; timeshift backend; live stream format; live buffer size; zap auto-revert; live overlay timeout |
-| Audio, subtitles & translation | Preferred audio language; audio output mode; A/V sync; default A/V offset; subtitle size; subtitle text color; subtitle background; live translation; translation service endpoint |
-| Picture, quality & network | Wi-Fi quality cap; Ethernet quality cap; internet speed test and recommendation |
-| Controls, timers & multiview | Controls timeout; notice timeout; default stop timer; default idle-standby timer; respect provider connection limit; centered two-slot multiview layout |
-| Playback compatibility (Advanced) | Fast retry; audio decoder; video decoder; compatibility memory; clear learned compatibility; surface mode; diagnostics timeout |
-| Movies & Series → Playback behavior | Auto-play next episode; VOD HTTP protocol mode |
-
-Rules for dependent controls:
-
-- Clock position, size, and font appear in an indented “Clock appearance” subgroup only when Live clock is enabled.
-- Timeshift depth and backend remain visible but disabled with an explanatory state when Timeshift is off; this preserves discoverability without implying they currently apply.
-- A/V offset remains visible but disabled when A/V sync is off.
-- Translation endpoint remains visible but disabled when live translation is off.
-- “Clear learned compatibility” is styled as a secondary destructive action and requires confirmation.
-- Decoder, surface, retry, and compatibility controls show a concise warning: change them only to solve playback problems.
-
-### 4.2 Current Browsing page
-
-| New page | Existing controls moved there |
-|---|---|
-| Live TV → Browsing layout | Live TV channel mode; auto-hide categories; show Live source browser; hide decorative Live rows |
-| Live TV → Categories & quick filters | Show Favorites; show All Channels; show Recent Channels; quick-filter terms; quick-filter visibility; Live category sort |
-| Live TV → Channel numbering & grouping | Numbering mode; grouping mode; grouped-channel label mode; Live variant preference |
-| Live TV → Guide defaults | Default guide category |
-| Movies & Series → Library layout | VOD layout; type badge style; Movie category sort; Series category sort |
-| Movies & Series → Loading & search | Complete category on open; infinite scroll; portal search |
-| Movies & Series → Duplicates & variants | Duplicate handling; VOD variant preference |
-| App & Remote → Home & top navigation | Top navigation customization; Home shelf customization; default landing screen |
-| App & Remote → Appearance & language | Theme; app language; time format |
-| App & Remote → Remote shortcuts | Global, playback, and Live-browse profiles; Red, Green, Yellow, and Blue assignments for each profile |
-
-Rules for dependent controls:
-
-- Auto-hide categories is visually nested under Live TV channel mode when that mode supports it.
-- Group label and variant preference remain visible but disabled until Grouped mode is selected.
-- VOD variant preference remains visible but disabled when Duplicate handling is “Show all.”
-- Remote shortcut profiles use a compact tab row and a two-column button grid on TV; on narrow layouts they become a one-column list.
-
-### 4.3 Remaining current domains
-
-| New domain/page | Existing content |
-|---|---|
-| Sources & Guide → Providers | Active provider/source, add, edit, delete, provider status, sync, rebuild, catalog warnings |
-| Sources & Guide → Combined sources | Create, rename, delete, add/remove/reorder/enable combined M3U members |
-| Sources & Guide → Guide sources | Add, enable, refresh, edit timezone, and delete external XMLTV sources |
-| Sources & Guide → Assignments & policies | Source priority per provider, assign/unassign/reorder, guide source policy, logo source policy, resolution summary |
-| Sources & Guide → Guide time shift | Per-provider EPG offset and reset |
-| Sources & Guide → Source compatibility | Xtream text classification and Base64 compatibility, moved out of Privacy; provider diagnostics and maintenance links |
-| Sources & Guide → Provider settings/compatibility | Per-provider M3U VOD classification, source-specific catalog controls, provider diagnostics, and database maintenance |
-| Privacy & Parental → Parental controls | Protection level, PIN management, and per-provider protected-category management |
-| Privacy & Parental → Privacy & history | Incognito mode and clear playback history |
-| Recording → Overview | Storage health, free space, active count, scheduled count, and direct “Manage recordings” action |
-| Recording → Storage | App/custom/USB location and Wi-Fi-only recording |
-| Recording → Defaults | File-name pattern, retention, simultaneous recordings, before/after padding |
-| Recording → Scheduled recordings | Browse, stop, enable/disable, skip, cancel, retry, delete, and repair schedules |
-| Backup & Restore → Local | Create, share, restore, and manage local backups |
-| Backup & Restore → USB | Create and restore USB backups when removable storage exists |
-| Backup & Restore → Drive | Sign in/out, push, pull, choose, manage, and delete cloud snapshots |
-| About & Support → Updates | Version, auto-check, auto-download, check/download/install, latest release, status, last checked |
-| About & Support → Crash reports | Latest report summary, view, share, and delete |
-| About & Support → About | Build description and verification, developer, GitHub, donate/support |
-
-## 5. Screen model
-
-### 5.1 TV layout
-
-```text
-┌─────────────────────────────────────────────────────────────────────────────┐
-│ StreamVault Settings Search Exit │
-├───────────────────┬─────────────────────────────────────────────────────────┤
-│ Sources & Guide │ Playback │
-│ Playback │ Tune how video and audio behave. │
-│ Live TV │ │
-│ Movies & Series │ ┌ General playback ───────────────────────────────────┐ │
-│ App & Remote │ │ Everyday playback behavior and player integration │ │
-│ Privacy & Parental│ └─────────────────────────────────────────────────────┘ │
-│ Recording │ ┌ Live TV playback & timeshift ──────────────────────┐ │
-│ Backup & Restore │ │ Stream format, live buffer, clock and rewind │ │
-│ About & Support │ └─────────────────────────────────────────────────────┘ │
-│ │ ┌ Audio, subtitles & translation ────────────────────┐ │
-│ │ │ Language, output, sync and subtitle appearance │ │
-│ │ └─────────────────────────────────────────────────────┘ │
-└───────────────────┴─────────────────────────────────────────────────────────┘
-```
-
-Selecting “Live TV playback & timeshift” replaces the overview cards with a detail page:
-
-```text
-Playback / Live TV playback & timeshift Restore defaults
-Stream format, timeshift, live buffering and on-screen clock.
-
-┌ Clock ─────────────────────────────────────────────────────────────────────┐
-│ Live clock [ On ] │
-│ Position Top right › │
-│ Size Medium › │
-│ Style Digital mono › │
-└────────────────────────────────────────────────────────────────────────────┘
-┌ Timeshift ─────────────────────────────────────────────────────────────────┐
-│ Enable timeshift [ Off ] │
-│ Buffer length 30 minutes (disabled) │
-│ Storage method Automatic (disabled) › │
-└────────────────────────────────────────────────────────────────────────────┘
-```
-
-### 5.2 Narrow phone/tablet layout
-
-- Use the same destination and page models.
-- Replace the permanent rail with a top-level list and normal forward navigation.
-- Render one content column with system Back behavior.
-- Keep at least 48 dp touch targets and do not rely on hover or focus color alone.
-
-### 5.3 Header behavior
-
-- The app top bar says “Settings”; the right pane owns the active domain/page title and description.
-- Search is always available from the Settings top bar.
-- The content header is sticky while rows scroll.
-- Detail pages show `Domain / Page` as a breadcrumb and a visible Back affordance on touch layouts.
-- “Restore defaults” is page-scoped, never global, and opens a confirmation listing the affected group.
-
-## 6. Row and card language
-
-Use one coherent component family:
-
-| Component | Use |
-|---|---|
-| `SettingsOverviewCard` | Opens a subpage; title, one-line purpose, optional status summary, chevron |
-| `SettingsGroupCard` | Visually and semantically groups 2–7 related rows under a heading |
-| `SettingsToggleRow` | Boolean preference; full row toggles; label, short explanation, switch |
-| `SettingsChoiceRow` | Opens a selection dialog or sheet; label, current value, chevron |
-| `SettingsActionRow` | Executes or opens an action; verb-led label and optional status |
-| `SettingsDangerRow` | Clear/delete/reset; warning color is supplemental to explicit text |
-| `SettingsStatusCard` | Provider, recording, backup, speed-test, update, or diagnostic state |
-| `SettingsInlineNotice` | Dependency explanation, expert warning, error, or restart requirement |
-
-Visual rules:
-
-- Use real Material icons with accessible descriptions where the icon is meaningful; decorative icons are excluded from semantics.
-- Use restrained domain accent colors only on icons, selected indicators, and small status marks. Do not tint entire pages differently.
-- Use an opaque surface for group cards so related items read as a unit against the existing dark background.
-- Keep row text left-aligned and values near the trailing edge, but constrain value width and wrap gracefully.
-- Use a 2–3 dp high-contrast focus outline plus a modest surface change. Focus must remain clear in every theme and must not depend on scale animation.
-- Keep selected, focused, enabled, and pressed states visually distinct.
-- Remove repeated dividers between every row; use internal spacing and group boundaries.
-- Prefer plain-language labels. Put protocol names, decoder details, retry intervals, and service endpoints in Advanced pages or supporting descriptions.
-
-## 7. D-pad and Back behavior
-
-1. Entering Settings focuses the last selected domain; first visit focuses Sources & Guide.
-2. Up/Down moves only within the rail. Right enters the selected domain’s first overview card or restores its last focused card.
-3. Left from the first horizontal position returns to the rail without changing the domain.
-4. Selecting an overview card opens the detail page and focuses its first enabled row.
-5. Back closes the active dialog first, then returns from detail to the domain overview, then exits Settings.
-6. After a dialog closes, focus returns to the exact row that opened it.
-7. After a conditional subgroup appears or disappears, focus remains on the parent toggle; it must not jump into or beyond the inserted rows.
-8. Disabled rows may be focused only when their explanation is useful; activating them does nothing and accessibility state says why they are unavailable. Purely irrelevant rows are hidden.
-9. Long lists keep the focused row within a comfortable central viewport when possible, rather than pinning focus against the screen edge.
-10. Mouse/touch activation follows the same state transition as remote activation and never creates a second focus-only click requirement.
-
-## 8. Search behavior
-
-- Search matches localized titles, descriptions, common synonyms, and technical aliases such as “buffer,” “decoder,” “EPG,” “XMLTV,” “subtitles,” and “DVR.”
-- Results show `Setting title`, current value/status, and `Domain › Page`.
-- Selecting a result opens the correct page, scrolls to the setting, and moves focus to it.
-- Search includes static preference/action entries, not dynamic provider names, recording titles, or backup file names.
-- Unavailable device-specific results are omitted. Conditional results may appear with their unmet requirement, for example “Enable timeshift first.”
-- Search is a convenience layer over the same catalog used by page navigation; it must not maintain a separate list of settings.
-
-## 9. Accessibility, localization, and readability
-
-- Every actionable row exposes one merged semantic node with role, label, current value, enabled state, and toggle state where applicable.
-- Switches must not create a duplicate focus target inside the row.
-- Section headings use heading semantics so accessibility services can navigate by group.
-- Status is never conveyed by color alone; pair it with text and, where useful, an icon.
-- Minimum TV row height is 56 dp; touch targets are at least 48×48 dp.
-- Body copy must remain readable at couch distance and support Android font scaling without clipping. Test at 1.0× and 1.5× font scale.
-- Focus outline and text meet WCAG AA contrast against every shipped theme; normal text targets 4.5:1 and large text/UI boundaries target 3:1.
-- All layouts use start/end rather than left/right, except user-facing clock-position choices whose localized labels describe physical screen position.
-- Replace all hard-coded Settings text with resources, including EPG headings, policy labels, time-shift buttons, live stream format, and helper copy.
-- Validate English, one long-string locale, and an RTL locale before release; update all shipped locale packs as part of the release translation pass.
-- Avoid auto-scrolling text. Allow two-line descriptions, then place longer explanations in an info dialog.
-- Motion is subtle and nonessential. Focus, selection, and expanded state remain understandable when animations are disabled.
-
-## 10. State, error, and destructive-action behavior
-
-- Preference changes remain immediate and persistent, matching current behavior.
-- A changed value is reflected in the row immediately; persistence failures show an inline error/snackbar and restore the last confirmed value.
-- Long-running sync, backup, restore, speed-test, update, recording, and EPG actions keep status in their owning card. Do not freeze unrelated Settings navigation.
-- Empty states offer a primary next action: Add provider, Add EPG source, Create backup, or Schedule from Guide as appropriate.
-- Device-specific controls such as USB storage are hidden when unsupported, not shown disabled forever.
-- Clear history, delete provider/source/backup/report, clear learned compatibility, and restore defaults require confirmation.
-- Confirmations state the exact scope and whether the operation can be undone.
-- Provider deletion, restore, and other long destructive work show determinate progress when available and prevent duplicate submission.
-- Advanced pages include “Recommended: Automatic” guidance but never silently rewrite an expert’s existing value.
-
-## 11. Code architecture
-
-### 11.1 Navigation and catalog
-
-Replace integer categories with stable IDs:
-
-```kotlin
-enum class SettingsDomain(val route: String) {
- SOURCES_GUIDE("sources-guide"),
- PLAYBACK("playback"),
- LIVE_TV("live-tv"),
- MOVIES_SERIES("movies-series"),
- APP_REMOTE("app-remote"),
- PRIVACY_PARENTAL("privacy-parental"),
- RECORDING("recording"),
- BACKUP_RESTORE("backup-restore"),
- ABOUT_SUPPORT("about-support")
-}
-
-data class SettingsDestination(
- val id: String,
- val domain: SettingsDomain,
- val titleRes: Int,
- val descriptionRes: Int,
- val icon: ImageVector,
- val advanced: Boolean = false,
-)
-
-sealed interface SettingsModal {
- data class Choice(val itemId: String) : SettingsModal
- data class Confirmation(val actionId: String) : SettingsModal
- data class TextEntry(val itemId: String) : SettingsModal
-}
-```
-
-The catalog owns stable IDs, destination relationships, localized search metadata, visibility requirements, and the target item ID used for focus. It does **not** own preference values or business actions.
-
-### 11.2 UI state strategy
-
-- Keep `SettingsViewModel` as the compatibility facade during the migration.
-- Expose small page-specific state projections and event interfaces so a Composable does not receive the entire state plus dozens of Boolean setters.
-- Replace `selectedCategory: Int` with a saveable navigation state containing domain ID, page ID, target item ID, and last-focused item per destination.
-- Replace independent modal Booleans with one nullable `SettingsModal`, while retaining specialized provider/backup/recording workflow state where a real multi-step workflow needs it.
-- Do not create a second preference repository or duplicate flows.
-- After all pages are migrated and tests are green, split action coordinators only where ownership is clear. Persistence decomposition is a follow-up, not a prerequisite for the visual redesign.
-
-### 11.3 Proposed file structure
-
-```text
-feature/settings/src/main/java/com/streamvault/feature/settings/presentation/
-├── SettingsScreen.kt # composition entry and platform callbacks
-├── SettingsShell.kt # adaptive rail/detail layout and top actions
-├── SettingsNavigationState.kt # typed destination/back/focus state
-├── SettingsCatalog.kt # domains, pages, items and search metadata
-├── SettingsSearchOverlay.kt # catalog search and result navigation
-├── components/
-│ ├── SettingsRows.kt # toggle, choice, action, danger rows
-│ ├── SettingsCards.kt # overview, group, status and notice cards
-│ └── SettingsFocus.kt # traversal and restoration helpers
-└── pages/
- ├── sources/ # provider and EPG pages
- ├── playback/ # six focused playback pages
- ├── livetv/ # Live TV browsing pages
- ├── vod/ # Movies & Series pages
- ├── appremote/ # navigation, appearance and shortcuts
- ├── privacy/ # parental, privacy and history
- ├── recording/ # overview, storage, defaults, schedules
- ├── backup/ # local, USB and Drive
- └── about/ # updates, reports and project information
-```
-
-Do not move every legacy file in one mechanical commit. Create the destination, migrate its behavior and tests, then delete its obsolete legacy section code.
-
-## 12. Implementation plan
-
-### Task 1: Freeze the behavior and preference inventory
-
-**Files:**
-
-- Create: `feature/settings/src/test/java/com/streamvault/feature/settings/presentation/SettingsInventoryTest.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsCatalog.kt`
-- Modify: `feature/settings/src/test/java/com/streamvault/feature/settings/presentation/SettingsPreferenceSnapshotMapperTest.kt`
-
-**Deliverable:** A machine-checked catalog in which stable domain, page, and item IDs are unique and every existing preference/action in sections 4.1–4.3 has an owner.
-
-- [ ] Add the nine `SettingsDomain` IDs and all page IDs from the hierarchy.
-- [ ] Add item IDs for every preference and action in the relocation map; include title/description resources, search aliases, page ID, and optional visibility condition.
-- [ ] Write tests that reject duplicate IDs, orphan pages, empty labels, and preference items with no destination.
-- [ ] Extend the preference snapshot test so changing UI organization cannot omit an observed preference.
-- [ ] Run `./gradlew.bat :feature:settings:testDebugUnitTest` and require all tests to pass.
-- [ ] Commit as `test(settings): lock redesigned settings inventory`.
-
-### Task 2: Build the typed shell and focus contract
-
-**Files:**
-
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsShell.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsNavigationState.kt`
-- Replace: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsNavigationRail.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsScreen.kt`
-- Test: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsConnectedBehaviorTest.kt`
-
-**Deliverable:** A master/detail shell that supports typed domains, overview/detail Back behavior, and deterministic focus restoration while still hosting legacy page content.
-
-- [ ] Write failing Compose tests for rail traversal, Right-to-content entry, Left-to-rail return, detail-to-overview Back, dialog-to-row focus restoration, and restored focus after switching domains.
-- [ ] Implement `SettingsNavigationState` with stable IDs and saved last-focused item IDs.
-- [ ] Render the nine domain entries with Material icons, selected/focused separation, and localized labels.
-- [ ] Add the sticky content header and correct destination-specific title/subtitle.
-- [ ] Add a compatibility adapter that hosts existing section functions until their domain migrates.
-- [ ] Route an incoming backup URI to Backup & Restore and preserve the existing import-review workflow.
-- [ ] Run the connected Settings test class on the TV emulator and save 1080p screenshots for the rail and one overview.
-- [ ] Commit as `feat(settings): add typed master detail shell`.
-
-### Task 3: Create the component system
-
-**Files:**
-
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/components/SettingsRows.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/components/SettingsCards.kt`
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/components/SettingsFocus.kt`
-- Replace usages from: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsRowComponents.kt`
-- Test: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsComponentsAccessibilityTest.kt`
-
-**Deliverable:** One reusable, semantic, focus-safe visual language for all settings pages.
-
-- [ ] Write tests for merged toggle semantics, choice current value, disabled explanation, heading semantics, minimum target size, and single activation per click/key press.
-- [ ] Implement the eight components defined in section 6 using existing core UI tokens where possible.
-- [ ] Add consistent enabled, disabled, focused, pressed, selected, warning, and destructive states for all shipped themes.
-- [ ] Verify long values wrap without covering controls and switches are not separate focus stops.
-- [ ] Capture dark, light, focused, disabled, and 1.5× font-scale component screenshots.
-- [ ] Commit as `feat(settings): add accessible settings components`.
-
-### Task 4: Redesign Playback
-
-**Files:**
-
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/pages/playback/PlaybackOverview.kt`
-- Create six page files under: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/pages/playback/`
-- Create the initial VOD playback page: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/pages/vod/VodPlaybackSettingsPage.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPlayerPreferenceDialogs.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsScreenDialogs.kt`
-- Delete after parity: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPlaybackSection.kt`
-- Test: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsPlaybackNavigationTest.kt`
-
-**Deliverable:** The current Playback mega-list is replaced by six small pages plus the two VOD-specific settings moved to Movies & Series.
-
-- [ ] Write reachability tests for every item in section 4.1 and dependency tests for clock, timeshift, A/V sync, and translation children.
-- [ ] Implement the Playback overview cards with useful current-state summaries such as “Timeshift off” or “Quality automatic.”
-- [ ] Migrate General playback without changing stored values or callbacks.
-- [ ] Migrate Live TV playback & timeshift and preserve live stream format collection.
-- [ ] Migrate Audio, subtitles & translation with a subtitle preview inside the appearance dialog.
-- [ ] Migrate Picture, quality & network and preserve speed-test progress/recommendation actions.
-- [ ] Migrate Controls, timers & multiview.
-- [ ] Migrate Advanced compatibility with warning copy and clear-compatibility confirmation.
-- [ ] Move auto-play next episode and VOD HTTP protocol mode into the initial Movies & Series Playback behavior page before removing the old list.
-- [ ] Remove old Playback list code only after the inventory test proves parity.
-- [ ] Run unit tests and connected playback settings tests; manually verify values survive app restart.
-- [ ] Commit as `feat(settings): redesign playback settings`.
-
-### Task 5: Replace Browsing with Live TV, Movies & Series, and App & Remote
-
-**Files:**
-
-- Create page files under:
- - `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/pages/livetv/`
- - `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/pages/vod/`
- - `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/pages/appremote/`
-- Reuse/move: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/RemoteShortcutSettingsSupport.kt`
-- Reuse/move: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/RemoteShortcutSettingsModels.kt`
-- Delete after parity: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsBrowsingSection.kt`
-- Test: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsBrowsingDomainsTest.kt`
-
-**Deliverable:** There is no “Browsing” catch-all. Its settings are discoverable in three clear domains.
-
-- [ ] Write reachability tests for every item in section 4.2 and dependency tests for Live grouping and VOD duplicate handling.
-- [ ] Implement the four Live TV pages and move Live category sort with the other category controls.
-- [ ] Implement the remaining Movies & Series pages and retain auto-play next episode plus VOD HTTP mode on Playback behavior.
-- [ ] Implement App & Remote pages, preserving navigation/shelf reorder behavior and all twelve remote shortcut assignments.
-- [ ] Add page summaries that report meaningful state without exposing technical enum names.
-- [ ] Delete the old Browsing section only after inventory and callback parity pass.
-- [ ] Test D-pad entry/exit for every page, one RTL locale, and narrow one-column rendering.
-- [ ] Commit as `feat(settings): split browsing into focused domains`.
-
-### Task 6: Redesign Sources & Guide
-
-**Files:**
-
-- Create page files under: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/pages/sources/`
-- Refactor existing `SettingsProvider*.kt`, `SettingsCombinedM3uComponents.kt`, and `SettingsEpg*.kt` into those pages without changing their action classes.
-- Test: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsSourcesGuideTest.kt`
-
-**Deliverable:** Provider and EPG management become one coherent source domain, and source parser compatibility no longer appears under Privacy.
-
-- [ ] Write tests for no-provider, one-provider, combined-source, no-EPG, assignment, unsupported-policy, syncing, warning, and deletion states.
-- [ ] Build Providers and Combined sources overview pages from existing cards and workflows.
-- [ ] Build Guide sources, Assignments & policies, and Guide time-shift pages.
-- [ ] Move Xtream classification and Base64 compatibility to Advanced source compatibility.
-- [ ] Localize every remaining hard-coded EPG and policy string.
-- [ ] Preserve sync progress, cancellation, warnings, active-source selection, and provider deletion behavior.
-- [ ] Commit as `feat(settings): unify source and guide settings`.
-
-### Task 7: Migrate Privacy, Recording, Backup, and About
-
-**Files:**
-
-- Create page files under `pages/privacy/`, `pages/recording/`, `pages/backup/`, and `pages/about/`.
-- Refactor existing `SettingsPrivacySection.kt`, `SettingsRecording*.kt`, `SettingsBackup*.kt`, and about/update/report code into the page structure.
-- Test: add one connected behavior test class per domain.
-
-**Deliverable:** All remaining domains use the same page, card, row, focus, and error patterns.
-
-- [ ] Keep parental level/PIN and incognito/history under Privacy & Parental; remove source compatibility controls from this domain.
-- [ ] Split Recording status, storage, defaults, and schedule management while preserving all status-specific actions.
-- [ ] Split Local, USB, and Drive backup pages and keep unavailable device paths hidden.
-- [ ] Split updates, crash reports, and project information under About & Support.
-- [ ] Add explicit confirmation text for every destructive action listed in section 10.
-- [ ] Verify long-running work does not block navigation outside the owning action.
-- [ ] Commit each independently testable domain separately.
-
-### Task 8: Add catalog-backed search
-
-**Files:**
-
-- Create: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsSearchOverlay.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsCatalog.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsShell.kt`
-- Test: `feature/settings/src/test/java/com/streamvault/feature/settings/presentation/SettingsSearchTest.kt`
-- Test: `feature/settings/src/androidTest/java/com/streamvault/feature/settings/presentation/SettingsSearchNavigationTest.kt`
-
-**Deliverable:** Search finds and focuses a setting without duplicating Settings metadata.
-
-- [ ] Write ranking tests for title, description, synonym, acronym, and technical alias matches.
-- [ ] Implement normalized locale-aware catalog filtering and deterministic result ordering.
-- [ ] Implement result rows with current value and breadcrumb.
-- [ ] Navigate a result to the target page/item and restore focus to Search after Back.
-- [ ] Exclude unavailable device-specific entries and explain unmet conditional dependencies.
-- [ ] Commit as `feat(settings): add settings search`.
-
-### Task 9: Replace modal flags with typed modal state
-
-**Files:**
-
-- Replace: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsScreenDialogState.kt`
-- Modify: `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsScreenDialogs.kt`
-- Modify page-specific dialog hosts under `pages/`.
-- Test: `feature/settings/src/test/java/com/streamvault/feature/settings/presentation/SettingsModalStateTest.kt`
-
-**Deliverable:** At most one simple settings modal is active, its owner is explicit, and dismiss always restores focus.
-
-- [ ] Model choice, confirmation, and text-entry modals with `SettingsModal`.
-- [ ] Keep complex provider, backup-import, recording-browser, and parental workflows as typed workflow states rather than forcing them into a generic dialog.
-- [ ] Migrate one dialog family at a time and remove each obsolete Boolean after its tests pass.
-- [ ] Test replacement, dismissal, process recreation, and opener focus restoration.
-- [ ] Commit as `refactor(settings): use typed modal state`.
-
-### Task 10: Localization, responsive layouts, and visual polish
-
-**Files:**
-
-- Modify base and localized resources under: `feature/settings/src/main/res/values*/`
-- Modify Settings page/component files for RTL and adaptive layout fixes.
-- Add golden assets under the existing Settings screenshot-test location.
-
-**Deliverable:** The redesign is readable, translated, RTL-safe, and visually consistent at supported sizes.
-
-- [ ] Audit with `rg` to ensure no user-facing Settings text remains hard-coded in Kotlin.
-- [ ] Finalize concise titles, descriptions, expert warnings, disabled explanations, and confirmation copy.
-- [ ] Update all shipped locale packs; resolve long-label overflow instead of shrinking text below the typography scale.
-- [ ] Capture 1080p TV goldens for all nine domain overviews and representative detail pages.
-- [ ] Capture 720p TV, narrow phone, light theme, 1.5× font, and RTL goldens.
-- [ ] Verify focus, selected, disabled, warning, and error contrast in every shipped theme.
-- [ ] Commit as `style(settings): finish responsive accessible settings UI`.
-
-### Task 11: Regression, persistence, and release validation
-
-**Files:**
-
-- Modify: Settings unit and connected tests.
-- Update: `docs/images/Settings.png` after the final UI is accepted.
-- Add: release notes in the project’s normal changelog location.
-
-**Deliverable:** Evidence that the redesign did not lose behavior, corrupt preferences, or introduce navigation traps.
-
-- [ ] Run `./gradlew.bat :feature:settings:testDebugUnitTest`.
-- [ ] Run `./gradlew.bat :feature:settings:connectedDebugAndroidTest` on the Android TV emulator.
-- [ ] Run the project’s full unit-test command and build the debug APK.
-- [ ] For every catalog item, prove that it is visible or intentionally conditionally unavailable and invokes the original callback/persistence path.
-- [ ] Change representative values in all nine domains, restart the app, and verify persistence.
-- [ ] Export a backup before the redesign build, import it into the redesign build, and confirm preference parity.
-- [ ] Validate D-pad-only journeys: open Settings, search, change a choice, toggle a dependency, dismiss a modal, manage a provider, and exit.
-- [ ] Validate accessibility-service announcements for toggle, choice, disabled, status, heading, and destructive rows.
-- [ ] Inspect screenshots for clipping, scroll-edge focus, value overlap, incorrect titles, and accidental hard-coded English.
-- [ ] Update `docs/images/Settings.png` with the accepted final overview.
-- [ ] Run `graphify update .` after code changes and commit the updated graph artifacts according to repository policy.
-- [ ] Commit as `docs(settings): record redesign validation`.
-
-## 13. Acceptance criteria
-
-The redesign is complete only when all of the following are true:
-
-- The “Browsing” catch-all no longer exists.
-- No detail page contains more than eight primary rows before conditional children; Advanced pages may contain up to ten.
-- Every existing setting/action in section 4 is reachable through the new hierarchy and retains its stored value and behavior.
-- Common settings are reachable within three activations from the Settings root; Search reaches any indexed setting within two activations after text entry.
-- A D-pad user can move rail → overview → detail → dialog and all the way back without focus loss or ambiguity.
-- Closing a dialog restores focus to its opener.
-- Switching a parent toggle does not make focus jump when child rows appear/disappear.
-- Every page has an accurate title and plain-language description.
-- All actionable rows expose correct accessibility role, state, value, and enabled semantics.
-- There are no hard-coded user-facing Settings strings in Kotlin.
-- TV 720p/1080p, phone, 1.5× font, light theme, and RTL screenshots have no clipping or overlapping controls.
-- Existing backup files import without a schema migration caused solely by the redesign.
-- Unit, connected, and build verification commands pass.
-- The public Settings screenshot and release notes reflect the final design.
-
-## 14. Delivery order and review gates
-
-Review the work at these points instead of waiting until the entire redesign is complete:
-
-1. **IA gate:** Approve the nine domains, subpages, and relocation map before production UI implementation.
-2. **Shell gate:** Approve one TV overview and one detail-page golden, including focus treatment.
-3. **Playback gate:** Validate the hardest domain first; do not migrate the rest if Playback still feels dense.
-4. **Browsing replacement gate:** Confirm Live TV, Movies & Series, and App & Remote feel like independent, understandable domains.
-5. **Functional parity gate:** Inventory tests show every old control has a new owner.
-6. **Accessibility/localization gate:** RTL, large text, semantics, and D-pad paths pass before visual sign-off.
-7. **Release gate:** Persistence and old-backup import pass before replacing the public screenshot.
-
-This ordering deliberately solves the navigation and component language first, then uses Playback as the proving ground, then removes the current Browsing page, and only afterward migrates lower-risk domains.
diff --git a/docs/superpowers/plans/2026-09-13-vod-sliding-window-preloading.md b/docs/superpowers/plans/2026-09-13-vod-sliding-window-preloading.md
deleted file mode 100644
index 09e3723d..00000000
--- a/docs/superpowers/plans/2026-09-13-vod-sliding-window-preloading.md
+++ /dev/null
@@ -1,321 +0,0 @@
-# VOD Sliding-Window Preloading Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Add a bounded Media3 `DefaultPreloadManager` path for non-live VOD/series-episode and catch-up navigation, while preserving direct playback and the existing guarded single-item live preload path.
-
-**Architecture:** Keep Media3 preload details inside `:player` and expose a small `PlayerEngine` preload-window contract to `:feature:playback`. The feature layer selects and resolves adjacent candidates; the player layer creates per-item media sources with the existing custom data-source provider, ranks them with `SimpleRankingDataComparator`, and returns a managed `MediaSource` when playback switches to an item that was preloaded. The manager is recreated together with the player so every returned source is consumed by an `ExoPlayer` created from the same `DefaultPreloadManager.Builder`.
-
-**Tech Stack:** Kotlin, AndroidX Media3 1.11.0 `DefaultPreloadManager`, `SimpleRankingDataComparator`, `TargetPreloadStatusControl`, custom OkHttp-backed `DataSource.Factory`, Media3 `MediaSource`, coroutines, Hilt, JUnit/Truth/Mockito, Robolectric, Android TV device validation.
-
-**Spec:** `docs/upgrade.txt`, the `ADD (P2) - VOD/episode sliding-window preloading` item and the remaining-backlog instruction to design and test VOD-only preloading before replacing the current single-source path.
-
-## Global Constraints
-
-- Scope is this one upgrade item only. Do not implement custom adaptive variant ordering, Media3 Cast migration, explicit playlist progression, or embedded-subtitle recovery.
-- Work directly on the current `develop` worktree. Preserve unrelated existing changes, including the current `docs/CHANGELOG.md` edit and the completed FrameExtractor pilot changes.
-- The new manager is opt-in by content policy: normal `LIVE` channel playback is never added to the sliding window. The existing `PlayerEngine.preload(StreamInfo?)` behavior remains available for the guarded adjacent-channel zap path and recovery code.
-- The initial window is at most three managed items: the current item, one previous item, and one next item. At most two non-current items may cause preload I/O. Do not preload the entire series, category, or EPG history.
-- The initial target status for each adjacent item is `DefaultPreloadManager.PreloadStatus.specifiedRangeLoaded(0L, 3_000L)`. The current item and all items outside the one-item distance are returned as `null` by the target status control. Do not configure persistent disk caching in this pilot.
-- VOD/series-episode and catch-up candidates must be resolved through existing feature/provider code and must retain headers, user-agent, proxy, TLS policy, transport policy, container metadata, DRM metadata, and expiration information. Candidate resolution or preload failure only removes that candidate; it must never fail foreground playback.
-- Do not preload a candidate with a blank/invalid URL, an expired `StreamInfo`, `PlayerPreloadContentType.LIVE`, an unknown stream type, or DRM during the initial pilot. DRM stays on the normal direct-playback path because early license acquisition has side effects and a separate cost profile.
-- Use the existing `PlayerDataSourceFactoryProvider.createFactory(..., preload = true)` for every preload source. Preload transfers must not attach the foreground transfer listeners used for measured playback bitrate and statistics.
-- Media3 preload APIs are `@UnstableApi`; keep the `@OptIn` localized to `:player`. `:feature:playback` must continue to depend only on `PlayerEngine` and player-domain preload value types, never on `androidx.media3` classes.
-- All `DefaultPreloadManager` calls, source reconciliation, and manager release happen on the same engine/main thread. A released manager or builder must never be reused.
-- Keep URLs and request metadata sanitized in logs. Log only candidate kind/key, resolved stream class, rank/distance, source count, skip/failure category, preload completion, and playback-source reuse.
-- Keep direct playback as the fallback whenever a candidate is not managed, has expired, has changed identity, or the manager cannot return a source. The current `PreloadCoordinator` remains responsible for the legacy single-source path.
-
-## Existing Code to Preserve
-
-- `player/src/main/java/com/streamvault/player/playback/PreloadCoordinator.kt` remains the compatibility cache for the existing single-item `preload(StreamInfo?)` API, especially live zapping and recovery.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerZapActions.kt` keeps its current connection-limit/cooldown checks and adjacent live-channel behavior. It must not be silently migrated to the VOD window.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerRecoveryActions.kt` continues to clear preload state through `preload(null)`; the new implementation must make that clear both the legacy cache and the window manager.
-- `player/src/main/java/com/streamvault/player/playback/PlayerDataSourceFactoryProvider.kt` remains the source of custom headers, user-agent handling, timeout profiles, proxy/TLS behavior, and foreground-transfer exclusion.
-- `player/src/main/java/com/streamvault/player/playback/PlayerMediaSourceFactory.kt` remains the source of HLS, DASH, Smooth Streaming, progressive, MPEG-TS, RTSP, DRM, extractor, retry-policy, and subtitle-format decisions.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerContentResolver.kt` remains the feature boundary for resolving episode/VOD and provider playback metadata.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerEpgCoordinator.kt` and `PlayerGuideTimelineCoordinator.kt` remain responsible for fetching and projecting the EPG timeline used by catch-up selection.
-- `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerAutoPlayActions.kt` keeps the existing ten-second next-episode countdown and auto-play preference behavior. Preloading must not auto-start or change that UI flow.
-
-## Implementation Steps
-
-- [x] **Step 1: Define the player-boundary preload-window contract and deterministic window policy.**
-
- **Files:**
-
- - Add `player/src/main/java/com/streamvault/player/PlayerPreload.kt`.
- - Modify `player/src/main/java/com/streamvault/player/PlayerEngine.kt`.
- - Add `player/src/test/java/com/streamvault/player/PlayerPreloadWindowPolicyTest.kt`.
-
- **Changes:**
-
- - Define the Media3-free value types:
-
- ```kotlin
- enum class PlayerPreloadContentType { VOD, CATCH_UP, LIVE }
-
- data class PlayerPreloadItem(
- val key: String,
- val streamInfo: StreamInfo,
- val contentType: PlayerPreloadContentType
- )
-
- data class PlayerPreloadWindow(
- val items: List<PlayerPreloadItem>,
- val currentIndex: Int
- )
- ```
-
- - Add default-safe methods to `PlayerEngine` so existing test doubles and auxiliary engines remain source-compatible:
-
- ```kotlin
- fun preloadWindow(window: PlayerPreloadWindow) {}
- fun clearPreloadWindow() = preload(null)
- ```
-
- - Add a pure `normalizePlayerPreloadWindow(window, maxManagedItems = 3)` helper. It must trim blank keys/URLs, remove duplicate keys while retaining the first occurrence, reject `LIVE` items, keep the current item when its index is valid, and retain only the closest previous/next entries around the current item.
- - Keep the current index meaningful after filtering. If the requested current item is removed, return an empty window instead of silently treating an adjacent candidate as current.
- - Do not make `PlayerPreloadItem` contain Media3 `MediaItem`, `MediaSource`, `Uri`, or `DataSource` values.
-
- **Tests:**
-
- - A three-item `[previous, current, next]` window remains unchanged and indexes current correctly.
- - Four or more candidates are reduced to current plus one item on each side.
- - Duplicate keys retain the first item and the current index is adjusted.
- - Live candidates, blank keys, blank URLs, and an invalid current index produce the documented filtered/empty result.
- - A VOD item and a catch-up item remain eligible even when their underlying Media3 stream class is HLS or DASH.
-
-- [x] **Step 2: Add the Media3 manager session with ranking, target status, reconciliation, and source lookup.**
-
- **Files:**
-
- - Add `player/src/main/java/com/streamvault/player/playback/Media3PreloadWindowManager.kt`.
- - Add `player/src/test/java/com/streamvault/player/playback/Media3PreloadWindowManagerTest.kt`.
-
- **Required production surface:**
-
- ```kotlin
- @UnstableApi
- internal class Media3PreloadWindowManager(
- private val context: Context,
- private val mediaSourceFactory: PlayerMediaSourceFactory,
- private val dataSourceFactoryProvider: PlayerDataSourceFactoryProvider,
- private val bandwidthMeter: BandwidthMeter
- ) {
- fun createPlayer(
- renderersFactory: RenderersFactory,
- loadControl: LoadControl,
- preloadDataSourceFactory: DataSource.Factory,
- configure: (ExoPlayer.Builder) -> Unit
- ): ExoPlayer
-
- fun updateWindow(window: PlayerPreloadWindow)
- fun getMediaSource(streamInfo: StreamInfo): MediaSource?
- fun clearWindow()
- fun release()
- }
- ```
-
- **Changes:**
-
- - In `createPlayer`, construct one `DefaultPreloadManager.SimpleRankingDataComparator` and one `TargetPreloadStatusControl<Int, DefaultPreloadManager.PreloadStatus>`.
- - Return `specifiedRangeLoaded(0L, 3_000L)` only when the ranking index is exactly one position away from the current index. Return `null` for the current item, unset current index, or any item farther away.
- - Build `DefaultPreloadManager.Builder(context, rankingComparator, targetStatusControl)`, call `setDataSourceFactory(preloadDataSourceFactory)`, set the same renderers factory/load control/bandwidth meter used by foreground playback, build the manager, then create the foreground `ExoPlayer` with `builder.buildExoPlayer(ExoPlayer.Builder(...).apply(configure))`.
- - Do not create an independent foreground `ExoPlayer` with `.build()` after a preload manager has been created. The manager-returned sources must be played only by the player created from this builder.
- - `updateWindow` must call the Step 1 normalization policy, set the manager’s current index through `setCurrentPlayingIndex`, and reconcile by key/media identity rather than blindly calling `reset()` on every update. Keep an existing current source alive when it remains in the new window; remove only stale/changed entries with `removeMediaItems` or `remove`.
- - For each new item, resolve its stream type with `buildPlaybackPreparationPlan(..., preload = true)`, create its source through `PlayerMediaSourceFactory.create(..., preload = true)`, and add it with `add(mediaSource, rankingIndex)` or `addMediaSources` using its list index as ranking data.
- - Use the per-item source path so each candidate retains its own custom request properties. Also pass the preload-scoped factory from `PlayerDataSourceFactoryProvider` into `DefaultPreloadManager.Builder.setDataSourceFactory` as the manager/player factory fallback. When no stream is known yet (for example, a render surface is bound before playback), use a non-foreground fallback factory; actual managed candidates must still be created with the per-item `preload = true` provider path.
- - Store a map from the stable `PlayerPreloadItem.key` and the factory’s media identity to the managed `MediaItem`. `getMediaSource(streamInfo)` must return the manager’s source for the exact matching media identity, or `null` when no managed source exists.
- - `clearWindow` must remove/release all managed sources without releasing the foreground player. `release` must release the `DefaultPreloadManager`, clear maps, and make all later methods no-ops or safe failures.
- - Attach a `PreloadManagerListener` for sanitized completion/error logs. A preload error removes only that candidate and never emits a foreground `PlayerError`.
-
- **Tests:**
-
- - Verify target status is `null` for current/far items and three seconds loaded for adjacent items.
- - Verify `SimpleRankingDataComparator` is updated when the current index moves and the nearer candidate is ranked first.
- - Verify reconciliation retains the current source, removes stale candidates, replaces changed stream identity, and never exceeds three managed items.
- - Verify live candidates are rejected before any Media3 source is created.
- - Verify sources are created with `preload = true`, the configured `setDataSourceFactory` receives the preload factory, and the foreground transfer listener is not attached to preload data sources.
- - Verify a missing manager source returns `null` so the caller can create a direct source, and verify release/clear calls do not throw.
- - Use an injectable/fake manager seam for deterministic JVM tests where real Media3 preload threads are not suitable; keep one Robolectric construction test for the 1.11 API wiring.
-
-- [x] **Step 3: Integrate manager lifecycle and managed-source reuse into `Media3PlayerEngine`.**
-
- **Files:**
-
- - Modify `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt`.
- - Extend `player/src/test/java/com/streamvault/player/PlayerEngineFeatureConfigurationTest.kt` or add `player/src/test/java/com/streamvault/player/Media3PlayerEnginePreloadTest.kt`.
- - Extend `player/src/test/java/com/streamvault/player/playback/PreloadCoordinatorTest.kt` only for the unchanged legacy-path contract.
-
- **Changes:**
-
- - Replace the single `preloadCoordinator` field arrangement with the existing `PreloadCoordinator` plus a nullable `Media3PreloadWindowManager` session and a stored, data-only pending window for calls made before the player exists.
- - In `createPlayer`, build the current `DefaultLoadControl` and renderers exactly as today, create the manager session, and create the foreground player through `Media3PreloadWindowManager.createPlayer`. Preserve all current audio/video renderer customization, analytics listeners, live-speed control, seek increments, audio attributes, surface behavior, and MediaSession setup.
- - Derive `preloadDataSourceFactory` from the current `lastStreamInfo` with `PlayerDataSourceFactoryProvider.createFactory(..., preload = true)` when possible. If a player is created before any stream is known, pass a non-foreground fallback factory and rely on per-item source creation for later windows.
- - In `preloadWindow`, normalize and store the request if the manager session does not yet exist; otherwise update the manager immediately. Clear the legacy single-item cache when a VOD/catch-up window is accepted so stale live-zap data cannot be reused for a different content class.
- - In `prepareInternal`, look up a managed source by the exact current `StreamInfo` before trying `PreloadCoordinator.tryReuse`. If no managed source exists, preserve the existing direct factory path. Keep `preloadCoordinator.onPlaybackStarted(mediaId)` for its existing invalidation semantics.
- - When `preload(null)` is called, clear both the legacy coordinator and the sliding window. This preserves the behavior required by live recovery and channel changes.
- - When `recreatePlayer` or `resetEngineState` releases the current `ExoPlayer`, release the manager session and never reuse a `MediaSource` created by the old session. Retain only the data-only pending window if it is safe to re-add after a new player session; otherwise clear it and let the feature refresh after `READY`.
- - Preserve manager/source lifecycle across content switches without clearing the window before a next-episode or catch-up candidate can be consumed. Clear the old window only when the new content class is ineligible or when the feature submits a replacement window.
- - Add logs distinguishing `preload-window accepted`, `preload-window skipped`, `preload-source reused`, and `preload-source direct-fallback`, with sanitized identity fields.
-
- **Tests:**
-
- - A matching managed VOD/catch-up item is selected before direct source creation.
- - A changed URL, headers/DRM identity, expired item, or absent manager source uses the direct source path.
- - `preload(null)` clears both paths.
- - Recreating/resetting the engine releases the manager and does not return an old-session source.
- - Existing live `preload(StreamInfo)` behavior and live recovery clearing remain unchanged.
- - Existing player configuration tests continue to verify decoder, surface, audio-focus, buffer, and MediaSession behavior.
-
-- [x] **Step 4: Add deterministic episode and catch-up candidate selection in `:feature:playback`.**
-
- **Files:**
-
- - Add `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerPreloadWindowSupport.kt`.
- - Add `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerPreloadWindowCoordinator.kt`.
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerEpisodePlaybackSupport.kt`.
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerProgramTimelineSupport.kt`.
- - Add `feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerPreloadWindowSupportTest.kt`.
- - Add `feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerPreloadWindowCoordinatorTest.kt`.
-
- **Changes:**
-
- - Add pure episode helpers that flatten sanitized series seasons in season/episode order and return previous/current/next entries across season boundaries. Keep `findNextEpisode` behavior unchanged and add `findPreviousEpisode` plus a bounded `buildEpisodeWindow` helper.
- - Add pure catch-up helpers that sort programs by start time, locate the selected program, and return the closest previous/next programs that are archive-playable for the current channel. Keep the existing EPG history/upcoming limits; do not query a second unbounded EPG list just for preloading.
- - Generate stable, sanitized keys such as `episode:<providerId>:<playbackEpisodeIdentity>` and `catchup:<providerId>:<channelId>:<startTime>:<endTime>`. Keys must not contain complete signed URLs, credentials, or headers.
- - `PlayerPreloadWindowCoordinator` must expose these exact operations:
-
- ```kotlin
- suspend fun buildEpisodeWindow(
- current: PlayerPreloadItem,
- series: Series,
- currentEpisode: Episode,
- providerId: Long,
- isCurrent: () -> Boolean
- ): PlayerPreloadWindow?
-
- suspend fun buildCatchUpWindow(
- current: PlayerPreloadItem,
- selectedProgram: Program,
- channel: Channel,
- timelinePrograms: List<Program>,
- providerId: Long,
- isCurrent: () -> Boolean
- ): PlayerPreloadWindow?
- ```
-
- - Use the already resolved current `StreamInfo` as the current item. Resolve adjacent episode streams through `PlayerContentResolver.resolvePlaybackStream` with `ContentType.SERIES_EPISODE`; resolve catch-up URLs through `PlayerProviderCoordinator.buildCatchUpUrls`, then pass each candidate through the shared playback resolver so custom provider metadata is retained.
- - Add a no-player-mutation helper to `PlayerPreparationCoordinator` named `prepareStreamForPreload(streamInfo: StreamInfo): StreamInfo?`. It may run the existing `PlaybackStreamPreparer`, must reject expired results, must not call `PlayerEngine.prepare`, and must not perform the foreground probe-before-playback step.
- - For a candidate with multiple catch-up URL variants, attempt them in provider order until one resolves; keep alternate URLs only in the normal playback/recovery path. The window contains one candidate per adjacent program.
- - Return `null` when the current item or required provider/channel context is unavailable. Skip individual unresolved neighbors, preserve order, and never fail the current playback session because a neighbor cannot be resolved.
- - Do not invent an ordering for standalone movies or generic VOD rows when the caller has no explicit ordered queue. The player contract supports future VOD queues, but this first integration covers the existing ordered series-episode and catch-up flows.
-
- **Tests:**
-
- - Episode selection covers same-season, cross-season, first-episode, and last-episode cases.
- - Catch-up selection returns chronological previous/next programs, excludes non-archive-playable programs, and handles a missing selected program.
- - Resolution preserves headers, user-agent, proxy/TLS/transport fields, stream type, DRM metadata where applicable to direct resolution, and expiration time.
- - Resolver failures skip only the failed neighbor; a current-only window remains valid.
- - Cancellation/stale-session checks stop candidate resolution and prevent a stale window from being returned.
- - Feature tests contain no Media3 imports and `verifyFeaturePlaybackBoundary` remains clean.
-
-- [x] **Step 5: Connect window refreshes to episode and catch-up playback without changing UI behavior.**
-
- **Files:**
-
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerViewModel.kt`.
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerPlaybackContextCoordinator.kt`.
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerAutoPlayActions.kt`.
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerCatchUpActions.kt`.
- - Modify `feature/playback/src/main/java/com/streamvault/feature/playback/player/PlayerGuideTimelineCoordinator.kt` only if a bounded ordered timeline snapshot is needed by the pure catch-up helper.
- - Extend `feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerCatchUpActionsTest.kt` and add focused ViewModel/coordinator interaction tests using a fake `PlayerEngine`.
-
- **Changes:**
-
- - Inject `PlayerPreloadWindowCoordinator` into `PlayerViewModel`.
- - Add a private `refreshPreloadWindow(requestVersion: Long)` that launches in the current playback session, snapshots the current resolved stream/context, builds an episode or catch-up window, checks `isActivePlaybackSession(requestVersion)`, and calls `playerEngine.preloadWindow(window)`.
- - Trigger refresh after the player has successfully prepared the current non-live item and after asynchronous series context resolution completes. Use a fingerprint of current key plus neighboring keys/stream identities to avoid duplicate network resolution and repeated manager reconciliation.
- - In `playCatchUp(program)`, store the selected `Program` in the playback context before starting candidate playback. Clear it when leaving catch-up or starting a new unrelated content session. This is required because `currentProgram` represents live wall-clock time and is not necessarily the program selected for replay.
- - Build the catch-up timeline from the existing bounded guide snapshot (`programHistory`, `currentProgram`, and `upcomingPrograms`) and the selected program. Do not change guide refresh cadence or visible history/upcoming limits.
- - Keep `PlayerAutoPlayActions`’s completion persistence, watched-state refresh, countdown, cancel action, and `playEpisode` call unchanged. The next episode should consume the manager source opportunistically through `PlayerEngine.prepare`; if unavailable, it continues through the existing direct path.
- - Clear the window when playback changes to ordinary live TV, when the catch-up context is abandoned, and during final lifecycle cleanup. Do not clear it at the beginning of every session, because that would discard the preloaded next episode before it is consumed.
- - Keep thumbnail preloading separate. `startThumbnailPreload()` remains its current six-position image-preview path and must not call the video preload manager.
-
- **Tests:**
-
- - A ready series episode requests current/previous/next candidates once and sends the expected current index.
- - A last episode sends a current-only window and does not attempt an out-of-range next episode.
- - Catch-up selection stores the selected program, resolves adjacent replay candidates, and clears the window when returning to live.
- - A stale session or newer playback request prevents a completed resolver job from updating the active engine.
- - `playNextEpisodeNow()` and automatic countdown still call the existing `playEpisode` path and do not add a second auto-play transition.
- - Live channel changes still call the legacy clear/single-item path and never send a live item to `preloadWindow`.
-
-- [x] **Step 6: Add observability and verify the module/build contracts.**
-
- **Files:**
-
- - Extend the player preload tests and feature coordinator tests from Steps 2–5.
- - Modify `docs/upgrade.txt` only after implementation evidence exists; keep the item marked as an active pilot until the device gate in Step 7 passes.
-
- **Required diagnostics:**
-
- - Count window submissions, accepted item count, skipped live/DRM/expired/invalid count, candidate resolution failures, manager preload completions/errors, managed-source reuse, direct fallback, manager resets, and manager recreation.
- - Include content kind and resolved stream class. Include stable candidate keys only; sanitize URL-like values with `PlaybackLogSanitizer` and never log headers/cookies/tokens.
- - Keep preloading out of foreground bitrate accounting. Verify the foreground `PlayerTransferByteCounter` and its measured bitrate do not include preload bytes.
-
- **Commands:**
-
- ```powershell
- .\gradlew.bat :player:testDebugUnitTest --tests "com.streamvault.player.*Preload*" --tests "com.streamvault.player.playback.*Preload*" --no-daemon --console=plain
- .\gradlew.bat :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.player.*Preload*" --tests "com.streamvault.feature.playback.player.PlayerCatchUpActionsTest" --no-daemon --console=plain
- .\gradlew.bat :player:compileDebugKotlin :feature:playback:compileDebugKotlin verifyFeaturePlaybackBoundary --no-daemon --console=plain
- .\gradlew.bat :player:testDebugUnitTest :feature:playback:testDebugUnitTest :app:testDebugUnitTest --no-daemon --console=plain
- .\gradlew.bat :app:assembleDebug --no-daemon --console=plain
- git diff --check
- ```
-
- **Expected results:**
-
- - All focused and module unit tests pass.
- - `verifyFeaturePlaybackBoundary` reports no Media3 reference from `:feature:playback`.
- - The app compiles with Media3 1.11.0’s `DefaultPreloadManager` API and no deprecated preload-manager calls.
- - The debug APK assembles successfully.
- - `git diff --check` reports no whitespace errors and the diff contains only the planned player/feature tests, implementation files, and the eventual upgrade-audit update.
-
-- [ ] **Step 7: Run the device/content pilot and make the keep/remove decision.**
-
- **Validation matrix:**
-
- - One series with at least three playable episodes, including a cross-season boundary if available.
- - One provider-backed episode whose resolved playback requires custom headers, user-agent, proxy, TLS, or transport policy.
- - One catch-up channel with at least three adjacent archive-playable EPG programs.
- - One standalone movie/VOD item to confirm no invented ordering and unchanged direct playback.
- - The affected Android TV/device/content combination if it is non-live and non-DRM.
-
- **For each applicable item:**
-
- - Capture logs from window submission through the first foreground frame for current playback, next/previous selection, manager source reuse, and direct fallback.
- - Confirm the manager never reports more than three managed sources and never starts for ordinary live-channel playback.
- - Compare the source-reuse path with a controlled direct-playback run of the same item. Record time to `READY`, time to first rendered frame, preload completion/error, and whether the resolved request shape matches the direct baseline.
- - Exercise next episode, previous/next catch-up selection, rapid content switching, recovery/error handling, app background/foreground, engine recreation, and final release.
- - Confirm no preload request changes foreground measured bitrate, decoder selection, subtitle/track behavior, proxy/TLS behavior, or playback history.
-
- **Acceptance gate before removing or weakening the legacy path:**
-
- - All eligible series-episode and catch-up cases either reuse a managed source or cleanly fall back to direct playback with no user-visible error.
- - No eligible window exceeds three managed items or two adjacent preload transfers.
- - No ordinary live channel is added to the window manager.
- - Manager lifecycle survives content switches, engine recreation, cancellation, and release without leaked threads, stale source reuse, or foreground playback errors.
- - Median and p95 start-to-ready/first-frame latency do not regress against the direct baseline on the same device/content sample. Record the measured threshold and sample size in the audit.
- - Custom headers, proxy/TLS/transport policy, URL renewal, DRM exclusion, track selection, and foreground transfer accounting remain correct.
- - Logs are sanitized and sufficient to distinguish manager reuse, successful preload with direct fallback, skipped candidate, and manager failure.
-
- **Documentation:** Update the second `ADD` item in `docs/upgrade.txt` with the implementation state, window cap, supported candidate sources, device/content matrix, measured latency, fallback/error counts, and the decision to retain or remove the legacy single-source path. Do not mark the item `DONE` until the acceptance gate is met.
-
-## Reference
-
-Media3’s official documentation states that `DefaultPreloadManager` ranks one-dimensional media items by distance from the current playing index, queries a `TargetPreloadStatusControl` for the amount to load, returns managed `MediaSource` instances for playback, and requires the returned source to be played by an `ExoPlayer` created from the same builder. The relevant APIs are [DefaultPreloadManager](https://developer.android.com/reference/androidx/media3/exoplayer/source/preload/DefaultPreloadManager), [DefaultPreloadManager.Builder](https://developer.android.com/reference/androidx/media3/exoplayer/source/preload/DefaultPreloadManager.Builder), [preload-manager concepts](https://developer.android.com/media/media3/exoplayer/preloading-media/preloadmanager/concepts), [create/configure](https://developer.android.com/media/media3/exoplayer/preloading-media/preloadmanager/create), and [manage/play](https://developer.android.com/media/media3/exoplayer/preloading-media/preloadmanager/manage-play).
-
-## Completion Definition
-
-The implementation is complete only when Steps 1–6 are implemented and verified, Step 7 has real device/content evidence, and `docs/upgrade.txt` records the supported scope and keep/remove decision. Until then, the existing single-item coordinator remains in place as the live/recovery compatibility path and direct playback remains the fallback for every preload miss.
diff --git a/docs/superpowers/plans/2026-09-14-provider-flow-main-thread-jank-remediation.md b/docs/superpowers/plans/2026-09-14-provider-flow-main-thread-jank-remediation.md
deleted file mode 100644
index eae35d0f..00000000
--- a/docs/superpowers/plans/2026-09-14-provider-flow-main-thread-jank-remediation.md
+++ /dev/null
@@ -1,870 +0,0 @@
-# Provider Flow Main-Thread Jank Remediation Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Eliminate repeated provider configuration decryption from the Android main thread while preserving provider behavior and proving the improvement on the connected emulator.
-
-**Architecture:** Add a synchronized process-local Android Keystore key-handle cache, move one-shot snapshot reads/decode to IO, and keep stable cold provider flows whose expensive credential-redacted projections are memoized by the exact stored configuration inputs. Move app-shell destination construction to `AppNavigation` state so Compose no longer creates repository collectors through `MainActivity` lookups. Cold flows preserve the repository's existing exception, completion, and `.first()` behavior; the redacted cache removes repeated Keystore work across collectors and runtime-only updates.
-
-**Tech Stack:** Kotlin, Kotlin Coroutines Flow, Room, Android Keystore, Hilt, Jetpack Compose, Mockito-Kotlin, Truth, Gradle, ADB.
-
-**Spec:** `docs/superpowers/specs/2026-09-14-provider-flow-main-thread-jank-design.md`
-
-## Global Constraints
-
-- Preserve the `ProviderRepository` interface, provider behavior, Room schema, and credential-at-rest format.
-- Provider observation and one-shot snapshot Keystore/decode work, plus redacted projection creation, run on an injected IO dispatcher whose production value is `Dispatchers.IO`.
-- Cached provider state contains no password, Jellyfin token, or decrypted encrypted JSON.
-- `first()` callers must wait for a real Room-backed emission; do not introduce an artificial empty provider list or null active provider.
-- Runtime and Stalker-learning updates must not invoke `ProviderConfigurationCodec.decode()`.
-- Decode failures must reach the collecting caller and must not be cached; a later collection or changed row must be able to retry.
-- Keep debug StrictMode enabled and sanitize all logs and ADB artifacts.
-- Do not change Media3 preload, thumbnail extraction, or playback behavior in this fix.
-- Do not overwrite the user's existing `docs/CHANGELOG.md` edits or restore `docs/upgrade.txt`.
-- Run `graphify update .` after production code files are modified.
-
----
-
-## File Map
-
-| File | Responsibility |
-| --- | --- |
-| `data/src/main/java/com/streamvault/data/security/CachingSecretKeyProvider.kt` | Thread-safe, testable cache for the Android Keystore `SecretKey` handle. |
-| `data/src/main/java/com/streamvault/data/security/CredentialCrypto.kt` | Use the cached key handle while preserving AES-GCM and error behavior. |
-| `data/src/test/java/com/streamvault/data/security/CachingSecretKeyProviderTest.kt` | Sequential, concurrent, and failure behavior for key-handle caching. |
-| `data/src/main/java/com/streamvault/data/provider/ProviderPublicProjection.kt` | Decode configurations into redacted templates and assemble identity/runtime/learning state without re-decoding. |
-| `data/src/test/java/com/streamvault/data/provider/ProviderPublicProjectionTest.kt` | Projection redaction, type validation, runtime overlay, and Stalker-learning coverage. |
-| `data/src/main/java/com/streamvault/data/provider/ProviderObservationStreams.kt` | Build stable cold provider flows backed by a synchronized redacted-projection cache. |
-| `data/src/test/java/com/streamvault/data/provider/ProviderObservationStreamsTest.kt` | Decode-frequency, concurrent-collector, first-emission, ordering, retry, and failure-propagation tests. |
-| `data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt` | Lazily create one stable pair of cold observation-flow objects and return them from the existing interface methods. |
-| `data/src/main/java/com/streamvault/data/provider/RoomProviderSnapshotRepository.kt` | Run the complete one-shot provider snapshot read/decode/assembly path on IO. |
-| `data/src/test/java/com/streamvault/data/provider/RoomProviderSnapshotRepositoryTest.kt` | Verify snapshot decode dispatching, credentials, missing rows, and type mismatch behavior. |
-| `app/src/main/java/com/streamvault/app/navigation/AppNavigation.kt` | Derive destination items from collected coordinator state and provide them to descendants. |
-| `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt` | Consume the shared destination list and pass it into the settings graph. |
-| `app/src/main/java/com/streamvault/app/ui/components/shell/AppShellNavigation.kt` | Pure destination construction and composition-local consumption; no activity/repository access. |
-| `app/src/test/java/com/streamvault/app/ui/components/shell/AppShellNavigationTest.kt` | State-driven destination behavior and unchanged route ordering. |
-| `docs/CHANGELOG.md` | Read only; it already has user edits. Provide suggested release-note text in the handoff instead of modifying or staging it. |
-
-## Interfaces Produced for Later Tasks
-
-Task 1 produces:
-
-~~~kotlin
-internal class CachingSecretKeyProvider(
- private val loadOrCreate: () -> SecretKey
-) {
- fun get(): SecretKey
-}
-~~~
-
-Task 2 produces:
-
-~~~kotlin
-internal data class RedactedProviderConfigurationProjection(
- val providerType: ProviderType,
- val configurationGeneration: Long,
- val providerTemplate: LegacyProvider
-)
-
-internal interface ProviderPublicProjection {
- fun decode(entity: ProviderConfigEntity): RedactedProviderConfigurationProjection
-
- fun assemble(
- identity: ProviderEntity,
- configuration: RedactedProviderConfigurationProjection?,
- runtime: ProviderAccountRuntimeEntity?,
- portalState: StalkerPortalStateEntity?
- ): LegacyProvider
-}
-
-~~~
-
-The production implementation is `DefaultProviderPublicProjection(codec, gson)`; tests can provide a counting implementation of the interface.
-
-Task 3 produces:
-
-~~~kotlin
-internal class ProviderObservationStreams(
- providerDao: ProviderDao,
- providerSnapshotDao: ProviderSnapshotDao,
- projection: ProviderPublicProjection,
- workDispatcher: CoroutineDispatcher = Dispatchers.IO
-) {
- val providers: Flow<List<LegacyProvider>>
- val activeProvider: Flow<LegacyProvider?>
-}
-~~~
-
----
-
-### Task 1: Cache the Android Keystore Key Handle
-
-**Files:**
-
-- Create: `data/src/main/java/com/streamvault/data/security/CachingSecretKeyProvider.kt`
-- Modify: `data/src/main/java/com/streamvault/data/security/CredentialCrypto.kt:31-105`
-- Create: `data/src/test/java/com/streamvault/data/security/CachingSecretKeyProviderTest.kt`
-- Test: `data/src/test/java/com/streamvault/data/security/CredentialCryptoTest.kt`
-
-**Interfaces:**
-
-- Consumes: The existing `CredentialCrypto` contract and Android Keystore loader body.
-- Produces: `CachingSecretKeyProvider.get()` for both `encryptIfNeeded()` and `decryptIfNeeded()`.
-
-- [ ] **Step 1: Write the failing cache tests.**
-
-Create tests in the existing `com.streamvault.data.security` package. Use `SecretKeySpec(byteArrayOf(1, 2, 3, 4), "AES")`, an `AtomicInteger`, and a loader lambda so the tests do not access Android Keystore:
-
-~~~kotlin
-@Test
-fun `sequential gets load the key once`() {
- val loads = AtomicInteger()
- val key = SecretKeySpec(byteArrayOf(1, 2, 3, 4), "AES")
- val provider = CachingSecretKeyProvider {
- loads.incrementAndGet()
- key
- }
-
- assertThat(provider.get()).isSameInstanceAs(key)
- assertThat(provider.get()).isSameInstanceAs(key)
- assertThat(loads.get()).isEqualTo(1)
-}
-
-@Test
-fun `concurrent gets load the key once`() {
- val loads = AtomicInteger()
- val key = SecretKeySpec(byteArrayOf(1, 2, 3, 4), "AES")
- val provider = CachingSecretKeyProvider {
- loads.incrementAndGet()
- Thread.sleep(10)
- key
- }
-
- val executor = Executors.newFixedThreadPool(8)
- try {
- val results = (1..16).map {
- executor.submit<SecretKey> { provider.get() }
- }.map { it.get() }
- assertThat(results).containsExactlyElementsIn(List(16) { key })
- assertThat(loads.get()).isEqualTo(1)
- } finally {
- executor.shutdownNow()
- }
-}
-
-@Test
-fun `loader failure is not cached`() {
- val loads = AtomicInteger()
- val key = SecretKeySpec(byteArrayOf(1, 2, 3, 4), "AES")
- val provider = CachingSecretKeyProvider {
- if (loads.incrementAndGet() == 1) error("keystore unavailable")
- key
- }
-
- assertThrows<IllegalStateException> { provider.get() }
- assertThat(provider.get()).isSameInstanceAs(key)
- assertThat(loads.get()).isEqualTo(2)
-}
-~~~
-
-- [ ] **Step 2: Run the focused test to confirm the cache does not exist yet.**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.security.CachingSecretKeyProviderTest"
-~~~
-
-Expected: compilation failure because `CachingSecretKeyProvider` is not defined.
-
-- [ ] **Step 3: Implement the synchronized cache.**
-
-Create the class with a volatile fast path and synchronized initialization. Do not cache failures:
-
-~~~kotlin
-internal class CachingSecretKeyProvider(
- private val loadOrCreate: () -> SecretKey
-) {
- @Volatile
- private var cached: SecretKey? = null
-
- fun get(): SecretKey {
- cached?.let { return it }
- return synchronized(this) {
- cached ?: loadOrCreate().also { cached = it }
- }
- }
-}
-~~~
-
-- [ ] **Step 4: Wire the production crypto implementation.**
-
-In `AndroidKeystoreCredentialCrypto`, replace the private `getOrCreateSecretKey()` call sites with a field-backed provider:
-
-~~~kotlin
-private val secretKeyProvider = CachingSecretKeyProvider(::loadOrCreateSecretKey)
-
-// encryptIfNeeded and decryptIfNeeded both call:
-secretKeyProvider.get()
-~~~
-
-Rename the current keystore body to `private fun loadOrCreateSecretKey(): SecretKey`. Keep the alias, transformation, IV size, GCM tag size, error wrapping, and logging unchanged. Do not cache a `Cipher` or plaintext credential.
-
-- [ ] **Step 5: Run crypto tests.**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.security.CachingSecretKeyProviderTest" --tests "com.streamvault.data.security.CredentialCryptoTest"
-~~~
-
-Expected: all focused security tests pass.
-
-- [ ] **Step 6: Update graphify after the production security change.**
-
-~~~powershell
-graphify update .
-~~~
-
-Expected: the graph updates successfully. If the CLI is unavailable, record the limitation and continue with the verified tests.
-
-- [ ] **Step 7: Commit the isolated security change.**
-
-~~~powershell
-git add data/src/main/java/com/streamvault/data/security/CachingSecretKeyProvider.kt data/src/main/java/com/streamvault/data/security/CredentialCrypto.kt data/src/test/java/com/streamvault/data/security/CachingSecretKeyProviderTest.kt data/src/test/java/com/streamvault/data/security/CredentialCryptoTest.kt
-git commit -m "perf: cache credential keystore key handle"
-~~~
-
-### Task 2: Build a Redacted Configuration Projection
-
-**Files:**
-
-- Create: `data/src/main/java/com/streamvault/data/provider/ProviderPublicProjection.kt`
-- Create: `data/src/test/java/com/streamvault/data/provider/ProviderPublicProjectionTest.kt`
-- Reference: `data/src/main/java/com/streamvault/data/provider/ProviderConfigRevisionCodec.kt:104-254`
-- Reference: `data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt:2059-2070`
-
-**Interfaces:**
-
-- Consumes: `ProviderConfigurationCodec`, `ProviderConfigEntity`, `ProviderEntity`, `ProviderAccountRuntimeEntity`, `StalkerPortalStateEntity`, and the existing `toLegacyProvider()`/learning mappers.
-- Produces: the `ProviderPublicProjection` interface, `DefaultProviderPublicProjection`, and the redacted projection model consumed by Task 3.
-
-- [ ] **Step 1: Write projection tests before implementation.**
-
-Use a real `ProviderConfigurationCodec` with a fake `CredentialCrypto` that returns values unchanged and counts decrypt calls. Build one Xtream `ProviderConfigEntity` with a non-empty password and one Stalker entity with a generation-valid learning row. Cover these assertions:
-
-~~~kotlin
-@Test
-fun `decode returns a redacted template and preserves public configuration fields`() {
- val projection = defaultPublicProjection()
-
- val decoded = projection.decode(xtreamEntity(password = "secret"))
-
- assertThat(decoded.providerType).isEqualTo(ProviderType.XTREAM_CODES)
- assertThat(decoded.configurationGeneration).isEqualTo(7L)
- assertThat(decoded.providerTemplate.serverUrl).isEqualTo("https://example.test")
- assertThat(decoded.providerTemplate.username).isEqualTo("user")
- assertThat(decoded.providerTemplate.password).isEmpty()
-}
-
-@Test
-fun `assemble overlays identity runtime and generation-valid Stalker learning`() {
- val result = defaultPublicProjection().assemble(
- identity = providerEntity(id = 9L, name = "Living room"),
- configuration = stalkerProjection(generation = 4L),
- runtime = ProviderAccountRuntimeEntity(
- providerId = 9L,
- maxConnections = 3,
- catalogLayout = CatalogLayout.UNIFIED_VOD,
- catalogLayoutDetectionVersion = 2
- ),
- portalState = generationValidPortalState(providerId = 9L, generation = 4L)
- )
-
- assertThat(result.name).isEqualTo("Living room")
- assertThat(result.maxConnections).isEqualTo(3)
- assertThat(result.catalogLayout).isEqualTo(CatalogLayout.UNIFIED_VOD)
- assertThat(result.stalkerConfigurationGeneration).isEqualTo(4L)
- assertThat(result.password).isEmpty()
-}
-~~~
-
-Also test a type mismatch, missing configuration, stale Stalker learning, and a projection whose configuration contains a credential. Add table-driven characterization cases for Xtream, M3U, Stalker, and Jellyfin that compare `assemble()` with the existing `ProviderSnapshot.toLegacyProvider().redactedCredentials()` result before the old repository body is removed. Compare the complete `LegacyProvider`, not a selected field subset, so newly added configuration/runtime/learning fields cannot be silently dropped. The public output must never expose a password or Jellyfin credential.
-
-- [ ] **Step 2: Run the new tests to establish the missing implementation.**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.provider.ProviderPublicProjectionTest"
-~~~
-
-Expected: compilation failure because the projection types do not exist.
-
-- [ ] **Step 3: Implement redacted configuration decoding.**
-
-Define `ProviderPublicProjection` as the small internal interface shown above and implement it in `DefaultProviderPublicProjection`. This makes Task 3 tests count `decode()` directly instead of treating crypto calls as a proxy for decode passes.
-
-Create `RedactedProviderConfigurationProjection` with `providerType`, `configurationGeneration`, and a redacted `LegacyProvider providerTemplate`. In `decode(entity)`, call the existing codec exactly once, convert the typed configuration through the current `ProviderConfiguration.toLegacyProvider()` mapper using a private non-observable identity template, and immediately clear `password` with the existing redaction rule. Retain only the redacted `LegacyProvider` template and generation after the method returns.
-
-The private identity template must use the stored provider ID and type plus a non-empty internal name because `StableProvider` validates the name. `assemble()` must overwrite all identity fields before returning, so the template name never reaches callers.
-
-- [ ] **Step 4: Implement lightweight assembly.**
-
-`assemble()` must preserve the current `ProviderSnapshot.toLegacyProvider()` behavior:
-
-1. Return `identity.toPublicDomain()` when no configuration projection exists.
-2. Reject a projection whose `providerType` differs from `identity.type`, matching the existing snapshot type invariant.
-3. Copy identity fields (`id`, `name`, `type`, `isActive`, `status`, `lastSyncedAt`, `createdAt`) onto the redacted template.
-4. Overlay runtime fields (`maxConnections`, `expirationDate`, `apiVersion`, `allowedOutputFormats`, `catalogLayout`, and `catalogLayoutDetectionVersion`) from `ProviderAccountRuntimeEntity.toDomainRuntime()`, defaulting to `ProviderAccountRuntime()` when absent.
-5. For Stalker providers, call `toGenerationValidLearning(gson, configurationGeneration)` and copy the existing generation, learned-profile, portal-profile, fingerprint, MAG preset, protocol-family, bootstrap-recipe, endpoint-preference, cookie-mode, playback-backend, and last-playback fields. Do not apply learning from another generation.
-6. Keep the password/credential field blank after every copy operation.
-
-Move the current private `ProviderEntity.toPublicDomain()` and `Provider.redactedCredentials()` helpers out of `ProviderRepositoryImpl.kt` into this focused file as `internal` helpers, delete the old private copies, and preserve their behavior exactly. Import the new helpers where the repository still uses them.
-
-- [ ] **Step 5: Run projection tests and inspect the public-output assertions.**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.provider.ProviderPublicProjectionTest"
-~~~
-
-Expected: all projection tests pass, including redaction and generation validation.
-
-- [ ] **Step 6: Update graphify after the production projection change.**
-
-~~~powershell
-graphify update .
-~~~
-
-Expected: the graph updates successfully. If the CLI is unavailable, record the limitation and continue with the verified tests.
-
-- [ ] **Step 7: Commit the projection layer.**
-
-~~~powershell
-git add data/src/main/java/com/streamvault/data/provider/ProviderPublicProjection.kt data/src/test/java/com/streamvault/data/provider/ProviderPublicProjectionTest.kt data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt
-git commit -m "perf: add redacted provider configuration projection"
-~~~
-
-### Task 3: Memoize Redacted Projections While Preserving Cold-Flow Semantics
-
-**Files:**
-
-- Create: `data/src/main/java/com/streamvault/data/provider/ProviderObservationStreams.kt`
-- Create: `data/src/test/java/com/streamvault/data/provider/ProviderObservationStreamsTest.kt`
-- Modify: `data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt:158-206`
-- Reference: `data/src/main/java/com/streamvault/data/local/dao/ProviderSnapshotDao.kt:15-31`
-
-**Interfaces:**
-
-- Consumes: `ProviderPublicProjection` from Task 2 and the existing DAO flows.
-- Produces: stable cold `Flow<List<LegacyProvider>>` and `Flow<LegacyProvider?>` objects returned by the unchanged `ProviderRepository` methods.
-
-- [ ] **Step 1: Write controlled-flow tests.**
-
-Use `MutableSharedFlow` or `MutableStateFlow` instances for identities, configs, runtimes, and portal states. Stub the small `ProviderPublicProjection` interface with a thread-safe fake that delegates assembly but increments a counter in `decode()`. Pass a `StandardTestDispatcher(testScheduler)` as `workDispatcher` so ordinary flow behavior is deterministic. Add one dedicated concurrency test using `Dispatchers.Default` and latches: hold the first decode after it enters, start the remaining collectors, release it, and assert all collectors complete with only one decode. Do not use timing sleeps to prove the race.
-
-Cover the following test shape:
-
-~~~kotlin
-val identities = MutableSharedFlow<List<ProviderEntity>>(replay = 1)
-val configs = MutableSharedFlow<List<ProviderConfigEntity>>(replay = 1)
-val runtimes = MutableSharedFlow<List<ProviderAccountRuntimeEntity>>(replay = 1)
-val portalStates = MutableSharedFlow<List<StalkerPortalStateEntity>>(replay = 1)
-val streams = ProviderObservationStreams(
- providerDao = fakeProviderDao(identities),
- providerSnapshotDao = fakeSnapshotDao(configs, runtimes, portalStates),
- projection = countingProjection,
- workDispatcher = StandardTestDispatcher(testScheduler)
-)
-
-val first = async { streams.providers.first() }
-emitInitialRows(identities, configs, runtimes, portalStates)
-assertThat(first.await().single().password).isEmpty()
-assertThat(countingProjection.decodeCalls.get()).isEqualTo(1)
-~~~
-
-Add tests that:
-
-- Emit a runtime-only change and assert provider runtime fields change while `decodeCalls` remains `1`.
-- Emit a Stalker-learning-only change and assert learning fields change while `decodeCalls` remains `1`.
-- Collect `providers` twice and `activeProvider` twice concurrently, then emit one configuration list and assert one decode pass despite the separate cold Room subscriptions.
-- Emit a changed generation/payload and assert exactly one additional decode.
-- Emit the same provider ID with a changed encrypted payload but unchanged generation and assert one additional decode; generation alone is not a sufficient cache key.
-- Remove a configuration row and assert the final provider uses the same public fallback as before; re-add the identical row and assert it decodes again, proving removal evicted the cache entry.
-- Assert identity order and active-provider selection remain unchanged.
-- Start `first()` before the first DAO emission and assert it completes only after real rows are emitted.
-- Throw from `decode()` and assert the exact exception reaches each collecting caller, no partially assembled provider is published, and a later successful emission/collection retries rather than reusing a failed entry.
-- Complete a DAO flow and assert completion remains observable to the collector. This specifically guards against accidentally replacing the cold flows with `shareIn`/`stateIn`.
-
-- [ ] **Step 2: Run the observation tests before implementation.**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.provider.ProviderObservationStreamsTest"
-~~~
-
-Expected: compilation failure because the observation-stream class does not exist.
-
-- [ ] **Step 3: Implement the synchronized redacted-projection cache.**
-
-Keep the cache private to `ProviderObservationStreams`. Compare the complete immutable `ProviderConfigEntity` row rather than maintaining a hand-written subset of fields that could drift when the entity changes:
-
-~~~kotlin
-private data class CachedProjection(
- val source: ProviderConfigEntity,
- val value: RedactedProviderConfigurationProjection
-)
-~~~
-
-Implement one synchronized `resolveConfigurationRows(rows)` critical section that:
-
-1. Reuses an entry only when `cached.source == row`, covering type, schema version, generation, payload, policy fields, identity key, and timestamp automatically.
-2. Calls `projection.decode(row)` once for a new or changed row.
-3. Publishes a newly decoded value to the cache only after decode succeeds.
-4. Evicts provider IDs absent from the latest Room row list.
-5. Returns an immutable map for assembly.
-
-The cache may retain only `RedactedProviderConfigurationProjection`; never retain a decoded typed configuration, plaintext password/token, or raw decrypted JSON. Do not swallow decode exceptions and do not install a failed/partial entry.
-
-- [ ] **Step 4: Implement stable cold provider and active-provider flows.**
-
-Build each flow object once, but leave it cold. The expensive transform runs on the injected dispatcher and consults the synchronized cache, so multiple collectors may create cheap Room subscriptions without repeating decryption:
-
-~~~kotlin
-private val publicConfigurations: Flow<Map<Long, RedactedProviderConfigurationProjection>> =
- providerSnapshotDao.observeConfigs()
- .distinctUntilChanged()
- .map(::resolveConfigurationRows)
-
-val providers: Flow<List<LegacyProvider>> =
- combine(
- providerDao.getAll(),
- publicConfigurations,
- providerSnapshotDao.observeRuntimes(),
- providerSnapshotDao.observeStalkerPortalStates()
- ) { identities, configurations, runtimes, portalStates ->
- val runtimeByProvider = runtimes.associateBy { it.providerId }
- val portalStateByProvider = portalStates.associateBy { it.providerId }
- identities.map { identity ->
- projection.assemble(
- identity = identity,
- configuration = configurations[identity.id],
- runtime = runtimeByProvider[identity.id],
- portalState = portalStateByProvider[identity.id]
- )
- }
- }.flowOn(workDispatcher)
-
-val activeProvider: Flow<LegacyProvider?> =
- providers
- .map { list -> list.firstOrNull(LegacyProvider::isActive) }
- .distinctUntilChanged()
-~~~
-
-Do not use `shareIn` or `stateIn`: their sharing coroutine owns upstream failure/completion, so public collectors would no longer receive the same exception/completion behavior as the existing cold repository flows. Do not add an initial value.
-
-- [ ] **Step 5: Delegate the repository API to the stable cold flow objects.**
-
-Add a lazy field in `ProviderRepositoryImpl` so existing JVM tests can stub DAO flows before construction of the observation stream:
-
-~~~kotlin
-private val observationStreams: ProviderObservationStreams by lazy {
- ProviderObservationStreams(
- providerDao = providerDao,
- providerSnapshotDao = providerSnapshotDao,
- projection = DefaultProviderPublicProjection(providerConfigurationCodec, gson)
- )
-}
-
-override fun getProviders(): Flow<List<Provider>> = observationStreams.providers
-
-override fun getActiveProvider(): Flow<Provider?> = observationStreams.activeProvider
-~~~
-
-Remove the old `combine`/decode body from these methods. Preserve all one-shot repository methods; Task 4 separately fixes the dedicated `RoomProviderSnapshotRepository` path observed in the ADB StrictMode trace.
-
-- [ ] **Step 6: Run data regression tests.**
-
-Run:
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.provider.ProviderPublicProjectionTest" --tests "com.streamvault.data.provider.ProviderObservationStreamsTest" --tests "com.streamvault.data.repository.ProviderRepositoryImplTest"
-~~~
-
-Expected: the new flow tests pass and existing provider setup, update, sync, and migration tests remain green.
-
-- [ ] **Step 7: Update the graph after production data code changes.**
-
-Run:
-
-~~~powershell
-graphify update .
-~~~
-
-Expected: the graph updates without changing unrelated user files. If the CLI remains unavailable, record that verification limitation and continue with Gradle tests.
-
-- [ ] **Step 8: Commit the memoized observation change.**
-
-~~~powershell
-git add data/src/main/java/com/streamvault/data/provider/ProviderObservationStreams.kt data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt data/src/test/java/com/streamvault/data/provider/ProviderObservationStreamsTest.kt
-git commit -m "perf: memoize provider observation decoding"
-~~~
-
-### Task 4: Move One-Shot Snapshot Decode to IO
-
-**Files:**
-
-- Modify: `data/src/main/java/com/streamvault/data/provider/RoomProviderSnapshotRepository.kt:17-55`
-- Create: `data/src/test/java/com/streamvault/data/provider/RoomProviderSnapshotRepositoryTest.kt`
-
-**Interfaces:**
-
-- Consumes: existing DAOs, `ProviderConfigurationCodec`, and an injectable internal `CoroutineDispatcher` defaulting to `Dispatchers.IO`.
-- Produces: unchanged `ProviderSnapshotRepository` behavior with the complete read/decode/assembly operation confined to IO.
-
-- [ ] **Step 1: Add one-shot snapshot regression tests.**
-
-Instantiate the repository with recording fake DAOs, a real codec backed by a recording fake `CredentialCrypto`, and a dedicated `StandardTestDispatcher`. Assert that:
-
-- `getSnapshot()` reaches neither the recording DAOs nor crypto until the supplied worker dispatcher is advanced, proving that the complete operation is dispatched instead of inheriting the caller context.
-- A valid snapshot still returns the full typed configuration, including operational credentials; this path must not use the redacted public-projection cache.
-- A missing provider or configuration still returns `null`.
-- A provider/configuration type mismatch still throws the existing `IllegalStateException`.
-- Runtime and generation-valid Stalker learning are assembled exactly as before.
-
-- [ ] **Step 2: Run the new test before implementation.**
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.provider.RoomProviderSnapshotRepositoryTest"
-~~~
-
-Expected: the dispatch assertion fails because `getSnapshot()` currently inherits the caller context.
-
-- [ ] **Step 3: Inject a dispatcher and wrap the whole operation.**
-
-Keep the Hilt-visible `@Inject` constructor signature so no dispatcher binding is required. Move the dependencies plus `workDispatcher` to an internal primary constructor, then add an `@Inject` secondary constructor with the existing dependency list that delegates with `Dispatchers.IO`. Tests call the internal primary constructor with `StandardTestDispatcher`. Wrap the entire `getSnapshot()` body in `withContext(workDispatcher)`, including all DAO reads, type validation, Stalker-learning conversion, codec decode, and snapshot assembly:
-
-~~~kotlin
-override suspend fun getSnapshot(providerId: Long): ProviderSnapshot? =
- withContext(workDispatcher) {
- // existing read, validation, decode, and assembly body
- }
-~~~
-
-Do not cache this result or redact it: sync/playback callers require the typed credentials. Preserve cancellation and exception propagation.
-
-- [ ] **Step 4: Run snapshot and provider data tests.**
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.provider.RoomProviderSnapshotRepositoryTest" --tests "com.streamvault.data.repository.ProviderRepositoryImplTest"
-~~~
-
-Expected: PASS with the dispatcher assertion and existing provider behavior intact.
-
-- [ ] **Step 5: Update graphify and commit the one-shot fix.**
-
-~~~powershell
-graphify update .
-git add data/src/main/java/com/streamvault/data/provider/RoomProviderSnapshotRepository.kt data/src/test/java/com/streamvault/data/provider/RoomProviderSnapshotRepositoryTest.kt
-git commit -m "perf: move provider snapshot decode to IO"
-~~~
-
-If `graphify` is unavailable, record that limitation and continue with the verified Gradle results.
-
-### Task 5: Remove Repository Collection from App-Shell Composables
-
-**Files:**
-
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavigation.kt:19-61`
-- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt:38-55,128-170`
-- Modify: `app/src/main/java/com/streamvault/app/ui/components/shell/AppShellNavigation.kt:1-130`
-- Modify: `app/src/test/java/com/streamvault/app/ui/components/shell/AppShellNavigationTest.kt`
-- Inspect: `app/src/test/java/com/streamvault/app/navigation/AppNavigationCoordinatorTest.kt` to confirm existing coordinator assertions still cover active-provider-driven state
-
-**Interfaces:**
-
-- Consumes: `AppNavigationState.topLevelDestinations`, `AppNavigationState.catalogLayout`, and the stable repository flow objects from Task 3.
-- Produces: one app-owned destination list shared by `AppNavHost`, settings, live graphs, catalog graphs, and shell scaffolds.
-
-- [ ] **Step 1: Add pure destination-state tests.**
-
-Extend `AppShellNavigationTest` so route assertions call the pure builder with explicit `configured` and `layout` values. Add a default-state test and assert that the same destination input produces equal route IDs regardless of caller:
-
-~~~kotlin
-@Test
-fun `destination construction is independent of Activity and repository state`() {
- val result = buildDestinationItems(
- configured = AppTopLevelDestination.defaultOrder,
- layout = CatalogLayout.SPLIT
- )
-
- assertThat(result.map { it.route })
- .containsExactly(
- Routes.HOME,
- Routes.LIVE_TV,
- Routes.MOVIES,
- Routes.SERIES,
- Routes.DOWNLOADS,
- Routes.EPG,
- Routes.SEARCH,
- Routes.PLUGINS,
- Routes.SETTINGS
- )
- .inOrder()
-}
-~~~
-
-`AppTopLevelDestination` has no `route` property; keep this explicit route list so the test compiles and documents the current mapping, including `GUIDE -> Routes.EPG`.
-
-- [ ] **Step 2: Run app shell tests before changing the composable.**
-
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.ui.components.shell.AppShellNavigationTest"
-~~~
-
-Expected: existing tests pass.
-
-- [ ] **Step 3: Make destination construction pure.**
-
-Change `rememberAppDestinationItems()` to accept the already known state and remove `LocalContext`, `MainActivity`, `findMainActivity()`, `collectAsStateWithLifecycle`, and `providerRepository.getActiveProvider()` from `AppShellNavigation.kt`:
-
-~~~kotlin
-@Composable
-internal fun rememberAppDestinationItems(
- configuredDestinations: List<AppTopLevelDestination>,
- catalogLayout: CatalogLayout
-): List<UiDestination> {
- val destinationItems = remember(configuredDestinations, catalogLayout) {
- buildDestinationItems(configuredDestinations, catalogLayout)
- }
- return destinationItems.map { item ->
- UiDestination(
- id = item.route,
- label = stringResource(item.labelRes),
- icon = item.icon
- )
- }
-}
-~~~
-
-Keep `buildDestinationItems()` unchanged so split/unified route behavior remains identical.
-
-- [ ] **Step 4: Add an app-owned composition local for shared destinations.**
-
-Define a nullable local so isolated tests can use a pure default without touching the repository:
-
-~~~kotlin
-internal val LocalAppDestinationItems = staticCompositionLocalOf<List<UiDestination>?> { null }
-~~~
-
-Update `AppScreenScaffold` to use the provided list, falling back to `rememberAppDestinationItems(AppTopLevelDestination.defaultOrder, CatalogLayout.SPLIT)` only when rendered outside `AppNavigation` (for example, an isolated preview or test). The fallback must be pure and must not inspect `Context`, `MainActivity`, preferences, or provider repository.
-
-- [ ] **Step 5: Provide one shared destination list from `AppNavigation`.**
-
-After collecting `state`, call the pure composable builder once and wrap `AppNavHost` in `CompositionLocalProvider`:
-
-~~~kotlin
-val navigationDestinations = rememberAppDestinationItems(
- configuredDestinations = state.topLevelDestinations,
- catalogLayout = state.catalogLayout ?: CatalogLayout.SPLIT
-)
-
-CompositionLocalProvider(LocalAppDestinationItems provides navigationDestinations) {
- AppNavHost(
- navigationDestinations = navigationDestinations,
- // existing arguments
- )
-}
-~~~
-
-Add `navigationDestinations: List<UiDestination>` to `AppNavHost` and pass that exact list to `registerSettingsGraph`. Remove the old no-argument `rememberAppDestinationItems()` call from `AppNavHost`.
-
-- [ ] **Step 6: Run navigation and shell tests.**
-
-~~~powershell
-.\gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.ui.components.shell.AppShellNavigationTest" --tests "com.streamvault.app.navigation.AppNavigationCoordinatorTest"
-~~~
-
-Expected: route behavior and coordinator tests pass.
-
-- [ ] **Step 7: Run app golden tests that exercise `AppScreenScaffold`.**
-
-~~~powershell
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.components.shell.ShellGoldenTest' --console=plain
-.\gradlew.bat :app:connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.app.ui.PremiumRouteGoldenTest' --console=plain
-~~~
-
-Expected: screenshots remain visually unchanged. Confirm the exact current test class names with `rg` before running; review generated diffs if a harness needs to provide `LocalAppDestinationItems` explicitly.
-
-- [ ] **Step 8: Update graphify after the production navigation change.**
-
-~~~powershell
-graphify update .
-~~~
-
-Expected: the graph updates successfully. If the CLI is unavailable, record the limitation and continue with the verified tests.
-
-- [ ] **Step 9: Commit the navigation state change.**
-
-~~~powershell
-git add app/src/main/java/com/streamvault/app/navigation/AppNavigation.kt app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt app/src/main/java/com/streamvault/app/ui/components/shell/AppShellNavigation.kt app/src/test/java/com/streamvault/app/ui/components/shell/AppShellNavigationTest.kt
-git commit -m "perf: remove provider flow collection from app shell"
-~~~
-
-### Task 6: Run Full Automated Regression and Assemble the Debug APK
-
-**Files:**
-
-- Modify: none unless a test identifies a regression in files from Tasks 1–5.
-- Inspect only: `docs/CHANGELOG.md` so the final handoff can suggest placement without changing the user's edits.
-
-**Interfaces:**
-
-- Consumes: all production and test changes from Tasks 1–5.
-- Produces: a tested debug APK and a clean verification record before emulator testing.
-
-- [ ] **Step 1: Run focused data and app unit tests together.**
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest :app:testDebugUnitTest
-~~~
-
-Expected: PASS with no provider migration, setup, sync, navigation, or shell regressions.
-
-- [ ] **Step 2: Run all repository debug unit tests.**
-
-~~~powershell
-.\gradlew.bat testDebugUnitTest
-~~~
-
-Expected: PASS across all modules. Diagnose an unrelated failure before continuing; do not weaken assertions.
-
-- [ ] **Step 3: Assemble the debug APK.**
-
-~~~powershell
-.\gradlew.bat :app:assembleDebug
-~~~
-
-Expected: `app/build/outputs/apk/debug/app-debug.apk` exists and the build reports success.
-
-- [ ] **Step 4: Audit every production configuration-decode call site.**
-
-~~~powershell
-rg -n "providerConfigurationCodec\.decode|codec\.decode\(" data/src/main/java -g "*.kt"
-~~~
-
-Expected: the public observation path is behind `flowOn(workDispatcher)`, `RoomProviderSnapshotRepository.getSnapshot()` is behind `withContext(workDispatcher)`, image-interceptor decoding is owned by an OkHttp worker thread, channel presentation decoding remains inside its existing worker-dispatched path, and provider update/persistence decoding remains transaction-dispatched. If any decode call can inherit a main-thread caller, add a focused dispatcher test and fix it before emulator validation rather than assuming the two observed stacks were exhaustive.
-
-- [ ] **Step 5: Inspect the worktree before emulator installation.**
-
-~~~powershell
-git status --short
-git diff --check
-~~~
-
-Expected: only the intended implementation and tests are present; existing `docs/CHANGELOG.md` and `docs/upgrade.txt` changes remain preserved and unstaged.
-
-### Task 7: Validate the Fix on the Connected Emulator and Report the Result
-
-**Files:**
-
-- Modify: no repository files.
-- Inspect only: `docs/CHANGELOG.md`; do not patch, stage, or commit it because it already contains user changes.
-- Create outside the repository only: sanitized temporary ADB output under `$env:TEMP`.
-
-**Interfaces:**
-
-- Consumes: the assembled `app-debug.apk` and the single currently authorized ADB device selected at validation time.
-- Produces: before/after performance evidence and suggested changelog text in the final handoff.
-
-- [ ] **Step 1: Install and launch the debug APK.**
-
-~~~powershell
-$adb = 'C:\Users\David\AppData\Local\Android\Sdk\platform-tools\adb.exe'
-$serials = @(& $adb devices | Select-String "`tdevice$" | ForEach-Object { ($_ -split "`t")[0] })
-if ($serials.Count -ne 1) { throw "Expected exactly one authorized ADB device, found $($serials.Count)" }
-$serial = $serials[0]
-& $adb -s $serial install -r .\app\build\outputs\apk\debug\app-debug.apk
-& $adb -s $serial shell am force-stop com.streamvault.app.debug
-& $adb -s $serial shell am start -n com.streamvault.app.debug/com.streamvault.app.MainActivity
-~~~
-
-Expected: exactly one authorized device is selected, install succeeds, `com.streamvault.app.debug` is resumed, and provider data remains available. If multiple devices are connected, stop and select the intended serial explicitly rather than guessing.
-
-- [ ] **Step 2: Reset diagnostic counters and capture a clean baseline window.**
-
-Before reproducing the scenario, clear logcat and reset gfxinfo counters:
-
-~~~powershell
-$adb = 'C:\Users\David\AppData\Local\Android\Sdk\platform-tools\adb.exe'
-$validationDir = Join-Path $env:TEMP ("streamvault_jank_validation_{0}" -f (Get-Date -Format 'yyyyMMdd_HHmmss'))
-New-Item -ItemType Directory -Path $validationDir | Out-Null
-& $adb -s $serial logcat -c
-& $adb -s $serial shell dumpsys gfxinfo com.streamvault.app.debug reset
-~~~
-
-Capture initial process status. Keep raw logcat only in the temporary directory, extract the narrow diagnostic patterns below to a separate report, and redact every URL, username, token, cookie, device identifier, MAC address, and password before reporting or copying anything into the repository.
-
-- [ ] **Step 3: Exercise the same lag-producing workflow for at least five minutes.**
-
-Use the emulator's existing navigation/playback scenario and allow background provider runtime updates to occur. Capture exactly 61 process samples at a 5-second cadence (roughly five minutes) with PID lookup, RSS, anonymous RSS, swap, thread count, and CPU. Timestamp each row and save it under a new `$env:TEMP\streamvault_jank_validation_<timestamp>` directory. Do not restart the app during the observation window. Poll in intervals short enough to keep the user updated; do not issue one blocking five-minute sleep.
-
-Implement the sampler as a short reusable PowerShell function that appends CSV rows containing `timestamp`, `pid`, `VmRSS`, `RssAnon`, `VmSwap`, `Threads`, and the package's `dumpsys cpuinfo` line. Invoke it in batches of at most 12 samples, five seconds apart, until 61 total samples are recorded; use the pauses between batches for commentary updates. If `pidof` changes or returns empty, mark the run failed because the app restarted or exited.
-
-If the reproduction includes live TV, additionally follow the repository's mandatory live-TV protocol: capture at least 45 screenshots at a 2-second cadence and prefer 61 (roughly two minutes), validate more than one live channel, compare image hashes for frame progression, confirm `media_session` remains `PLAYING` with `error=null`, and run the prescribed sanitized HLS/recovery/fatal-error log checks. Record channel names, screenshot count, interval, unique hash count, media-session state, and log findings.
-
-- [ ] **Step 4: Check the main-thread stall signature.**
-
-Run the following sanitized query against the captured log:
-
-~~~powershell
-& $adb -s $serial logcat -d -v time | Set-Content -Encoding utf8 (Join-Path $validationDir 'raw_logcat.txt')
-rg -n "CredentialCrypto|ProviderConfigurationCodec|AndroidKeystore|StrictMode|Skipped [0-9]+ frames|ANR|OutOfMemory|FATAL EXCEPTION" (Join-Path $validationDir 'raw_logcat.txt')
-~~~
-
-Expected: no main-thread StrictMode stack contains Keystore, `CredentialCrypto`, or provider configuration decode. Runtime updates may still emit ordinary provider logs, but they must not trigger a decode stack.
-
-- [ ] **Step 5: Collect final frame and process metrics.**
-
-~~~powershell
-& $adb -s $serial shell dumpsys gfxinfo com.streamvault.app.debug
-& $adb -s $serial shell dumpsys meminfo -d com.streamvault.app.debug
-& $adb -s $serial shell dumpsys cpuinfo
-& $adb -s $serial shell dumpsys activity activities
-~~~
-
-Compare against the captured baseline: materially fewer janky/skipped frames than 16.55 percent, no main-thread provider/Keystore event over 100 ms, no ANR/OOM, and no monotonic RSS/thread growth. Report emulator rendering noise separately. Do not claim that all Keystore work disappeared: legitimate credential consumers can still decrypt on the IO dispatcher.
-
-- [ ] **Step 6: If the provider signature is gone but lag remains, stop and diagnose preload separately.**
-
-Do not modify preload or thumbnail code in this task. Capture a fresh stack or trace showing the remaining owner before opening a follow-up change.
-
-- [ ] **Step 7: Prepare, but do not write, the changelog suggestion.**
-
-Include this exact candidate in the final handoff after acceptance passes: `- Fixed progressive UI lag caused by repeated provider configuration decryption and Android Keystore work on the main thread.` Do not edit, stage, or commit `docs/CHANGELOG.md`; the user can choose how to integrate it with their current changes.
-
-- [ ] **Step 8: Run graphify after the final production-code state and inspect status.**
-
-~~~powershell
-graphify update .
-git diff --check
-git status --short
-~~~
-
-Expected: graph is current, no whitespace errors, and only intended files plus the user's pre-existing unstaged `docs/CHANGELOG.md`/`docs/upgrade.txt` changes remain. Do not stage either user-owned path.
-
-## Self-Review Checklist
-
-- [ ] Every spec goal maps to Tasks 1–7: key cache, IO decode, redacted memoization, one-shot snapshot dispatch, stable cold flows, state-driven navigation, tests, and emulator validation.
-- [ ] No task changes the public `ProviderRepository` interface or Room schema.
-- [ ] The plan preserves `.first()`, upstream exception, and completion semantics by keeping the public flows cold and adding no initial value.
-- [ ] Configuration decode is isolated to the projection stage; runtime and learning updates only assemble immutable copies.
-- [ ] Plaintext credentials are not stored in the redacted projection cache; operational one-shot snapshots remain credential-complete and execute on IO.
-- [ ] Navigation no longer calls `getActiveProvider()` from a composable.
-- [ ] The test commands use the repository's Gradle module names and existing test classes.
-- [ ] No raw credential-bearing logcat output is committed.
-- [ ] `docs/CHANGELOG.md` and `docs/upgrade.txt` remain unstaged and untouched.
-- [ ] No unresolved placeholder markers or unspecified implementation steps remain.
diff --git a/docs/superpowers/plans/2026-09-14-xtream-series-zero-episodes-self-heal.md b/docs/superpowers/plans/2026-09-14-xtream-series-zero-episodes-self-heal.md
deleted file mode 100644
index 84551801..00000000
--- a/docs/superpowers/plans/2026-09-14-xtream-series-zero-episodes-self-heal.md
+++ /dev/null
@@ -1,158 +0,0 @@
-# Xtream Series Zero-Episode Self-Heal Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Prevent an Xtream series from showing an empty episode list after a user re-enters it. Two complementary guards make the detail path self-heal: (1) a freshly-hydrated Xtream series whose local episodes have vanished is re-fetched instead of returning an empty cache, and (2) re-hydration never replaces a larger local episode set with a smaller (partial) remote set.
-
-**Architecture:** Keep all changes inside `SeriesRepositoryImpl.getSeriesDetails`. Fix 1 mirrors the existing Stalker "impossible state" self-repair (`SeriesRepositoryImpl.kt:489-500`) for the Xtream branch. Fix 2 computes a single `adoptRemoteEpisodes` decision and uses it both to gate the destructive `episodeDao.replaceAll` call and to select which season set is shown, so the UI and the persisted rows stay consistent.
-
-**Tech Stack:** Kotlin, Kotlin Coroutines, Room, Mockito-Kotlin, Truth, Gradle.
-
-**Spec:** `docs/superpowers/specs/2026-09-14-xtream-series-zero-episodes-self-heal-design.md`
-
-## Global Constraints
-
-- Preserve the `SeriesRepository` interface and the Room schema.
-- No change to `EpisodeDao.replaceAll` or any DAO signature; the guards live in the repository layer.
-- A genuinely empty series (provider returns no episodes and none are persisted) must still show as empty and remain `SUMMARY_ONLY`; do not loop re-fetching it on every open.
-- The provider-empty case (e.g. series 10588) must be unchanged: single variant, no episodes server-side, stays `SUMMARY_ONLY`.
-- Healthy series (fresh + episodes present, or remote superset) keep their existing behavior exactly.
-- Foreign-key enforcement is OFF in this app (`onDelete = CASCADE` on `episodes` never fires); do not rely on cascade semantics.
-- Run `graphify update .` after production code files are modified.
-
----
-
-## File Map
-
-| File | Responsibility |
-| --- | --- |
-| `data/src/main/java/com/streamvault/data/repository/SeriesRepositoryImpl.kt` | Add the Xtream fresh-but-empty guard and the non-destructive episode-adoption decision. |
-| `data/src/test/java/com/streamvault/data/repository/SeriesRepositoryImplTest.kt` | Add tests for the fresh-but-empty re-hydration path and the partial-set preservation path; adjust the existing fresh-cache test to carry episodes. |
-
-## Interfaces Produced for Later Tasks
-
-No new public interface is introduced. The only contract change is the internal decision variable `adoptRemoteEpisodes`, which is private to `getSeriesDetails`.
-
----
-
-### Task 1: Self-heal a fresh Xtream series whose episodes vanished
-
-**Files:**
-
-- Modify: `data/src/main/java/com/streamvault/data/repository/SeriesRepositoryImpl.kt:486-488`
-- Modify: `data/src/test/java/com/streamvault/data/repository/SeriesRepositoryImplTest.kt`
-
-- [ ] **Step 1: Add a failing test for the fresh-but-empty re-hydration.**
-
-Add `getSeriesDetails rehydrates fresh xtream series that lost its episodes`: a `DETAIL_HYDRATED` series with a recent `detailHydratedAt` and an empty `episodeDao.getBySeriesSync`, then assert `seriesCatalogSource.hydrateSeries` and `xtreamContentIndexDao.markDetailHydrated` are invoked (i.e. the detail path fell through to re-hydration instead of returning the empty cache).
-
-- [ ] **Step 2: Guard the existing fresh-cache test so it still means "fresh with episodes".**
-
-In `getSeriesDetails uses fresh xtream hydrated cache without refetching`, change the empty `episodeDao.getBySeriesSync` stub to return a single `EpisodeBrowseEntity` so the test keeps asserting that a fresh series *with* episodes does not refetch.
-
-- [ ] **Step 3: Implement the Xtream fresh-but-empty guard.**
-
-Replace the unconditional early return in the Xtream branch with the Stalker-style check:
-
-~~~kotlin
-if (provider.type == ProviderType.XTREAM_CODES && seriesEntity.hasFreshXtreamDetails()) {
- val localSeries = buildSeriesWithPersistedEpisodes(seriesEntity)
- if (localSeries.seasons.any { season -> season.episodes.isNotEmpty() }) {
- return Result.success(attachSeriesPresentation(localSeries, knownPresentation))
- }
-}
-~~~
-
-- [ ] **Step 4: Run the focused repository tests.**
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.repository.SeriesRepositoryImplTest"
-~~~
-
-Expected: the new test and the adjusted fresh-cache test pass.
-
-### Task 2: Never shrink the episode set during re-hydration
-
-**Files:**
-
-- Modify: `data/src/main/java/com/streamvault/data/repository/SeriesRepositoryImpl.kt:546-547,615-617,626`
-- Modify: `data/src/test/java/com/streamvault/data/repository/SeriesRepositoryImplTest.kt`
-
-- [ ] **Step 1: Add a failing test for partial remote sets.**
-
-Add `getSeriesDetails keeps persisted episodes when remote returns a partial set`: a non-fresh Xtream series (or `SUMMARY_ONLY`) with two persisted episodes whose `hydrateSeries` returns one episode, then assert the result still shows the persisted (larger) episode set and `episodeDao.replaceAll` is not called.
-
-- [ ] **Step 2: Capture the persisted episode list once.**
-
-Change the `hasPersistedEpisodes` lookup to retain the list so the count can be compared:
-
-~~~kotlin
-val persistedEpisodesBefore = episodeDao.getBySeriesSync(seriesEntity.id)
-val hasPersistedEpisodes = persistedEpisodesBefore.isNotEmpty()
-~~~
-
-- [ ] **Step 3: Gate `replaceAll` behind a superset decision.**
-
-Replace the existing `if (episodesToPersist.isNotEmpty())` guard:
-
-~~~kotlin
-val adoptRemoteEpisodes = episodesToPersist.isNotEmpty() &&
- (persistedEpisodesBefore.isEmpty() || episodesToPersist.size >= persistedEpisodesBefore.size)
-if (adoptRemoteEpisodes) {
- episodeDao.replaceAll(seriesEntity.id, providerId, episodesToPersist)
-}
-~~~
-
-- [ ] **Step 4: Use the same decision when merging seasons.**
-
-Change the first `mergedSeasons` branch condition from `remoteSeries.seasons.any { it.episodes.isNotEmpty() }` to `adoptRemoteEpisodes` so the displayed seasons match what was persisted.
-
-- [ ] **Step 5: Run the focused repository tests.**
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest --tests "com.streamvault.data.repository.SeriesRepositoryImplTest"
-~~~
-
-Expected: the partial-set test passes and the existing "remote only has season metadata" test (which relies on persisted episodes being kept) still passes.
-
-### Task 3: Full Regression and Graph Update
-
-**Files:**
-
-- Modify: none unless a test identifies a regression in `SeriesRepositoryImpl.kt`.
-
-- [ ] **Step 1: Run the data module unit tests.**
-
-~~~powershell
-.\gradlew.bat :data:testDebugUnitTest
-~~~
-
-Expected: PASS with no series sync or repository regressions.
-
-- [ ] **Step 2: Update graphify after the production change.**
-
-~~~powershell
-graphify update .
-~~~
-
-Expected: the graph updates successfully. If the CLI is unavailable, record the limitation and continue with the verified Gradle results.
-
-- [ ] **Step 3: Inspect the worktree.**
-
-~~~powershell
-git status --short
-git diff --check
-~~~
-
-Expected: only the two intended files are modified; no whitespace errors; pre-existing `docs/CHANGELOG.md`/`docs/upgrade.txt` changes remain unstaged and untouched.
-
-## Self-Review Checklist
-
-- [ ] Fix 1 mirrors the existing Stalker self-repair and only fires for a fresh Xtream series with zero persisted episodes.
-- [ ] Fix 2 never reduces the locally persisted episode count; a partial remote response keeps the larger local set.
-- [ ] Genuinely empty series still resolve to `SUMMARY_ONLY` and are not refetched in a loop.
-- [ ] Healthy series (fresh + episodes, or remote superset) are behaviorally unchanged.
-- [ ] No DAO signatures or Room schema changes.
-- [ ] Test commands use the repository's Gradle module name (`:data`) and the existing test class.
-- [ ] `graphify update .` is run after production files change.
-- [ ] `docs/CHANGELOG.md` and `docs/upgrade.txt` remain untouched and unstaged.
diff --git a/docs/superpowers/plans/2026-09-15-settings-experience.md b/docs/superpowers/plans/2026-09-15-settings-experience.md
deleted file mode 100644
index f5dd02ec..00000000
--- a/docs/superpowers/plans/2026-09-15-settings-experience.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Settings experience implementation plan
-
-> **Rejected design — superseded.** The user rejected the resulting UI and UX, including legibility, layout, and focus behavior. The checked items below are historical implementation records, not design acceptance. Use [the replacement plan](2026-09-16-settings-redesign-replacement.md).
-
-**Goal:** Replace dense settings lists with focused destinations and a consistent, readable TV interface while retaining existing preference and action handlers.
-
-**Design:** Keep the feature boundary and persistence model. A settings destination catalog owns category and page metadata. The existing section renderers accept an optional page and retain their original callbacks. Playback becomes short task-based pages. Browsing is replaced by Live TV, Movies & Series, and App & Remote. Provider parser options move out of Privacy. Use a quiet navigation rail, proper icons, large page titles, descriptive navigation cards, and consistent full-width rows with a single focus target per switch. Back returns to the owning overview. Existing category IDs used by backup entry points stay stable.
-
-**Constraints:** Work only in the current checkout; no worktrees. Preserve all controls, conditional behavior, dialogs, preferences, backup schema, and feature boundaries. Do not change playback engines.
-
-## Steps
-
-- [x] Add catalog navigation tests for unique destinations, ownership, legacy category IDs, and page bounds; verify the initial failing test.
-- [x] Add `SettingsDestination.kt` and resources. Update `SettingsNavigationRail.kt` and `SettingsContentPane.kt` with overview/detail navigation and saved selection.
-- [x] Partition `SettingsPlaybackSection.kt` and `SettingsBrowsingSection.kt` by explicit page ownership; preserve all callbacks. Move parser compatibility from `SettingsPrivacySection.kt` to Sources.
-- [x] Update `SettingsRowComponents.kt`: readable values, consistent surfaces, disabled semantics, single switch focus. Apply the row language to migrated controls.
-- [x] Verify settings unit tests, feature boundary, debug build, and connected UI navigation/interaction tests. Inspect emulator screenshots for overview, detail, dialogs, focus, long labels, and scrolling. Record limitations accurately.
-- [x] Update `docs/CHANGELOG.md` and record visual validation evidence.
-
-## Validation details
-
-Run `./gradlew.bat :feature:settings:testDebugUnitTest :app:assembleDebug` and the relevant connected settings tests. Compare the original and new renderer callback inventories to detect lost functionality. On the emulator, navigate with D-pad into overview and detail, open and dismiss a choice, toggle a representative preference and restore it, and verify Back. No live playback fix is in scope; do not claim live playback validation from settings screenshots.
diff --git a/docs/superpowers/plans/2026-09-16-settings-redesign-replacement.md b/docs/superpowers/plans/2026-09-16-settings-redesign-replacement.md
deleted file mode 100644
index 01a6745b..00000000
--- a/docs/superpowers/plans/2026-09-16-settings-redesign-replacement.md
+++ /dev/null
@@ -1,331 +0,0 @@
-# Settings replacement: design and implementation plan
-
-> **Status: replacement implementation in progress; not yet accepted.** The user rejected the previous redesign. Its layouts, components, screenshots, checked boxes, and test results are not an approved design baseline.
->
-> **Execution:** Implement in the current checkout using the executing-plans workflow. No worktrees: do not create, open, enumerate, or inspect another checkout. Preserve unrelated local changes. ADB is allowed for bounded baseline investigation during planning. Once development starts, do not invoke ADB, launch/install the app, or run connected/device tests until every implementation checklist item in section 8 is complete. Final device verification is a separate, consolidated stage. Do not relabel development/debugging as planning to bypass this rule.
-
-**Goal:** Replace the entire Settings experience with one that is good enough to be accepted by Google's top UI reviewer, while preserving all existing functionality.
-
-That is the required quality bar, not a claim of endorsement by Google. Section 9 makes the bar reviewable. A broken focus path, unreadable text, inconsistent layout, or lost function is an automatic rejection regardless of test counts.
-
-**User clarification:** The ambition is a market-leading Settings experience: minimal, modern, theme-driven, and coherent from category menus through the deepest setting or dialog. Technical correctness alone does not satisfy this brief.
-
-**Architecture:** One settings shell, one semantic visual system, one navigation/focus coordinator, and independently rendered pages. Preserve domain preferences and operational callbacks; replace the rejected presentation architecture where it prevents coherent behavior. Settings subflows, search, parental controls, provider management, recordings, backup, and support must share the same interaction rules.
-
-**Tech stack:** Kotlin, Jetpack Compose, existing TV Material and Material 3 dependencies, existing feature navigation and preference/domain boundaries. No new UI framework.
-
-**Spec:** Sections 1–7 of this document. Implementation: section 8. Acceptance: sections 9–10.
-
-### Planning-only device investigation
-
-ADB may be used before development to identify the installed build, inspect existing layout/focus behavior, and resolve gaps that supplied screenshots and source inspection cannot answer. Keep this investigation bounded to a named planning question and record its findings. The supplied screenshots already establish the visual defects; reproducing them is not a prerequisite to accepting them. Once implementation begins, use source review, host tests, and previews until the final verification gate opens. Planning evidence never counts as acceptance of the replacement.
-
-## 1. What failed and what the replacement must solve
-
-| Evidence | Failure | Required correction |
-|---|---|---|
-| User screenshots: black search label on dark canvas | Search is not readable in its resting state | Explicit semantic foreground/background pairs for every input state |
-| User screenshots: dark entered query | The primary interaction becomes unreadable while being used | Specify entered text, placeholder, floating label if present, cursor, selection, icons, and error colours |
-| User screenshots: large blank area, oversized rows, inconsistent gaps | Weak hierarchy and poor use of screen space | A measured layout and typography system; inspect compositions rather than individual components alone |
-| User report: entering pages such as parental controls sends focus to Home | Navigation does not preserve the user's context | One owner of entry and return focus; test the complete app route, including asynchronous loading |
-| User screenshots: Live TV overview and Browsing layout use unrelated surface colours | Menu and detail pages feel like different interfaces | One theme palette and shared surface roles across both levels |
-| User screenshots: Browsing layout title and description repeated inside its container | Duplicated hierarchy consumes space without adding information | One page title; group headings only for distinct groups |
-| User request: General playback needs a visible return to Playback | Remote Back alone does not make the return path discoverable | Persistent on-screen Back button on every nested page, returning to the parent and restoring its opener |
-| Previous redesign: large generic cards, repeated subtitles, extra overview hops | Content was reorganized without resolving the interaction model | Compact grouped settings lists; add a subpage only when it reduces complexity |
-| Previous validation: unit/build success presented as completion | Evidence did not cover the real experience | Separate implementation correctness from visual and interaction acceptance |
-
-### Source findings and uncertainty
-
-- `core/ui/.../theme/Theme.kt` currently provides `androidx.tv.material3.MaterialTheme`. Settings also uses `androidx.compose.material3` controls. Those are distinct theme providers. Standard Material input defaults must not be assumed to inherit the TV palette.
-- `SettingsScreen.kt`, `SettingsContentPane.kt`, and `ParentalControlGroupScreen.kt` independently request focus; the first two use delayed requests. The app shell also defines focus-entry behavior. This needs coordinated ownership, not another delay.
-- `SettingsPageComponents.kt` gives navigation cards a 100dp minimum height; headers, per-page descriptions, card padding, and shell padding accumulate. Reducing one margin is insufficient.
-- The exact `Search settings` field shown in the supplied screenshots is not present in the current checkout's production Settings sources found during this audit. The screenshots remain valid defect evidence. Before implementation, identify the renderer/build that supplied that field using files and build metadata in this checkout, supplemented by bounded planning-only ADB inspection if needed. Do not invent a filename, blame the user, or inspect another worktree.
-- The precise Home-focus failure is not yet proven. Trace the complete production entry/return path and theme propagation. These findings are investigation targets, not claims that every root cause is already established.
-
-## 2. Design decision
-
-Three approaches were considered:
-
-1. Adjust the current cards and colours: rejected because it retains the failed hierarchy and competing focus requests.
-2. Add more cards, categories, and a search field on every page: rejected because it adds repetition and navigation work.
-3. **Replace Settings with a self-contained, list-based workspace:** selected. It supports predictable remote navigation, compact information, explicit page context, and shared components across all workflows.
-
-### TV structure
-
-- Enter Settings from the existing app navigation. Inside Settings, render a dedicated workspace with a stable category rail and one content pane.
-- Replace the global Home/Live TV/Movies navigation bar within Settings with a local header and explicit exit/back action. Other app destinations remain reachable by exiting Settings. Child Settings routes must not create another global navigation bar.
-- Back from the Settings root returns to the actual app destination that opened it, not a hard-coded Home destination. If entry was external, use the existing app navigation fallback.
-- Keep the rail and page header outside the page's scrolling body. Only their own overflowing content scrolls. Page identity and section selection must remain visible.
-- Display subpages as compact navigation rows with short titles and useful summaries. Do not recreate a grid of oversized cards.
-- Put normal preferences in grouped lists. Use cards only for distinct objects or state, such as one provider, a backup snapshot, or an active recording.
-- Place advanced compatibility separately from everyday choices. No catch-all Browsing page.
-
-### Compact structure
-
-- Use a Settings root list and full-width detail pages, with a local Back control. Do not compress a TV rail into a narrow screen or create a second horizontally scrolling category bar.
-- Derive layout once from the shell's available constraints and input context. Pass the same layout mode to all children.
-- Adapt values and supporting text to vertical stacking when needed. Text enlargement may increase row height; fixed heights must never clip text.
-
-### Page header and search
-
-- Every nested page has a persistent, visible Back button in the leading position of the local header, with a directional icon and a localized parent label where space permits (for example, “Playback”). Its accessible label identifies the destination. On narrow layouts, retain the Back icon and accessible parent label. This is a real selectable button, not a decorative breadcrumb or another category tab.
-- Example: **Playback → General playback → Back to Playback**. Both the on-screen button and remote/system Back return to Playback, restore its scroll position, and focus the General playback row. They must not exit Settings or select Home. Ordinary nested pages return one parent level; search and dialog return paths retain their explicit origin.
-- Back remains visible while the page body scrolls. Opening a page focuses its first enabled setting row, not Back. From that first row, Up reaches the header controls; Down from Back returns to content. Touch and remote users have the same return destination.
-- One title per page. Use supporting copy only when it explains a choice or consequence; no generic promotional sentence on every page.
-- Search is one persistent action in the Settings header, opening a dedicated Settings search surface. It is not a large outlined field repeated above every list.
-- Search scope is all available Settings, labelled clearly. A result includes the setting name, owning section, and current value where useful.
-- Activating a result opens the owning page, scrolls to the setting, and focuses it. Dismissing search returns to its opener with the original page position intact.
-- Show initial suggestions, no-results, and clear-query states. Do not display a blank panel with no explanation.
-- On TV, focusing Search does not open the keyboard. Select enters text editing; Back first leaves text editing/hides the keyboard, then dismisses search. Touch activates editing on the first tap.
-
-## 3. Layout, typography, and component contract
-
-These are project design tokens and initial composition constraints, not claims that Google mandates these exact dimensions. Refine them together in Compose previews before implementation sign-off; do not improvise per-screen values.
-
-| Element | TV baseline | Compact baseline |
-|---|---|---|
-| Spacing scale | 4, 8, 12, 16, 24, 32dp | Same scale |
-| Outer settings inset | 32dp horizontal, 24dp vertical | 16dp |
-| Category rail | 208dp; 24dp content gap | Root category list, no rail |
-| Content width | Fill remaining space, cap at 720dp | Fill available width |
-| Local header | 56dp minimum; 16dp gap to body | 56dp minimum; 12dp gap |
-| Page title | 28sp / 34sp, medium | 24sp / 30sp, medium |
-| Primary row text | 18sp / 24sp | 16sp / 24sp |
-| Supporting text / value | 14sp / 20sp | 14sp / 20sp |
-| Simple row | 56dp minimum | 56dp minimum |
-| Row with supporting text | 72dp minimum; expand for wrapping | 72dp minimum; expand for wrapping |
-| Row inset | 16dp horizontal; 8–12dp vertical | 16dp horizontal; 8–12dp vertical |
-| Search input when open | 56dp minimum | 56dp minimum |
-| Icons and chevrons | 20–24dp | 20–24dp |
-| Group radius / separators | 12dp group radius; subtle 1dp inset separators | Same |
-
-- At the reference 960 × 540dp TV composition, show at least six simple rows or four explanatory rows below the header without scrolling. Validate with actual supported text sizes; do not meet this by shrinking labels.
-- The first meaningful control begins no more than 16dp after the header block. No unexplained blank band before a page title or between search and results.
-- The page title belongs inside the local 56dp-minimum header, with no second title band beneath it. Align the rail and content to the same workspace top. Apply the outer top inset once; do not add reserved global-navbar space, a hero spacer, or repeated scaffold padding. The replacement local header removes the large navbar-to-title gap shown in the user's screenshot.
-- The visual direction is minimal and modern: restrained surfaces, clear typography, compact grouped rows, and only useful supporting text. Do not repeat the page title/description inside its first group or surround every group with another large decorative card. Whitespace must distinguish hierarchy without pushing ordinary controls off screen.
-- All labels share a leading alignment line; values, switches, and chevrons share a trailing alignment line.
-- Short values sit at the trailing edge on wide layouts. Long values and explanations wrap below their label; they never collide with controls.
-- Distinguish choice/navigation, toggle, destructive action, progress, and read-only status. A read-only status must not look clickable. A toggle is one activation target, not separately focusable row and switch.
-- State must not rely only on colour. Selection and focus are visually distinct. Focus uses a consistent, high-contrast outline and paired surface/text colours; it must not change layout size or be cropped by list edges.
-- Use semantic tokens for canvas, grouped surface, primary/secondary text, outline, accent, focused surface/content, disabled state, error, cursor, and selection. No default black/white foreground assumptions.
-- Resolve every colour from the active theme. Overview navigation rows and detail preference rows use the same base surface/content roles at the same hierarchy and interaction state. In particular, Live TV → Browsing layout must not change from a grey menu to an unrelated blue panel. Rail selection, keyboard focus, and errors may use distinct shared semantic roles because they communicate different states; they must not introduce per-page palettes.
-- Theme both Material families from the same palette, or explicitly theme every mixed-family control through a shared adapter. Validate theme switching without restarting the app.
-- Theme switching updates the rail, overview, detail page, Back button, search, values, switches, and dialogs together. No fixed dark fill in Light theme, stale menu colour, or platform-default control tint is acceptable.
-- Search must remain legible when empty, focused, typed, selected, disabled, loading, and in error. Include the keyboard-open composition.
-
-## 4. Information architecture and preservation
-
-The inventory is the source of truth for preservation. Categories below are the proposed organization; retain a subpage only if it has a coherent task or would otherwise produce a long list. Common controls should not require an empty intermediate page.
-
-| Section | Responsibilities |
-|---|---|
-| Sources & guide | Providers, combined sources, sync, guide sources/assignments/policies/time shift; advanced source text parsing |
-| Playback | General behavior; audio and lip sync; subtitle appearance and translation; quality/network; controls and timers; advanced decoder/display compatibility |
-| Live TV | Channel layout, visible categories and filters, grouping/numbering/variants, live playback/timeshift, clock, multiview |
-| Movies & series | Library layout/loading/search, duplicate handling and variants, category sorting, episode playback and connection compatibility |
-| Appearance & remote | Theme/language/time format, landing screen/navigation/home shelves, all remote shortcut profiles |
-| Privacy & parental | PIN and protection level, protected/hidden categories, incognito viewing, history removal |
-| Recordings | Status/schedule/files, storage choices, file naming/retention/concurrency/padding/network restriction |
-| Backup & restore | Local and device-specific storage, share/import preview, Drive/account/snapshots/conflict handling |
-| About & support | Updates and progress, diagnostics/crash reports, build/project information, close-app action |
-
-Inventory fields:
-
-```text
-stableSettingId | oldLocation | newLocation | labelResource | persistedKey
-readBinding | writeOrActionCallback | availability | dependency
-confirmation | searchAliases | returnFocusTarget | verificationCase
-```
-
-Account for conditional and operational states, not only static labels: no provider, provider busy/error, PIN missing/present/incorrect, no recordings/active recordings, storage unavailable, USB absent, Drive disconnected, empty backups, update checking/downloading/install-permission-required, and failed operations.
-
-No preference-key or backup-schema migration is permitted solely for the redesign. Preserve ongoing operation state across page changes. Destructive actions retain or gain a clear confirmation with consequences. Never reset settings as part of migration.
-
-## 5. Navigation and focus contract
-
-### Ownership
-
-One `SettingsFocusCoordinator` owns requested transitions within the Settings workspace. Pages register stable targets; they do not independently focus on composition. Keep keyboard-editing focus local to the field while it owns editing.
-
-Suggested interfaces:
-
-```kotlin
-data class SettingsLocation(val sectionId: String, val pageId: String, val itemId: String?)
-data class SettingsReturnPoint(val location: SettingsLocation, val focusedItemId: String?)
-data class SettingsFocusIntent(val targetId: String, val transitionId: Long)
-
-// UI state stores stable IDs and per-page list positions, never FocusRequester instances.
-// The coordinator applies the current intent only after its target is attached and laid out.
-// If another transition occurs first, the stale intent is discarded.
-```
-
-No `delay(80)`, `delay(100)`, or retries that compete to win focus. Scroll the target into composition, wait for its attachment/layout, then apply the current focus intent once. Loading completion must not override a focus move the user already made.
-
-### Required transitions
-
-| Event | Focus destination | State retained |
-|---|---|---|
-| Enter Settings | Current section's first useful control, or restored last control on return | Section and page context |
-| Activate another section | Its first useful control; selection stays visually marked | Previous section position |
-| Open detail page | First enabled editable/action row | Opener ID and overview scroll |
-| Activate visible Back on General playback | General playback row in Playback | Same result as remote/system Back; Playback scroll restored |
-| Up from first content row / Down from header Back | Local header controls / first content row | No transfer to global Home navigation |
-| Open parental controls | Relevant parental control or first content-type control after loading | Parent route/provider and opener |
-| Open a choice/PIN/confirmation dialog | Selected choice or first required input/action | Exact opener |
-| Dismiss or complete dialog | Exact opener, including after its value changes | Page position |
-| Enable a parent preference | The same switch | Newly visible child settings below it |
-| Focused item becomes unavailable | Nearest valid item in the same page | Never fall back to app Home |
-| Activate search result | Exact setting on its owning page | Query/results position and return point |
-| Back from detail | Exact opener in previous page | Scroll offset restored before focus |
-| Leave content toward category rail | Selected section | Current content target for re-entry |
-| Back from root | Previous app destination and its opener where supported | App navigation state |
-| Restore configuration/process state | Saved valid Settings location; nearest valid item if removed | No Home jump |
-
-Directional rules must respect RTL. Within a list, Up/Down move between controls; at boundaries, an explicit destination is used. In a text field, Left/Right edit text only while editing is active. Dialog focus is contained. Global app navigation must not steal focus during any of these transitions.
-
-## 6. File ownership and scope
-
-All paths below are inside this checkout.
-
-| Files | Responsibility |
-|---|---|
-| `core/ui/.../theme/Theme.kt`, `design/AppPalette.kt` | Coherent TV/standard Material theme mapping; verify shared consumers |
-| `core/ui/.../components/SearchInput.kt` | Audit shared input ownership and existing callers; avoid changing unrelated search behavior accidentally |
-| `core/ui/.../components/shell/AppShellVisuals.kt` | Audit shell focus entry and local/global navigation separation |
-| `app/.../navigation/AppNavHost.kt`, `feature/settings/.../navigation/SettingsGraph.kt` | Preserve app entry/back and parental subroute ownership |
-| Existing `SettingsScreen.kt`, `SettingsContentPane.kt`, `SettingsAdaptiveLayout.kt`, `SettingsNavigationRail.kt` | Replace shell composition and competing focus logic |
-| Existing `SettingsPageComponents.kt`, `SettingsRowComponents.kt`, selection/value/input dialog components | Replace rejected visual language and inconsistent control states |
-| New `SettingsDesignTokens.kt`, `SettingsShell.kt`, `SettingsNavigationState.kt`, `SettingsFocusCoordinator.kt` under settings presentation | Explicit design tokens, workspace, saved locations/return points, and focus transitions |
-| New `SettingsCatalog.kt`, `SettingsSearchSurface.kt` under settings presentation | Inventory-backed search and result navigation |
-| `SettingsPlaybackSection.kt`, `SettingsBrowsingSection.kt`, remaining section renderers | Migrate to focused page renderers; remove obsolete catch-all composition when parity is proven |
-| `parental/ParentalControlGroupScreen.kt` and its controls | Complete parental workflow inside the same shell/focus system |
-| `feature/settings/src/main/res/values*/` | Concise labels, dependency explanations, and all shipped translations |
-| Settings/core UI unit tests; Settings and app connected tests | Palette, navigation, component, and complete-route regressions |
-
-`...` in this table denotes the existing `src/main/java/com/streamvault/<module>/` package root, not an unknown file to discover in another checkout. New presentation files go in `feature/settings/src/main/java/com/streamvault/feature/settings/presentation/`.
-
-## 7. Design review before device work
-
-Create Compose preview fixtures from the production components. They must include the actual shell and theme providers, not isolated idealized controls or HTML that differs from implementation.
-
-Required preview sheets: Settings root, Playback, Privacy & parental, parental category management, search empty/typed/results/no-results, one preference detail page, PIN dialog, source error/busy state, backup import/conflict state, recording defaults, and update progress.
-
-Include paired overview/detail compositions for Live TV → Browsing layout and Playback → General playback in each theme. Compare surface roles, typography, top spacing, visible Back, and first-row focus side by side. Review the full shell so cropped content images cannot hide wasted space above the title.
-
-Render or inspect them without ADB using available host-side Compose preview/render tooling. If that capability is unavailable, record the gap and inspect the preview definitions and measured tokens; do not pretend the previews were rendered or use a device early. The final device stage must resolve any remaining visual evidence gap.
-
-**Host preview evidence (2026-09-16):** production-component previews now compile in `SettingsPreviews.kt` for Classic blue, M3 purple, Light, Playback detail, Privacy and parental controls, parental category management, Search empty/results/no-results, PIN error, provider busy/error, backup conflicts, recording defaults, and update progress. `:feature:settings:tasks --all` exposes no Compose preview or screenshot-render task (only RenderScript packaging), so no host-rendered image is claimed. The final consolidated device pass must close this visual evidence gap after sections A–F are complete.
-
-Review whole compositions for hierarchy, rhythm, density, alignment, contrast, state clarity, and task flow. No prior screenshot is a golden to copy merely because it exists. Resolve review defects before advancing the implementation checklist.
-
-## 8. Implementation checklist — ADB forbidden throughout
-
-Check an item only when its artifact or non-device evidence exists. Completing this checklist means ready for final verification, not design accepted.
-
-### A. Establish the real baseline and preservation inventory
-
-- [x] Identify the production Settings entry points and reconcile the supplied search screenshots with this checkout's sources/build metadata. Record what is known and any unproven cause.
-- [x] Produce `docs/superpowers/specs/2026-09-16-settings-control-inventory.md` with every field in section 4; include conditional controls, device-specific actions, dialogs, and exit/back behavior.
-- [x] Trace complete navigation and focus ownership from app entry through parental controls, loading, dialogs, search, and return. Record competing requests and their removal plan.
-- [x] Mark prior design/validation records as rejected or historical; do not reuse their checked boxes as evidence.
-
-### B. Build the visual foundation
-
-- [x] Implement `SettingsDesignTokens.kt` and shared semantic state colours. Remove duplicated per-screen dimensions and inherited input defaults.
-- [x] Bridge TV Material and standard Material themes from the same palette. Cover Classic blue, M3 purple, and Light, including theme changes in place.
-- [x] Apply identical semantic surface roles to overview/detail rows and all nested workflows; review Live TV/Browsing layout pairs in every theme. Remove per-page colours, duplicated headings, and stacked top insets.
-- [x] Implement list group, choice row, toggle row, action row, status row, header, text field, and dialog primitives with the section 3 contracts.
-- [x] Add palette contrast tests and component preview fixtures for all text/control states. Verify placeholder, entered text, cursor, selection, error, disabled explanation, and focus explicitly.
-
-### C. Replace navigation and focus ownership
-
-- [x] Implement typed Settings locations, return points, and per-page scroll state. Use stable IDs; retain compatibility for backup-import and provider/parental entry points.
-- [x] Build the self-contained Settings shell and compact root/detail layout, including a real return route to the app.
-- [x] Add persistent on-screen Back to every nested page. Verify Playback → General playback → Back to Playback restores the General playback row, with identical remote/system Back behavior and a reachable header from the first row.
-- [x] Implement the single focus coordinator with attachment-aware transitions and stale-request cancellation. Remove competing delayed entry requests.
-- [x] Integrate parental category management into this shell. Loading, PIN validation, filter changes, and save/reset actions must follow the same focus policy.
-- [x] Add non-device tests for navigation transitions, return points, removed targets, and restoration. Write complete app-route connected regression cases now; do not execute them yet.
-
-### D. Migrate the entire Settings surface
-
-- [x] Migrate Playback and Live TV first; prove each control in their inventory still uses the original persistence/action path.
-- [x] Migrate Movies & series and Appearance & remote, including all remote profiles and conditional grouping/variant behavior.
-- [x] Migrate Sources & guide, including provider editing, combined sources, sync/cancel/error states, guide assignment/policies, and parser compatibility.
-- [x] Migrate Privacy & parental end to end, including protected/hidden categories, PIN states, incognito, and destructive-history confirmation.
-- [x] Migrate Recordings and Backup & restore, including progress, storage permissions/unavailability, USB conditions, Drive states, preview/conflict flows, and confirmations.
-- [x] Migrate About & support, including update download/install state, diagnostics, project links, and close app.
-- [x] Remove rejected navigation cards/section layout paths once their replacements cover the inventory. Do not retain old UI as hidden fallbacks.
-
-### E. Implement search and adaptive behavior
-
-- [x] Build one catalog-backed search surface with label, alias, and owning-section matching. Search selects existing controls; it does not duplicate preference logic.
-- [x] Implement target navigation, scrolling, focus, query/result restoration, clear query, and no-results behavior. Exclude unavailable actions; explain disabled prerequisites.
-- [x] Implement TV select-to-edit, keyboard exit, mouse/touch activation, and field focus ownership. Add regression cases for the black-on-dark placeholder and typed text.
-- [x] Complete compact root/detail navigation, narrow input handling, RTL directions, long translations, and text scaling without truncating essential labels/values.
-- [x] Translate new navigation and help copy into shipped locale packs; no English-only navigation gap accepted as finished.
-
-### F. Finish review and all non-device checks
-
-- [x] Complete and review the production Compose preview sheets in section 7. Correct excessive whitespace, oversized cards, dense text, inconsistent baseline alignment, and mismatched states.
-- [x] Run `./gradlew.bat :core:ui:testDebugUnitTest :feature:settings:testDebugUnitTest :app:testDebugUnitTest` and resolve failures relevant to changed shared UI/navigation.
-- [x] Run `./gradlew.bat :feature:settings:verifyFeatureSettingsBoundary :app:assembleDebug :feature:settings:assembleDebugAndroidTest :app:assembleDebugAndroidTest`. Build tests without installing or executing them.
-- [x] Add connected coverage for every transition in section 5, including app → Settings → parental controls → loading/PIN → Back. Do not substitute component-only focus tests for full-route tests.
-- [x] Review the completed change against every inventory entry and section 9 criterion; record code/host-test/preview evidence and any final-device-only checks separately.
-- [x] Verify all implementation boxes A–F are complete, record the exact build/source identity for final verification, and prepare one scripted device verification pass. No manual discovery sessions on the emulator.
-
-**Final verification identity (2026-09-17):** Git HEAD `952cd6ca76bbad69e77a0b4cb9b102853ca65ba3` on `feature/improveSettings`; 91 changed or untracked source files under `app`, `core`, and `feature` produce SHA-256 manifest `49880E40FF13986512C64A28905DC3692A01242C8A070388B5E2ED8F3FD006D3`. The final APKs are `app-debug.apk` (`A875BE7114DEADC80649D9FDCBF1F3CCA20EBD9EA02F76401D913B6BB380824A`), `app-debug-androidTest.apk` (`4539053FA50BD7C406DB9BE426C444C3088ABDAF3E77252C96FF5985E99FB6D0`), and `settings-debug-androidTest.apk` (`6A9D08E6C4EEF520781E38225AA5EE81E1C7D08677472BCDF997F0A168D36D2B`). The app identity is `com.streamvault.app.debug`, version `1.0.17.1-debug` (`19`).
-
-`tools/validate-settings-redesign.ps1` is the sole prepared device pass. It requires one explicitly selected online device, records device/build/source identity, installs those exact APKs, runs the Settings behavior/row/route suites and app navigation contract suite, opens the production Settings route directly, verifies focus and Back restoration across every category and representative detail page, verifies typed search/result/return, captures PNG/XML/focus/log evidence, and fails on instrumentation or fatal-process evidence. It changes no destructive user data. Compact-device acceptance remains a separately reported final-device condition because this machine currently has only an Android TV system image; a resized TV surface must not be misreported as phone evidence.
-
-### TV Guide polish follow-up (2026-09-17)
-
-- [x] Give EPG source fields a visible resting outline, readable placeholder/entered text, a 56dp interaction target, and theme-derived cursor/focus colors.
-- [x] Make EPG field editing dismissible from touch/mouse keyboard Back, TV Back, the IME Done action, and a Back key event without navigating away from Settings.
-- [x] Replace the time-shift card's inherited text/chip colors with the shared Settings semantic roles; provider labels and disabled/reset states remain readable in every palette.
-- [x] Add unit coverage for EPG field Back ownership and pass settings/core UI tests plus app and Android-test assembly.
-- [ ] Re-run the single final device verification pass after all implementation changes; no development ADB session is used for this follow-up.
-
-## 9. Acceptance contract
-
-**Required standard: good enough to be accepted by Google's top UI reviewer.** The following are mandatory pass/fail gates, not a points system where one success compensates for a defect.
-
-| Gate | Pass requirement | Automatic rejection examples |
-|---|---|---|
-| Legibility | Project target: at least 4.5:1 for all informative text, including placeholders and values, against its actual composited background; at least 3:1 for meaningful boundaries/focus indicators | Black-on-dark search text; unreadable typed/selected text; explanation rendered as barely visible disabled text |
-| Hierarchy and sizing | Section 3 tokens used consistently; titles, labels, values, help, and actions have distinct roles | Giant generic cards, arbitrary margins, repeated title/subtitle blocks, tiny text used to force density |
-| Alignment and density | Stable leading/trailing alignment; stated TV visible-row targets met at reference size; no avoidable blank bands | A handful of ordinary preferences consume several screens through padding alone |
-| Navigation | Every section/page/modal has a deterministic entry and return target; all section 5 transitions pass | Opening parental controls or any other Settings page focuses Home |
-| Visible return path | Every nested page retains a visible Back button; Playback → General playback → Back restores Playback and its General playback row | Remote-only return; missing/scrolled-away Back; button exits Settings instead of returning to the parent |
-| Focus feedback | One visible focus owner, clear distinction from selection, no clipping, no jumps after loading/recomposition | Focus disappears, moves after the user starts navigating, or lands on a non-actionable status |
-| Search | Empty and typed text readable in all themes; results reach and focus the actual setting; keyboard and Back behave predictably | A search field repeated across every page; focus lost after query/results change |
-| Task efficiency | Common tasks take at most three activations from Settings root; no empty overview hop; groups match user intent | Users hunt through unrelated Playback/Browsing options or traverse cosmetic intermediary pages |
-| Functional parity | Every inventory row has a reachable control/state, preserved callback/key, and an evidence entry | Omitted USB/Drive/remote/parental/advanced action; hidden unavailable option without explanation |
-| Accessibility | 48dp minimum touch targets, one switch target, correct role/state/value semantics, sensible reading order | Label and control announce conflicting state; only colour communicates focus or failure |
-| Adaptation | No clipping/overlap in actual TV, compact, enlarged-text, long-label, or RTL compositions | Narrow layout consumes all height with navigation; value obscures switch; mirrored Back points wrong way |
-| Visual coherence | One reviewed component language across regular settings, provider/backup objects, progress, errors, and dialogs | Old and new row styles mixed across tabs; modal looks like an unrelated app |
-| Theme continuity | All surfaces and states derive from the active theme; overview/detail pairs use matching roles and update together | Grey Live TV menu becomes an unrelated blue Browsing layout panel; stale or hard-coded control colours |
-| Minimal composition | One page title within the local header; single outer inset; compact useful content follows within 16dp | Large empty navbar-to-title band, repeated Browsing layout heading/description, decorative panels that force needless scrolling |
-| Honesty of completion | Evidence covers real production routes and exact final build; reported gaps are not silently called passes | Build success, callback counts, or one screenshot presented as design acceptance |
-
-Normal text and touch-target minimums are grounded in [Android accessibility guidance](https://developer.android.com/guide/topics/ui/accessibility/apps). The all-informative-text 4.5:1 rule is this project's stricter target. TV hierarchy and readability follow [Android TV typography guidance](https://developer.android.com/design/ui/tv/guides/styles/typography); explicit focus states follow [Android TV focus guidance](https://developer.android.com/design/ui/tv/guides/styles/focus-system). Passing these measurable checks supports, but does not replace, a critical visual/task-flow review.
-
-## 10. Final verification stage — only after section 8 is complete
-
-This is the only ADB/device stage after development begins; bounded baseline inspection during planning is separately allowed above. It is one consolidated verification session, not one shell command. Do not mark its acceptance results before it runs.
-
-1. Verify build/source identity, install the final build, and run the prepared Settings and app-route connected tests. Start with the exact reported failures: empty search text, typed search text, page entry, and parental controls.
- Include Playback → General playback → visible Back and remote Back, confirming the restored opener; Live TV → Browsing layout, confirming matching theme roles; and the complete shell, confirming removal of the excessive top gap. Ordinary forward navigation must focus the first enabled content row while keeping Back visible and reachable.
-2. Execute a predetermined route matrix covering every section, every modal family, search result navigation/return, conditional controls, provider loading/error, recording/storage states, backup restore/Drive, and update progress. Record exact focus targets, not just visible screens.
-3. Inspect representative full compositions in all three themes, 720p/1080p TV, a genuine compact-device configuration, larger text, and RTL/long labels. Do not count a letterboxed TV emulator as phone evidence.
-4. Verify representative changes persist after restart and old backup data still maps to the same settings. Restore temporary test changes. Do not perform destructive operations on real user data.
-5. Save a compact contact sheet and focused evidence for the search states, parental entry/return, main sections, and responsive/theme variants. Review every acceptance gate against this evidence.
-6. If any gate fails, report the concrete failure and reopen the responsible implementation items. Fix them before any targeted re-verification; do not keep exploratory ADB sessions running. Never declare success because the verification stage was reached.
-7. Only after the design and interaction gates pass, update public screenshots, changelog, and a new acceptance report. Previous reports remain historical and explicitly rejected as design acceptance.
-
-No live-playback fix is included. If implementation unexpectedly requires a playback-engine change, stop that scope expansion and apply the repository's separate live-playback validation requirements; Settings screenshots cannot prove stream health.
-
-## 11. Completion rule
-
-Implementation boxes describe work completed. Acceptance describes the quality actually observed. They are separate records.
-
-Do not say the redesign is complete while any contrast failure, focus regression, missing function, broken layout, localization gap, or unverified production-route behavior remains. Do not ask the user to accept an organized version of the rejected design. Deliver the replacement and its evidence against the stated review bar.
diff --git a/docs/superpowers/plans/2026-09-16-settings-validation.md b/docs/superpowers/plans/2026-09-16-settings-validation.md
deleted file mode 100644
index 20a22134..00000000
--- a/docs/superpowers/plans/2026-09-16-settings-validation.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# Settings redesign validation
-
-> **Historical checks; design acceptance rejected.** The user reported unreadable search text, poor sizing/spacing, and focus jumping to Home when opening Settings pages. The test/build results below did not establish an acceptable complete experience. They must not be used to sign off the replacement design. See [the replacement plan](2026-09-16-settings-redesign-replacement.md).
-
-## Result
-
-The debug app builds and is installed on the Android TV emulator. All 42 settings unit tests and all 18 connected tests pass. The settings module boundary check also passes.
-
-Command:
-
-```powershell
-.\gradlew.bat :feature:settings:testDebugUnitTest :feature:settings:connectedDebugAndroidTest :app:assembleDebug
-```
-
-## Structure and behavior
-
-- Ten clear categories replace the Browsing catch-all with Live TV, Movies & Series, and App & Remote.
-- Playback has seven focused pages. Live TV has six, Movies & Series three, and App & Remote three. Recording, backups, and support also have dedicated pages.
-- Source compatibility moved from Privacy to Providers. Close app moved from the crowded top bar to About → App information.
-- Comparison against the original renderers retained all 46 Playback and all 29 Browsing preference/action handlers. Stored preferences, backup schema, and playback engine code were not changed.
-- Independent review found two navigation problems, both fixed: overview scroll/focus restoration on Back, and inconsistent compact-layout breakpoints.
-
-## Emulator walkthrough
-
-Device: Television_1080p, Android 16, 1920 × 1080.
-
-- Opened Settings and navigated rail → Playback → Audio using D-pad.
-- Opened Audio Output, dismissed it with Back, and verified focus returned to its row.
-- Enabled A/V sync adjustment: the dependent default-offset row appeared and focus stayed on the switch. Restored the original disabled value afterward.
-- Scrolled Playback to Advanced compatibility, entered it, then pressed Back. The overview retained its scroll position and focus returned to the same card.
-- Inspected Live TV overview and Channel list & guide, plus Movies & Series overview. Verified readable rows and full-width navigation cards.
-- Inspected app runtime errors and settings focus warnings for the running process; none were reported.
-
-Screenshots:
-
-- [Playback overview](../../images/Settings.png)
-- [Audio detail](../../images/Settings-audio.png)
-- [Live TV overview](../../images/Settings-live-tv.png)
-- [Movies & Series overview](../../images/Settings-movies.png)
-
-## Connected test coverage and limits
-
-Connected tests cover existing D-pad and RTL navigation, dialogs, backup behavior, single-target switch semantics and keyboard activation, disabled actions, long labels at 300dp, and content visibility in a constrained 590dp layout.
-
-This is settings validation, not a live-stream playback validation. No playback engine changes were made. A physical phone, full light-theme/large-font visual matrix, and every provider/backup workflow were not exercised manually. New navigation copy currently falls back to English outside the base locale; existing setting translations remain in place. Attempting portrait sizing on the TV emulator produced a constrained TV window, so that capture is not treated as phone validation. Emulator display overrides were restored.
diff --git a/docs/superpowers/specs/2026-08-17-player-input-policy-design.md b/docs/superpowers/specs/2026-08-17-player-input-policy-design.md
deleted file mode 100644
index 2f6574fe..00000000
--- a/docs/superpowers/specs/2026-08-17-player-input-policy-design.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# Player Input Policy Design
-
-**Date:** 2026-08-17
-
-**Phase:** Phase 1 — source decomposition without behavior change
-
-## Decision
-
-Extract the root player key-routing decisions from `PlayerScreen.kt` into a
-platform-free `PlayerInputPolicy.kt`. The policy receives an immutable snapshot
-of the state that currently gates the root handlers and returns a typed action
-plus whether the existing `onLiveOverlayInteraction()` callback must run first.
-`PlayerScreen.kt` remains the owner of Compose state, `PlayerViewModel`, focus,
-pointer input, Back execution, and all side effects.
-
-The Android `KeyEvent` to policy-key conversion stays at the screen boundary in
-a small adapter. This keeps Android constants out of the policy and allows the
-decision rules to be unit-tested with ordinary Kotlin values.
-
-## Invariants
-
-- Preserve the separate `onPreviewKeyEvent` and `onKeyEvent` phases.
-- Preserve action-down-only handling and the existing `notifyUserActivity()` call
- before every handled key decision.
-- Preserve preview priority: live channel-up/down zapping runs only when no
- blocking overlay/dialog is active; channel-info without its sub-panel may still
- receive the interaction callback before zapping.
-- Preserve modal key behavior: Back closes audio/video offset, speed, variant,
- or timer/track state in the existing order; directional/center keys pass to the
- dialog; unrelated keys are consumed.
-- Preserve every center, directional, media, guide/info/menu, channel, previous,
- mute, and numeric-key branch, including RTL and catch-up conditions.
-- Preserve callback order: `onLiveOverlayInteraction()` is executed before the
- selected player command, exactly as in `PlayerScreen.kt`.
-- Do not move or redesign `PlayerBackNavigationPolicy`; default Back continues
- through the existing `handleBackPress()` mapping.
-- Do not introduce Phase 2 modal state, navigation contracts, ViewModel APIs, or
- behavior changes.
-
-## Policy model
-
-`PlayerInputState` contains only values needed by the two current handlers:
-content type, catch-up/RTL flags, countdown and modal visibility, live overlay
-visibility, channel-info sub-panel state, controls state, numeric-input state,
-and episode-picker eligibility.
-
-`PlayerInputKey` is a platform-free sealed value with fixed keys and
-`Digit(value)` for numeric input. `playerPreviewInputDecision()` returns
-`PASS`, `PLAY_NEXT`, or `PLAY_PREVIOUS`, with the existing overlay-interaction
-flag. `playerInputDecision()` returns typed commands such as `OPEN_EPG`,
-`OPEN_CHANNEL_LIST`, `SEEK_FORWARD`, `TOGGLE_CONTROLS`, `SHOW_EPISODES`,
-`TOGGLE_PLAYBACK`, `TOGGLE_MUTE`, `INPUT_NUMERIC_DIGIT`, and the modal dismissal
-commands. `PASS` means the modifier returns `false`; `CONSUME` means it returns
-`true` without a ViewModel/state mutation.
-
-## Verification
-
-Add unit tests for preview blocking/RTL-independent zapping, modal Back and
-directional pass-through priority, center numeric/live behavior, RTL channel/EPG
-mapping, seek behavior, episode-picker eligibility, media/guide/info/menu,
-channel previous, mute repeat handling, and numeric digits. Then run the focused
-policy tests, app unit tests, compile, structural checks, graph refresh, and the
-existing player validation gates.
diff --git a/docs/superpowers/specs/2026-08-17-player-modal-host-design.md b/docs/superpowers/specs/2026-08-17-player-modal-host-design.md
deleted file mode 100644
index c1423f38..00000000
--- a/docs/superpowers/specs/2026-08-17-player-modal-host-design.md
+++ /dev/null
@@ -1,261 +0,0 @@
-# Player Modal Hosts Design
-
-**Date:** 2026-08-17
-
-**Phase:** Phase 1 — source decomposition without behavior change
-
-**Parent plan:** [`COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`](../../COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md)
-
-## Decision summary
-
-Extract the nine existing player-dialog call sites from `PlayerScreen.kt` into `PlayerModalHosts.kt` while preserving their current composition placement, order, predicates, state ownership, callback order, ViewModel scope, Back behavior, focus behavior, navigation behavior, and Picture-in-Picture behavior.
-
-The file will contain two internal composable hosts rather than one host moved to a new common location:
-
-- `PlayerTopLevelModalHost` contains `ProgramHistoryDialog` and `MultiViewPlannerDialog` and is invoked at their current top-level position before the root player `Box`.
-- `PlayerControlsModalHost` contains the remaining seven call sites and is invoked at their current position inside the root player `Box`, after `PlayerResumePrompt` and before diagnostics/live overlays.
-
-This placement-preserving split is intentionally safer than the parent plan's conceptual single `PlayerDialogHost`. The hosts may be consolidated after Phase 2 introduces explicit mutually exclusive modal state and validates the resulting composition-order change. Phase 1 will not make that state or ordering change.
-
-## Alternatives considered
-
-1. **Two placement-preserving hosts in one file — selected.** This extracts the responsibility without moving either dialog group across the root player `Box` or `PlayerResumePrompt`. Its temporary cost is two callback-heavy host APIs.
-2. **One host at the controls-dialog location.** This is visually simpler, but it moves program history and MultiView into the root player `Box` and changes their ordering relative to `PlayerResumePrompt`.
-3. **One host at the current top-level location.** This moves all controls-related dialogs out of the root player `Box` and changes their ordering relative to the prompt and overlays.
-4. **Introduce explicit modal state and then use one host.** This is the preferred eventual shape, but it changes state representation and exclusivity and therefore remains Phase 2 work.
-
-## Goal
-
-Make player modal rendering a clearly located presentation responsibility so later state isolation and `:feature:playback` extraction are easier to review, without changing runtime behavior in this slice.
-
-Success means that a reviewer can map every old dialog invocation to one new invocation with the same data, predicate, order, and callback body. Reducing line count is secondary to preserving behavior.
-
-## Current context
-
-`PlayerScreen.kt` currently owns the player coordinator, modal state, lifecycle and Picture-in-Picture handling, Back handling, input routing, focus restoration, controls auto-hide policy, overlay composition, and nine dialog call sites representing eight dialog types:
-
-1. `ProgramHistoryDialog`
-2. `MultiViewPlannerDialog`
-3. `PlayerTrackSelectionDialog`
-4. `ChannelVariantSelectionDialog`
-5. `PlayerSpeedSelectionDialog`
-6. `PlayerSleepTimerDialog` for stop playback
-7. `PlayerSleepTimerDialog` for idle standby
-8. `PlayerAudioVideoOffsetDialog`
-9. `PlayerEpisodeSelectionDialog`
-
-The first two are composed before the root player `Box`. The remaining seven are composed inside that `Box`. `PlayerResumePrompt` is a full-screen in-content prompt between those groups, not one of the extracted dialog call sites.
-
-Multiple modal booleans can currently be true at the same time. Phase 2 will replace that representation with explicit modal state; Phase 1 must preserve the current possibility, source order, Back priority, and resulting presentation behavior.
-
-## Architecture and ownership
-
-Create:
-
-```text
-app/src/main/java/com/streamvault/app/ui/screens/player/PlayerModalHosts.kt
-```
-
-Both hosts are `internal` and presentation-only. Their inputs are read-only values and narrow callbacks copied from the existing call sites.
-
-The hosts must not:
-
-- Receive `PlayerViewModel`, `NavController`, `MainActivity`, a player engine, or mutable state holders.
-- Read flows, create `remember` state, launch effects, install a `BackHandler`, or mutate `PlayerScreen` state.
-- Compute navigation destinations or call navigation directly.
-- Change modal exclusivity, dismissal policy, focus restoration, controls auto-hide behavior, or overlay priority.
-- Introduce a sealed modal type, grouped modal state, route contract, new ViewModel API, or new dependency.
-
-`MultiViewViewModel` is the one explicit dependency-injection exception. `PlayerTopLevelModalHost` obtains it with `hiltViewModel()` only inside the existing `showSplitDialog && currentChannel != null` branch and passes it to `MultiViewPlannerDialog`. This preserves lazy creation and the current `ViewModelStoreOwner`; it must not be hoisted into `PlayerScreen` or created when the dialog is absent.
-
-All modal booleans and `showTrackSelection` remain owned by `PlayerScreen`. The following also remain in `PlayerScreen` unchanged:
-
-- `anyOverlayVisible` and its focus-restoration effect.
-- Controls auto-hide inputs and effect keys.
-- `PlayerBackNavigationState`, `playerBackAction`, and the existing action-to-mutation mapping.
-- Root pointer/key interception while a modal is active.
-- Modal-opening callbacks supplied to controls and live overlays.
-- Audio/video-sync disabling cleanup.
-
-## Exact composition placement and order
-
-`PlayerTopLevelModalHost` replaces only the current contiguous top-level block. It remains after live-variant observation and before player preparation identity/effects. Within the host, composition order is:
-
-1. `ProgramHistoryDialog`
-2. `MultiViewPlannerDialog`
-
-`PlayerControlsModalHost` replaces only the current contiguous dialog block inside the root player `Box`. It remains after `PlayerResumePrompt` and before diagnostics and live overlays. Within the host, composition order is:
-
-1. `PlayerTrackSelectionDialog`
-2. `ChannelVariantSelectionDialog`
-3. `PlayerSpeedSelectionDialog`
-4. Stop-playback `PlayerSleepTimerDialog`
-5. Idle-standby `PlayerSleepTimerDialog`
-6. `PlayerAudioVideoOffsetDialog`
-7. `PlayerEpisodeSelectionDialog`
-
-No dialog call may move across `PlayerResumePrompt`, the root player `Box`, diagnostics, or live-overlay composition during this phase. Parameter evaluation must also remain at the equivalent call-site scope; presentation strings may be passed into a host after evaluation with the same resources and fallbacks.
-
-## Visibility contract
-
-The hosts preserve these exact predicates:
-
-| Dialog | Required visibility predicate |
-|---|---|
-| Program history | `!isInPictureInPictureMode && showProgramHistory` |
-| MultiView planner | `showSplitDialog && currentChannel != null` |
-| Track selection | Host is outside PiP and `showTrackSelection != null` remains interpreted by the existing dialog |
-| Channel variant selection | Host is outside PiP; pass `showVariantSelection` and `currentChannel` unchanged |
-| Playback speed | Host is outside PiP; pass `showSpeedSelection` unchanged |
-| Stop-playback timer | Host is outside PiP; pass `showStopPlaybackTimerDialog` unchanged |
-| Idle-standby timer | Host is outside PiP; pass `showIdleStandbyTimerDialog` unchanged |
-| Audio/video offset | Host is outside PiP and `visible` remains `showAudioVideoOffsetDialog && audioVideoSyncEnabled && castConnectionState != CastConnectionState.CONNECTED` |
-| Episode selection | Host is outside PiP; pass `showEpisodePicker` unchanged |
-
-MultiView is intentionally **not** newly hidden in Picture-in-Picture mode. That is the current behavior. Changing it, even if desirable, requires a separately scoped behavior proposal and is prohibited here.
-
-Visibility booleans must not be cleared merely because Picture-in-Picture or another eligibility condition temporarily prevents composition. Phase 1 preserves the existing state lifetime and cleanup behavior.
-
-## Data and callback contract
-
-Every host parameter maps directly to an existing dialog argument. Do not replace narrow callbacks with a feature-wide action type in this phase.
-
-The following data expressions must remain equivalent:
-
-- Program history receives `programHistory`.
-- MultiView receives the non-null `currentChannel` as `pendingChannel`.
-- Track selection receives the current track type, audio tracks, subtitle tracks, video qualities, and live-translation availability/activity values.
-- Variant selection receives `currentChannel`.
-- Speed selection receives `playbackSpeed`.
-- Timer dialogs receive their existing resource titles and the corresponding stop/idle selected minutes.
-- Audio/video offset receives `audioVideoOffsetState` and `canSaveChannel = currentChannel != null`.
-- Episode selection preserves `currentSeries?.name ?: playbackTitle.ifBlank { title }`, `currentSeriesSeasons.orEmpty()`, `currentEpisode?.id ?: internalChannelId`, and `currentEpisode?.seasonNumber ?: seasonNumber`.
-
-Callbacks passed from `PlayerScreen` preserve these exact orders:
-
-| Interaction | Required callback order |
-|---|---|
-| Select program history item | Play catch-up, then clear `showProgramHistory` |
-| Dismiss program history | Clear `showProgramHistory` |
-| Launch MultiView | Clear `showSplitDialog`, hand off playback, then invoke navigation to `Routes.MULTI_VIEW` |
-| Dismiss MultiView | Clear `showSplitDialog` |
-| Select subtitle | Deactivate live translation, then select the subtitle track |
-| Select live translation | Clear the selected subtitle track, then activate live translation |
-| Select stop-playback timer | Notify user activity, set the timer, then clear its dialog flag |
-| Select idle-standby timer | Notify user activity, set the timer, then clear its dialog flag |
-| Dismiss audio/video offset | Clear its dialog flag, then dismiss the preview |
-| Select episode | Clear `showEpisodePicker`, then start episode playback |
-
-All remaining method references and dismiss callbacks are passed through unchanged. The extraction must not add automatic dismissal after audio, video, variant, speed, offset-save, or offset-reset callbacks unless the current dialog or ViewModel already performs it.
-
-## Back, focus, and input invariants
-
-This extraction does not move or rewrite Back, focus, or input policy.
-
-- `BackHandler(enabled = !resumePrompt.show)` remains in `PlayerScreen`.
-- `PlayerBackNavigationState` receives the same modal inputs in the same priority order.
-- Closing audio/video offset from Back still clears the flag before dismissing the preview.
-- `anyOverlayVisible` contains the same modal terms and continues to gate root focus and pointer handling.
-- Controls auto-hide observes the same modal keys and conditions.
-- Dialog-specific focus requesters and key handling remain inside their existing dialog implementations.
-
-The new hosts must not wrap dialogs in focus groups, key handlers, additional layout containers, animations, or semantics nodes.
-
-## Error handling and nullability
-
-No new error state is introduced.
-
-- A null `currentChannel` suppresses the MultiView dialog without clearing `showSplitDialog`, matching current behavior.
-- Existing nullable track type, channel, series, season, episode, and title fallbacks are preserved.
-- The host does not catch callback exceptions or reorder actions to compensate for them; existing failure behavior remains unchanged.
-
-## Verification and acceptance gates
-
-### Mechanical review
-
-- Compare the before/after diff and account for all nine old call sites and all nine new call sites.
-- Confirm only imports and the two contiguous dialog blocks moved; state declarations, effects, Back/input logic, modal-opening callbacks, and dialog implementations remain unchanged.
-- Confirm host call placement and internal call order match this document.
-- Confirm every argument expression and callback body is textually identical or demonstrably equivalent.
-- Run `git diff --check`.
-
-### Automated checks
-
-Run from the repository root:
-
-```powershell
-.\gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain
-.\gradlew.bat :app:testDebugUnitTest --no-daemon --console=plain
-.\gradlew.bat :app:lintDebug --no-daemon --console=plain
-```
-
-Run the existing player/instrumentation and golden coverage on the Television 1080p emulator. If the complete connected suite cannot run because of an external environment failure, record the exact command, failing infrastructure condition, and the narrower successful checks; do not report the acceptance gate as passed.
-
-No new production abstraction solely for testing is required in this mechanical slice. If focused host tests can use the existing Compose test infrastructure without changing dialog behavior, add coverage for:
-
-- Program history hidden in PiP.
-- MultiView retaining its current non-PiP-gated predicate.
-- The composite audio/video-offset predicate.
-- Callback ordering for program selection, MultiView launch, timer selection, audio/video-offset dismissal, subtitle/live-translation selection, and episode selection.
-
-### Manual functional smoke test
-
-On a TV emulator or device, verify:
-
-- Player launch and normal playback.
-- Controls open/close and auto-hide.
-- Remote Back priority and focus restoration.
-- Program history open, dismiss, and selection.
-- MultiView planner open, dismiss, and launch.
-- Track, variant, speed, both timer, audio/video-offset, and episode dialogs where applicable.
-- Picture-in-Picture entry/exit, including program-history suppression and no newly introduced MultiView rule.
-- Cast-connected suppression of audio/video offset where applicable.
-
-Record unavailable scenarios explicitly; an untested scenario is not a pass.
-
-### Full player and Live TV validation
-
-Because dialog composition moves, this change is not merge-ready until the repository's full player protocol passes:
-
-- Validate more than one live channel.
-- Capture at a 2-second cadence for at least 45 screenshots over roughly 90 seconds; prefer 61 screenshots over roughly two minutes.
-- Confirm changing screenshot hashes throughout the full window.
-- Confirm the media session remains `PLAYING` with `error=null`.
-- Confirm logs contain no fatal player error, stuck-player timeout, or unintended MPEG-TS fallback.
-- Record sanitized HLS prepare/read/first-frame or expected recovery evidence.
-- Report channel names, screenshot count, interval, unique hash count, media-session result, and log findings.
-
-Build, installation, launch, a single screenshot, or one live channel is not sufficient validation.
-
-### Documentation and graph
-
-- Update the Phase 1 status in the parent plan only after the applicable gates pass.
-- Run `graphify update .` after Kotlin source changes. Documentation-only edits do not require claiming that the implementation graph is current.
-
-## Rollback
-
-Keep the extraction as a standalone, history-preserving change where practical. Rolling back `PlayerModalHosts.kt` and restoring the two original contiguous blocks must restore the prior composition without data, state, ViewModel API, or navigation migrations.
-
-Do not combine this extraction with playback fixes, modal-state cleanup, visual changes, or dependency movement.
-
-## Non-goals and future-phase boundary
-
-- No new dialog behavior or corrected modal behavior, including no new MultiView PiP restriction.
-- No modal exclusivity enforcement or sealed `PlayerModal`/`PlayerDialogState`.
-- No state grouping, state-frequency isolation, or relocation from `PlayerScreen`.
-- No route/screen split, navigation contract, or feature-module extraction.
-- No change to player preparation, recovery, timeshift, surface ownership, lifecycle, or window behavior.
-- No ViewModel API or dependency changes other than imports required by the file move.
-- No baseline-profile work and no changes to PR #162.
-
-Those items remain governed by their existing later phases in the parent plan.
-
-## Definition of done
-
-This slice is complete only when:
-
-- Both placement-preserving hosts exist in `PlayerModalHosts.kt` and all nine call sites have moved.
-- The visibility, ordering, data, callback, Back, focus, input, ViewModel-scope, and nullability contracts above are preserved.
-- No future-phase state or navigation design has been introduced.
-- Mechanical review, compile, unit, lint, applicable instrumentation/golden checks, manual smoke testing, and full multi-channel Live TV validation have passed or are explicitly reported as incomplete blockers.
-- The parent plan describes the same Phase 1 boundary and does not claim completion prematurely.
diff --git a/docs/superpowers/specs/2026-08-21-phase2-runtime-state-isolation-design.md b/docs/superpowers/specs/2026-08-21-phase2-runtime-state-isolation-design.md
deleted file mode 100644
index 15040646..00000000
--- a/docs/superpowers/specs/2026-08-21-phase2-runtime-state-isolation-design.md
+++ /dev/null
@@ -1,171 +0,0 @@
-# Phase 2 Runtime State Isolation Design
-
-**Date:** 2026-08-21
-
-**Phase:** Phase 2 — runtime state isolation
-
-**Parent plan:** [`COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`](../../COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md)
-
-## Decision summary
-
-Complete Phase 2 as a behavior-preserving runtime-boundary pass. The work will reduce the amount of state observed by the `PlayerScreen` composition root, make modal state explicitly mutually exclusive, consolidate channel-clock production, finish the hot lazy-list audit, and record compiler/runtime evidence against the Phase 0 baseline.
-
-The work will remain inside the existing `:app` module. It will not introduce feature modules, change playback recovery, migrate surfaces to Views, or change the product UI. The Phase 2 result is a better-measured and more isolated Compose tree that is safe to use as the input to later module extraction.
-
-## Purpose and success criteria
-
-The modernization plan treats Compose reduction as an architecture and measurement problem rather than a source-count problem. Phase 1 split large files without changing ownership. Phase 2 must now make high-frequency state local to the consumer that renders it, so changes such as playback position, a 30-second channel-progress tick, or conditional diagnostics do not invalidate unrelated player or list content.
-
-Phase 2 is successful only when all of the following are true:
-
-1. Player state is grouped by consumer and frequency, with position and duration remaining inside the transport subtree.
-2. Player modal visibility has one explicit active representation while preserving the existing placement and callback behavior of the two modal hosts.
-3. Channel progress uses one shared clock source, collected by list/screen owners rather than independently by every card.
-4. The identified Home, EPG, media-shelf, player, and dialog lazy lists have stable keys and `contentType` values where the list contains dynamic or mixed content.
-5. Compiler reports identify the remaining unstable UI arguments and the implementation documents which ones were intentionally isolated or converted rather than silenced with blanket annotations.
-6. Available compiler, build, unit, and benchmark evidence is compared with Phase 0. Device playback evidence is reported separately and remains an incomplete gate when `adb` or a stable provider stream is unavailable.
-
-## Scope
-
-### In scope
-
-- `PlayerScreen` state-collection boundaries and consumer-specific host composables.
-- Player modal-state representation and its pure transition/query behavior.
-- Shared channel-progress clock ownership for dashboard, Home, search, and reusable channel cards.
-- Stable lazy-list keys and `contentType` for the Phase 2 hot-list audit.
-- Targeted immutable presentation models where a compiler hotspot is both high-frequency and materially larger than its rendering contract.
-- Unit tests for pure state transitions, progress calculation, and presentation-model mapping.
-- Compose compiler report comparison, incremental compile comparison, and available macrobenchmark evidence.
-- Graph refresh after Kotlin source changes.
-
-### Out of scope
-
-- Player preparation, recovery, timeshift, Media3 engine behavior, or stream selection policy.
-- A new Gradle module or navigation contract.
-- A full XML/View migration.
-- Blanket `@Stable` or `@Immutable` annotations on domain/data classes.
-- A global `CompositionLocal` for all player or channel state.
-- Moving modal call sites across the root player `Box`, `PlayerResumePrompt`, diagnostics, or live overlays.
-- Claiming full Phase 2 exit without the repository's multi-channel live-playback protocol.
-
-## Architecture
-
-### Player state boundaries
-
-`PlayerScreen` remains the route/coordinator. It keeps state required for route preparation, lifecycle/window effects, root input and Back decisions, focus policy, player surface binding, and error/recovery presentation. It should no longer collect every flow needed by a nested consumer merely because that consumer is rendered from the same root.
-
-The player tree will use these boundaries:
-
-```text
-PlayerScreen
- route/session + lifecycle state
- root input/back/focus policy
- PlayerRenderView
- root error/notice/resolution presentation
- PlayerControlsOverlayHost
- transport controls state
- position + duration
- control-only realtime values
- PlayerControlsModalHost
- modal-dependent track/timer/episode state
- PlayerLiveOverlayHost
- channel/category/EPG overlay state
- live overlay focus and content
- PlayerDiagnosticsHost
- diagnostics state collected only while visible
-```
-
-The hosts may receive the existing `PlayerViewModel` or narrow callbacks where that is already the established package pattern, but their public state contracts must be small and consumer-specific. A host must not create a second player engine or alter ViewModel scope. Duplicate collection of a hot `StateFlow` is acceptable only when it keeps ownership local and avoids passing a broad aggregate state through the root; cold work and transformations must not be duplicated.
-
-High-frequency values remain leaf-local:
-
-- `currentPosition` and `duration` are collected by `PlayerControlsOverlayHost`.
-- Diagnostics stats are collected only inside a visible diagnostics host.
-- Channel progress time is collected once by the owning list/screen and passed to progress rendering.
-
-### Explicit modal state
-
-Replace the flag bundle in `PlayerModalState` with a single nullable `PlayerModal` value. `PlayerModal` is a sealed interface whose variants carry only data needed to identify the active modal, such as `TrackSelection(TrackType)`; the remaining variants are singleton objects.
-
-`PlayerModalState` may retain read-only compatibility queries such as `showSpeedSelection`, `trackSelection`, and `hasVisibleModal` so Back/input code can be migrated without widening the diff. Those queries derive from the single active value; they do not store duplicate booleans. Opening a modal replaces the current active modal. Dismissal sets it to null. This makes exclusivity explicit without changing the existing composition locations or modal callback order.
-
-The two existing modal hosts remain placement-preserving:
-
-- `PlayerTopLevelModalHost` remains before the root player `Box`.
-- `PlayerControlsModalHost` remains inside the root player `Box`, after `PlayerResumePrompt` and before diagnostics/live overlays.
-
-The state representation changes; the composition placement does not.
-
-### Shared channel clock
-
-Create one package-local `ChannelProgressTicker`/clock implementation with the existing 30-second cadence and `WhileSubscribed` lifetime. The clock exposes a read-only `StateFlow<Long>` and contains no UI or domain model dependency.
-
-Dashboard, Home, and search list owners collect the clock once when they render channel progress. `ChannelCard`, `LiveChannelRowSurface`, and `LiveChannelRowCard` receive the current timestamp as a value. The cards do not collect the clock themselves. The timestamp is read only by the progress leaf; card identity, focus, accessibility, and click behavior remain driven by the channel presentation data.
-
-The clock's progress calculation will be a pure function with tests covering no program, before-start, in-progress, after-end, and zero/negative duration cases.
-
-### Stability and list rules
-
-The compiler report is evidence, not a reason to annotate uncertain domain models. For the confirmed Phase 2 hotspots:
-
-- isolate `PlayerEngine` and other implementation-heavy values at the video-surface boundary;
-- prefer small primitive player presentation values at host boundaries;
-- use a focused immutable card model only when it removes a broad domain object from a frequently-rendered card API without losing required behavior;
-- keep ordinary Kotlin lists out of new aggregate UI-state APIs when an immutable collection or a narrow item model is justified by the measured hotspot.
-
-Every audited lazy list must have a stable key for dynamic items. Mixed lists and lists whose item renderer has materially different layouts must also provide `contentType`. Static singleton items may use their existing explicit item keys. No keys will be invented from display text where a stable domain ID exists.
-
-## Data flow and behavior invariants
-
-- ViewModel state remains the source of truth; this phase does not move business logic into composables.
-- `PlayerScreen` still owns root input event adaptation and event-time state snapshots.
-- Back priority remains numeric input, countdown/notice/modal/live-overlay handling, then controls/navigation according to the existing policy.
-- Preparation remains keyed by `PlayerPrepareIdentity` and keeps the existing arguments/effect keys.
-- PiP and window effects remain in `PlayerLifecycleHost`/route-owned code.
-- Audio/video-offset eligibility remains gated by sync enabled and cast disconnected.
-- MultiView keeps its existing visibility behavior; no new PiP restriction is added.
-- Channel progress remains visually equivalent at the existing 30-second update cadence.
-- No new collection is allowed inside a lazy-list item for shared clock or screen-level state.
-
-## Testing and measurement
-
-### Automated tests
-
-Add or extend unit tests for:
-
-- modal construction, replacement, derived visibility queries, and dismissal;
-- channel progress calculation;
-- mapping from grouped player state to narrow presentation contracts where a pure mapper is introduced.
-
-Each new pure production function follows red-green-refactor. Composable host extraction is verified through compilation, existing player policy tests, source-level call-site checks, and applicable Compose/instrumentation coverage rather than a production-only test seam.
-
-### Compiler and build evidence
-
-Before and after the implementation, record:
-
-- unstable argument count and named hotspot signatures from `app_debug-composables.txt`;
-- `:app:compileDebugKotlin` incremental timings after touching the same player file;
-- `:app:testDebugUnitTest`, `:app:assembleDebug`, and lint results with pre-existing failures separated from new findings;
-- available Macrobenchmark interaction results.
-
-The report must distinguish source/compiler evidence from runtime recomposition evidence. A compiler report alone does not prove fewer recompositions.
-
-### Runtime gates
-
-Use the existing repository protocol for at least two live channels: 2-second screenshots for at least 45 captures, preferably 61; changing frame hashes; media session `PLAYING` with `error=null`; and sanitized logs without fatal/stuck/unintended fallback evidence. If `adb` or a stable stream is unavailable, record the exact blocker and leave the Phase 2 exit criterion open.
-
-## Rollout and rollback
-
-Land the work in small, independently verifiable slices:
-
-1. Pure modal state and progress-clock tests/models.
-2. Player host state isolation.
-3. Shared ticker call-site migration.
-4. Lazy-list key/`contentType` audit.
-5. Compiler/benchmark comparison and documentation.
-
-Each slice should compile and pass focused tests before the next slice. Reverting a slice must restore the previous state ownership without changing playback policy or persisted data. Do not combine this work with unrelated player recovery or data-layer changes.
-
-## Definition of done
-
-Phase 2 is code-complete when the state, ticker, list, and compiler deliverables above are implemented, tested, measured, documented, and graphified. It is exit-ready only after the available build/runtime evidence is recorded and the required multi-channel live-playback protocol either passes or is explicitly documented as blocked by the environment.
diff --git a/docs/superpowers/specs/2026-08-22-platform-smoke-reliability-design.md b/docs/superpowers/specs/2026-08-22-platform-smoke-reliability-design.md
deleted file mode 100644
index 05876335..00000000
--- a/docs/superpowers/specs/2026-08-22-platform-smoke-reliability-design.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Platform Smoke Reliability Design
-
-## Problem
-
-The release workflow is currently the only practical place to exercise the full Android API matrix. That makes `master` the feedback loop for CI experiments. The latest workflow also prebuilds instrumentation APKs in a separate Gradle invocation before starting the emulator. After that change, API 33 and API 35 regressed from passing to dying before test discovery, while API 36 remained unresolved. Failed jobs preserve neither device crash diagnostics nor connected-test reports.
-
-## Design
-
-Move the platform matrix into a reusable workflow that runs on pushes to `develop` and supports both `workflow_call` and manual execution. The release workflow will call it after the host build, so the same gate is exercised before merging and during release.
-
-Each matrix entry will build, install, and execute from the emulator runner's script, matching the last known-good API 25–35 execution path. API 36 remains an explicitly isolated Android TV x86 configuration. There will be no separate precompile invocation.
-
-The smoke runner will register failure handling before its first Gradle command. On failure it will capture the active suite, device properties, instrumentation/package state, the Android crash log buffer, recent logcat, and DropBox app-crash records. The workflow will always upload these diagnostics together with app/data connected-test outputs and reports, with a unique artifact name per API.
-
-## Safety and Release Behavior
-
-- Manual execution of the reusable smoke workflow never publishes an APK or release.
-- Release publication still requires both the host build and the reusable platform matrix to pass.
-- Matrix jobs remain independent with `fail-fast: false`.
-- Diagnostics commands are best-effort and cannot replace the original test exit status.
-- Existing API coverage and API 35/36 foreground-service suites remain unchanged.
-
-## Verification
-
-Shell tests will use fake `adb` and `gradlew` executables to prove that failure diagnostics run after the first suite fails, preserve the failing status, and record the suite name. Static workflow tests will prove that release delegates to the reusable workflow, the reusable workflow can run manually, connected-test artifacts are uploaded, and the removed precompile stage cannot return unnoticed.
diff --git a/docs/superpowers/specs/2026-08-23-core-ui-boundary-design.md b/docs/superpowers/specs/2026-08-23-core-ui-boundary-design.md
deleted file mode 100644
index af11cb90..00000000
--- a/docs/superpowers/specs/2026-08-23-core-ui-boundary-design.md
+++ /dev/null
@@ -1,205 +0,0 @@
-# Phase 3 Core UI Boundary Design
-
-**Status:** Approved for specification review
-**Date:** 2026-08-23
-**Related plan:** [`docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`](../../COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md)
-
-## Goal
-
-Create a stable `:core:ui` Android library that owns reusable StreamVault presentation primitives while keeping application navigation, repositories, routes, domain models, and activity behavior in `:app`.
-
-Phase 3 is a structural migration. It must preserve existing visuals, focus behavior, input behavior, navigation callbacks, resource text, and golden-test output.
-
-## Current boundary problem
-
-The repository currently has only `:app`, `:benchmark`, `:domain`, `:data`, and `:player`. Theme, design tokens, focus helpers, pointer/remote interaction, and TV control wrappers live under `app/src/main/java/com/streamvault/app/ui`. `AppShell.kt` combines reusable visual components with:
-
-- `MainActivity` discovery and direct activity access;
-- `PreferencesRepository` and provider repository collection;
-- app route constants and route mapping;
-- `AppTopLevelDestination` and `CatalogLayout` domain models;
-- app string resources used for navigation labels and close actions.
-
-This makes a visual change part of the `:app` presentation compilation unit and prevents later feature modules from consuming shared UI without also depending on app-owned behavior.
-
-## Chosen approach
-
-Use a two-sided boundary:
-
-1. `:core:ui` owns generic rendering, design tokens, theme setup, focus/input primitives, and TV controls.
-2. `:app` owns the adapter that resolves configured destinations, routes, labels, and repository-backed navigation state, then supplies a generic destination list to core rendering.
-
-The existing screen call sites remain behaviorally compatible during this phase. They may continue calling the app-facing `AppScreenScaffold` adapter while generic components are imported from `:core:ui`. This keeps route/state migration out of Phase 3 and leaves typed navigation contracts for Phase 4.
-
-## Module and package structure
-
-Add:
-
-```text
-core/
- ui/
- build.gradle.kts
- src/main/AndroidManifest.xml
- src/main/res/font/inter_*.ttf
- src/main/java/com/streamvault/core/ui/
- components/shell/AppShellVisuals.kt
- device/TelevisionDevice.kt
- design/AppColors.kt
- design/AppMotion.kt
- design/AppShapes.kt
- design/AppSpacing.kt
- design/AppTypography.kt
- design/FocusHelpers.kt
- design/FocusSpec.kt
- interaction/MouseSupport.kt
- interaction/TvComponents.kt
- interaction/TvInteractionSounds.kt
- theme/Color.kt
- theme/Spacing.kt
- theme/Theme.kt
-```
-
-Register `:core:ui` in `settings.gradle.kts`. The module uses the existing version catalog and Compose/TV Material versions; it must not introduce a second UI toolkit or duplicate dependency versions.
-
-The core module may depend on Android framework APIs, Compose runtime/foundation/ui, TV Material, Material icons, and the lifecycle Compose API required by the existing focus helpers. It must not depend on `:app`, `:data`, `:domain`, `:player`, navigation, Hilt, repositories, or application implementation classes.
-
-The existing font resources used by `AppTypography` move with that implementation into `:core:ui`, so typography no longer references `com.streamvault.app.R`.
-
-`MouseSupport` currently uses the generic `Context.isTelevisionDevice()` predicate from the app device package. Extract only that platform-neutral TV classification predicate into `com.streamvault.core.ui.device.TelevisionDevice.kt`; keep Fire TV classification, removable-storage helpers, and the app-facing `rememberIsTelevisionDevice()` wrapper in `:app`.
-
-## Core UI API
-
-The generic shell visual API is deliberately small:
-
-```kotlin
-enum class NavigationChrome {
- Rail,
- TopBar
-}
-
-data class UiDestination(
- val id: String,
- val label: String,
- val icon: ImageVector
-)
-
-@Composable
-fun CoreAppScreenScaffold(
- currentDestinationId: String,
- destinations: List<UiDestination>,
- onDestinationSelected: (String) -> Unit,
- title: String,
- subtitle: String? = null,
- modifier: Modifier = Modifier,
- navigationChrome: NavigationChrome = NavigationChrome.Rail,
- topBarVisible: Boolean = true,
- compactHeader: Boolean = false,
- showScreenHeader: Boolean = true,
- header: (@Composable ColumnScope.() -> Unit)? = null,
- topBarActions: (@Composable RowScope.() -> Unit)? = null,
- contentPadding: PaddingValues = PaddingValues(),
- content: @Composable ColumnScope.() -> Unit
-)
-```
-
-`UiDestination` contains only rendering data and a stable ID. It must not contain a `NavController`, route parser, repository, activity, resource ID, or domain model. Core selection logic compares IDs and invokes `onDestinationSelected`; it does not know what an ID means.
-
-`AppShellVisuals.kt` owns the visual implementation of the scaffold, rail, top bar, headers, generic status/message/load-more/metadata components, and close-action control. The close-action composable receives its content description as a `String` supplied by the caller rather than reading app resources.
-
-The generic visual components moved from `AppShell.kt` retain their current public behavior and styling. No visual redesign, spacing change, focus-policy change, or callback-order change is part of this phase.
-
-## App adapter
-
-Keep app-specific navigation resolution under the existing app shell package in this focused adapter file:
-
-```text
-app/src/main/java/com/streamvault/app/ui/components/shell/AppShellNavigation.kt
-```
-
-The adapter owns:
-
-- collection of configured top-level destinations;
-- active-provider catalog-layout collection;
-- mapping from `AppTopLevelDestination` to route, localized label, and icon;
-- the VOD merge rule for non-split catalog layout;
-- the plugin icon definition;
-- the `Context`/`MainActivity` compatibility bridge required by the current implementation;
-- the app-facing `AppScreenScaffold` wrapper that maps `AppNavigationChrome` to core `NavigationChrome` and passes `UiDestination` values to `CoreAppScreenScaffold`.
-
-No core source may import this adapter or any of its app types. The adapter is intentionally transitional; Phase 4 will decide whether its state and route contracts move into navigation coordinators.
-
-## Import and ownership migration
-
-Update app presentation imports so generic UI consumers use `com.streamvault.core.ui` packages. Keep app-only navigation adapter imports under `com.streamvault.app.ui.components.shell`.
-
-The following remain app-owned in Phase 3:
-
-- screen composables and ViewModels;
-- app-specific media cards and browse implementations;
-- route constants and route parsing;
-- resource-backed destination construction;
-- repository and domain access;
-- `MainActivity` and platform capabilities;
-- feature-specific dialogs and content components.
-
-The following move to core:
-
-- theme and design tokens;
-- generic focus and focus-restore helpers;
-- generic pointer/remote activation helpers;
-- TV interaction sound wrapper;
-- `TvClickableSurface`, `TvButton`, and `TvIconButton`;
-- generic shell scaffold, headers, status/message/load-more/metadata visuals.
-
-If a component cannot cross the boundary without an app resource, domain model, route, or repository, it stays in `:app` and is not forced into core.
-
-## Dependency guard
-
-Add a build-time `verifyCoreUiBoundary` task in `core/ui/build.gradle.kts`. Wire `:core:ui:check` to depend on it, and add a root `verifyCoreUiBoundary` lifecycle task that depends on `:core:ui:verifyCoreUiBoundary`, so the guard is runnable both as `:core:ui:verifyCoreUiBoundary` and as `verifyCoreUiBoundary` from the repository root. It must:
-
-1. fail if `:core:ui` declares a project dependency on `:app`, `:data`, `:domain`, `:player`, or a feature module;
-2. scan core Kotlin source for imports or references to the exact banned prefixes/tokens `com.streamvault.app`, `com.streamvault.data`, `com.streamvault.domain`, `com.streamvault.player`, `androidx.navigation`, `dagger.hilt`, `MainActivity`, `NavController`, and `NavHost`;
-3. be runnable directly from the repository root and wired into the core verification lifecycle;
-4. report the offending file and matching text when it fails.
-
-The check is a migration guard, not a general architectural linter. It must not ban Android framework, Compose, TV Material, or lifecycle Compose imports that the generic primitives require.
-
-## Testing and validation
-
-Before migration, retain the current app baseline and use the existing Phase 0 measurements as the comparison point.
-
-Add focused unit coverage for the app adapter's pure `buildDestinationItems(configured, layout)` helper, including the existing VOD merge rule and split-catalog behavior. Preserve the existing app shell golden tests and update their imports or adapter setup so they continue to render the same rail, top bar, headers, and generic states. Those app integration goldens remain the critical golden coverage for this structural slice; moving them into `:core:ui` is explicitly out of scope because they use app resources and app-owned composition setup.
-
-Run, at minimum:
-
-```powershell
-.\gradlew.bat verifyCoreUiBoundary
-.\gradlew.bat :core:ui:compileDebugKotlin
-.\gradlew.bat :app:compileDebugKotlin
-.\gradlew.bat :app:testDebugUnitTest
-.\gradlew.bat :app:assembleDebug
-```
-
-Run the relevant shell golden/instrumentation checks when an emulator is available. This phase does not change player composition or lifecycle code, so the full long-duration Live TV protocol is not newly required solely for the core UI move; any incidental player-facing import or behavior change must stop the migration and trigger the repository playback protocol.
-
-Record module task impact and any unavailable emulator gates in the Phase 3 report or the main architecture plan. After production code changes, run `graphify update .` as required by the repository instructions.
-
-## Explicit non-goals
-
-- No `:core:navigation` module.
-- No typed destination contract.
-- No feature-module extraction.
-- No `NavController` removal from `:app`.
-- No conversion of Compose screens to Views.
-- No modal/state ownership changes.
-- No player recovery, transport, surface, or lifecycle changes.
-- No broad app-wide visual cleanup beyond import/package changes required by the move.
-
-## Rollback
-
-The migration is rollback-safe at the commit level:
-
-- move source/resources and update imports in separate mechanical commits where practical;
-- keep the app adapter as the compatibility boundary until compilation and golden checks pass;
-- do not delete the adapter or old call-site compatibility until the core module is proven;
-- keep the dependency guard and module build independently runnable.
diff --git a/docs/superpowers/specs/2026-08-23-navigation-contracts-design.md b/docs/superpowers/specs/2026-08-23-navigation-contracts-design.md
deleted file mode 100644
index da496633..00000000
--- a/docs/superpowers/specs/2026-08-23-navigation-contracts-design.md
+++ /dev/null
@@ -1,293 +0,0 @@
-# Phase 4 Navigation Contracts Design
-
-Date: 2026-08-23
-
-## Status
-
-Proposed design for Phase 4 of the Compose reduction and UI architecture
-plan. This design prepares the application for Phase 5 feature-module
-extraction without changing player composition, playback lifecycle, stream
-recovery, or screen visuals.
-
-## Goal
-
-Separate navigation contracts from Android Navigation implementation and move
-startup/external navigation orchestration out of the root composable, while
-preserving current routes, deep links, player handoffs, return behavior, and
-golden output.
-
-## Current problem
-
-The current navigation package combines several responsibilities:
-
-- `AppNavigation.kt` owns the remembered root `NavHostController`, provider
- preference collection, landing resolution, startup player lookup, external
- request consumption, catalog-route correction, and graph composition.
-- `AppNavigationGraph.kt` registers destinations but also performs direct
- navigation, reads/writes saved-state payloads, resolves player return routes,
- and owns feature-specific transition behavior.
-- `AppNavigationContracts.kt` contains raw route strings, route builders,
- domain-object adapters, player request serialization, and Android Navigation
- imports in one file.
-- `MainActivity` parses platform intents into app navigation requests, while
- the root composable decides when those requests may be executed.
-- Feature screens receive callbacks today, but the graph implementation still
- owns the root controller and many feature-specific navigation decisions.
-
-This prevents moving a feature with its graph registration and navigation
-contract into a Phase 5 module without also moving root navigation knowledge.
-
-## Chosen architecture
-
-### `:core:navigation`: contract-only module
-
-Add `:core:navigation` as a small Kotlin/JVM-compatible module with no
-project dependencies and no references to `:app`, `:data`, `:domain`,
-`:player`, Compose, AndroidX Navigation, Hilt, or Activities.
-
-The module owns only stable, serializable navigation values:
-
-- `AppDestination`, a sealed typed destination model for route identity and
- typed arguments.
-- `PlayerNavigationRequest`, containing primitive player handoff data and a
- typed optional return destination.
-- `ExternalNavigationRequest`, covering destination, search, player, playlist
- import, and backup import requests.
-- `NavigationCommand` and `NavigationActions`, the feature-facing navigation
- contract. These expose navigation intent without exposing `NavController`.
-- Shared navigation keys/contract constants that are required across the app
- and future feature modules.
-
-The contract model uses primitives, strings, lists of primitives, and other
-core navigation values. Domain objects such as `Channel`, `Movie`, `Episode`,
-`MovieDetailPresentationHint`, and `SeriesDetailPresentationHint` do not cross
-this module boundary. App or future feature modules adapt those objects into
-navigation requests at their ownership boundary.
-
-The contract module does not encode Android route strings. Route syntax,
-argument names, URI encoding, and compatibility parsing remain app adapters
-until a feature module owns its route codec.
-
-### `:app`: platform and composition adapter
-
-The app remains responsible for Android Navigation and app/domain integration:
-
-- `AppRouteCodec` maps `AppDestination` to the existing route strings and
- decodes supported route arguments.
-- Domain adapters map channels, movies, episodes, and playback history into
- `PlayerNavigationRequest` values.
-- Legacy external-route parsing maps old route strings into typed
- `AppDestination` values before navigation execution.
-- Android intent parsing remains at the Activity/platform boundary, including
- URI validation and the existing backup-file bridge.
-- `NavControllerNavigator` is the only object allowed to translate typed
- navigation commands into `NavController` operations.
-- App-specific presentation-hint storage remains in the app adapter until the
- movie and series features move in Phase 5.
-
-The app may depend on `:core:navigation`; the core navigation module may not
-depend on the app or any feature implementation.
-
-## Navigation data flow
-
-```text
-MainActivity / TV launcher / app-owned caller
- |
- v
-typed ExternalNavigationRequest or NavigationCommand
- |
- v
-AppNavigationCoordinator
- - startup landing resolution
- - startup player lookup
- - external request de-duplication/acknowledgement
- - lifecycle-safe pending commands
- |
- v
-AppNavHost's narrow command collector
- |
- v
-NavControllerNavigator
- |
- v
-typed AppDestination -> AppRouteCodec -> NavHost route
-```
-
-The root `AppNavigation` composable becomes wiring: it obtains the app
-navigation dependencies, creates/receives the controller, and calls
-`AppNavHost`. It does not resolve startup targets, parse external requests,
-decide catalog corrections, or contain feature navigation branches.
-
-The coordinator owns pending-command state and idempotence. A command is
-acknowledged only after the navigator successfully executes it while the
-current entry is resumed. Recomposition, Activity recreation, and repeated
-`onNewIntent` delivery must not duplicate a startup player launch or external
-request.
-
-## Typed contracts
-
-The exact names may be refined during implementation, but the public shape is
-fixed by these rules:
-
-```kotlin
-sealed interface AppDestination : java.io.Serializable
-
-data class PlayerNavigationRequest(
- val streamUrl: String,
- val title: String,
- val channelId: String? = null,
- val internalId: Long = -1L,
- val categoryId: Long? = null,
- val providerId: Long? = null,
- val isVirtual: Boolean = false,
- val combinedProfileId: Long? = null,
- val combinedSourceFilterProviderId: Long? = null,
- val contentType: String = "LIVE",
- val artworkUrl: String? = null,
- val archiveStartMs: Long? = null,
- val archiveEndMs: Long? = null,
- val archiveTitle: String? = null,
- val returnDestination: AppDestination? = null,
- val seriesId: Long? = null,
- val seasonNumber: Int? = null,
- val episodeNumber: Int? = null,
- val episodeId: Long? = null
-) : java.io.Serializable
-
-sealed interface ExternalNavigationRequest : java.io.Serializable
-
-sealed interface NavigationCommand : java.io.Serializable
-
-interface NavigationActions {
- fun navigate(destination: AppDestination)
- fun openPlayer(request: PlayerNavigationRequest)
- fun back(): Boolean
- fun returnTo(destination: AppDestination?): Boolean
-}
-```
-
-`AppDestination` includes typed equivalents for the current top-level,
-detail, provider setup, player, search, guide, settings, plugin, downloads,
-multi-view, and welcome destinations. Optional query values are represented as
-nullable or typed fields rather than embedded route strings. The app route
-codec preserves the existing sentinel/default behavior when converting these
-values to Android Navigation arguments.
-
-Invalid or unsafe player requests remain rejected at the app boundary before
-they reach the player destination. The supported stream-scheme policy is
-unchanged.
-
-## Graph registration and feature isolation
-
-Rename the central graph entry point to `AppNavHost` and keep it primarily a
-registry. It owns the single `NavHost` call, start destination, shared app
-graph dependencies, and registration order. It does not contain feature screen
-branches or startup/external resolution.
-
-Split registration into app-owned extensions that are shaped to move with
-future feature modules:
-
-- `registerWelcomeGraph`
-- `registerProviderGraph`
-- `registerHomeGraph`
-- `registerLiveGraph`
-- `registerCatalogGraph`
-- `registerPlayerGraph`
-- `registerSystemGraph`
-
-Each extension receives typed `NavigationActions` and the minimum feature
-dependencies it needs. No registration extension accepts the root
-`NavHostController`. Destination lambdas may use their own
-`NavBackStackEntry` for typed arguments and saved state, but navigation side
-effects go through `NavigationActions` or a feature-owned app adapter.
-
-This gives Phase 5 a direct extraction unit: a feature module can move its
-screen code, graph registration extension, route argument codec, and feature
-navigation tests together. The app root will retain only registry composition
-and cross-feature navigation policies.
-
-## Startup and external navigation
-
-Extract the current root-composable logic into testable app services:
-
-- `StartupNavigationResolver` resolves the configured landing destination and
- optional first-favorite/last-watched player request from explicit repository
- ports and input values. It preserves the current provider/combined-profile,
- hidden-channel, virtual-category, and return-to-live behavior.
-- `ExternalNavigationRequestParser` converts Activity intents and legacy route
- extras into typed requests. It preserves search, player, provider setup,
- playlist import, backup import, and ACTION_VIEW fallback behavior.
-- `AppNavigationCoordinator` accepts startup inputs and external requests,
- exposes pending typed commands, prevents duplicate handling, and reports
- acknowledgement only after successful navigation.
-
-`MainActivity` remains responsible for Android-only concerns such as intent
-extras, URI grants, backup inbox copying, and forwarding `onNewIntent`. It no
-longer owns a navigation-specific mutable flow that the root composable must
-interpret directly; it submits typed requests to the coordinator boundary.
-
-## Back and return behavior
-
-Player requests carry a typed optional return destination. The navigator keeps
-the existing preference order:
-
-1. Pop to an existing matching return destination when possible.
-2. Navigate to the typed return destination if it is not already in the stack.
-3. Fall back to Home when no return target exists or the stack cannot be
- restored.
-
-Movie and series detail presentation hints remain in app-owned saved-state
-adapters during Phase 4. Their behavior and keys remain unchanged. This avoids
-putting domain-specific variant models into `:core:navigation` while preserving
-the handoff needed by the current detail screens.
-
-## Testing strategy
-
-### Core navigation tests
-
-- Every `AppDestination` encodes/identifies its typed arguments without raw
- route strings.
-- `PlayerNavigationRequest` preserves all fields, including series identity
- and typed return destination.
-- External request variants are serializable and distinguishable.
-- Navigation action fakes record typed commands without a `NavController`.
-
-### App navigation tests
-
-- Route codec round trips all current destinations and sentinel values.
-- Legacy external routes decode to the same typed destinations as before.
-- Unsafe or missing player URLs are rejected.
-- Startup landing resolution covers normal landing, first favorite, last
- watched, provider source, combined source, hidden channels, and no-target
- fallback.
-- External intent parsing covers player, destination, search, playlist import,
- backup import, malformed legacy route, and ACTION_VIEW fallback.
-- Return-route behavior covers existing-stack pop, missing-stack navigation,
- and Home fallback.
-
-### Graph and connected coverage
-
-- Registration extensions compile without accepting a root controller.
-- A fake `NavigationActions` verifies screen callbacks emit typed commands.
-- Existing shell, premium-route, player overlay, and player smoke coverage is
- rerun after the graph split.
-- Connected tests cover startup player requests, external navigation, player
- return behavior, and deep-link entry on the TV emulator when available.
-
-## Non-goals
-
-- No feature module extraction occurs in Phase 4.
-- No player composition, lifecycle, recovery, or stream policy changes occur.
-- No visual redesign or route renaming occurs.
-- No domain model migration into `:core:navigation` occurs.
-- No claim is made about build-time improvement without before/after
- measurements.
-
-## Phase 5 handoff
-
-Phase 4 is exit-ready only when `AppNavHost` is a registry, feature graph
-extensions do not receive the root controller, typed contracts are independent
-of app/domain/data/player code, and tests cover deep links, startup player
-requests, return routes, and external navigation. Phase 5 can then move a
-feature by transferring its registration extension and screen-owned adapters
-without expanding the root navigation file.
diff --git a/docs/superpowers/specs/2026-08-23-upgrade-migration-resilience-design.md b/docs/superpowers/specs/2026-08-23-upgrade-migration-resilience-design.md
deleted file mode 100644
index 24d0d5d2..00000000
--- a/docs/superpowers/specs/2026-08-23-upgrade-migration-resilience-design.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Upgrade Migration Resilience Design
-
-## Goal
-
-Make upgrades from StreamVault 1.0.14 and later preserve all user data, tolerate legacy provider representations, and avoid a process crash loop when Room cannot open the database.
-
-## Scope
-
-This change hardens the existing 72-to-74 provider migration and the application database-opening boundary. It does not enable destructive migration, merge providers, redesign the Room schema, or replace the 73-to-74 provider-table rebuild.
-
-## Provider identity collisions
-
-Schema 72 allows provider rows that are distinct under the legacy raw-field index but equivalent under the schema-73 canonical identity algorithm. The migration must preserve every such provider and all of its dependent rows.
-
-During the 72-to-73 backfill:
-
-1. Compute the same canonical identity key used by `ProviderConfigurationCodec`.
-2. Give the first provider in stable `id` order the canonical key.
-3. If that key is already owned, derive a deterministic disambiguated key from the canonical key and provider ID.
-4. Never delete or merge providers or provider-owned data.
-
-The disambiguated key remains stable across retries because both inputs are durable. Runtime configuration commits must not allow Room's `REPLACE` behavior to remove another provider's configuration. If a legacy-disambiguated provider is updated without becoming unique, it retains its current disambiguated identity. A newly inserted provider whose canonical identity is already owned is rejected through the existing boolean commit result.
-
-## Legacy provider types
-
-Before snapshot backfill, schema-72 provider type strings are canonicalized using the same aliases recognized by `RoomEnumConverters`: `XTREAM` and `XTREAM_CODES_API` become `XTREAM_CODES`; `STALKER` and `STB` become `STALKER_PORTAL`; `PLAYLIST` becomes `M3U`.
-
-Unknown values follow the existing converter behavior and become `M3U`. The canonical value is written back to `providers.type` so the stable provider row and typed configuration cannot disagree after 73-to-74.
-
-## Foreign-key validation
-
-The 73-to-74 migration continues to back up, clear, rebuild, and restore the provider-dependent graph. After restoration it validates only the tables it copied. It must not reject a pre-existing foreign-key problem in a table outside that graph.
-
-The existing 37-table preservation mechanism remains unchanged in this patch. Its storage cost is a separate optimization problem; changing it without an equally safe SQLite parent-table rebuild would risk catalog loss.
-
-## Startup database gate
-
-Application startup gets one explicit database-readiness owner. It opens the Room writable database on the IO dispatcher before launching database-backed recovery work. State is exposed as `Opening`, `Ready`, or `Failed`.
-
-- `Ready`: launch download, plugin, reminder, Stalker, pending-restore, and work-registration startup actions.
-- `Failed`: retain the sanitized failure summary, do not launch database consumers, and keep the process alive.
-- Retrying repeats the open attempt without deleting data.
-
-`MainActivity` renders a small TV-safe database recovery screen until the gate is ready. Failure UI offers Retry and a path to share the already-sanitized crash/diagnostic report. It does not offer automatic database deletion.
-
-Startup jobs also receive per-task exception containment so a later recovery defect cannot terminate the application process after the database is ready.
-
-## Testing
-
-Tests are added before production changes and must cover:
-
-- schema 72 with two raw-distinct URLs that normalize to one identity;
-- preservation of both providers and representative dependent catalog rows through the current schema;
-- deterministic distinct identity keys across repeated construction;
-- all supported provider-type aliases and unknown-type fallback;
-- runtime commits that cannot replace another provider's configuration;
-- foreign-key validation ignoring unrelated legacy damage while still detecting damage in a rebuilt table;
-- database gate success, failure, retry, and one-time startup task admission;
-- startup task exceptions being recorded without crashing or blocking sibling tasks.
-
-Existing migration registry and full-chain tests remain required. Emulator/instrumentation execution must be coordinated with the other active worker; JVM tests and static checks may run independently.
-
-## Non-goals
-
-- No `fallbackToDestructiveMigration`.
-- No automatic provider merge.
-- No silent provider or catalog deletion.
-- No database schema version bump unless Room entity shape changes.
-- No attempt to optimize the 37-table rebuild in the same change.
diff --git a/docs/superpowers/specs/2026-08-24-phase-5-feature-module-extraction-design.md b/docs/superpowers/specs/2026-08-24-phase-5-feature-module-extraction-design.md
deleted file mode 100644
index 366ce656..00000000
--- a/docs/superpowers/specs/2026-08-24-phase-5-feature-module-extraction-design.md
+++ /dev/null
@@ -1,239 +0,0 @@
-# Phase 5 Feature Module Extraction Design
-
-Date: 2026-08-24
-
-## Status
-
-Approved design for Phase 5 of the Compose reduction and UI architecture plan.
-Phase 5 is split into independently mergeable feature extractions. Playback is
-first and establishes the module, navigation, dependency, testing, measurement,
-and reporting pattern used by the remaining features.
-
-## Goal
-
-Move feature presentation out of :app so a change within one feature does not
-compile unrelated feature source, feature tests run independently, and :app
-becomes the Android platform and navigation composition root.
-
-This phase changes module and package ownership. It does not redesign the UI,
-convert screens to Views, or change playback preparation, recovery, timeshift,
-focus, input, lifecycle, or navigation behavior.
-
-## Accepted scope and sequencing
-
-The extraction order is:
-
-1. :feature:playback
-2. :feature:provider
-3. :feature:settings
-4. :feature:live
-5. :feature:catalog
-6. :feature:system only when measured source/build impact justifies it
-
-Each extraction has its own implementation plan, review boundary, build
-measurement, verification report, and rollback point. Playback is the only
-detailed implementation plan produced with this design. Later feature plans
-reuse its proven conventions and gates.
-
-Temporary feature dependencies on :data are allowed during Phase 5 when needed
-to preserve behavior. Every direct implementation import is recorded in
-docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md and removed or
-justified in Phase 7. No feature may depend on :app.
-
-## Target dependency direction
-
-~~~text
-:app
- -> :feature:playback
- -> later feature modules
- -> :core:navigation / :core:ui / :domain / :data / :player
-
-:feature:playback
- -> :core:navigation
- -> :core:ui
- -> :domain
- -> :player
- -> :data # temporary imports recorded in the ledger
-
-:player -> :domain
-:core:ui # no project dependencies
-:core:navigation # no project dependencies
-~~~
-
-Dependencies between feature implementation modules are prohibited. Shared
-behavior moves to an existing contract/core module only when it is genuinely
-shared and fits that module's responsibility.
-
-## Playback ownership
-
-### :feature:playback owns
-
-- registerPlaybackGraph and playback route patterns.
-- Player route/screen, ViewModel, state, policies, coordinators, overlays, and
- feature-specific dialogs.
-- MultiView screen, ViewModel, state, manager, planner, and control HUD.
-- Playback Cast models, request factory, manager, coordinator, and bindings.
-- Live preview handoff and live translation presentation services.
-- Playback-specific strings, drawables, tests, and golden fixtures.
-- Feature boundary verification and Compose compiler diagnostics.
-
-### :app retains
-
-- MainActivity, root NavHostController, external intent parsing, route
- compatibility decoding, and saved-state payload transport.
-- AppNavHost, which imports and calls registerPlaybackGraph.
-- Android implementation of the playback host contract for PiP,
- keep-screen-on, and Cast route chooser actions.
-- Watch Next and launcher recommendation implementations.
-- StreamVaultPluginManager, adapted to feature-owned playback preparation and
- Cast URL rewrite ports through app-owned Hilt bindings.
-- Platform services and manifest entry points that are not feature-owned.
-
-### :player owns
-
-- PlayerEngine, Media3PlayerEngine, playback/timeshift policy, render-view
- creation/binding, and engine qualifiers.
-- PlayerRenderView, because Live/EPG previews and playback all consume it.
-- API methods for primary/MultiView engine configuration. Feature presentation
- must not cast PlayerEngine to Media3PlayerEngine.
-
-### Shared supporting ownership
-
-- Generic image wrappers and dialog visuals move to :core:ui only when their
- API contains rendering inputs rather than app resources or navigation.
-- Shared time-format rendering uses a core UI value type and composition local;
- :app maps the persisted domain preference into that value.
-- Pure archive capability and channel raw-identity policies move to :domain.
-- PlayerTransparentGuideOverlay.kt is excluded from playback. It is currently
- unreferenced and depends on EPG implementation types, so it moves under the
- app EPG package and is reconsidered with :feature:live.
-
-## Playback navigation seam
-
-AppRouteCodec continues to own compatibility encoding/decoding. Playback owns
-the stable route patterns and graph registration:
-
-~~~kotlin
-object PlaybackRoutePatterns {
- const val PLAYER = "player"
- const val MULTI_VIEW = "multi_view"
-}
-
-fun NavGraphBuilder.registerPlaybackGraph(
- actions: NavigationActions,
- platformHost: PlaybackPlatformHost?,
- consumePlayerRequest: (NavBackStackEntry) -> PlayerNavigationRequest?
-)
-~~~
-
-AppNavHost passes payloads::consumePlayerRequest. The feature never imports
-AppNavigationPayloads, AppRouteCodec, MainActivity, or a root controller. The
-existing supported-scheme check moves with the graph and retains the current
-fallback: Back first, then Home with Player removed from the stack.
-
-## Platform and service contracts
-
-The playback feature defines these narrow contracts:
-
-~~~kotlin
-data class PlaybackPictureInPictureState(
- val enabled: Boolean,
- val isPlaying: Boolean,
- val videoWidth: Int,
- val videoHeight: Int,
- val pixelWidthHeightRatio: Float
-)
-
-interface PlaybackPlatformHost {
- val pictureInPictureMode: StateFlow<Boolean>
- fun updatePictureInPictureState(state: PlaybackPictureInPictureState)
- fun clearPictureInPictureState()
- fun enterPictureInPicture(): Boolean
- fun openCastRouteChooser()
- fun setKeepScreenOn(enabled: Boolean)
-}
-
-interface PlaybackStreamPreparer {
- suspend fun prepare(streamInfo: StreamInfo): Result<StreamInfo>
-}
-
-interface CastUrlRewriter {
- suspend fun rewrite(request: CastMediaRequest): String?
-}
-
-interface PlaybackSurfaceRefreshPort {
- suspend fun updateWatchNextProgress(history: PlaybackHistory)
- suspend fun refreshWatchNext()
- suspend fun refreshRecommendations()
-}
-~~~
-
-App adapters delegate to the existing MainActivity, plugin, Watch Next, and
-launcher implementations. They add no policy. Player lifecycle effect keys and
-callback order remain unchanged when calls are redirected through these ports.
-
-## Source and resource migration
-
-Production and test files move with history where possible. Mechanical moves,
-package/import changes, contract changes, and behavior changes use separate
-commits. No behavior change is authorized by this design.
-
-Playback source uses com.streamvault.feature.playback.*. Resources referenced
-by moved code are copied into the feature for compilation, then removed from
-:app only when no remaining app source references the key. Shared keys may
-remain duplicated during transition and are recorded for the later owning
-feature. Localization values remain equivalent in every existing locale.
-
-Player and MultiView unit tests move into the feature. Navigation compatibility
-tests remain in :app. Playback request safety and graph callback tests move into
-the feature. Whole-app entry, deep-link, and return tests remain app tests.
-Playback overlay goldens move to the feature module.
-
-## Error handling and rollback
-
-- Invalid player requests keep the existing warning and Back/Home fallback.
-- Missing platform capability is a nullable host and preserves current no-op
- behavior outside MainActivity.
-- Existing plugin preparation, Cast rewrite, Watch Next, and recommendation
- failures retain their results and logging.
-- The app route remains wired until feature graph, integration, unit,
- connected, and live playback gates pass.
-- Every commit compiles independently. The original implementation is removed
- only after the feature destination is running through AppNavHost.
-
-## Build and runtime validation
-
-For every feature extraction:
-
-- Capture five incremental build runs before and after a representative
- feature-only source edit.
-- Capture five incremental unit-test compile runs before and after extraction.
-- Record clean debug and warm no-change guardrails.
-- Verify a feature-only edit does not compile unrelated feature source.
-- Run feature tests independently, then app integration tests and assemble.
-- Run boundary guards and scan feature source for app/controller imports.
-- Refresh graph output after code changes with graphify update .
-
-Playback additionally requires the repository live-TV protocol on at least two
-channels: 61 screenshots per channel at two-second cadence, changing hashes for
-the full window, media session PLAYING with error=null, healthy HLS evidence,
-and no fatal error, stuck timeout, or unintended MPEG-TS fallback. Player focus,
-Back, controls, seeking, overlays, PiP, Cast, repeated zapping, and MultiView
-are included in manual/connected validation.
-
-Module/package moves invalidate generated profile descriptors, so profile
-generation is rerun from the existing :benchmark producer. Generated output is
-not hand-edited or release-approved without the existing physical-device gate.
-
-## Phase 5 exit criteria
-
-- :app contains orchestration and platform entry points, not extracted feature
- presentation implementations.
-- No feature implementation depends on :app or a root navigation controller.
-- Each feature exposes graph registration and small contracts only.
-- Each feature's tests run independently.
-- A feature-only edit does not compile unrelated feature source.
-- Temporary data dependencies are complete in the transitional ledger.
-- Playback behavior and live stability are equivalent or better.
-- Build/runtime measurements and a phase report exist for every extraction.
-- :feature:system is extracted only when measurements justify it.
diff --git a/docs/superpowers/specs/2026-08-27-phase-5-settings-feature-extraction-design.md b/docs/superpowers/specs/2026-08-27-phase-5-settings-feature-extraction-design.md
deleted file mode 100644
index 04f5ecb1..00000000
--- a/docs/superpowers/specs/2026-08-27-phase-5-settings-feature-extraction-design.md
+++ /dev/null
@@ -1,409 +0,0 @@
-# Phase 5 Settings Feature Module Extraction Design
-
-Date: 2026-08-27
-Status: Approved for implementation planning
-
-## Context
-
-Phase 5 moves presentation out of `:app` into independently compiled feature
-modules without changing behavior. Playback now lives in `:feature:playback`
-and provider setup lives in `:feature:provider`. Their reports retain open
-runtime, manual, and performance gates; this settings extraction does not close
-or reinterpret those gates.
-
-Settings is the next roadmap slice. Its current package contains 71 production
-Kotlin files and 19,483 lines, plus 12 unit-test files and 1,031 test lines.
-Graphify identifies `SettingsViewModel` as a god node with 112 connections.
-The ViewModel has 27 constructor dependencies and coordinates preferences,
-providers, EPG, recordings, parental controls, backup/restore, Drive backup,
-application updates, diagnostics, TV surfaces, and direct DAO state.
-
-The extraction is therefore a contract-first, staged ownership transfer. It
-is not a one-shot package rename and not an opportunity to redesign Settings.
-
-## Goal
-
-Create `:feature:settings` as the sole owner of Settings presentation,
-parental-control presentation, backup/restore presentation, settings state and
-dialogs, feature resources, tests, and graph registration while keeping
-`:app` as the platform and navigation composition root.
-
-The extracted feature must compile and test independently. A settings-only
-source edit must not compile playback or provider feature source. Routes,
-arguments, focus, semantics, callbacks, persistence, file-launcher behavior,
-and visual output remain equivalent.
-
-## Non-goals
-
-- Do not convert Settings or backup flows to classic Views in Phase 5.
-- Do not redesign the settings navigation rail, rows, dialogs, or section
- organization.
-- Do not split `SettingsViewModel` behavior or replace its state model during
- the mechanical ownership move.
-- Do not change backup formats, conflict resolution, Drive behavior, provider
- synchronization, recording policy, parental-control policy, or app-update
- policy.
-- Do not extract Downloads, Plugins, Live, EPG, catalog, or system presentation.
-- Do not add a feature-to-feature implementation dependency.
-- Do not claim Phase 5 completion while playback/provider/settings acceptance
- or performance gates remain open.
-
-## Current ownership and coupling
-
-### Settings package
-
-The move unit is:
-
-```text
-app/src/main/java/com/streamvault/app/ui/screens/settings/
-app/src/test/java/com/streamvault/app/ui/screens/settings/
-```
-
-It includes the root screen, sections, dialogs, action coordinators, derived
-observers, formatting/model helpers, `SettingsViewModel`, the parental-control
-group route/ViewModel, backup preview, Drive backup, provider management,
-recording browsing, EPG configuration, app-update presentation, and speed test.
-
-### Navigation
-
-`app/navigation/graph/SystemGraph.kt` currently registers Downloads, Settings,
-Plugins, and parental-control groups. `AppRouteCodec` owns compatibility
-encoding/decoding for the Settings backup URI and parental provider ID.
-
-Settings extraction moves only Settings and parental-control graph
-registration. Downloads and Plugins remain app-owned. Compatibility encoding
-and external-intent parsing remain app-owned.
-
-### Existing provider backup-preview seam
-
-`:feature:provider` exposes `ProviderBackupPreviewContent` and
-`ProviderBackupPreviewRequest`. `AppNavHost` currently satisfies that contract
-with the app-owned `BackupImportPreviewDialog` from Settings.
-
-Settings takes ownership of `BackupImportPreviewDialog` without changing the
-provider API. `AppNavHost`, as composition root, continues to translate the
-provider request field-for-field into the settings composable. Neither feature
-imports the other.
-
-### Direct implementation dependencies
-
-The current settings package directly imports these `:data` types:
-
-| Implementation type | Current responsibility | Phase 7 removal direction |
-|---|---|---|
-| `ProgramDao` | provider program-count diagnostics | domain diagnostics query |
-| `XtreamIndexJobDao` | Xtream index status observation | domain sync-status query |
-| `XtreamLiveOnboardingDao` | live onboarding progress | domain onboarding-status query |
-| `XtreamIndexJobEntity` | index status mapping | domain sync-status model |
-| `XtreamLiveOnboardingStateEntity` | onboarding status mapping | domain onboarding-status model |
-| `DatabaseMaintenanceSnapshot` | database maintenance UI mapping | domain maintenance snapshot |
-| `PreferencesRepository` | settings persistence and observation | domain application-settings contract |
-| `ProviderSyncCommands` | repair/cancel commands | domain provider-sync commands |
-| `SyncRepairSection` | repair section selection | domain provider-sync section |
-
-The feature also uses concrete `AudioCompatibilityMemoryStore` from `:player`.
-That dependency is allowed by the Phase 5 technical-module rules but is
-recorded as a Phase 7 contract-cleanup candidate.
-
-### App implementation dependencies
-
-The package currently imports app resources, shell components, shared display
-models, backup files, diagnostics, update services, TV-surface managers,
-TV-input work, `MainActivity`, route codecs, locale helpers, and build
-verification. These imports cannot cross the feature boundary. They are
-resolved through the ownership rules and ports below.
-
-## Target dependency direction
-
-```text
-:app
- -> :feature:settings
- -> :feature:provider
- -> :feature:playback
- -> :core:navigation / :core:ui / :domain / :data / :player
-
-:feature:settings
- -> :core:navigation
- -> :core:ui
- -> :domain
- -> :data # temporary, every imported type ledgered
- -> :player # AudioCompatibilityMemoryStore audit candidate
-```
-
-`:feature:settings` must not depend on `:app`, `:feature:provider`, or
-`:feature:playback`. Feature-to-feature navigation is expressed with core
-destinations and app callbacks.
-
-## Target ownership
-
-### `:feature:settings` owns
-
-- Settings and parental-control route patterns and graph registration.
-- `SettingsScreen`, `SettingsViewModel`, `SettingsUiState`, action helpers,
- observers, sections, rows, dialogs, formatters, and operational UI models.
-- `ParentalControlGroupScreen`, its ViewModel, state, and components.
-- Backup/restore and Drive-backup presentation, including
- `BackupImportPreviewDialog`.
-- Settings-owned backup file selection/management UI behavior behind the
- platform file port.
-- Settings-owned resources, locale translations, unit tests, connected tests,
- Compose diagnostics, and module-boundary verification.
-- Pure app-update presentation models and selection/formatting policy. The
- update transport/installer implementation remains app-owned.
-- The dashboard-shelf customization dialog, because it is invoked only from
- Settings and edits a persisted settings preference.
-
-### `:app` retains
-
-- `MainActivity`, root `NavHostController`, `AppNavHost`, external intents,
- `AppRouteCodec`, and navigation payload storage.
-- Downloads and Plugins registration in the app system graph.
-- `BackupFileBridge` implementation used by external-intent parsing.
-- `CrashReportStore` installation and storage implementation.
-- app-update download/network/install implementations and worker entry points.
-- Watch Next, launcher recommendations, TV-input manager/worker, build identity,
- package verification, and other platform implementations.
-- Hilt adapters from app implementations to settings feature ports.
-- Mapping `ProviderBackupPreviewRequest` to the settings-owned preview dialog.
-
-### Neutral shared ownership
-
-- Generic shell visuals, TV empty/search controls, PIN entry, time formatting,
- and device classification use or move to `:core:ui` only when their APIs are
- app-agnostic.
-- Persisted display preference enums used by Settings plus Live or Catalog move
- to `:domain`; storage values and parsing remain unchanged.
-- Typed settings and parental destinations remain in `:core:navigation`.
-
-## Public feature boundary
-
-### Routes and graph registration
-
-The feature owns stable patterns matching the existing strings:
-
-```kotlin
-object SettingsRoutePatterns {
- const val SETTINGS = "settings"
- const val SETTINGS_DESTINATION = "settings?backupUri={backupUri}"
- const val PARENTAL_CONTROL_GROUPS = "parental_control_groups/{providerId}"
-}
-
-fun NavGraphBuilder.registerSettingsGraph(
- actions: NavigationActions,
- platformHost: SettingsPlatformHost,
- navigationDestinations: List<UiDestination>,
- onTopLevelRouteRequested: (String) -> Unit,
- onTopLevelDestinationRequested: (AppDestination) -> Unit,
-)
-```
-
-The graph reads the existing `backupUri` and `providerId` arguments, uses
-`dropUnlessResumed` for provider create/edit and parental navigation, and
-passes controller-free callbacks to the screens. It never imports
-`AppRouteCodec`, a root controller, `MainActivity`, or app payload storage.
-
-`AppRouteCodec` keeps constructing and decoding the same routes. The app system
-graph stops registering Settings only after `AppNavHost` registers the feature
-graph.
-
-### Platform host
-
-Route-owned Android actions use one narrow host supplied by `:app`:
-
-```kotlin
-interface SettingsPlatformHost {
- val buildInfo: SettingsBuildInfo
- val backupFiles: SettingsBackupFileHost
- fun officialBuildStatus(): SettingsOfficialBuildStatus
- fun playRecording(request: SettingsRecordingPlaybackRequest)
- fun shareBackup(uri: Uri): Result<Unit>
- fun shareCrashReport(): Result<Unit>
- fun removableBackupDirectory(): File?
-}
-```
-
-`SettingsBuildInfo`, `SettingsOfficialBuildStatus`, and
-`SettingsRecordingPlaybackRequest` are feature-owned immutable value types.
-The host adds no policy; app adapters delegate to current implementations.
-The feature retains Activity Result launchers and their callback order.
-
-`SettingsBackupFileHost` exposes the current managed-backup, picker-free,
-folder, removable-storage, URI, delete, and publish operations using
-`SettingsBackupFileCandidate` values. It delegates to app-owned
-`BackupFileBridge`; no storage policy or filename behavior is reimplemented in
-the feature.
-
-### Injected operational ports
-
-App-owned services used by the feature ViewModel are exposed through focused
-interfaces:
-
-```kotlin
-interface SettingsSurfaceRefreshPort {
- suspend fun refreshWatchNext()
- suspend fun refreshRecommendations()
- suspend fun refreshTvInputCatalog()
- fun enqueueTvInputCatalogRefresh()
-}
-
-interface SettingsDiagnosticsPort {
- fun latestReport(): SettingsCrashReport?
- fun deleteLatestReport(): Boolean
-}
-
-interface SettingsAppUpdatePort {
- val downloadState: StateFlow<SettingsUpdateDownloadState>
- fun isRemoteVersionNewer(
- remoteVersionCode: Int?,
- remoteVersionName: String,
- remotePublishedAt: String?,
- ): Boolean
- suspend fun fetchLatestRelease(): Result<SettingsReleaseInfo>
- suspend fun refreshDownloadState(): SettingsUpdateDownloadState
- suspend fun startDownload(release: SettingsReleaseInfo): Result<Unit>
- suspend fun installDownloadedUpdate(expectedSha256: String?): Result<Unit>
-}
-```
-
-The feature value types preserve every field consumed by current settings
-presentation. App adapters map current update/diagnostics objects without
-changing error strings, timestamps, HTTPS validation, download state, or
-installer behavior. The feature owns the pure auto-check interval and
-download/install action-selection policy; the app port retains the
-BuildConfig/channel-aware version comparison.
-
-## Screen and state boundary
-
-Phase 5 keeps the current `SettingsUiState`, action coordinators, observer
-topology, and ViewModel call order. The extraction may split route-owned
-platform launchers from `SettingsScreen`, but must not split the ViewModel by
-responsibility in the same change. That decomposition belongs to a later
-behavior-focused phase with dedicated tests.
-
-The target composition is:
-
-```text
-SettingsGraph
- SettingsRoute
- Activity Result launchers and SettingsPlatformHost
- SettingsScreen
- Settings navigation rail/content pane
- sections and rows
- SettingsScreenOverlays
- backup/restore dialogs
-
- ParentalControlGroupRoute
- ParentalControlGroupScreen
-```
-
-`SettingsScreen` remains renderable with an explicitly supplied ViewModel/state
-and callbacks. Existing test tags, content descriptions, focus request order,
-dialog ordering, lazy-item ordering, and Back behavior remain unchanged.
-
-## Resources
-
-The settings package references 665 unique resources: 660 strings and five
-plurals. Feature-owned settings and parental keys move locale by locale into
-`:feature:settings`. A resource is removed from `:app` only when no app source,
-test, manifest, benchmark, or other feature references it. Shared keys may be
-duplicated temporarily when ownership is not yet safe to transfer; duplication
-is recorded in the report.
-
-The module namespace is `com.streamvault.feature.settings`, and moved source
-uses `com.streamvault.feature.settings.*` packages and
-`com.streamvault.feature.settings.R`.
-
-## Migration sequence
-
-1. Record inventory, rollback SHA, baseline commands, dependencies, routes,
- resources, tests, and open acceptance gates.
-2. Add the module, coverage wiring, and fail-closed boundary task with Kotlin
- and Java violation fixtures.
-3. Establish neutral shared UI/model contracts and app-supplied platform ports.
-4. Move the backup-preview implementation first and keep the provider contract
- compatible through app composition.
-5. Move parental-control presentation and verify its provider-ID route.
-6. Move settings models/actions/observers and their tests mechanically.
-7. Move `SettingsViewModel` and add app adapters/Hilt bindings for operational
- ports.
-8. Move remaining Settings UI and resources without changing behavior.
-9. Register the settings graph from `AppNavHost`, then remove Settings routes
- from the app system graph.
-10. Remove legacy ownership, audit dependencies, update the ledger, run all
- structural/runtime gates, regenerate profiles, refresh Graphify, and write
- the feature report.
-
-## Error handling and rollback
-
-- Invalid or missing settings backup URI retains the existing empty/default
- behavior.
-- Missing recording playback or platform capability remains a no-op with the
- current user-message behavior.
-- File permission, unavailable picker, share, removable-storage, update,
- diagnostics, backup, Drive, sync, and provider errors keep their current
- messages and callback ordering.
-- Backup partial-import checkpoint and retry state is preserved.
-- The app-owned Settings route remains wired until the feature graph compiles,
- unit tests pass, and an installed app reaches both Settings destinations.
-- Commits separate contracts, mechanical moves, graph wiring, and cleanup so
- each slice is independently revertible.
-
-## Verification
-
-### Automated structural gates
-
-- `:feature:settings:verifyFeatureSettingsBoundary`
-- `:feature:settings:testDebugUnitTest`
-- `:feature:settings:lintDebug`
-- `:feature:settings:check`
-- `:feature:settings:assembleDebug`
-- app navigation compatibility tests and feature-graph boundary tests
-- `:app:testDebugUnitTest`
-- `:app:assembleDebug`
-- source scans for app/root-controller/feature-implementation imports
-- runtime dependency report and transitional ledger comparison
-- `graphify update .` after code changes
-
-### Connected and manual behavior gates
-
-- Settings route with and without `backupUri`.
-- Settings navigation rail, D-pad focus restoration, Back behavior, touch,
- mouse, RTL, reduced motion, and accessibility semantics.
-- All selection/value/PIN/provider/EPG/recording/update/backup dialogs.
-- Parental category protection/hiding, search, PIN, save/reset, and route return.
-- Backup create/share/local/folder/USB flows where supported; preview choices,
- conflict strategies, partial import, restore synchronization, and Drive
- sign-in/push/pull/manage/delete.
-- Provider create/edit callbacks from Settings and provider backup-preview
- rendering through the unchanged provider request contract.
-- Recording folder launcher and recording playback handoff.
-
-Unavailable hardware, credentials, accounts, files, or provider data are
-reported as open gates, not passes.
-
-### Build and profile evidence
-
-- Five before/after settings-only incremental source-edit runs.
-- Five before/after settings-test compile runs.
-- Clean debug and warm no-change guardrails.
-- Executed task-set proof that a settings edit does not compile playback or
- provider feature source.
-- Profile regeneration and stale app-settings descriptor scan after package
- moves.
-- Controlled runtime benchmark evidence for settings scrolling and dialog
- opening when the environment supports it.
-
-## Exit criteria
-
-- Settings, parental controls, backup/restore presentation, state, dialogs,
- resources, tests, and graph registration are owned by `:feature:settings`.
-- `:app` registers the settings graph and supplies platform adapters only.
-- Provider backup preview still renders through `ProviderBackupPreviewContent`
- with field-for-field callback compatibility.
-- No settings feature source imports `com.streamvault.app`, a root navigation
- controller, provider/playback feature implementations, or `MainActivity`.
-- All temporary `:data` imports are complete in the transitional ledger.
-- Feature tests run independently and a feature-only edit is isolated from
- unrelated feature compilation.
-- Verification and open runtime/performance gates are recorded honestly in
- `docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`.
diff --git a/docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md b/docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md
deleted file mode 100644
index 1b1710ed..00000000
--- a/docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md
+++ /dev/null
@@ -1,487 +0,0 @@
-# Phase 5 Live Feature Module Extraction Design
-
-Date: 2026-08-28
-Status: Approved for implementation planning
-
-## Context
-
-Phase 5 moves presentation out of `:app` into independently compiled feature
-modules without changing behavior. `:feature:playback` and `:feature:provider`
-are extracted. `:feature:settings` is codewise extracted and independently
-checked, with its remaining acceptance and performance gates recorded in
-`docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`. Those open gates remain
-separate and are not reopened or reinterpreted by this slice.
-
-The next roadmap item is `:feature:live`. Its current move unit contains Home
-Live TV browsing, category and channel presentation, EPG/guide presentation,
-preview rendering and state, remote-input policy, dialogs, Hilt ViewModels,
-resources, and tests. The production Home and EPG packages currently contain
-13 Kotlin files and approximately 10,700 lines. Graphify identifies
-`HomeViewModel` and `EpgViewModel` as god nodes with 69 and 71 connections.
-
-The extraction crosses three existing ownership seams:
-
-- Home and EPG directly use app implementations such as
- `StreamVaultPluginManager` and `TvInputChannelSyncManager`.
-- Preview handoff and MultiView are implemented in `:feature:playback`, but
- Phase 5 prohibits feature implementation dependencies.
-- Home and EPG still consume app-owned shell, card, selection, category,
- remote-input, time-format, and dialog presentation.
-
-The extraction is therefore contract-first and staged. It is not a package
-rename, a Live TV redesign, a preview-policy rewrite, or a Catalog extraction.
-
-## Goal
-
-Create `:feature:live` as the sole owner of Home Live TV and EPG presentation,
-state, dialogs, preview UI, feature resources, tests, and graph registration,
-while `:app` remains the platform and navigation composition root.
-
-The feature must compile and test independently. A live-only source edit must
-not compile Settings, Provider, Playback, Catalog, or System presentation
-source. Route arguments, list ordering, stable identities, focus restoration,
-remote shortcuts, callback order, preview handoff, EPG navigation, recording
-and reminder actions, and visual output remain equivalent.
-
-## Non-goals
-
-- Do not convert Home Live TV or EPG away from Compose.
-- Do not redesign Home, EPG, their modes, dialogs, navigation chrome, or
- preview layout.
-- Do not split or behaviorally refactor `HomeViewModel` or `EpgViewModel`
- during the mechanical ownership transfer.
-- Do not change preview preparation, adaptive reprime, decoder/surface/buffer
- setup, playback recovery, timeshift, HLS fallback, or player lifecycle.
-- Do not move `LivePreviewHandoffManager`, `MultiViewManager`,
- `MultiViewViewModel`, or `MultiViewPlannerDialog` out of
- `:feature:playback`.
-- Do not add `:feature:live -> :feature:playback` or any other feature-to-
- feature implementation dependency.
-- Do not start Dashboard, Movies, Series, VOD, Favorites, Search, Downloads,
- Plugins, Welcome, Catalog, or System extraction.
-- Do not close Playback, Provider, or Settings acceptance/performance gates.
-- Do not claim Phase 5 completion from completion of this slice.
-
-## Current ownership and coupling
-
-### Live presentation move unit
-
-```text
-app/src/main/java/com/streamvault/app/ui/screens/home/
-app/src/main/java/com/streamvault/app/ui/screens/epg/
-app/src/test/java/com/streamvault/app/ui/screens/home/
-app/src/test/java/com/streamvault/app/ui/screens/epg/
-```
-
-The production move unit includes:
-
-- `HomeScreen`, `HomeScreenDialogs`, `HomeSidebarComponents`,
- `HomePreviewUiState`, and `HomeViewModel`.
-- `EpgScreen`, `EpgControlComponents`, `EpgGridComponents`,
- `EpgHeroComponents`, `EpgScreenDialogs`, `GuideDateTime`,
- `PlayerTransparentGuideOverlay`, and `EpgViewModel`.
-- `HomeViewModelTest`, `EpgViewModelTest`, `GuideDateTimeTest`, and
- `ProgramReminderIssueMessageTest`.
-
-`PlayerTransparentGuideOverlay` is currently unreferenced. The accepted Phase
-5 design explicitly deferred it from Playback to this slice. It moves with EPG
-so there is one owner, but it remains unregistered and behaviorally unchanged.
-
-### Navigation
-
-`app/navigation/graph/LiveGraph.kt` currently owns `live_tv` and `epg`
-destination registration. `AppRouteCodec` owns compatibility encoding and
-decoding for:
-
-```text
-live_tv?categoryId={categoryId}
-epg?categoryId={categoryId}&anchorTime={anchorTime}&favoritesOnly={favoritesOnly}
-```
-
-The feature takes ownership of the stable patterns and graph registration.
-`AppRouteCodec` retains external compatibility, typed-destination encoding,
-payload transport, and player-request construction.
-
-### Preview and MultiView coupling
-
-Home and EPG use the `:player` API for auxiliary preview engines and directly
-use Playback implementation types for handoff and MultiView. The new feature
-must not import those types. `:app`, which already depends on both features,
-adapts the existing implementations to live-owned ports without adding policy.
-
-### Direct implementation dependencies
-
-The current packages directly use these non-domain implementations:
-
-| Implementation | Current responsibility | Phase 5 treatment |
-|---|---|---|
-| `PreferencesRepository` | live/guide preferences and preview engine configuration | temporary `:data` dependency; ledger every source site |
-| `ProviderSyncStateSource` | Home provider synchronization state | temporary `:data` dependency; ledger source site |
-| `StreamVaultPluginManager` | preview stream preparation | replace with `LivePreviewStreamPreparer` app adapter |
-| `TvInputChannelSyncManager` | refresh TV input after provider refresh | replace with `LiveSurfaceRefreshPort` app adapter |
-| `LivePreviewHandoffManager` | preview/fullscreen/reverse handoff | replace with `LivePreviewHandoffPort` app adapter |
-| `MultiViewManager` | slot count and capacity | replace with `LiveMultiViewStatusPort` app adapter |
-| `MultiViewViewModel` / `MultiViewPlannerDialog` | planner presentation and launch | inject app-composed `LiveMultiViewPlannerContent` |
-
-All remaining direct `:data` imports are recorded in
-`docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`. The direct
-`:player` dependency remains approved for `PlayerEngine`, render surfaces,
-engine qualifiers, and immutable player API types.
-
-## Target dependency direction
-
-```text
-:app
- -> :feature:live
- -> :feature:playback
- -> :feature:provider
- -> :feature:settings
- -> :core:navigation / :core:ui / :domain / :data / :player
-
-:feature:live
- -> :core:navigation
- -> :core:ui
- -> :domain
- -> :data # temporary; every direct implementation import ledgered
- -> :player # preview engine and render-surface API only
-```
-
-`:feature:live` must not depend on `:app`, `:feature:playback`,
-`:feature:provider`, `:feature:settings`, or a root navigation controller.
-
-## Target ownership
-
-### `:feature:live` owns
-
-- `LiveRoutePatterns` and `registerLiveGraph`.
-- Home Live TV screen, state, preview state, ViewModel, categories, channels,
- sidebars, quick filters, reorder UI, dialogs, and remote-shortcut policy.
-- EPG screen, state, ViewModel, grid, hero, controls, dialogs, override UI,
- reminder/recording presentation, date/time helpers, and the deferred
- transparent-guide source.
-- Live-owned playback request value types passed to app callbacks.
-- `LivePreviewHandoffPort`, `LivePreviewStreamPreparer`,
- `LiveSurfaceRefreshPort`, `LiveMultiViewStatusPort`, and immutable boundary
- values.
-- Live-specific copies/adapters of presentation that currently lives in
- `:app` but cannot move to `:core:ui` without coupling Core UI to domain
- models or starting Catalog work.
-- Feature strings/plurals/drawables, locale translations, unit tests,
- connected tests, golden fixtures, Compose diagnostics, and module-boundary
- verification.
-
-### `:app` retains
-
-- `MainActivity`, root `NavHostController`, `AppNavHost`, external intents,
- `AppRouteCodec`, navigation payload storage, and startup/top-level policy.
-- Construction of `PlayerNavigationRequest` from live-owned playback request
- values and invocation of `NavigationActions.openPlayer`.
-- App adapters for plugin stream preparation, TV-input refresh, preview
- handoff, and MultiView status.
-- Composition of Playback-owned `MultiViewPlannerDialog` and navigation to
- `AppDestination.MultiView`.
-- App-owned shared component implementations still used by Catalog/System.
- They are not deleted or moved merely because Live receives feature-local
- equivalents.
-- Generated profile production and app-level compatibility tests.
-
-### Neutral shared ownership
-
-- Shell visuals, device classification, notification permission gating,
- generic TV buttons/surfaces, PIN dialogs, image wrappers, and time-format
- primitives use existing `:core:ui` APIs.
-- `GuideLookupKey` and live remote-shortcut dispatch are live-specific and move
- into `:feature:live`.
-- Shared app components that accept domain entities remain in `:app` for
- Catalog until that slice. Live-local equivalents use distinct names where
- both implementations coexist; Catalog source is otherwise untouched.
-
-## Public feature boundary
-
-### Routes and graph registration
-
-The feature owns route strings exactly matching current compatibility:
-
-```kotlin
-object LiveRoutePatterns {
- const val LIVE_TV = "live_tv"
- const val LIVE_TV_DESTINATION = "live_tv?categoryId={categoryId}"
- const val EPG = "epg"
- const val EPG_DESTINATION =
- "epg?categoryId={categoryId}&anchorTime={anchorTime}&favoritesOnly={favoritesOnly}"
-}
-```
-
-Graph registration is controller-free:
-
-```kotlin
-fun NavGraphBuilder.registerLiveGraph(
- navigationDestinations: List<UiDestination>,
- onDestinationRequested: (AppDestination) -> Unit,
- onPlayChannel: (LiveChannelPlaybackRequest) -> Unit,
- onPlayArchive: (LiveArchivePlaybackRequest) -> Unit,
- multiViewPlannerContent: LiveMultiViewPlannerContent,
-)
-```
-
-The graph reads the existing argument defaults (`-1L`, `-1L`, and `false`),
-constructs Home and Guide return destinations with the same values, and passes
-controller-free callbacks to `HomeScreen` and `FullEpgScreen`. It never imports
-`AppRouteCodec`, `Routes`, `NavController`, `MainActivity`, app payloads, or a
-Playback implementation.
-
-The app maps `LiveChannelPlaybackRequest` and `LiveArchivePlaybackRequest`
-field-for-field into the existing `PlayerNavigationRequest` construction path.
-The feature request types preserve channel/provider/category identity,
-combined-profile/source filters, virtual-category state, archive bounds/title,
-and the typed return destination.
-
-### Preview ports
-
-The live feature defines:
-
-```kotlin
-enum class LivePreviewOrigin { HOME, GUIDE }
-
-data class LivePreviewSession(
- val engine: PlayerEngine,
- val channelId: Long,
- val providerId: Long,
- val streamInfo: StreamInfo,
-)
-
-interface LivePreviewHandoffPort {
- val reverseHandoffOrigin: Flow<LivePreviewOrigin?>
-
- fun registerPreviewSession(
- channel: Channel,
- streamInfo: StreamInfo,
- engine: PlayerEngine,
- origin: LivePreviewOrigin,
- )
-
- fun beginFullscreenHandoff(channelId: Long, engine: PlayerEngine?): Boolean
- fun consumeReverseHandoff(origin: LivePreviewOrigin): LivePreviewSession?
- fun clear(engine: PlayerEngine?)
-}
-
-interface LivePreviewStreamPreparer {
- suspend fun prepare(streamInfo: StreamInfo): Result<StreamInfo>
-}
-```
-
-`AppLivePreviewHandoffAdapter` delegates to the existing singleton
-`LivePreviewHandoffManager`, maps only enum/session value types, and preserves
-the same manager instance consumed by Playback. It does not reproduce timeout,
-release, or handoff policy. `AppLivePreviewStreamPreparer` delegates to
-`StreamVaultPluginManager.preparePlaybackStreamInfo` and preserves the existing
-result and error message.
-
-Home and EPG retain their separate preview state and existing preview engine
-logic. The ports replace imports only; they do not move player policy into the
-live feature.
-
-### TV surface and MultiView ports
-
-```kotlin
-interface LiveSurfaceRefreshPort {
- suspend fun refreshTvInputCatalog()
-}
-
-data class LiveMultiViewStatus(
- val channelCount: Int = 0,
- val slotCapacity: Int = 4,
-)
-
-interface LiveMultiViewStatusPort {
- val status: Flow<LiveMultiViewStatus>
-}
-
-typealias LiveMultiViewPlannerContent = @Composable (
- pendingChannel: Channel?,
- onDismiss: () -> Unit,
- onLaunch: () -> Unit,
-) -> Unit
-```
-
-The app surface adapter delegates to `TvInputChannelSyncManager`. The app
-MultiView adapter combines the existing `MultiViewManager.slots` and persisted
-two-slot layout preference into the same count/capacity values currently
-computed by `HomeViewModel`. The planner lambda renders the existing
-Playback-owned planner with its existing Hilt scope and invokes callbacks in
-the same order. Live never imports Playback implementation packages.
-
-## Screen and state boundary
-
-Phase 5 keeps current state topology and ViewModel method order. The target is:
-
-```text
-LiveGraph
- HomeRoute
- HomeScreen
- live/category/channel presentation
- isolated HomePreviewUiState consumer
- HomeDialogsHost
- app-composed MultiView planner content
-
- EpgRoute
- FullEpgScreen
- guide grid/hero/controls
- isolated preview fields and render surface
- EpgScreenDialogs
-```
-
-`HomeUiState`, `HomePreviewUiState`, `EpgUiState`, `EpgOverrideUiState`, and
-`ProgramReminderUiState` retain their current fields and defaults during the
-move. Existing lazy keys/content types, focus requesters, saveable state,
-dialog ordering, lifecycle effects, permission gating, and Back behavior are
-preserved. Any missing stable key or `contentType` found by the inventory is
-recorded as a separate behavior/performance follow-up unless adding it is
-provably identity-preserving and covered by focused tests.
-
-The screens use `CoreAppScreenScaffold`, `UiDestination`, core time-format and
-device APIs, and feature-local presentation components. They remain renderable
-with explicitly supplied ViewModels/state and callbacks, without a root
-controller or app activity.
-
-## Resources
-
-The initial scan found 196 unique resource references in the Home/EPG move
-unit. The implementation inventory records exact default and locale ownership
-before moving any key.
-
-Feature-owned Home, Live TV, EPG, preview, reminder, recording-conflict, and
-dialog resources move locale by locale into `:feature:live`. A key is removed
-from `:app` only when no app source, test, manifest, benchmark, or other feature
-uses it. Shared keys may be duplicated temporarily with identical values; the
-duplication and future owner are recorded in the live report.
-
-The module namespace is `com.streamvault.feature.live`. Moved source uses
-`com.streamvault.feature.live.*` and `com.streamvault.feature.live.R`.
-
-## Migration sequence
-
-1. Record rollback SHA, exact sources/tests/resources/imports/routes, current
- test state, source counts, baseline commands, and all existing open gates.
-2. Add `:feature:live`, coverage/Compose configuration, and a fail-closed
- boundary task with Kotlin and Java violation fixtures.
-3. Add route patterns and live-owned playback request values with compatibility
- tests before changing app graph wiring.
-4. Add preview, preparation, TV-surface, and MultiView contracts; implement
- app adapters and Hilt bindings with delegation tests.
-5. Replace app shell/time/device/remote/shared-presentation imports with core
- APIs or distinct live-local presentation equivalents.
-6. Move Home state, ViewModel, preview state, tests, UI, dialogs, and resources.
-7. Move EPG state, ViewModel, tests, UI, dialogs, deferred overlay, and
- resources.
-8. Register the feature graph from `AppNavHost`; app callbacks construct player
- requests and compose the existing MultiView planner.
-9. Remove legacy live ownership only after feature, app integration, connected,
- and installed-route checks pass.
-10. Audit temporary dependencies/resources, capture build measurements,
- regenerate profiles, run full live acceptance, refresh Graphify, and write
- `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md`.
-
-## Error handling and rollback
-
-- Missing or invalid route arguments retain existing defaults.
-- No provider, empty category/channel, stale EPG, preview preparation failure,
- permission denial, reminder delivery issue, recording conflict, and EPG
- override errors keep current messages and callback ordering.
-- Preview cancellation, replacement, adaptive reprime, fullscreen handoff,
- reverse handoff, clear, engine stop, and engine release ordering remain
- unchanged.
-- MultiView planner dismissal and launch clear dialog/preview state in the same
- order before app navigation.
-- App adapters delegate and map values only; they do not catch, translate, or
- retry failures unless the existing call site already does so.
-- The app-owned live destinations remain wired until the feature graph compiles,
- unit tests pass, and the installed app reaches both Live TV and EPG.
-- Contracts, mechanical moves, graph wiring, cleanup, profiles, and acceptance
- evidence are separate rollback points.
-
-## Verification
-
-### Automated structural gates
-
-- `:feature:live:verifyFeatureLiveBoundary`
-- `:feature:live:testDebugUnitTest`
-- `:feature:live:lintDebug`
-- `:feature:live:compileDebugAndroidTestKotlin`
-- `:feature:live:check`
-- `:feature:live:assembleDebug`
-- route-pattern, playback-request mapping, app-adapter, and graph callback tests
-- `:app:testDebugUnitTest`
-- `:app:assembleDebug`
-- source scans for app/root-controller/feature-implementation imports
-- runtime dependency/ledger/resource ownership comparison
-- `graphify update .` after code changes
-
-### Connected and manual behavior gates
-
-- Live TV route with and without `categoryId`.
-- EPG route with category, anchor time, and favorites combinations.
-- Category/source switching, search, quick filters, hidden items, favorites,
- custom groups, pin/unpin, reorder, parental PIN, and focus restoration.
-- Repeated channel focus, preview start/stop/replacement, fullscreen handoff,
- reverse handoff, and MultiView planner/launch.
-- EPG horizontal time movement, vertical channel movement, paging, day/prime-
- time jumps, density/mode/favorites filters, search, overrides, reminders,
- recording conflicts, archive launch, and Back behavior.
-- TV remote, touch/mouse, RTL, reduced motion, accessibility semantics, and
- notification permission behavior.
-
-Unavailable providers, archive windows, recording storage, notification
-permission, accounts, hardware, or physical devices are recorded as open gates,
-not passes.
-
-### Mandatory live playback protocol
-
-Because this slice changes preview composition, preview handoff, navigation,
-and render-surface ownership, validation must cover at least two live channels.
-For each channel:
-
-- Capture 61 screenshots at a two-second cadence where practical (never fewer
- than 45 screenshots for approximately 90 seconds).
-- Confirm changing screenshot hashes through the full window.
-- Confirm the media session remains `PLAYING` with `error=null`.
-- Confirm sanitized HLS prepare/read/first-frame or intended recovery evidence.
-- Confirm no fatal player error, stuck-player timeout, or unintended MPEG-TS
- fallback.
-- Record channel name, screenshot count, interval, unique hash count, media
- session result, and log findings.
-
-A build, install, launch, single screenshot, or short visual check is not live
-acceptance.
-
-### Build and profile evidence
-
-- Five before/after live-only incremental source-edit runs.
-- Five before/after moved-test compilation runs.
-- Clean debug and warm no-change guardrails.
-- Executed-task proof that a live edit does not compile unrelated feature
- source.
-- Profile regeneration after package/signature moves, followed by scans for
- stale `com/streamvault/app/ui/screens/home` and `/epg` descriptors.
-- Runtime benchmark evidence for category switching, channel focus, preview
- start/stop/replacement, and EPG horizontal/vertical navigation when the
- environment supports reliable measurement.
-
-## Exit criteria
-
-- Home Live TV and EPG presentation, state, dialogs, resources, tests, preview
- UI, and graph registration are owned by `:feature:live`.
-- `:app` registers the live graph and supplies player-navigation callbacks,
- app adapters, and Playback-owned MultiView planner content only.
-- No live feature source imports `com.streamvault.app`, a root navigation
- controller, `MainActivity`, or another feature implementation.
-- Preview handoff continues through the same Playback singleton via the app
- adapter; no handoff/release policy is duplicated.
-- All temporary `:data` imports are complete in the transitional ledger.
-- Feature tests run independently and a live-only edit is isolated from
- unrelated feature compilation.
-- Multi-channel long-duration validation and all available Live/EPG functional
- gates are recorded with exact evidence.
-- Remaining unavailable or failed gates are stated in
- `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md` without claiming Phase 5
- completion or closing Settings, Provider, or Playback gates.
diff --git a/docs/superpowers/specs/2026-09-02-phase-5-catalog-feature-extraction-design.md b/docs/superpowers/specs/2026-09-02-phase-5-catalog-feature-extraction-design.md
deleted file mode 100644
index 9a480308..00000000
--- a/docs/superpowers/specs/2026-09-02-phase-5-catalog-feature-extraction-design.md
+++ /dev/null
@@ -1,521 +0,0 @@
-# Phase 5 Catalog Feature Extraction Design
-
-Date: 2026-09-02
-
-## Status
-
-Approved scope derived from the governing Compose reduction plan and the Phase
-5 roadmap. This document defines the dedicated design for the fifth Phase 5
-slice, `:feature:catalog`.
-
-## Goal
-
-Move Dashboard, Movies, Series, combined VOD, Favorites, Search, and catalog
-detail presentation out of `:app` into an independently compiled and tested
-`:feature:catalog` Android library. A Catalog-only change must stop recompiling
-unrelated feature presentation, while routes, return behavior, screen output,
-focus, input, lazy-list identity, Cast, download, and update behavior remain
-unchanged.
-
-This is an ownership and build-boundary change. It is not a visual redesign, a
-Compose-to-Views conversion, a repository rewrite, or a change to playback,
-Cast, download, provider synchronization, filtering, grouping, ranking,
-parental-control, or navigation policy.
-
-## Current baseline
-
-The unextracted Catalog surface currently contains 21 production Kotlin files
-and approximately 14,662 lines under these app packages:
-
-- `ui/screens/dashboard`
-- `ui/screens/movies`
-- `ui/screens/series`
-- `ui/screens/vod`
-- `ui/screens/favorites`
-- `ui/screens/search`
-
-The app also owns `HomeGraph`, `CatalogGraph`, catalog payload transport, detail
-navigation helpers, Catalog-only card/browse components, four Catalog-focused
-unit tests, and four Catalog route golden cases inside the mixed app golden
-suite.
-
-The current code has four boundary problems that must be resolved during the
-move:
-
-1. Catalog screens import app navigation, shell, device, time, formatting,
- resources, `MainActivity`, `StreamVaultPluginManager`,
- `DownloadForegroundService`, and app-update implementations.
-2. Dashboard directly renders the Settings-owned
- `DashboardShelfCustomizationDialog`.
-3. Movie and Series detail ViewModels directly import Playback-owned Cast
- implementations and resources.
-4. Seven Catalog ViewModels import `PreferencesRepository`, and Dashboard also
- imports `ProviderSyncStateSource`. These are allowed temporary `:data`
- dependencies, but they must be recorded in the Phase 5 transitional ledger.
-
-## Scope
-
-### `:feature:catalog` owns
-
-- `CatalogRoutePatterns` and controller-free `registerCatalogGraph`.
-- The Home/Dashboard route and media shelves.
-- Movies browse and movie detail presentation.
-- Series browse and series detail presentation.
-- Combined VOD browse presentation and its shared browse policies/helpers.
-- Search presentation and its ViewModel.
-- Favorites presentation and its ViewModel. Favorites remains unregistered if
- it is unregistered before extraction; this slice does not create a new route.
-- Catalog-specific cards, rows, filters, dialogs, browse chrome, time/progress
- ticker, formatting, and presentation models.
-- Catalog resources, unit tests, connected behavior tests, and Catalog golden
- fixtures.
-- Catalog boundary verification and Compose compiler diagnostics.
-
-### `:app` retains
-
-- `MainActivity`, `AppNavHost`, the root `NavHostController`, external intents,
- startup routing, compatibility encoding/decoding, and saved-state payload
- transport.
-- Player-request construction for channels, movies, episodes, and playback
- history.
-- The implementation that opens the Cast route chooser.
-- The `StreamVaultPluginManager` adapter used to prepare copy/download streams.
-- The `DownloadForegroundService` launcher.
-- App-update version/channel policy and `AppUpdateInstaller` integration.
-- The composition seam that renders the Settings-owned dashboard-shelf dialog.
-- App navigation-destination collection and mapping into Core UI shell models.
-- Platform and Hilt adapters that implement Catalog-owned ports.
-
-### Other modules retain
-
-- `:feature:settings` retains `DashboardShelfCustomizationDialog` because it
- edits a persisted settings preference and is also a Settings surface.
-- `:feature:playback` retains Cast request construction, coordination, playback
- events, message mapping, and player presentation.
-- `:core:navigation` retains `AppDestination`, `NavigationActions`,
- `NavigationOptions`, and player navigation request types.
-- `:core:ui` retains generic shell visuals, image wrappers, TV device
- detection, time-format composition locals, focus/input primitives, and
- feature-neutral visual components.
-- `:domain` retains repositories, use cases, managers, models, and pure catalog
- policies.
-- `:data` temporarily supplies `PreferencesRepository` and
- `ProviderSyncStateSource` until the Phase 7 contract cleanup.
-
-### Excluded
-
-- Downloads, Plugins, Welcome, Settings, Live, EPG, Playback, Provider, and
- MultiView screen extraction.
-- New Favorites navigation or product-visible route changes.
-- Paging-library adoption, new loading behavior, new sorting/filtering rules,
- or list-window size changes.
-- Cast, download, app-update, plugin, playback preparation, and provider-sync
- policy changes.
-- Closing open acceptance or performance gates belonging to Playback,
- Provider, Settings, or Live.
-
-## Chosen approach
-
-Use one Catalog module with app-owned adapters and composition slots.
-
-This is preferred over leaving Dashboard in `:app` because the accepted plan
-and roadmap explicitly place Dashboard media shelves in Catalog, and its media
-models/components overlap heavily with Movies, Series, Search, and Favorites.
-The cross-feature integrations are narrow enough to express as callbacks or
-ports.
-
-This is preferred over adding `:feature:catalog -> :feature:settings` or
-`:feature:catalog -> :feature:playback` dependencies because Phase 5 prohibits
-feature implementation dependencies. The app already depends on all feature
-modules and is the correct composition point for those integrations.
-
-Splitting Dashboard into a separate module is rejected for this slice. Its
-current size does not justify another Gradle module, and doing so would reduce
-the build-isolation value of the accepted Catalog grouping.
-
-## Module and package shape
-
-~~~text
-:feature:catalog
- api/
- CatalogFeatureContracts.kt
- CatalogPlatformPorts.kt
- navigation/
- CatalogGraph.kt
- CatalogRoutePatterns.kt
- presentation/
- components/
- dashboard/
- favorites/
- movies/
- search/
- series/
- vod/
- time/
-~~~
-
-Production packages use `com.streamvault.feature.catalog.*`. Existing source
-files move with history where practical. Large screens are not redesigned or
-arbitrarily decomposed as part of the module move; only focused files required
-for app-independent contracts and feature-local shared components are added.
-
-The module's approved project dependencies are exactly:
-
-~~~text
-:core:navigation
-:core:ui
-:domain
-:data
-~~~
-
-The module must not depend on `:app`, `:player`, or any `:feature:*`
-implementation module. The `:data` dependency is temporary and all imported
-types are listed in
-`docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`.
-
-## Feature contracts
-
-The feature owns small contracts that contain no app or sibling-feature types.
-Names and shapes are fixed for the implementation plan.
-
-~~~kotlin
-enum class CatalogNavigationChrome { Rail, TopBar }
-
-typealias CatalogScaffoldContent = @Composable (
- currentDestination: AppDestination,
- title: String,
- subtitle: String?,
- navigationChrome: CatalogNavigationChrome,
- topBarVisible: Boolean,
- compactHeader: Boolean,
- showScreenHeader: Boolean,
- content: @Composable ColumnScope.() -> Unit,
-) -> Unit
-
-typealias CatalogDashboardShelfCustomizationContent = @Composable (
- currentShelves: List<AppHomeDashboardShelf>,
- onDismiss: () -> Unit,
- onSave: (List<AppHomeDashboardShelf>) -> Unit,
-) -> Unit
-
-interface CatalogPlatformHost {
- fun openCastRouteChooser()
-}
-
-interface CatalogStreamPreparer {
- suspend fun prepare(streamInfo: StreamInfo): Result<StreamInfo>
-}
-
-interface CatalogDownloadStarter {
- fun startDownload(downloadId: String)
-}
-~~~
-
-`CatalogScaffoldContent` intentionally exposes exactly the arguments used by
-the current Catalog routes. None of the six Catalog root screens currently
-passes custom header, action, modifier, or content-padding slots. The app maps
-`currentDestination` through `AppRouteCodec` and captures the existing
-top-level destination callback when it delegates to `AppScreenScaffold`.
-
-Catalog-internal navigation uses typed Core destinations rather than app route
-strings:
-
-~~~kotlin
-data class CatalogChannelPlaybackContext(
- val categoryId: Long?,
- val providerId: Long,
- val isVirtual: Boolean,
- val combinedProfileId: Long?,
- val returnDestination: AppDestination,
-)
-~~~
-
-Dashboard and Favorites receive `onDestinationRequested:
-(AppDestination) -> Unit` for their content actions. Movies, Series, VOD, and
-Search no longer accept a raw `onNavigate` string solely to configure the app
-shell; their scaffold slot captures the app-owned destination selection
-callback. Favorites continues to accept an explicit current destination from
-its direct test host because it has no registered route.
-
-Cast behavior is translated through Catalog-owned request/result/event types:
-
-~~~kotlin
-data class CatalogCastRequest(
- val streamInfo: StreamInfo,
- val title: String,
- val subtitle: String?,
- val artworkUrl: String?,
- val startPositionMs: Long,
-)
-
-enum class CatalogMessage {
- CastStarted,
- CastUnavailable,
- CastUnsupported,
- CastItemUnavailable,
- CastSessionFailed,
- CastLoadFailed,
- DownloadStarted,
- DownloadFailed,
- DownloadUrlUnavailable,
-}
-
-sealed interface CatalogCastStartResult {
- data object Started : CatalogCastStartResult
- data object RouteSelectionRequired : CatalogCastStartResult
- data object Unavailable : CatalogCastStartResult
- data class Unsupported(val message: CatalogMessage) : CatalogCastStartResult
-}
-
-sealed interface CatalogCastPlaybackEvent {
- data object RouteSelectionCancelled : CatalogCastPlaybackEvent
- data class Finished(
- val succeeded: Boolean,
- val message: CatalogMessage,
- ) : CatalogCastPlaybackEvent
-}
-
-interface CatalogCastPort {
- val playbackEvents: Flow<CatalogCastPlaybackEvent>
- suspend fun startCasting(request: CatalogCastRequest): CatalogCastStartResult
-}
-
-sealed interface CatalogUiEvent {
- data object OpenCastRouteChooser : CatalogUiEvent
- data class ShowMessage(val message: CatalogMessage) : CatalogUiEvent
-}
-~~~
-
-The app adapter delegates to the existing Playback Cast factory/coordinator
-and maps results field-for-field. Movie and Series detail ViewModels retain the
-current pending/report-mode behavior but expose `CatalogUiEvent` and feature
-resource messages.
-
-Dashboard update behavior uses an app-owned adapter:
-
-~~~kotlin
-enum class CatalogUpdateAction {
- None,
- DownloadLatest,
- Downloading,
- InstallLatest,
- InstallPermissionRequired,
-}
-
-data class CatalogUpdateNotice(
- val latestVersionName: String,
- val downloadSha256: String?,
- val action: CatalogUpdateAction,
-)
-
-interface CatalogAppUpdatePort {
- val notice: Flow<CatalogUpdateNotice?>
- suspend fun installDownloadedUpdate(expectedSha256: String?): Result<Unit>
-}
-~~~
-
-The app implementation owns current-build comparison, cached release mapping,
-download-state mapping, and installation. The Catalog ViewModel only displays
-the mapped notice and requests installation.
-
-## Navigation seam
-
-`CatalogRoutePatterns` owns these existing strings without changing their
-values:
-
-~~~kotlin
-object CatalogRoutePatterns {
- const val HOME = "home"
- const val MOVIES = "movies"
- const val SERIES = "series"
- const val VOD = "vod"
- const val SEARCH = "search"
- const val SEARCH_DESTINATION = "search?query={query}"
- const val MOVIE_DETAIL = "movie_detail/{movieId}?returnRoute={returnRoute}"
- const val SERIES_DETAIL = "series_detail/{seriesId}?returnRoute={returnRoute}"
- const val MOVIE_DETAIL_PRESENTATION_HINT_KEY = "movie_detail_presentation_hint"
- const val SERIES_DETAIL_PRESENTATION_HINT_KEY = "series_detail_presentation_hint"
-}
-~~~
-
-`AppRoutePatterns` aliases these constants so external routes and compatibility
-tests remain app-owned. `AppRouteCodec` continues to encode and decode
-`AppDestination` and return-route query values.
-
-The feature graph registers Home, Movies, Series, VOD, Search, Movie Detail,
-and Series Detail. It receives callbacks for:
-
-- top-level destination requests;
-- opening movie and series detail with presentation hints;
-- channel, movie, episode, and history playback requests;
-- consuming/copying movie and series presentation hints;
-- app shell rendering and dashboard shelf customization.
-
-The feature graph never constructs `PlayerNavigationRequest`, imports
-`AppRouteCodec`, accesses `AppNavigationPayloads`, or receives a root
-controller. `AppNavHost` maps each callback to the existing app helpers.
-
-The existing `HomeGraph` is folded into `registerCatalogGraph`. The old
-app-owned `HomeGraph` and `CatalogGraph` are removed only after the feature graph
-passes focused graph tests and app navigation integration tests.
-
-## State, data, and platform boundaries
-
-- Existing ViewModel state flows, collection frequency, initial values, and
- callback order remain unchanged.
-- Filtering, ranking, grouping, hydration, sorting, and list-window behavior
- move mechanically with their current owners.
-- Movie/Series presentation-hint keys become feature-owned; the app payload
- adapter uses those keys when copying hints into the destination entry.
-- `CatalogStreamPreparer` replaces direct plugin-manager access for copy and
- download URL preparation.
-- Catalog ViewModels continue to use domain `DownloadManager`; successful
- enqueue calls invoke `CatalogDownloadStarter`, and user messages become
- `CatalogUiEvent` values rendered by the screen.
-- `CatalogPlatformHost` replaces `MainActivity` discovery for the Cast chooser.
-- `CatalogAppUpdatePort` replaces app-update implementation imports.
-- Catalog screens use `core.ui.device.rememberIsTelevisionDevice`,
- `LocalUiTimeFormat`, and Core UI date/time formatting.
-- The existing millisecond-duration formatter moves into Catalog presentation
- because only Catalog detail screens consume it after extraction.
-
-## Shared presentation ownership
-
-Components whose production consumers are all in the accepted Catalog scope
-move to feature-local packages. This includes the current Catalog cards,
-`CategoryRow`, continue-watching row, saved-category shortcuts, selection chips,
-reorder bar, VOD chrome/classic browser, infinite-scroll effect, browse shell
-content, external-ratings strip, episode row, and shared channel-progress
-ticker.
-
-The app shell wrapper does not move because Downloads, Plugins, and app-owned
-routes still consume it. Catalog receives an app-supplied scaffold slot that
-continues to use the same destination list and `CoreAppScreenScaffold` visuals.
-
-Generic Core UI components remain in `:core:ui`. This slice does not move a
-component into Core merely to make Catalog compile. A component is copied or
-moved into Catalog when its behavior or resource vocabulary is Catalog-specific.
-
-## Resources and localization
-
-Every resource referenced by moved production or test code is copied into the
-Catalog namespace before source moves. All currently supported locale values
-are copied with identical text, formatting arguments, plurals, and resource
-types.
-
-App copies are removed only when no remaining app source, test, manifest,
-benchmark, or sibling feature references the key. Shared app keys may remain
-duplicated during Phase 5 when ownership is not yet safe to change; duplicates
-are listed in the execution report.
-
-The four Catalog golden fixtures move from the mixed app route suite to a
-Catalog-owned connected suite:
-
-- `route_dashboard_default`
-- `route_movies_landing`
-- `route_series_detail`
-- `route_search_results`
-
-Pixel output is expected to remain identical. Baselines are regenerated only
-when package/resource mechanics make the existing file unusable and the visual
-diff has been reviewed as behavior-equivalent.
-
-## Error handling and rollback
-
-- Missing or invalid detail IDs keep the existing loading/error behavior.
-- Missing presentation hints fall back to repository detail lookup exactly as
- before.
-- Stream preparation, Cast start, Cast lifecycle, download enqueue, update
- installation, clipboard, and external-intent failures keep their current
- user-visible messages and no-op/fallback behavior.
-- A null `CatalogPlatformHost` makes route-chooser opening a no-op, matching the
- current non-`MainActivity` behavior.
-- Search section failures remain independent and retain the current degraded
- and empty-state behavior.
-- Every migration task compiles independently. App graphs may temporarily
- import feature-owned screens until feature graph registration is complete.
-- Original app resources and wrappers are removed only after the new feature
- destinations pass. Rollback is a wiring/package revert, not a data migration.
-
-## Verification
-
-### Structural and unit
-
-- `:feature:catalog:verifyFeatureCatalogBoundary`
-- `:feature:catalog:compileDebugKotlin`
-- `:feature:catalog:testDebugUnitTest`
-- `:feature:catalog:lintDebug`
-- `:app:testDebugUnitTest`
-- `:app:assembleDebug`
-- `:app:assembleBeta`
-- `:app:assembleRelease`
-
-The boundary verifier rejects app packages, `MainActivity`, root navigation
-controllers, `:player`, and every sibling feature implementation. It also
-asserts the exact four approved project dependencies and tests Kotlin and Java
-fixtures for every forbidden category.
-
-### Navigation and behavior
-
-- Route-pattern and graph callback tests cover Home, Movies, Series, VOD,
- Search query defaults, Movie Detail, Series Detail, return destinations, and
- presentation-hint consumption.
-- App tests continue to cover `AppRouteCodec`, payload copying, detail opening,
- return navigation, and player-request mapping.
-- ViewModel tests cover existing search history, dashboard shelf ordering,
- grouped detail hints, Cast start/lifecycle behavior, download launching, and
- update installation mapping.
-- Connected tests cover D-pad focus, touch/mouse activation, search typing,
- filtering/sorting, shelves, combined VOD, detail return, Cast chooser events,
- and lazy-list load-more behavior.
-- The four feature golden cases pass from the Catalog module.
-
-### Build and runtime
-
-- Capture five before/after incremental Catalog source-edit runs.
-- Capture five before/after incremental Catalog unit-test compile runs.
-- Record clean debug and warm no-change guardrails.
-- Prove a Catalog-only edit does not compile Playback, Provider, Settings, or
- Live Kotlin source.
-- Run the seeded dashboard vertical-scroll Macrobenchmark before and after.
-- Exercise Dashboard, Movies, Series, VOD, Search, details, and return routes on
- the API 36 TV emulator, plus phone/tablet and RTL/reduced-motion coverage when
- available.
-- Regenerate baseline/startup profiles because packages and method descriptors
- move; verify stale app Catalog descriptors are absent and feature Catalog
- descriptors are present.
-- This slice does not require the long-duration Live TV protocol unless an
- implementation change touches playback-facing behavior beyond request
- mapping. Any such change is out of scope and must stop for separate approval.
-
-## Documentation and graph maintenance
-
-Execution produces:
-
-- `docs/COMPOSE_REDUCTION_PHASE5_CATALOG_REPORT.md`
-- `validation/phase5_catalog/` inventory, build, resource, connected, device,
- profile, and benchmark evidence
-- a `:feature:catalog` section in the transitional dependency ledger
-- roadmap and governing-plan status updates based only on completed evidence
-
-After code changes, run `graphify update .` and record the graph refresh in the
-Catalog report.
-
-## Exit criteria
-
-- Dashboard, Movies, Series, VOD, Favorites, Search, and detail presentation are
- owned by `:feature:catalog`.
-- `:app` contains Catalog composition adapters and compatibility/navigation
- mapping, not Catalog screen implementations.
-- The feature has exactly the four approved project dependencies and no app,
- root-controller, player, or sibling-feature implementation imports.
-- Existing routes, arguments, presentation hints, return destinations, focus,
- semantics, lazy keys/content types, UI output, and callback sequence are
- preserved.
-- Catalog unit and connected tests run independently.
-- A Catalog-only edit does not compile unrelated feature source.
-- Temporary data imports and remaining duplicated resources are fully recorded.
-- Build, runtime, profile, device, and golden evidence is recorded without
- overstating unavailable or failed gates.
-- Playback, Provider, Settings, and Live open gates remain governed by their
- existing reports.
diff --git a/docs/superpowers/specs/2026-09-05-phase6-backup-import-views-experiment-design.md b/docs/superpowers/specs/2026-09-05-phase6-backup-import-views-experiment-design.md
deleted file mode 100644
index 629a6d8b..00000000
--- a/docs/superpowers/specs/2026-09-05-phase6-backup-import-views-experiment-design.md
+++ /dev/null
@@ -1,144 +0,0 @@
-# Phase 6 Backup Import Views Experiment Design
-
-## Decision
-
-Phase 6 will begin with a controlled A/B experiment for the backup-import preview dialog. The existing Compose implementation remains the production default while a classic Android Views implementation is built against the same state and action contract. The experiment must produce a keep-or-drop decision before the Views implementation is wired into the real Settings journey.
-
-The first candidate is intentionally narrower than the complete backup/import flow. File pickers, backup inspection, import execution, Drive actions, restore checkpoints, and provider synchronization remain unchanged. This isolates the UI-toolkit decision from persistence, I/O, and asynchronous import behavior.
-
-## Context
-
-The current preview surface is `BackupImportPreviewDialog` in `:feature:settings`. It renders a fixed set of backup counts, conflict information, two conflict-strategy actions, six import toggles, and Cancel/Import actions. The surrounding state and behavior already have explicit ownership:
-
-- `BackupPreview` and `BackupImportPlan` provide the rendered state.
-- `SettingsBackupActions` owns inspection, plan updates, confirmation, and retry behavior.
-- `SettingsViewModel` exposes the actions to `SettingsScreenDialogs`.
-- `SettingsPlatformHost` and the app adapters own Android framework operations outside the dialog.
-
-The current Compose dialog also carries TV-specific behavior that the experiment must preserve: delayed interaction protection while the dialog opens, initial body focus on television devices, scrollable body content, D-pad focus movement, Back dismissal, disabled actions while importing, and the existing localized strings.
-
-## Goals
-
-1. Establish a repeatable baseline for the current Compose preview surface.
-2. Build an equivalent classic Views surface without changing domain, ViewModel, or backup behavior.
-3. Compare both implementations under the same deterministic fixture and remote-control journey.
-4. Verify focus, accessibility, Back behavior, callback behavior, and visual parity before considering a migration.
-5. Make a documented keep-or-drop decision using benchmark evidence.
-
-## Non-goals
-
-- Converting the complete Settings screen.
-- Converting backup selection, local-backup management, Drive backup dialogs, or file pickers in this experiment.
-- Changing `BackupImportPlan`, `BackupPreview`, `SettingsBackupActions`, `SettingsViewModel`, or import execution behavior.
-- Introducing a new navigation destination for the production application.
-- Removing Compose dependencies from `:feature:settings` during the experiment.
-- Optimizing unrelated Settings or startup performance.
-
-## Options considered
-
-### Option A: Convert the complete backup/import flow
-
-This would cover file selection, preview, confirmation, import execution, and restore follow-up in one migration. It would provide the most realistic production result but would confound UI-toolkit measurements with Android document APIs, asynchronous work, and state restoration. It is too broad for the first Phase 6 decision.
-
-### Option B: Convert only the preview dialog with a deterministic benchmark host
-
-This keeps the state and behavior contract fixed, allows the same Compose and Views surfaces to be measured repeatedly, and leaves the current production path untouched until the result is known. It is the recommended option.
-
-### Option C: Convert a provider setup form first
-
-Provider setup is a valid later candidate, but it includes text input, provider-specific branches, validation, password handling, file launchers, pairing, and more extensive TV focus behavior. It is a larger migration and a weaker first experiment.
-
-## Recommended architecture
-
-### Shared contract
-
-The Views candidate consumes the existing `BackupPreview`, `BackupImportPlan`, and `isImporting` values. It emits the same callbacks as the Compose dialog:
-
-- dismiss
-- conflict-strategy selection
-- six section-toggle changes
-- import confirmation
-
-No new domain or persistence interface is introduced. The existing `SettingsBackupActions` remains the only owner of import behavior.
-
-### Views implementation
-
-Add a classic Views implementation in `:feature:settings` using an XML layout and a small Kotlin controller/view binder. The layout will contain:
-
-- title and version subtitle;
-- a vertically scrollable summary section;
-- two focusable conflict-strategy controls;
-- six focusable import switches;
-- Cancel and Import footer buttons.
-
-The dialog window will reproduce the current `PremiumDialog` contract: transparent window background, centered rounded surface, TV-sized width/height, bounded scrollable body, explicit initial focus, delayed interaction enablement, and Back/outside dismissal only after the open guard is released. Focus selectors and colors will use the existing `:core:ui` design values where XML resources are required; the candidate will not recreate a second application-wide design system.
-
-The production-facing integration point will be a small wrapper that can host the Views dialog from the existing Compose dialog host. It will be used only after the benchmark decision is positive. The existing Compose destination remains available as the rollback path throughout the experiment.
-
-### Debug-only benchmark host
-
-Add a debug-only activity in `:app` that renders the preview from a deterministic fixture. The activity accepts an explicit presentation mode (`compose` or `views`) and supplies identical callbacks that update the local fixture state. It does not access a real backup file, network provider, file picker, or database.
-
-This host gives Macrobenchmark a stable entry point and ensures the comparison measures the preview surface rather than backup I/O or the rest of Settings. A separate connected smoke test will exercise the real Settings integration after the candidate is wired behind the development switch.
-
-## Benchmark protocol
-
-Use the existing `:benchmark` module and seeded API 36 TV emulator. Add paired journeys that launch the same debug host in Compose and Views modes.
-
-Each mode will run the same sequence:
-
-1. Launch the benchmark host.
-2. Wait for the preview surface to become idle and record initial display timing.
-3. Move focus through the title/body/footer using D-pad input.
-4. Select the alternate conflict strategy.
-5. Toggle representative import sections, including a disabled/enabled transition for Import.
-6. Move focus back to the footer and dismiss with Back.
-
-Collect the same metrics and configuration for both modes:
-
-- `FrameTimingMetric` for focus and interaction work;
-- startup/initial-display timing for opening the surface;
-- memory/PSS metrics where supported by the installed Macrobenchmark version;
-- trace sections for the mode and journey boundaries;
-- functional and accessibility assertions outside the timing window.
-
-Use the same emulator image, APK variant, compilation mode, fixture, iteration count, and device reset policy. Run enough repetitions to report medians and P95 values rather than single samples. The diagnostic benchmark is not a release-quality physical-device claim; it is a paired comparison for this surface.
-
-## Functional and visual acceptance
-
-Both implementations must pass the same behavior matrix:
-
-- all six summary rows render with the same localized labels and counts;
-- conflict strategy selection updates the selected state and callback;
-- each import switch updates the corresponding callback;
-- Import is disabled when every section is disabled;
-- Cancel and Back dismiss when idle;
-- dismiss and Import are blocked while an import is active;
-- initial focus lands on the first body control on TV;
-- D-pad navigation reaches every interactive control in a predictable order;
-- scrollable content remains reachable without trapping focus;
-- visible text has equivalent accessibility labels and roles;
-- RTL and large-text layouts do not clip the dialog or hide actions;
-- the real Settings flow can still inspect and confirm a backup without behavior changes.
-
-The existing Compose instrumentation test remains as the baseline. Add View-hosted instrumentation coverage for the same states and callbacks, plus a paired screenshot/golden review on the seeded emulator. Visual parity is required for the experiment; a performance win that materially degrades the established StreamVault TV surface is not a successful migration.
-
-## Decision rule and rollback
-
-Views becomes the preferred implementation only if:
-
-- it improves at least one primary performance metric by approximately 10% or more across repeated paired runs;
-- it has no material regression in P95 interaction timing or memory behavior;
-- it passes the complete functional, focus, accessibility, RTL, large-text, and visual matrix;
-- the Compose/View host boundary is stable and understandable.
-
-If the results are tied, noisy, or fail any required behavior gate, the Views candidate is removed and the experiment report records that this surface remains Compose. If Views wins, it is first enabled through the development switch in the real Settings flow, validated again, and then made the default in a separate change. The original Compose implementation is not deleted in the same change that introduces the unvalidated replacement.
-
-## Deliverables
-
-1. A checked-in baseline/experiment benchmark entry for the Compose surface.
-2. A Views layout and binder/controller with the shared contract.
-3. A debug-only mode-selectable benchmark host.
-4. Equivalent Compose, Views, connected, and accessibility/focus tests.
-5. Paired benchmark output with medians, P95s, device/configuration, and functional results.
-6. A Phase 6 experiment report recording the keep-or-drop decision and next candidate.
diff --git a/docs/superpowers/specs/2026-09-05-settings-data-boundary-design.md b/docs/superpowers/specs/2026-09-05-settings-data-boundary-design.md
deleted file mode 100644
index 4de95e90..00000000
--- a/docs/superpowers/specs/2026-09-05-settings-data-boundary-design.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Settings Data Boundary Design
-
-## Context
-
-Phase 7 requires presentation modules to stop importing persistence and remote implementation types. `:feature:settings` currently depends directly on `:data` for `PreferencesRepository`, `ProgramDao`, Xtream indexing/onboarding DAOs and entities, and provider sync commands.
-
-## Decision
-
-Expose settings-required persistence through focused domain contracts:
-
-- `SettingsPreferences` contains only preference streams and commands consumed by settings UI and parental settings.
-- `SettingsOperations` exposes program counts, Xtream indexing/onboarding state, and repair-section sync commands using domain models.
-- `PreferencesRepository` implements `SettingsPreferences`; a data-layer adapter implements `SettingsOperations` by delegating to existing DAOs and sync commands.
-- Feature-owned UI mapping remains in `:feature:settings`, but it consumes domain models only.
-
-The contracts use existing domain enums and models wherever possible. Database maintenance and Xtream operational records become immutable domain snapshots. Android DataStore, Room DAOs/entities, and data sync enums remain private to `:data`.
-
-## Dependency direction
-
-```text
-:feature:settings ---> :domain <--- :data
- | |
- +----> :core:ui +----> DataStore / Room / sync implementations
- +----> :core:navigation
- +----> :player
-```
-
-## Compatibility
-
-- Preference keys, defaults, serialization, and setter behavior do not change.
-- Sync section ordering, progress callbacks, cancellation behavior, and user-facing messages do not change.
-- Xtream onboarding/index data is mapped field-for-field before entering presentation code.
-- Existing Hilt construction remains automatic through interface bindings.
-
-## Verification
-
-- Boundary tests must fail on either a Gradle `:data` dependency or a `com.streamvault.data` source reference.
-- Contract shape and data adapter mapping receive focused unit tests.
-- Existing settings tests are migrated to contract fakes/mocks without weakening assertions.
-- `:domain:test`, `:data:testDebugUnitTest`, `:feature:settings:testDebugUnitTest`, and `:app:assembleDebug` validate the completed checkpoint.
-
-## Out of scope
-
-- UI redesign or Compose-to-Views conversion.
-- Preference key/schema migration.
-- Changes to sync scheduling or provider behavior.
-- Removing the separate `:player` dependency; that belongs to the player-capability checkpoint.
diff --git a/docs/superpowers/specs/2026-09-06-playback-data-boundary-design.md b/docs/superpowers/specs/2026-09-06-playback-data-boundary-design.md
deleted file mode 100644
index 817c75d0..00000000
--- a/docs/superpowers/specs/2026-09-06-playback-data-boundary-design.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# Playback data-boundary cleanup
-
-## Context
-
-Phase 7 has already removed concrete `:data` dependencies from provider and settings features and from the player capability surface. `:feature:playback` still has a transitional `:data` edge. Its main source currently reaches into the data layer for preferences, provider playback resolution, credential/provider-specific exceptions, and the Xtream internal URL codec.
-
-The feature should own playback policy and presentation behavior. Persistence, provider selection, credential handling, and provider URL encoding belong behind domain contracts implemented by the application/data composition root.
-
-## Goal
-
-Remove `implementation(project(":data"))` and all `com.streamvault.data` imports from `:feature:playback` while preserving current playback resolution, credential-error messaging, multiview preference behavior, and live HLS-to-MPEG-TS recovery behavior.
-
-## Design
-
-### Player preferences contract
-
-Add `domain.settings.PlayerPreferences`, extending `SettingsPreferences` for the settings-owned preference surface and declaring the additional player/multiview reads and commands currently used by playback:
-
-- player mute state;
-- observed live/VOD variant maps and their recording commands;
-- per-channel aspect ratio and audio/video offset reads/writes;
-- last-live-category lookup and preferred-live-variant updates;
-- active-provider and multiview preset/performance-mode state.
-
-`PreferencesRepository` implements `PlayerPreferences`. The app Hilt module binds it to the domain contract. `PlayerPreferencesCoordinator` and `MultiViewViewModel` depend only on `PlayerPreferences`.
-
-### Playback resolution contract
-
-Add `domain.provider.PlayerPlaybackResolver` with:
-
-- `isInternalStreamUrl(String?)`;
-- `resolveAndCommitMetadata(...) : Result<ResolvedPlayback?>` using the existing domain `ResolvedPlayback` model.
-
-The result form keeps provider/data exceptions out of the feature API. The domain contract also defines stable player-facing failure types for credential access and provider resolution. An app adapter wraps `ProviderPlaybackResolver`, maps `ResolvedStreamUrl` to `ResolvedPlayback`, and translates the two data exceptions into those domain failures. Unknown failures retain their existing propagation behavior.
-
-`PlayerContentResolver` consumes only this contract and preserves separate credential and resolution messages. `PlayerProviderCoordinator` removes its data exception import and normalizes unexpected repository failures through the existing domain `Result` wrapper.
-
-### Internal playback URL codec
-
-The live recovery policy needs only the internal provider URL identity (provider id, live/movie/series kind, stream id, and extension), not the full data-layer Xtream factory. Add a small domain-owned `ProviderInternalStreamUrl` codec for that stable internal playback token. `PlayerAlternateStreamSupport` and its tests use this codec; data keeps its richer `XtreamUrlFactory` for data-layer URL construction and parsing.
-
-### Boundary enforcement
-
-Update the playback boundary task to:
-
-- approve only `:core:navigation`, `:core:ui`, `:domain`, and `:player` project dependencies;
-- reject `com.streamvault.data` in main source;
-- include Kotlin and Java data-import fixtures so the scanner cannot regress;
-- retain the existing app/navigation and direct Media3 guards.
-
-The task remains typed and configuration-cache compatible.
-
-## Compatibility and testing
-
-- Existing player content, provider coordinator, multiview, and alternate-stream tests are migrated to domain contracts/fakes.
-- Add focused tests for the app resolver adapter’s domain mapping and failure translation.
-- Run the playback boundary task, playback unit tests, domain/data/settings/player/live tests, and debug assembly.
-- Run `graphify update .` after source changes.
-- Update the Phase 7 plan only after the `:data` edge and source imports are absent and verification is green.
-
-## Out of scope
-
-- Reworking provider implementations or the existing data-layer resolver registry.
-- Changing playback retry policy, player capability APIs, or live validation behavior.
-- Removing other app/data dependencies outside `:feature:playback`.
diff --git a/docs/superpowers/specs/2026-09-06-player-capability-boundary-design.md b/docs/superpowers/specs/2026-09-06-player-capability-boundary-design.md
deleted file mode 100644
index 26d7fde4..00000000
--- a/docs/superpowers/specs/2026-09-06-player-capability-boundary-design.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# Player Capability Boundary Design
-
-Date: 2026-09-06
-Status: Approved for planning
-Phase: 7, checkpoint 3
-
-## Goal
-
-Complete the player-capability portion of Phase 7 by ensuring playback
-presentation consumes player-owned capabilities and never depends on concrete
-Media3 types. Preserve playback, recovery, timeshift, rendering, translation,
-and MultiView behavior.
-
-## Current state
-
-`Media3PlayerEngine` construction is already confined to application dependency
-injection, and `:feature:playback` no longer casts `PlayerEngine` to that concrete
-class. The earlier feature extraction added the capability methods needed by
-presentation directly to `PlayerEngine`.
-
-Two leaks remain:
-
-1. `LiveTranslationSession` constructs Media3 `Cue` values and compares audio
- buffers against Media3's PCM encoding constant.
-2. `:feature:playback` declares Media3 ExoPlayer directly and its boundary task
- does not prevent future Media3 imports or concrete-engine references.
-
-The existing architecture deliberately keeps the player API, Media3
-implementation, playback policies, timeshift, and surface binding together in
-`:player`. Splitting out another API module is not required by Phase 7 and would
-force Android/view concerns across a new module boundary without changing the
-runtime architecture.
-
-## Chosen approach
-
-Keep `PlayerEngine` as the player capability API and remove the remaining
-Media3-shaped values from its presentation-facing surface.
-
-### Injected subtitle capability
-
-Replace the cue-based presentation operation with a text-based capability:
-
-```kotlin
-fun setInjectedSubtitleText(text: String?)
-```
-
-A non-null, non-blank value displays one injected subtitle cue. A null or blank
-value clears injected subtitles. `Media3PlayerEngine` converts text to a Media3
-`Cue` internally and delegates to the existing view binder. Internal binder APIs
-may continue to use Media3 `Cue` because they remain inside `:player`.
-
-The old public `setInjectedSubtitleCues` and `clearInjectedSubtitleCues`
-operations will be removed after all callers migrate. This keeps one operation
-and makes clearing semantics explicit.
-
-### Live-audio capability
-
-Replace `LiveAudioPcmBuffer.encoding: Int` with a player-owned enum:
-
-```kotlin
-enum class PlayerPcmEncoding {
- PCM_16_BIT,
- UNSUPPORTED
-}
-```
-
-The Media3 audio sink maps `C.ENCODING_PCM_16BIT` to `PCM_16_BIT`; every other
-value maps to `UNSUPPORTED`. Presentation retains its existing rule of ignoring
-anything except 16-bit PCM. No resampling, timing, buffering, channel mixing, or
-upload behavior changes.
-
-### Dependency enforcement
-
-Remove the direct Media3 ExoPlayer dependency and Media3 imports from
-`:feature:playback`. Extend `verifyFeaturePlaybackBoundary` to reject:
-
-- `Media3PlayerEngine` in production presentation sources;
-- `androidx.media3` imports or fully qualified references in production
- presentation sources;
-- direct Media3 dependency aliases in the feature build file.
-
-Kotlin and Java fixtures will prove that import and fully qualified forms are
-detected. The feature continues to depend on `:player`, which is the approved
-owner of both the capability API and implementation.
-
-## Alternatives considered
-
-### Add `:player:api`
-
-This would make API-versus-implementation separation visible in Gradle, but the
-current API intentionally owns Android render-view creation and Compose surface
-binding. A new module would add configuration and dependency overhead while
-leaving those platform contracts intact. Reconsider only if a second player
-implementation or non-Android consumer appears.
-
-### Move the player contract into `:domain`
-
-Rejected because rendering, audio taps, subtitle styling, and lifecycle control
-are platform playback capabilities rather than business-domain contracts. This
-would either contaminate `:domain` with Android concerns or require a much larger
-redesign.
-
-### Only add a `Media3PlayerEngine` source guard
-
-This would document the already-satisfied cast requirement but leave direct
-Media3 types and dependencies in presentation. It is too weak for the Phase 7
-cleanup goal.
-
-## Behavior and error handling
-
-This checkpoint does not alter preparation, retries, recovery selection,
-timeshift, media sessions, render surfaces, track selection, audio focus, or
-transport policy. Subtitle text still becomes a single visible cue and is
-cleared on the same lifecycle paths. Unsupported PCM encodings continue to be
-discarded before conversion.
-
-No new user-visible error is introduced. Existing translation failures and
-cleanup paths remain unchanged.
-
-## Testing and validation
-
-Implementation will be test-driven and include:
-
-- contract tests for subtitle set/clear semantics;
-- mapping tests for 16-bit and unsupported Media3 audio encodings;
-- translation tests proving text rendering, clearing, and unsupported-buffer
- rejection remain unchanged;
-- playback boundary fixtures for concrete engine and Media3 references;
-- focused `:player` and `:feature:playback` unit tests;
-- the playback boundary task and `:app:assembleDebug`;
-- `graphify update .` after source changes.
-
-Because this changes player-facing API paths, final acceptance also requires the
-project's multi-channel, long-duration Live TV validation: screenshots every two
-seconds for at least 90 seconds per channel, frame-progression hashes, a healthy
-PLAYING media session, and sanitized logs with no fatal/stuck/unintended
-MPEG-TS-fallback evidence.
-
-## Completion criteria
-
-- `:feature:playback/src/main` contains no `Media3PlayerEngine` or
- `androidx.media3` references.
-- `:feature:playback` has no direct Media3 Gradle dependency.
-- Presentation uses only player-owned subtitle and PCM models.
-- The automated boundary prevents regression.
-- Focused and integration verification passes.
-- Required Live TV validation passes or is explicitly recorded as an external
- environment blocker; it must not be reported as passing without evidence.
diff --git a/docs/superpowers/specs/2026-09-08-multiple-themes-design.md b/docs/superpowers/specs/2026-09-08-multiple-themes-design.md
deleted file mode 100644
index 3e0a322d..00000000
--- a/docs/superpowers/specs/2026-09-08-multiple-themes-design.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# Multiple Themes Design
-
-## Goal
-
-Add user-selectable palette themes to StreamVault. The existing blue/navy palette remains the default, the M3 purple-on-black palette is selectable, and a true light palette is available for brighter viewing environments.
-
-## Scope
-
-- Theme selection is a persisted application preference.
-- Settings exposes a single theme selector in the Browsing section, directly below the existing view-mode-style app preferences.
-- The first release changes colors, Material color roles, and focus treatment only. Typography, shapes, spacing, layout density, and behavior remain shared.
-- Theme selection applies to the main app and the TV input setup activity.
-- Backup export and restore include the selected theme.
-- Unknown or missing stored values safely fall back to the blue default.
-- This slice does not add remote theme packages, user-authored colors, per-screen themes, or runtime plugin loading.
-
-## Theme IDs
-
-Theme IDs are stable storage values, not enum ordinals:
-
-| ID | Display name | Palette |
-| --- | --- | --- |
-| `classic_blue` | Classic blue | Current StreamVault blue/navy palette |
-| `m3_purple` | M3 purple | Purple primary with neutral black surfaces |
-| `light` | Light | Light surfaces with readable dark text and blue accents |
-
-## Architecture
-
-The domain layer owns the stable `AppTheme` ID enum and its tolerant storage parser. The data layer exposes it through `SettingsPreferences`, stores it in DataStore, and includes it in the existing portable backup registry and backup codec. The settings feature observes and writes the enum through its existing preference snapshot/view-model flow.
-
-The core UI layer owns the color palettes because it is intentionally independent of the domain and app modules. `StreamVaultTheme(themeId: String)` resolves the requested palette, updates the existing `AppColors` facade through Compose state, and constructs either a dark or light Material TV color scheme from that palette. Existing color call sites remain source-compatible, while top-level aliases become computed getters so they follow palette changes. The app entry points collect the domain preference and pass its stable storage value to core UI.
-
-## Safety and compatibility
-
-- The default is the current palette, so upgrades do not change appearance for users without a stored theme.
-- Invalid backup values are ignored by the domain parser and resolve to the default.
-- No network, permission, reflection, dynamic code, credential, or provider behavior is introduced.
-- Backup keys follow existing portable preference conventions and are not device-bound.
-
-## Verification
-
-- Unit tests cover theme ID parsing/defaulting and palette resolution.
-- Settings tests cover snapshot propagation and the setter contract.
-- Backup registry tests cover portable admission.
-- Targeted Gradle unit tests are run for domain, core UI, feature settings, and data; existing unrelated baseline failures are reported separately.
diff --git a/docs/superpowers/specs/2026-09-11-vod-overlay-chapters-design.md b/docs/superpowers/specs/2026-09-11-vod-overlay-chapters-design.md
deleted file mode 100644
index b1771056..00000000
--- a/docs/superpowers/specs/2026-09-11-vod-overlay-chapters-design.md
+++ /dev/null
@@ -1,292 +0,0 @@
-# VOD Overlay Redesign and Chapter Navigation Design
-
-**Date:** 2026-09-11
-
-**Status:** Approved visual direction; awaiting written-spec review
-
-## Summary
-
-Replace the existing VOD control card with a cinematic, video-first overlay and add native chapter navigation from Media3 1.11 metadata. The new interface must feel unrelated to the old VOD overlay while preserving every existing playback capability. Live TV controls remain visually and behaviorally unchanged.
-
-The approved visual reference is the interactive mockup in the current brainstorming session. Its defining traits are a bottom gradient instead of a floating card, a full-width chapter-aware timeline, centered transport controls, a small number of direct actions, and right-side sheets for chapters and playback settings.
-
-## Goals
-
-- Replace the VOD overlay's layout, hierarchy, colors, buttons, focus treatment, and settings presentation.
-- Keep the playing video visually dominant while controls are visible.
-- Make play, pause, seeking, elapsed time, remaining time, and the current title immediately understandable at TV distance.
-- Expose Media3 chapters through timeline markers, current-chapter context, previous/next chapter actions, and a chapter list.
-- Preserve subtitles, audio, quality, episodes, mute, speed, A/V sync, timers, Cast, picture-in-picture, aspect ratio, and external-player actions.
-- Provide predictable DPAD navigation and equally usable touch targets.
-- Keep Media3 types inside the `:player` module and expose app-owned models through `PlayerEngine`.
-
-## Non-goals
-
-- Redesigning the live TV or live-timeshift overlay.
-- Creating or editing chapters when a source contains none.
-- Fetching chapters from provider APIs or online databases.
-- Generating chapter thumbnails. Existing seek thumbnails may be shown when available.
-- Adding chapter support to Cast, external-player playback, live TV, or catch-up playback in this iteration.
-- Replacing the app-wide theme system.
-
-## Visual Design
-
-### Video-first chrome
-
-The VOD overlay uses top and bottom gradients drawn directly over the playing video. It must not place transport controls inside a large floating card or full-width opaque panel.
-
-The top strip contains only the StreamVault mark and the current clock. The bottom area contains, in order:
-
-1. Content type, resolution/HDR context, title, and current chapter name.
-2. Elapsed and remaining time.
-3. A full-width progress track with chapter boundary markers.
-4. One action row with centered transport controls and supporting actions at the sides.
-
-The app's semantic palette remains the source of truth. Background scrims use black/transparent gradients for readability; progress and focus accents use the active theme's brand and focus colors. The implementation must not introduce a parallel VOD-only hard-coded palette.
-
-### Transport controls
-
-The centered transport group contains:
-
-- Previous chapter, only when chapters exist and playback is beyond the first chapter.
-- Rewind 10 seconds.
-- Play or pause as the strongest visual control and initial TV focus target.
-- Forward 10 seconds.
-- Next chapter, only when another chapter exists.
-
-Media-next and media-previous remote keys retain their existing episode/playlist semantics. Chapter navigation is invoked by the dedicated on-screen controls and chapter list, so the redesign does not silently change established remote behavior.
-
-### Direct actions
-
-The left side contains contextual navigation:
-
-- Chapters, only when at least one visible chapter exists.
-- Episodes, only for series episodes when the episode picker is available.
-
-The right side contains frequently changed playback choices:
-
-- Subtitles, only when subtitle choices exist.
-- Audio, only when audio choices exist.
-- Playback settings.
-
-Subtitles and audio are shortcuts into their existing selection flows. They also remain reachable from Playback settings so a user never loses access when the compact row is constrained.
-
-### Playback settings sheet
-
-Playback settings opens as a right-side sheet over a dimmed but still-visible video. It replaces the long horizontal row of text buttons. The root sheet groups all existing VOD actions:
-
-- Tracks: subtitles, audio, video quality.
-- Playback: speed and A/V synchronization when supported.
-- Display: aspect ratio and picture-in-picture.
-- Session: mute, Cast or stop casting, and open in external player when supported.
-- Timers: stop-playback timer and idle-standby timer, including active-state summaries.
-
-Existing detailed selection dialogs may initially remain behind these rows, but their entry point and focus return are owned by the new sheet. Follow-up visual alignment of those detail dialogs is part of this redesign, not a separate product feature.
-
-### Chapter sheet
-
-The chapter action opens a right-side sheet containing:
-
-- The chapter count and total duration.
-- A vertically ordered list of visible chapters.
-- A stable chapter number, title, and start timestamp for each row.
-- A strong selected/current treatment on the chapter containing the current playback position.
-- Initial focus on the current chapter, or the first chapter if playback precedes all chapter starts.
-
-Selecting a row seeks to its normalized window-relative start time and closes the sheet. Returning from the sheet restores focus to the Chapters action.
-
-Untitled chapters are displayed as `Chapter N`. Hidden chapters are never shown, never receive timeline markers, and are not targets for previous/next actions.
-
-## Interaction Model
-
-### Overlay states
-
-The VOD overlay has five mutually exclusive presentation states:
-
-- `Hidden`: unobstructed video.
-- `Controls`: title, timeline, transport, and direct actions.
-- `Seeking`: Controls plus the existing thumbnail preview and the target chapter name.
-- `Chapters`: dimmed controls plus the chapter side sheet.
-- `Settings`: dimmed controls plus the playback settings side sheet or one of its detail views.
-
-Only one side sheet or detail modal may be active. The existing exclusive `PlayerModalState` pattern remains the source of truth and gains chapter/settings destinations.
-
-### DPAD behavior
-
-- Opening controls focuses Play/Pause.
-- Up from transport focuses the timeline; down returns to transport.
-- Left/right on the focused timeline performs the existing seek-step behavior and shows the seek preview.
-- Horizontal movement inside the transport and direct-action rows follows visual order.
-- Up/down between rows uses explicit focus destinations rather than relying on spatial guessing.
-- Back closes a detail view, then its parent sheet, then the controls, then exits playback according to the existing back-navigation policy.
-- Any accepted interaction refreshes the existing control auto-hide timer. Auto-hide is suspended while a sheet or detail modal is open.
-
-### Touch behavior
-
-- Tapping the video retains the existing show/hide behavior.
-- Timeline dragging retains the existing seek-preview lifecycle.
-- Every interactive target is at least 48 dp.
-- Side sheets dismiss via Back, the close action, or tapping the dimmed scrim.
-- No new swipe-only interaction is introduced.
-
-### RTL and accessibility
-
-- Text and side-sheet alignment follow the locale.
-- Media time continues increasing left-to-right, including in RTL locales.
-- Transport meanings are based on time, not reading direction.
-- Every icon-only action has a localized content description.
-- Focus is conveyed by shape/scale and a high-contrast ring, never color alone.
-- Current chapter and active settings expose selected semantics to accessibility services.
-
-## Chapter Data Architecture
-
-### Player-owned model
-
-Add an app-owned immutable model in `:player`:
-
-```kotlin
-data class PlayerChapter(
- val index: Int,
- val title: String,
- val startTimeMs: Long,
- val endTimeMs: Long?
-)
-```
-
-Add `val chapters: StateFlow<List<PlayerChapter>>` to `PlayerEngine`. All fake/test engines must expose the same state. The feature layer never imports `androidx.media3.extractor.metadata.Chapter`.
-
-### Extraction and normalization
-
-Media3 1.11 exposes extracted chapter entries inside track `Format.metadata`. `Media3PlayerEngine` collects `androidx.media3.extractor.metadata.Chapter` entries when tracks or the active timeline change.
-
-Normalization must:
-
-1. Exclude `isHidden == true` entries.
-2. Exclude entries whose start time is unset or negative after conversion.
-3. Convert period-relative timestamps to window-relative timestamps by subtracting the current window's `positionInFirstPeriodUs / 1000`.
-4. Clamp valid start and end positions to the known window duration when available.
-5. Sort by start time.
-6. Deduplicate equivalent chapter entries exposed on multiple tracks.
-7. Derive a missing end from the next chapter start, or from duration for the final chapter.
-8. Use the localized fallback `Chapter N` when Media3 supplies no usable title.
-
-The chapter state is cleared before every prepare, on stop/release, and when the active media item changes. Metadata absence or malformed entries produce an empty list and never interrupt playback.
-
-Official API behavior requires the period-to-window conversion before calling `seekTo`: https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter
-
-### Feature-owned navigation policy
-
-A pure feature-layer chapter policy combines `chapters` and `currentPosition` to derive:
-
-- Current chapter.
-- Previous chapter target.
-- Next chapter target.
-- Whether each chapter transport action is enabled.
-- Chapter name shown during seek preview.
-
-At an exact chapter boundary, that chapter becomes current. Previous-chapter behavior follows familiar media-player semantics: if playback is more than three seconds into the current chapter, seek to its start; otherwise seek to the previous chapter. Next always seeks to the next visible chapter.
-
-The three-second restart threshold is a named constant and is covered by unit tests.
-
-## Code Organization
-
-The redesign must avoid making the already large `PlayerControlsChrome.kt` and `PlayerScreen.kt` larger.
-
-### Player module
-
-- `PlayerChapter.kt`: app-owned public chapter model.
-- `ChapterMetadataMapper.kt`: Media3-to-app normalization and deduplication.
-- `PlayerEngine.kt`: chapter state contract.
-- `Media3PlayerEngine.kt`: lifecycle collection and chapter-state publication.
-
-### Playback feature
-
-- `VodChapterNavigation.kt`: pure current/previous/next policy.
-- `VodOverlayState.kt`: immutable UI state and action availability.
-- `VodPlayerControlsOverlay.kt`: overlay composition and layout.
-- `VodTimeline.kt`: progress, markers, seek preview, and timeline semantics.
-- `VodTransportControls.kt`: play/pause and seek/chapter controls.
-- `VodChapterSheet.kt`: chapter list and focus restoration.
-- `VodPlaybackSettingsSheet.kt`: grouped entry points for all VOD settings.
-- `PlayerControlsOverlayHost.kt`: collect chapter state and adapt existing callbacks.
-- `PlayerModalState.kt`, `PlayerModalHosts.kt`, and `PlayerBackNavigationPolicy.kt`: exclusive sheet/modal state and back handling.
-- `PlayerControlsChrome.kt`: retain live controls and delegate non-live content to the new VOD overlay; remove the old `PlayerVodInfo` after parity is proven.
-
-Localized strings are added to the base playback string resource. Existing translations fall back to the base language until the normal localization workflow updates them.
-
-## Capability Parity
-
-The old VOD overlay may be removed only after the following actions are reachable in the new UI where their existing availability conditions are satisfied:
-
-- Play/pause, rewind, forward, and direct seek.
-- Mute/unmute.
-- Subtitle, audio, and video-quality selection.
-- Episode selection.
-- External-player launch.
-- Playback speed.
-- A/V synchronization.
-- Stop-playback timer and idle-standby timer.
-- Cast/stop casting.
-- Picture-in-picture.
-- Aspect ratio.
-
-Chapter controls are hidden while casting because this iteration does not obtain chapter state from the remote player. The rest of the VOD settings retain their current Cast-specific enablement rules.
-
-## Empty, Loading, and Failure Behavior
-
-- Before duration is known, the timeline is visible but non-seekable and uses no fabricated duration.
-- Before chapters arrive, no Chapters action, markers, title, or chapter transport controls are shown.
-- If chapters arrive after controls are already visible, the layout updates without stealing focus.
-- If the focused chapter action disappears because the media item changes, focus returns to Play/Pause.
-- A failed seek leaves the overlay open and follows the player's existing error/retry path.
-- Chapter parsing problems are logged only as sanitized debug diagnostics; they are not user-facing playback errors.
-
-## Motion
-
-- Controls use a short fade/vertical settle when shown and the existing auto-hide timing.
-- Sheets enter and leave horizontally with a short fade on the scrim.
-- Focus scale is restrained and must not cause neighboring controls to jump.
-- Motion honors the platform reduced-motion setting by removing translation and retaining only immediate visibility changes.
-
-## Testing and Acceptance
-
-### Unit tests
-
-- Chapter mapping: hidden, unset, duplicate, unordered, missing-title, missing-end, duration clamp, and period/window-offset cases.
-- Chapter navigation: exact boundaries, the three-second previous threshold, first/last chapters, gaps, and no chapters.
-- Overlay action policy: movie versus episode, missing tracks, casting, chapter availability, and compact layouts.
-- Back policy: settings detail to settings root, sheet to controls, controls to hidden.
-
-### Compose and screenshot tests
-
-Add or replace VOD goldens for:
-
-- Controls with no chapters.
-- Controls with chapters and current-chapter context.
-- Focus on Play/Pause, timeline, Chapters, Subtitles, Audio, and Settings.
-- Seek preview over a chapter boundary.
-- Chapter sheet with current row selected.
-- Settings root and representative detail view.
-- Compact touch layout and RTL layout.
-
-The obsolete `player_controls_overlay_vod.png` golden is replaced only after the new overlay passes review. Live-control goldens must remain unchanged.
-
-### Integration verification
-
-- Run `:player:testDebugUnitTest` and `:feature:playback:testDebugUnitTest` after each vertical slice.
-- Run playback Compose screenshot tests and review rendered output at TV and compact widths.
-- Assemble the debug APK.
-- Exercise one MP4 with QuickTime chapters, one MP4 with Nero chapters, one Matroska file with chapters, and one VOD without chapters on an emulator/device.
-- Confirm markers, current chapter, previous/next behavior, sheet seeking, focus restoration, subtitle/audio access, and settings parity.
-- Run the repository-wide `testDebugUnitTest` task before completion.
-
-## Delivery Sequence
-
-1. Add the chapter model, extraction, normalization, and engine state without UI changes.
-2. Add pure chapter-navigation and overlay-action policies.
-3. Build the new VOD overlay against fixture data and approve its goldens.
-4. Wire real player state and chapter seeking.
-5. Replace VOD settings entry points with the side-sheet hierarchy while preserving all actions.
-6. Remove the old VOD UI path, update documentation, and run full verification.
-
-Each sequence step must remain independently testable. Live playback behavior is not modified by any step.
diff --git a/docs/superpowers/specs/2026-09-14-provider-flow-main-thread-jank-design.md b/docs/superpowers/specs/2026-09-14-provider-flow-main-thread-jank-design.md
deleted file mode 100644
index 60dfa1e5..00000000
--- a/docs/superpowers/specs/2026-09-14-provider-flow-main-thread-jank-design.md
+++ /dev/null
@@ -1,254 +0,0 @@
-# Provider Flow Main-Thread Jank Remediation Design
-
-**Date:** 2026-09-14
-
-**Status:** Approved direction; corrected after implementation-plan review
-
-## Summary
-
-Remove the intermittent UI stalls caused by provider configuration decryption on the Android main thread. The data layer will decode encrypted provider configuration on IO, memoize only credential-redacted projections across collectors, and keep the public provider flows cold so their existing completion and exception semantics are preserved. One-shot typed snapshot loading will also move its decode step to IO. App navigation will consume the already collected navigation state instead of opening additional repository flows from composables.
-
-The change preserves the `ProviderRepository` interface, provider behavior, Room schema, and credential-at-rest format. Playback preload and thumbnail behavior are outside the implementation scope unless post-fix measurements show a remaining independent problem.
-
-## Evidence and Problem Statement
-
-ADB diagnostics from `com.streamvault.app.debug` showed cumulative frame jank of 3,988 out of 24,090 frames (16.55 percent), a 99th-percentile frame time of 250 ms, and a recent 56-frame skip. In the captured log window, 77 StrictMode events exceeded 100 ms, 24 exceeded 500 ms, and the longest reached 674 ms.
-
-The repeated main-thread stack was:
-
-1. Compose's `AndroidUiDispatcher` resumes a provider flow collector.
-2. `ProviderRepositoryImpl.getProviders()` handles a Room `combine` emission.
-3. `ProviderConfigurationCodec.decode()` decrypts stored configuration.
-4. `AndroidKeystoreCredentialCrypto.decryptIfNeeded()` loads Android Keystore and obtains the key.
-5. Keystore disk and binder work blocks the UI thread.
-
-`getProviders()` currently combines identity, configuration, account-runtime, and Stalker-learning tables before decoding every stored configuration. A runtime or learning update therefore repeats configuration decryption even when encrypted configuration has not changed. `getActiveProvider()` creates another cold mapping flow for every call, and app navigation has multiple long-lived and Compose-created collectors.
-
-Memory samples remained flat and later decreased, with no OOM or ANR. The observed failure is bursty main-thread blocking rather than a demonstrated heap leak or sustained CPU saturation.
-
-## Goals
-
-- Execute provider configuration decode and Android Keystore access away from the main thread.
-- Decode a provider configuration only when its stored configuration row changes.
-- Deduplicate configuration decoding across concurrent and repeated repository collectors.
-- Expose stable providers and active-provider flow instances without changing their cold-flow failure semantics.
-- Remove repository and activity lookups from app-shell composables.
-- Keep public provider emissions credential-redacted.
-- Preserve the first-emission behavior relied on by callers using `first()`.
-- Preserve provider ordering and all identity, runtime, catalog-layout, and Stalker-learning fields.
-- Add automated regression coverage for decode frequency, concurrent collectors, cold-flow error/completion semantics, redaction, snapshot dispatching, and navigation destination construction.
-- Verify the result on the connected emulator using repeatable ADB measurements.
-
-## Non-goals
-
-- Changing the Room schema or encrypted JSON format.
-- Replacing Android Keystore or weakening credential encryption.
-- Removing StrictMode from debug builds.
-- Refactoring all provider consumers to a new repository interface.
-- Redesigning navigation or app-shell visuals.
-- Changing Media3 preload, thumbnail extraction, or playback behavior in the initial fix.
-- Establishing a general application-wide performance framework.
-
-## Chosen Architecture
-
-### Stable cold flows with a redacted projection cache
-
-`ProviderRepositoryImpl` will own stable flow instances rather than constructing a new flow object in `getProviders()` and `getActiveProvider()`. The flows remain cold: each collector receives normal Room completion and exceptions, and callers using `first()` still wait for a real database emission.
-
-A synchronized process-local cache deduplicates only the expensive configuration projection. Each provider entry retains the complete immutable `ProviderConfigEntity` source row and its credential-redacted projection. Data-class equality therefore covers every current and future row field without maintaining a fragile hand-written cache key. An equal-row cache hit returns the projection; a changed row decodes on IO, immediately redacts the result, and replaces that provider's entry. Entries for removed configuration rows are evicted. Failed decodes are never cached.
-
-This avoids `shareIn`'s exception-hiding behavior while still guaranteeing that concurrent or repeated collectors do not repeat Android Keystore work for an unchanged configuration.
-
-### Configuration-only decode stage
-
-Configuration decoding becomes its own upstream stage sourced only from `ProviderSnapshotDao.observeConfigs()`. It runs on `Dispatchers.IO`, resolves rows through the synchronized projection cache, and produces a map keyed by provider ID.
-
-Each output entry is a private data-layer projection containing:
-
-- The configuration generation.
-- A `LegacyProvider` template populated with configuration-derived public fields.
-- A blank password/credential field.
-
-The typed `ProviderConfiguration` and decrypted password exist only while the projection is built. They are not retained in the cache or any public flow. The encrypted payload is not logged.
-
-M3U configurations that require no decryption follow the same mapping path for consistent behavior. Malformed or undecryptable configuration continues to follow the repository's existing failure behavior; the performance change does not silently convert credential corruption into a valid provider.
-
-### Lightweight assembly stage
-
-The final providers stream combines:
-
-- Provider identity rows.
-- Memoized redacted configuration projections.
-- Account runtime rows.
-- Stalker portal state rows.
-
-The combine transform performs only map lookups, generation validation, and immutable copies. Runtime and Stalker-learning emissions must not invoke `ProviderConfigurationCodec.decode()`.
-
-The assembly helper overlays current identity fields, account-runtime fields, and generation-valid Stalker learning onto the redacted configuration template. A provider without a typed configuration row retains the existing `ProviderEntity.toPublicDomain()` behavior. Output order remains the identity DAO order.
-
-The projection/assembly boundary will be implemented as focused internal data-layer code rather than adding more responsibilities to the already large `ProviderRepositoryImpl.kt`.
-
-### Keystore key-handle cache
-
-`AndroidKeystoreCredentialCrypto` will cache the process-local `SecretKey` handle returned by Android Keystore. The cache uses synchronized lazy initialization so concurrent callers cannot load or generate the alias more than once.
-
-Only the opaque `SecretKey` handle is cached; raw key material is never exported. Encryption and decryption still create a fresh `Cipher`, IV, and GCM operation per value. Existing exception wrapping and actionable credential-reentry message remain unchanged.
-
-The caching mechanism will be isolated behind a small internal key-provider class with an injectable loader, allowing JVM tests to prove single-load and concurrent behavior without requiring Android Keystore.
-
-### Navigation state ownership
-
-`AppNavigation` already collects `AppNavigationCoordinator.state`, whose `topLevelDestinations` and `catalogLayout` fields are sufficient to build app destination items. It becomes the sole app-shell source for these values.
-
-`rememberAppDestinationItems()` changes from looking up `MainActivity`, collecting preferences, and invoking `providerRepository.getActiveProvider()` to a pure composable adapter that accepts configured destinations and catalog layout. `AppNavigation` computes the localized `UiDestination` list once per relevant state change and supplies it to `AppNavHost` and app-shell scaffolds through an app-owned composition local.
-
-`AppNavHost` passes the same destination list to the settings graph. `AppScreenScaffold` reads the composition local instead of opening repository flows. Existing test/golden callers outside `AppNavigation` receive the current default destination list through the composition-local default, preserving isolated rendering.
-
-`AppNavigationCoordinator` may continue to observe active provider state for startup and catalog reconciliation. Those cold collectors may retain separate lightweight Room subscriptions, but the projection cache guarantees they do not duplicate configuration decryption.
-
-### One-shot snapshot loading
-
-`RoomProviderSnapshotRepository.getSnapshot()` currently resumes after Room calls on the caller context and then invokes `ProviderConfigurationCodec.decode()`. Playback capability resolution can call it from `viewModelScope`, which reproduced the same Keystore StrictMode stack on the main thread.
-
-Wrap the complete snapshot read/decode/assembly operation in `withContext(Dispatchers.IO)`. Preserve null, type-mismatch, decryption-error, runtime, and generation-valid Stalker-learning behavior. This path returns a credential-bearing typed `ProviderSnapshot` for operational use and must not use the redacted public projection cache.
-
-## Data Flow
-
-```text
-provider_configs Room flow
- -> IO decode/decrypt
- -> credential-redacted configuration projection
- -> synchronized cache keyed by complete ProviderConfigEntity equality
-
-provider identity + redacted projection + runtime + Stalker learning
- -> lightweight provider assembly
- -> stable cold providers flow
- -> stable distinct active-provider flow
- -> AppNavigationCoordinator state
- -> AppNavigation destination items
- -> AppNavHost and AppScreenScaffold
-```
-
-An account-runtime update enters only the lightweight assembly stage. It cannot reach configuration decode or Android Keystore.
-
-## Concurrency and Lifecycle
-
-- Android Keystore load, configuration decode, and redacted projection creation run on `Dispatchers.IO`.
-- Public provider flows remain cold; the process-local redacted projection cache is owned by the singleton repository implementation.
-- Compose receives immutable, credential-redacted `LegacyProvider` values.
-- The key-handle cache is safe under concurrent encryption/decryption calls.
-- No new always-running coroutine or worker is introduced.
-- One-shot typed snapshot reads and decode run inside `withContext(Dispatchers.IO)`; repository write methods retain their current transactional behavior.
-
-## Error and Security Behavior
-
-- Keystore or decryption failures remain `CredentialDecryptionException` failures with the existing user-actionable message.
-- A failed decode must not publish a partially populated or plaintext provider.
-- A failed public projection decode is not cached and propagates to that cold-flow collector as it does today.
-- Cached public projection state contains no password, Jellyfin token, or decrypted encrypted JSON.
-- Logs and ADB validation output must remain sanitized and must not include provider URLs, usernames, headers, device identifiers, tokens, or passwords.
-- Debug StrictMode remains enabled so regressions continue to be visible.
-- The implementation must not catch cancellation as a provider decode failure.
-
-## Testing Strategy
-
-### Data unit tests
-
-Add focused tests proving:
-
-- One configuration emission decodes each configured provider once.
-- Account-runtime-only emissions update runtime fields without additional codec calls.
-- Stalker-learning-only emissions update learned fields without additional codec calls.
-- Multiple simultaneous `getProviders()` and `getActiveProvider()` collectors resolve one cached decode pass for unchanged configuration rows.
-- A changed configuration generation or encrypted payload triggers exactly one new decode.
-- Removed configurations are removed from the projection cache and public output; re-adding the same row requires a fresh decode.
-- Provider order and active-provider selection remain unchanged.
-- Every emitted public provider has a blank password/credential field.
-- A decode exception terminates the emission without exposing a partial provider.
-- A later collection retries a previously failed decode rather than replaying or hiding the exception.
-
-Use fake or mocked DAO flows and a counting codec/projection dependency. Tests must control flow emissions explicitly rather than relying on timing delays.
-
-### Crypto unit tests
-
-Add JVM tests for the internal key-handle cache proving:
-
-- Sequential requests call the loader once and return the same handle.
-- Concurrent requests call the loader once.
-- A loader exception is propagated and is not cached, allowing a later request to retry.
-
-Existing credential error-message coverage remains.
-
-### App navigation tests
-
-Extend destination tests to prove:
-
-- Split and unified catalog layouts preserve the existing route behavior.
-- Destination construction is driven entirely by supplied state.
-- The default composition-local destination list keeps isolated scaffold and golden tests working.
-- `AppNavigation` forwards one consistent destination list to both app-shell and settings consumers.
-
-No visual golden should change because the destination contents and order remain unchanged.
-
-### Build and regression tests
-
-Run the focused data and app unit-test tasks first, then the repository-wide debug unit tests and debug APK assembly. Existing provider configuration migration, setup, sync, navigation, and shell tests must remain green.
-
-## Emulator Performance Validation
-
-Use the same connected emulator and debug package for before/after comparison.
-
-1. Install and launch the new debug APK.
-2. Clear logcat and reset `dumpsys gfxinfo com.streamvault.app.debug` counters immediately before the scenario.
-3. Exercise the same navigation and playback path that previously became laggy, while allowing provider runtime/background updates to occur.
-4. Capture StrictMode, Choreographer, process CPU, `/proc/<pid>/status`, `dumpsys meminfo`, and `dumpsys gfxinfo` evidence.
-5. Keep URLs and credential-bearing values out of saved or reported logs.
-
-If the reproduction includes live TV, also follow the repository's stricter playback validation: capture at least 45 screenshots at a 2-second cadence and prefer 61, validate more than one live channel, verify changing frame hashes, confirm the media session remains `PLAYING` with `error=null`, and inspect the prescribed sanitized HLS/recovery/fatal-error log patterns.
-
-The fix passes when:
-
-- No StrictMode stack contains `CredentialCrypto`, Android Keystore, or `ProviderConfigurationCodec.decode()` on the main thread.
-- Runtime and Stalker state updates produce no repeated provider configuration decode in diagnostic logs/tests.
-- No provider/Keystore main-thread event exceeds 100 ms.
-- The repeated scenario shows materially fewer skipped and janky frames than the captured 16.55 percent baseline; emulator-wide rendering noise is reported separately rather than attributed to the app.
-- Process RSS and thread count show no monotonic growth during a minimum five-minute observation.
-- There is no ANR, OOM, fatal player error, or behavioral regression in provider selection, navigation layout, setup, sync, or playback startup.
-
-If meaningful jank remains after these criteria pass, collect a fresh trace and treat preload/thumbnail behavior as a separate diagnosis. It must not be bundled into this fix without evidence.
-
-## Expected Code Organization
-
-### Data module
-
-- `ProviderPublicProjection.kt`: private/internal redacted configuration projection and lightweight identity/runtime/learning assembly.
-- `ProviderObservationStreams.kt`: stable cold flows plus synchronized redacted projection memoization.
-- `ProviderRepositoryImpl.kt`: stable observation-flow ownership and repository API delegation.
-- `RoomProviderSnapshotRepository.kt`: IO-confined one-shot typed snapshot loading.
-- `CredentialCrypto.kt`: Android implementation using the cached key provider.
-- `CachingSecretKeyProvider.kt`: testable synchronized key-handle cache.
-- Data repository and security tests covering emission and cache behavior.
-
-### App module
-
-- `AppNavigation.kt`: derive destination items from collected coordinator state and provide them to descendants.
-- `AppNavHost.kt`: consume the supplied shared destination list and forward it to settings.
-- `AppShellNavigation.kt`: pure destination construction plus composition-local consumption; no activity/repository lookup.
-- Existing navigation and shell tests expanded for the state-driven path.
-
-### Documentation
-
-- Provide a concise suggested changelog entry after implementation and validation; do not edit or stage the user's already-modified `docs/CHANGELOG.md` in this task.
-- Record emulator measurements in the implementation handoff; do not commit raw credential-bearing logcat output.
-
-## Delivery Sequence
-
-1. Add the testable Keystore key-handle cache and crypto tests.
-2. Add redacted provider projection and assembly code with pure unit tests.
-3. Add stable cold provider flows backed by synchronized redacted projection memoization; add multi-collector and emission-frequency tests.
-4. Move one-shot typed snapshot loading and decode to IO; add snapshot behavior and dispatcher tests.
-5. Remove repository collection from app-shell composables and route coordinator state through navigation; add app tests.
-6. Run focused and repository-wide tests, assemble/install the debug APK, and perform ADB comparison validation.
-7. Prepare a changelog entry only after the measured acceptance criteria pass; do not stage the user's existing changelog edits.
-
-Each step must preserve a buildable, testable state and must be committed independently during implementation.
diff --git a/docs/superpowers/specs/2026-09-14-xtream-series-zero-episodes-self-heal-design.md b/docs/superpowers/specs/2026-09-14-xtream-series-zero-episodes-self-heal-design.md
deleted file mode 100644
index cf9c3634..00000000
--- a/docs/superpowers/specs/2026-09-14-xtream-series-zero-episodes-self-heal-design.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# Xtream Series Zero-Episode Self-Heal — Design
-
-## Problem
-
-An Xtream provider can leave a series showing "Season N with 0 episodes" after a user re-enters it. Two distinct local states produce this symptom:
-
-1. **Fresh-but-empty**: the `series` row still reports `cache_state = DETAIL_HYDRATED` with a recent `detail_hydrated_at`, but the `episodes` rows are gone. `getSeriesDetails` trusts `hasFreshXtreamDetails()` and returns the empty persisted set without re-fetching.
-2. **Partial re-scrape**: re-hydration returns a smaller (or remapped) episode set than what is already persisted, and `episodeDao.replaceAll` blindly deletes the larger local set.
-
-Both cases were investigated against provider `line.dndnscloud.ru`. Foreign-key enforcement is OFF in this app (Room 2.8.4 does not call `setForeignKeyConstraintsEnabled`, and the app never does), so `onDelete = CASCADE` never fires; the loss is via `EpisodeDao.replaceAll` or the fresh-cache early return, not cascade.
-
-## Design
-
-All changes are contained in `SeriesRepositoryImpl.getSeriesDetails`.
-
-### Fix 1 — fresh-but-empty self-heal
-
-The Xtream branch currently returns unconditionally when the row is fresh. Mirror the existing Stalker "impossible state" guard: only return the cached seasons when they actually contain episodes; otherwise fall through to the normal re-hydration path.
-
-### Fix 2 — non-destructive episode adoption
-
-Compute one boolean used in two places:
-
-```
-adoptRemoteEpisodes = remoteEpisodes.nonEmpty && (persisted.isEmpty() || remoteEpisodes.size >= persisted.size)
-```
-
-- `true` → persist the remote set (`replaceAll`) and render the remote seasons.
-- `false` → keep the persisted set and render it; a partial/remapped response never shrinks the library.
-
-This preserves the existing "empty remote keeps persisted episodes" behavior (which is currently handled implicitly) and extends it to the "partial remote" case.
-
-## Non-goals
-
-- No sibling/variant redirect (opening a same-TMDB sibling that has episodes) — left for a follow-up if the fresh-but-empty guard does not cover the observed symptom.
-- No DAO or schema change.
-- No change to how a genuinely empty series is represented (`SUMMARY_ONLY`, season shells rendered from provider metadata).
-
-## Test coverage
-
-- Fresh Xtream series + zero persisted episodes → re-hydrates.
-- Fresh Xtream series + episodes present → no re-fetch (existing behavior preserved).
-- Non-fresh series + partial remote set → persisted (larger) set is kept, `replaceAll` not called.
-- Existing "remote returns only season metadata keeps persisted episodes" test must remain green.
diff --git a/docs/superpowers/specs/2026-09-16-settings-control-inventory.md b/docs/superpowers/specs/2026-09-16-settings-control-inventory.md
deleted file mode 100644
index 3f271085..00000000
--- a/docs/superpowers/specs/2026-09-16-settings-control-inventory.md
+++ /dev/null
@@ -1,219 +0,0 @@
-# Settings control preservation inventory
-
-> Status: implementation inventory. Every entry keeps its existing `SettingsViewModel`/platform callback and underlying repository or operational store. A visual move must not rename preference keys, reset values, or replace an action with local UI state.
-
-The persistence identifier below is the stable domain write API (and, where applicable, the `PreferencesKeys` family it owns). This is the feature boundary Settings can verify without importing the data module. Physical DataStore key strings remain owned by `PreferencesRepository` and the backup registry.
-
-Common verification for every preference: open from its catalog result, change it, leave and return, restart in final device verification, and confirm the displayed value and behavior persist. Common focus return: dialogs return to the invoking `stableSettingId`; nested-page Back returns to its page opener.
-
-## Navigation and focus ownership trace
-
-| Boundary | Owner | Entry target | Return behavior |
-|---|---|---|---|
-| App → Settings | `AppNavHost` supplies `NavigationActions.back` to `SettingsScreen` | Current category content | Settings root Back pops to the actual prior app route; Settings does not render the global app navigation bar |
-| Category list/rail → category | `SettingsScreen` | First overview row or first direct control | Compact Back returns to the category list and restores the selected category; wide navigation retains the selected rail item |
-| Category overview → detail | `SettingsContentPane` + `SettingsFocusCoordinator` | First enabled row after attachment | Visible and system Back clear the typed `SettingsPage`, retain the overview list state, and focus the exact page opener |
-| Settings search → result | `SettingsScreen` request ID + `SettingsContentPane` coordinator | Stable catalog item ID | Search dismissal restores the Search action; selection opens the owning category/page and focuses the registered target after layout |
-| Privacy → category management | Settings graph + `ParentalControlGroupScreen` local coordinator | Protection mode after loading | Visible and system Back call the same graph action and return to Settings; Up/Down explicitly connects the first control and local Back button |
-| Choice/PIN/confirmation dialogs | Dialog component while visible | Selected value or first required action | Dismissal exposes the invoking page without changing category/page state; final connected validation verifies each opener retains focus |
-
-Removed competing behavior: Settings no longer composes the global app navigation bar, page entry has no timed `delay(80)`/`delay(100)` focus race, and category/page/search transitions are issued by one attachment-aware coordinator per Settings surface. The parental loading transition uses the same stale-intent check. Dialog-local requesters remain contained inside their modal and do not select an app destination. Final connected tests cover modal opener restoration because host tests cannot observe platform focus after a real dialog closes.
-
-## Sources & guide
-
-| stableSettingId | Old → new location | Label/resource | Read → write/action | Availability / confirmation / aliases |
-|---|---|---|---|---|
-| `sources.add` | Providers → Sources & guide / Sources | provider add copy | provider list → `onAddProvider` | Always; aliases add playlist/source |
-| `sources.active_provider` | Providers → Sources | active provider | active provider → `setActiveProvider` | Provider exists |
-| `sources.edit` | Provider card → Source detail | provider name/type | provider → `onEditProvider` | Per provider |
-| `sources.sync` | Provider card → Source detail | sync actions | sync state → `syncProviderSection`/`syncProviderCustom` | Per provider; progress/cancel/error retained |
-| `sources.delete` | Provider card → Source detail | delete provider | provider → `deleteProvider` | Destructive confirmation retained |
-| `sources.parental_categories` | Provider card → Privacy & parental | category controls | active provider → parental route | Provider required; aliases protected/hidden categories |
-| `sources.combined.active` | Combined M3U → Sources | combined source | active profile → `setActiveCombinedProfile` | Combined profile exists |
-| `sources.combined.members` | Combined M3U → Source detail | provider membership | member state → add/remove/enable combined provider | Profile/provider required |
-| `sources.combined.delete` | Combined M3U → Source detail | delete combined profile | profile → `deleteCombinedProfile` | Destructive confirmation |
-| `sources.m3u_vod_classification` | Provider options → Source detail / Compatibility | VOD classification | provider flag → `setM3uVodClassificationEnabled` | M3U only |
-| `sources.xtream_text_classification` | Privacy → Sources / Compatibility | `settings_xtream_text_classification` | `useXtreamTextClassification` → `toggleXtreamTextClassification` | Xtream compatibility |
-| `sources.xtream_base64` | Privacy → Sources / Compatibility | `settings_xtream_base64_compatibility` | `xtreamBase64TextCompatibility` → `toggleXtreamBase64TextCompatibility` | Xtream compatibility |
-| `guide.source.add` | Guide → Sources & guide / Guide sources | add EPG source | fields → `addEpgSource` | Name and URL required; file picker retained |
-| `guide.source.enabled` | Guide source card → Guide source detail | source enabled | source flag → `toggleEpgSourceEnabled` | Per EPG source |
-| `guide.source.refresh` | Guide source card → Guide source detail | refresh | refresh state → `refreshEpgSource` | Per source; busy/error retained |
-| `guide.source.timezone` | Guide source card → Guide source detail | timezone | timezone → `updateEpgSourceTimezone` | Validation/error retained |
-| `guide.source.delete` | Guide source card → Guide source detail | delete | source → `deleteEpgSource` | Two-step destructive confirmation |
-| `guide.assignment` | Provider assignments → Guide source detail | assignments | assignment order → assign/unassign/move APIs | Provider and EPG source required |
-| `guide.policy` | Provider assignments → Source detail | guide source policy | provider policy → `setGuideSourcePolicy` | Supported provider types only |
-| `guide.logo_policy` | Provider assignments → Source detail | logo source policy | provider policy → `setChannelLogoSourcePolicy` | Supported provider types only |
-| `guide.time_shift` | Guide → Guide behavior | EPG time shift | provider minutes → adjust/reset APIs | Per provider |
-| `guide.default_category` | Browsing → Live TV / Browsing | `settings_guide_default_category` | category id → `setGuideDefaultCategory` | Categories available |
-
-## Playback
-
-| stableSettingId | Old → new page | Label/resource | Read → write/action | Availability / aliases |
-|---|---|---|---|---|
-| `playback.media_session` | Playback → General playback | `settings_media_session` | `playerMediaSessionEnabled` → `setPlayerMediaSessionEnabled` | Always; first General target |
-| `playback.external` | Playback → General playback | `settings_external_playback` | mode → dialog → `setExternalPlaybackMode` | Compatible external apps |
-| `playback.speed` | Playback → General playback | `settings_default_playback_speed` | speed → dialog → `setDefaultPlaybackSpeed` | Always |
-| `playback.av_sync` | Playback → Audio | audio/video sync | enabled → `setPlayerAudioVideoSyncEnabled` | Always |
-| `playback.av_offset` | Playback → Audio | A/V offset | milliseconds → `setPlayerAudioVideoOffsetMs` | Sync enabled |
-| `playback.audio_decoder` | Playback → Audio | audio decoder | mode → `setPlayerAudioDecoderMode` | Always |
-| `playback.video_decoder` | Playback → Compatibility | video decoder | mode → `setPlayerVideoDecoderMode` | Always |
-| `playback.audio_output` | Playback → Audio | audio output | preference → `setPlayerAudioOutputPreference` | Device capability explained |
-| `playback.audio_language` | Playback → Audio | preferred audio language | tag → `setPreferredAudioLanguage` | Always |
-| `playback.live_translation` | Playback → Subtitles | `settings_live_translation_enabled` | enabled → `setPlayerLiveTranslationEnabled` | Always |
-| `playback.translation_endpoint` | Playback → Subtitles | `settings_live_translation_endpoint` | endpoint → `setPlayerLiveTranslationEndpoint` | Translation enabled |
-| `playback.subtitle_size` | Playback → Subtitles | `settings_subtitle_size` | scale → `setSubtitleTextScale` | Always |
-| `playback.subtitle_text_color` | Playback → Subtitles | `settings_subtitle_text_color` | ARGB → `setSubtitleTextColor` | Always |
-| `playback.subtitle_background` | Playback → Subtitles | `settings_subtitle_background` | ARGB → `setSubtitleBackgroundColor` | Always |
-| `playback.fast_retry` | Playback → Network | `settings_fast_retry_on_transient_failures` | enabled → `setPlayerFastRetryOnTransientFailures` | Always |
-| `playback.buffer` | Playback → Network | `settings_live_buffer_size` | mode → `setPlayerPlaybackBufferMode` | Always |
-| `playback.wifi_cap` | Playback → Network | `settings_wifi_quality_cap` | height → `setWifiQualityCap` | Always |
-| `playback.ethernet_cap` | Playback → Network | `settings_ethernet_quality_cap` | height → `setEthernetQualityCap` | Always |
-| `playback.speed_test` | Playback → Network | internet speed test | probe state → existing speed-test runner | Network required; progress/error retained |
-| `playback.back_button` | Playback → Controls | `settings_player_back_button` | visibility → `setPlayerBackButtonVisibility` | Player setting, distinct from Settings Back |
-| `playback.controls_timeout` | Playback → Controls | `settings_player_controls_timeout` | seconds → `setPlayerControlsTimeoutSeconds` | Always |
-| `playback.live_overlay_timeout` | Playback → Controls | `settings_live_overlay_timeout` | seconds → `setPlayerLiveOverlayTimeoutSeconds` | Always |
-| `playback.notice_timeout` | Playback → Controls | `settings_player_notice_timeout` | seconds → `setPlayerNoticeTimeoutSeconds` | Always |
-| `playback.diagnostics_timeout` | Playback → Controls | `settings_player_diagnostics_timeout` | seconds → `setPlayerDiagnosticsTimeoutSeconds` | Always |
-| `playback.prevent_standby` | Playback → Timers | `settings_prevent_standby` | enabled → `setPreventStandbyDuringPlayback` | Always |
-| `playback.stop_timer` | Playback → Timers | `settings_default_stop_timer` | minutes → `setDefaultStopPlaybackTimerMinutes` | Always |
-| `playback.idle_timer` | Playback → Timers | `settings_default_idle_standby_timer` | minutes → `setDefaultIdleStandbyTimerMinutes` | Always |
-| `playback.compatibility_memory` | Playback → Compatibility | learned compatibility | enabled → `setPlayerCompatibilityMemoryEnabled` | Always |
-| `playback.clear_compatibility` | Playback → Compatibility | clear learned compatibility | state → `clearLearnedPlaybackCompatibility` | Confirmation retained |
-| `playback.surface` | Playback → Compatibility | player surface | mode → `setPlayerSurfaceMode` | Always |
-| `playback.live_format` | Playback → Compatibility | live stream format | mode → `setPlayerLiveStreamFormatMode` | Advanced |
-
-## Live TV
-
-| stableSettingId | New page | Label/resource | Read → write/action | Dependency |
-|---|---|---|---|---|
-| `live.mode` | Browsing layout | channel mode | `liveTvChannelMode` → `setLiveTvChannelMode` | Always; first page target |
-| `live.auto_hide_categories` | Browsing layout | auto-hide categories | flag → `setLiveTvAutoHideCategories` | Mode-dependent explanation |
-| `live.source_switcher` | Browsing layout | show source switcher | flag → `setShowLiveSourceSwitcher` | Always |
-| `live.favorites_category` | Browsing layout | favorites category | flag → `setShowFavoritesCategory` | Always |
-| `live.all_category` | Browsing layout | all channels category | flag → `setShowAllChannelsCategory` | Always |
-| `live.recent_category` | Browsing layout | recent category | flag → `setShowRecentChannelsCategory` | Always |
-| `live.hide_decorative_rows` | Channels & grouping | hide decorative rows | flag → `setHideDecorativeLiveRows` | Always |
-| `live.numbering` | Channels & grouping | numbering mode | mode → `setLiveChannelNumberingMode` | Always |
-| `live.grouping` | Channels & grouping | grouping mode | mode → `setLiveChannelGroupingMode` | Always |
-| `live.group_label` | Channels & grouping | grouped label | mode → `setGroupedChannelLabelMode` | Grouping enabled |
-| `live.variant_preference` | Channels & grouping | preferred variant | mode → `setLiveVariantPreferenceMode` | Grouping enabled |
-| `live.sort` | Channels & grouping | live category sort | mode → `setCategorySortMode(LIVE, …)` | Always |
-| `live.quick_filters` | Filters | quick filters | list → add/remove filter APIs | Always |
-| `live.filter_visibility` | Filters | quick-filter visibility | mode → `setLiveTvQuickFilterVisibilityMode` | Always |
-| `live.timeshift_enabled` | Timeshift | live timeshift | flag → `setPlayerTimeshiftEnabled` | Always |
-| `live.timeshift_depth` | Timeshift | timeshift depth | minutes → `setPlayerTimeshiftDepthMinutes` | Timeshift enabled |
-| `live.timeshift_backend` | Timeshift | timeshift backend | preference → `setPlayerTimeshiftBackend` | Timeshift enabled/device state |
-| `live.zap_auto_revert` | Timeshift | auto-return on failed channel | flag → `setZapAutoRevert` | Always |
-| `live.clock_enabled` | Clock | live clock | flag → `setPlayerLiveClockEnabled` | Always |
-| `live.clock_position` | Clock | clock position | value → `setPlayerLiveClockPosition` | Clock enabled |
-| `live.clock_size` | Clock | clock size | value → `setPlayerLiveClockSize` | Clock enabled |
-| `live.clock_font` | Clock | clock font | value → `setPlayerLiveClockFont` | Clock enabled |
-| `live.multiview_center_two` | Multiview | center two-slot layout | flag → `setCenterTwoSlotMultiviewLayout` | Always |
-| `live.multiview_connection_limit` | Multiview | respect connection limit | flag → `setMultiViewRespectProviderConnectionLimit` | Always |
-
-## Movies & series
-
-| stableSettingId | New page | Read → write/action | Dependency |
-|---|---|---|---|
-| `vod.view_mode` | Library | `vodViewMode` → `setVodViewMode` | Always |
-| `vod.type_badge_icon` | Library | flag → `setVodTypeBadgeAsIcon` | Always |
-| `vod.complete_on_open` | Library | load mode → `setVodCompleteOnOpen` | Always |
-| `vod.infinite_scroll` | Library | flag → `setVodInfiniteScroll` | Load-mode dependent |
-| `vod.portal_search` | Library | flag → `setVodPortalSearch` | Provider capability |
-| `vod.duplicate_handling` | Organization | mode → `setVodDuplicateHandlingMode` | Always |
-| `vod.variant_preference` | Organization | mode → `setVodVariantPreferenceMode` | Duplicate mode is not SHOW_ALL |
-| `vod.movie_sort` | Organization | mode → `setCategorySortMode(MOVIE, …)` | Always |
-| `vod.series_sort` | Organization | mode → `setCategorySortMode(SERIES, …)` | Always |
-| `vod.auto_next_episode` | Episode playback | flag → `setAutoPlayNextEpisode` | Always |
-| `vod.http_protocol` | Episode playback | mode → `setPlayerVodHttpProtocolMode` | Advanced |
-
-## Appearance & remote
-
-| stableSettingId | New page | Read → write/action | Notes |
-|---|---|---|---|
-| `appearance.theme` | Appearance | theme → `setAppTheme` | Classic blue, M3 purple, Light; update in place |
-| `appearance.language` | Appearance | locale → `setAppLanguage` | All shipped locales |
-| `appearance.time_format` | Appearance | format → `setAppTimeFormat` | Always |
-| `appearance.top_navigation` | Home & navigation | destinations → `setAppTopLevelDestinations` | Ordered list dialog |
-| `appearance.home_shelves` | Home & navigation | shelves → set/reset dashboard APIs | Ordered list dialog |
-| `appearance.landing` | Home & navigation | destination → `setAppLandingDestination` | Always |
-| `remote.shortcuts.global.red` | Remote | Global / red selection → `setRemoteShortcutSelection` | Profile default and explicit action retained |
-| `remote.shortcuts.global.green` | Remote | Global / green selection → `setRemoteShortcutSelection` | Profile default and explicit action retained |
-| `remote.shortcuts.global.yellow` | Remote | Global / yellow selection → `setRemoteShortcutSelection` | Profile default and explicit action retained |
-| `remote.shortcuts.global.blue` | Remote | Global / blue selection → `setRemoteShortcutSelection` | Profile default and explicit action retained |
-| `remote.shortcuts.playback.red` | Remote | Playback / red selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-| `remote.shortcuts.playback.green` | Remote | Playback / green selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-| `remote.shortcuts.playback.yellow` | Remote | Playback / yellow selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-| `remote.shortcuts.playback.blue` | Remote | Playback / blue selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-| `remote.shortcuts.browse.red` | Remote | Browse / red selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-| `remote.shortcuts.browse.green` | Remote | Browse / green selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-| `remote.shortcuts.browse.yellow` | Remote | Browse / yellow selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-| `remote.shortcuts.browse.blue` | Remote | Browse / blue selection → `setRemoteShortcutSelection` | Profile/global defaults and explicit action retained |
-
-## Privacy & parental
-
-| stableSettingId | New page | Read → write/action | Dependency / confirmation |
-|---|---|---|---|
-| `privacy.protection_level` | Parental controls | level → PIN flow → `setParentalControlLevel` | Existing PIN verification/creation retained |
-| `privacy.pin` | Parental controls | PIN state → set/change PIN flow | PIN never exposed in search value |
-| `privacy.category_protection` | Parental categories | pending protection → save/reset APIs | Provider; PIN required to save |
-| `privacy.category_visibility` | Parental categories | hidden state → toggle/hide all/unhide all | Provider required |
-| `privacy.incognito` | Privacy & history | `isIncognitoMode` → `toggleIncognitoMode` | Always |
-| `privacy.clear_history` | Privacy & history | playback history → `clearHistory` | Destructive confirmation |
-
-## Recordings
-
-| stableSettingId | New page | Read → write/action | Dependency |
-|---|---|---|---|
-| `recording.browser` | Status & files | recording items → open browser | Operational states retained |
-| `recording.reconcile` | Status & files | storage/database → `reconcileRecordings` | Storage available |
-| `recording.folder` | Storage | folder → `updateRecordingFolder` | Document permission retained |
-| `recording.app_storage` | Storage | folder → `updateRecordingFolder(null, null)` | Always |
-| `recording.usb_storage` | Storage | removable directory → `useUsbRecordingStorage` | USB action only when available |
-| `recording.filename` | Defaults | pattern → `updateRecordingFileNamePattern` | Validation retained |
-| `recording.retention` | Defaults | days → `updateRecordingRetentionDays` | Always |
-| `recording.concurrency` | Defaults | count → `updateRecordingMaxSimultaneous` | Existing bounds |
-| `recording.padding` | Defaults | before/after → padding setters | Existing bounds |
-| `recording.wifi_only` | Defaults | flag → `setRecordingWifiOnly` | Always |
-
-## Backup, support, and app actions
-
-| stableSettingId | New page | Read → write/action | Dependency / confirmation |
-|---|---|---|---|
-| `backup.create` | Local backup | backup state → `exportConfig`/platform file host | TV picker-free fallback retained |
-| `backup.restore` | Local backup | selected URI → `inspectBackup` then import plan | Preview/conflict confirmation retained |
-| `backup.manage_local` | Local backup | managed files → list/delete platform host | Delete confirmation retained |
-| `backup.share` | Local backup | export → platform share | Share failure retained |
-| `backup.usb_create` | Local backup | removable dir → export | USB only |
-| `backup.usb_restore` | Local backup | removable backups → preview | USB only |
-| `backup.drive_auth` | Cloud backup | auth → begin sign-in/sign-out | Drive capability/account state |
-| `backup.drive_push` | Cloud backup | sync state → `pushToDrive` | Signed in |
-| `backup.drive_pull` | Cloud backup | snapshots → `pullFromDrive`/select | Signed in; conflict preview |
-| `backup.drive_manage` | Cloud backup | snapshots → manage/delete | Signed in; destructive confirmation |
-| `about.auto_update_check` | Updates | flag → `setAutoCheckAppUpdates` | Platform update capability |
-| `about.auto_update_download` | Updates | flag → `setAutoDownloadAppUpdates` | Auto-check enabled |
-| `about.check_update` | Updates | update state → `checkForAppUpdates` | Busy/error retained |
-| `about.download_install` | Updates | action state → download/install callbacks | Permission-required state retained |
-| `about.release` | Updates | release URL → `onOpenUri` | URL available |
-| `support.crash_view` | Diagnostics | report → `viewCrashReport` | Report exists |
-| `support.crash_share` | Diagnostics | report → platform share callback | Report exists |
-| `support.crash_delete` | Diagnostics | report → `deleteCrashReport` | Report exists; destructive |
-| `about.github` | About | URL → `onOpenUri` | Always |
-| `about.donate` | About | URL → `onOpenUri` | Always |
-| `about.close_app` | About | action → `onCloseApp` | Explicit action |
-
-## Route and focus preservation
-
-- Settings root: visible exit control returns through `NavigationActions.back`.
-- Every nested page: visible Back and remote/system Back return one level and restore the exact page opener.
-- Forward page entry: first enabled content row receives focus; Back remains visible and reachable by Up.
-- Category selection: the first category destination or direct control receives focus. No Settings transition targets app Home.
-- Parental category route: first mode control receives focus only after loading completes; loading completion must not overwrite a later user move.
-- Dialog completion/dismissal: return to the exact invoking stable ID.
-- Search: result stores its stable ID, owning category/page, and return point; sensitive values such as PIN are never indexed.
-
-## Inventory audit result
-
-The completed source audit compares this inventory against `SettingsUiState`, every public Settings mutation/action in `SettingsViewModel`, provider/EPG/recording operational components, `SettingsPreferences`, `PreferenceBackupRegistry`, and conditional platform callbacks. It found and added the previously omitted `live.zap_auto_revert` control and expanded the remote shortcut matrix into its 12 independently persisted profile/button fields.
-
-The inventory and production search catalog now contain the same 143 unique stable IDs. Dynamic provider, combined-source, EPG, parental, USB, Drive, and update actions retain their availability rules; unavailable actions are excluded from search and dependent preferences remain visible with a prerequisite explanation. The localization coverage test verifies every replacement resource and formatting placeholder in all 25 shipped translated resource packs.