Skip to content

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

refactor(live): wire Home to live-owned controls

David Nashash5506c9bcd976
diff --git a/app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt b/app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt
index 4076e7cc..ee9e1fd3 100644
--- a/app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt
+++ b/app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt
@@ -20,8 +20,8 @@ import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.streamvault.core.ui.components.SearchInput
-import com.streamvault.app.ui.components.SelectionChip
-import com.streamvault.app.ui.components.SelectionChipRow
+import com.streamvault.feature.live.presentation.components.LiveSelectionChip
+import com.streamvault.feature.live.presentation.components.LiveSelectionChipRow
import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.focus.FocusRequester
@@ -50,11 +50,11 @@ import androidx.lifecycle.compose.LifecycleEventEffect
import com.streamvault.app.ui.components.CategoryRow
import com.streamvault.app.ui.components.ChannelCard
import com.streamvault.feature.live.presentation.components.LiveChannelProgressTicker
+import com.streamvault.feature.live.presentation.components.LiveSourceSwitcher
import com.streamvault.feature.live.home.HomeViewModel
import com.streamvault.feature.live.home.CategoryItem
import com.streamvault.feature.live.home.CompactSplitLauncherButton
import com.streamvault.feature.live.home.LivePreviewPane
-import com.streamvault.app.ui.components.LiveSourceSwitcher
import com.streamvault.core.ui.components.shell.ContentMetadataStrip
import com.streamvault.app.ui.components.shell.LiveChannelRowSurface
import com.streamvault.core.ui.components.shell.StatusPill
@@ -771,7 +771,10 @@ fun HomeScreen(
currentSource = uiState.activeLiveSource,
options = uiState.liveSourceOptions,
onSourceSelected = viewModel::switchLiveSource,
- compact = true
+ compact = true,
+ noSourceLabel = stringResource(R.string.playlist_no_provider),
+ selectedLabel = stringResource(R.string.label_selected),
+ unavailableLabel = stringResource(R.string.live_source_unavailable_short)
)
}
}
@@ -907,18 +910,18 @@ fun HomeScreen(
}
}
if (uiState.savedCategoryFilters.isNotEmpty() || uiState.categorySearchQuery.isNotBlank()) {
- SelectionChipRow(
+ LiveSelectionChipRow(
title = stringResource(R.string.home_quick_filters_title),
chips = buildList {
add(
- SelectionChip(
+ LiveSelectionChip(
key = HOME_ALL_FILTER_KEY,
label = stringResource(R.string.home_quick_filters_all)
)
)
addAll(
uiState.savedCategoryFilters.map { filter ->
- SelectionChip(key = filter, label = filter)
+ LiveSelectionChip(key = filter, label = filter)
}
)
},
diff --git a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
index 4907c59a..ec418c95 100644
--- a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
+++ b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
@@ -127,9 +127,11 @@ These are transitional adapters, not new policy owners:
The `:feature:live` module itself depends only on `:core:navigation`, `:core:ui`,
`:domain`, `:data`, and `:player`; its boundary verifier rejects app and
feature-to-feature imports. Home and Guide ViewModels are being moved behind
-the live boundary incrementally: `HomeViewModel` and the sidebar/preview
-surface components are now feature-owned while the Home screen/dialog
-composition remains in `:app`. Live-owned
+the live boundary incrementally: `HomeViewModel`, the sidebar/preview surface,
+the live source switcher, and the Home quick-filter chip row are now
+feature-owned while the Home screen/dialog composition remains in `:app`.
+The source switcher receives localized labels from the app at the current
+composition boundary. Live-owned
presentation primitives, `HomeUiState`, `HomePreviewUiState`, and Guide
mode/density/reminder presentation models are independent of app code;
screen/resource moves, golden/runtime/performance gates, and legacy app cleanup
diff --git a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
index fd7436e2..12512586 100644
--- a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
+++ b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
@@ -17,9 +17,10 @@ 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` and the sidebar/preview surface
-components are now feature-owned and their feature checks are green. Home
-screen/dialog composition, complete locale resource migration, and acceptance
+Status update (2026-08-29): `HomeViewModel`, the sidebar/preview surface, the
+live source switcher, and the Home quick-filter chip row are 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.
Route patterns were subsequently moved behind `LiveRoutePatterns`; the app
@@ -651,6 +652,12 @@ Run `HomeScreenBehaviorTest`; expected missing-screen failure.
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` and `LiveSelectionChipRow`, passing the
+app-localized labels through explicit presentation parameters. The remaining
+app-owned live cards/rows and shell/dialog composition still require
+compatibility seams before the full Home move.
+
Preserve planner callback order:
```text