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 reorder bar

David Nashash520d7c10203d
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 ee9e1fd3..bc793c70 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
@@ -67,7 +67,7 @@ import com.streamvault.core.ui.components.dialogs.PremiumDialog
import com.streamvault.core.ui.components.dialogs.PremiumDialogActionButton
import com.streamvault.core.ui.components.dialogs.PremiumDialogFooterButton
import com.streamvault.app.ui.components.dialogs.RenameGroupDialog
-import com.streamvault.app.ui.components.ReorderTopBar
+import com.streamvault.feature.live.presentation.components.LiveReorderTopBar
import com.streamvault.app.ui.components.shell.AppNavigationChrome
import com.streamvault.app.ui.components.shell.AppScreenScaffold
import com.streamvault.core.ui.design.FocusRestoreHost
@@ -371,11 +371,14 @@ fun HomeScreen(
showScreenHeader = false
) {
if (isReorderMode) {
- ReorderTopBar(
+ LiveReorderTopBar(
categoryName = uiState.reorderCategory?.name ?: uiState.selectedCategory?.name ?: "Channels",
onSave = { viewModel.saveChannelReorder() },
onCancel = { viewModel.exitChannelReorderMode() },
- subtitle = stringResource(R.string.live_reorder_subtitle)
+ subtitle = stringResource(R.string.live_reorder_subtitle),
+ titleFormat = { categoryName -> stringResource(R.string.label_reordering, categoryName) },
+ cancelLabel = stringResource(R.string.action_cancel),
+ saveLabel = stringResource(R.string.action_save_order)
)
}
diff --git a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
index ec418c95..0ca6febe 100644
--- a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
+++ b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
@@ -128,8 +128,9 @@ 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`, 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 live source switcher, Home quick-filter chip row, and Home reorder top bar
+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
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 12512586..bf9f731f 100644
--- a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
+++ b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
@@ -18,7 +18,8 @@ golden/runtime/performance gates, and legacy app cleanup remain open; this plan
claim the Live slice or Phase 5 complete.
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
+live source switcher, Home quick-filter chip row, and Home reorder top bar 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.
@@ -653,9 +654,9 @@ 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
+feature-owned `LiveSourceSwitcher`, `LiveSelectionChipRow`, and
+`LiveReorderTopBar`, passing app-localized labels/title formatting 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:
diff --git a/feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveReorderTopBar.kt b/feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveReorderTopBar.kt
index 868c2a1d..6694eb54 100644
--- a/feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveReorderTopBar.kt
+++ b/feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveReorderTopBar.kt
@@ -40,7 +40,7 @@ fun LiveReorderTopBar(
visible: Boolean = true,
subtitle: String? = null,
modifier: Modifier = Modifier,
- titleFormat: (String) -> String = { "Reordering $it" },
+ titleFormat: @Composable (String) -> String = { "Reordering $it" },
cancelLabel: String = "Cancel",
saveLabel: String = "Save order"
) {