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 channel rows

David Nashashb56727e82818
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 bc793c70..8b6cb06b 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
@@ -56,7 +56,7 @@ import com.streamvault.feature.live.home.CategoryItem
import com.streamvault.feature.live.home.CompactSplitLauncherButton
import com.streamvault.feature.live.home.LivePreviewPane
import com.streamvault.core.ui.components.shell.ContentMetadataStrip
-import com.streamvault.app.ui.components.shell.LiveChannelRowSurface
+import com.streamvault.feature.live.presentation.components.LiveChannelRowSurface
import com.streamvault.core.ui.components.shell.StatusPill
import com.streamvault.core.ui.components.TvEmptyState
import com.streamvault.app.ui.components.dialogs.CategoryOptionsDialog
@@ -89,6 +89,7 @@ import com.streamvault.feature.playback.multiview.MultiViewViewModel
import com.streamvault.feature.playback.multiview.MultiViewPlannerDialog
import com.streamvault.app.navigation.Routes
import com.streamvault.domain.model.VirtualCategoryIds
+import com.streamvault.domain.playback.archivePlaybackCapability
import com.streamvault.domain.repository.ChannelRepository
import androidx.compose.ui.viewinterop.AndroidView
import com.streamvault.player.PlayerSurfaceResizeMode
@@ -1323,6 +1324,32 @@ fun HomeScreen(
isReorderMode = uiState.isChannelReorderMode,
isDragging = isDraggingThis,
rowHeight = channelRowHeight,
+ liveLabel = stringResource(R.string.card_live_badge),
+ noScheduleLabel = stringResource(R.string.label_no_schedule),
+ lockedLabel = stringResource(R.string.a11y_locked),
+ movingLabel = stringResource(R.string.badge_moving),
+ savedLabel = stringResource(R.string.badge_saved),
+ catchUpLabel = stringResource(R.string.badge_catch_up),
+ accessibilityDescription = buildString {
+ val hasUsableArchive = channel.archivePlaybackCapability().canBuildReplayCandidate
+ append(
+ channel.number.takeIf { it > 0 }?.let {
+ stringResource(R.string.a11y_channel_with_number, it, channel.name)
+ } ?: channel.name
+ )
+ channel.currentProgram?.title?.takeIf { it.isNotBlank() }?.let {
+ append(". ")
+ append(stringResource(R.string.a11y_now_playing, it))
+ }
+ if (channel.isFavorite) {
+ append(". ")
+ append(stringResource(R.string.a11y_favorite))
+ }
+ if (hasUsableArchive) {
+ append(". ")
+ append(stringResource(R.string.a11y_catch_up_available))
+ }
+ },
onClick = {
if (isReorderMode) {
draggingChannel = if (isDraggingThis) null else channel
diff --git a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
index 0ca6febe..398e90ba 100644
--- a/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
+++ b/docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
@@ -128,9 +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, Home quick-filter chip row, and Home reorder top bar
-are now feature-owned while the Home screen/dialog composition remains in
-`:app`.
+the live source switcher, Home quick-filter chip row, Home reorder top bar, and
+Home channel row surface 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 bf9f731f..e2d82d16 100644
--- a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
+++ b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
@@ -18,8 +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, Home quick-filter chip row, and Home reorder top bar are
-now feature-owned
+live source switcher, Home quick-filter chip row, Home reorder top bar, and
+Home channel row surface 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.
@@ -654,9 +654,10 @@ 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`, `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
+feature-owned `LiveSourceSwitcher`, `LiveSelectionChipRow`,
+`LiveReorderTopBar`, and `LiveChannelRowSurface`, passing app-localized
+labels/title formatting/accessibility text through explicit presentation
+parameters. The remaining app-owned live cards 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/LiveChannelRowSurface.kt b/feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelRowSurface.kt
index 4d2d2b4d..aeba8020 100644
--- a/feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelRowSurface.kt
+++ b/feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelRowSurface.kt
@@ -33,6 +33,9 @@ import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
+import androidx.compose.ui.semantics.contentDescription
+import androidx.compose.ui.semantics.semantics
+import androidx.compose.ui.semantics.stateDescription
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
@@ -66,12 +69,21 @@ fun LiveChannelRowSurface(
liveLabel: String = "LIVE",
noScheduleLabel: String = "No schedule",
lockedLabel: String = "Locked",
- movingLabel: String = "Moving"
+ movingLabel: String = "Moving",
+ savedLabel: String = "Saved",
+ catchUpLabel: String = "Catch-up",
+ accessibilityDescription: String? = null
) {
var isFocused by remember { mutableStateOf(false) }
val sounds = rememberTvInteractionSounds()
val focusRequester = remember { FocusRequester() }
val hasArchive = channel.archivePlaybackCapability().canBuildReplayCandidate
+ val resolvedAccessibilityDescription = accessibilityDescription ?: buildString {
+ append(channel.number.takeIf { it > 0 }?.let { "Channel $it, ${channel.name}" } ?: channel.name)
+ channel.currentProgram?.title?.takeIf { it.isNotBlank() }?.let { append(". Now playing $it") }
+ if (channel.isFavorite) append(". Favorite")
+ if (hasArchive) append(". Catch-up available")
+ }
val scale by animateFloatAsState(
targetValue = if (isDragging) FocusSpec.FocusedScale else 1f,
animationSpec = AppMotion.FocusSpec,
@@ -91,6 +103,10 @@ fun LiveChannelRowSurface(
.fillMaxWidth()
.mouseClickable(focusRequester = focusRequester, onLongClick = onLongClick, onClick = { sounds.playSelect(); onClick() })
.graphicsLayer { scaleX = scale; scaleY = scale }
+ .semantics(mergeDescendants = true) {
+ contentDescription = resolvedAccessibilityDescription
+ if (isLocked) stateDescription = lockedLabel
+ }
.onFocusChanged { if (it.isFocused && !isFocused) sounds.playNavigate(); isFocused = it.isFocused },
scale = ClickableSurfaceDefaults.scale(focusedScale = 1f),
shape = ClickableSurfaceDefaults.shape(RoundedCornerShape(16.dp)),
@@ -110,7 +126,9 @@ fun LiveChannelRowSurface(
modifier = Modifier.fillMaxWidth(),
rowHeight = rowHeight,
liveLabel = liveLabel,
- noScheduleLabel = noScheduleLabel
+ noScheduleLabel = noScheduleLabel,
+ savedLabel = savedLabel,
+ catchUpLabel = catchUpLabel
)
if (isLocked) {
Box(modifier = Modifier.fillMaxSize().background(AppColors.HeroBottom.copy(alpha = 0.82f)), contentAlignment = Alignment.Center) {
@@ -139,7 +157,9 @@ fun LiveChannelRowCard(
modifier: Modifier = Modifier,
rowHeight: Dp = 68.dp,
liveLabel: String = "LIVE",
- noScheduleLabel: String = "No schedule"
+ noScheduleLabel: String = "No schedule",
+ savedLabel: String = "Saved",
+ catchUpLabel: String = "Catch-up"
) {
val dense = rowHeight <= 56.dp
val ultraCompact = rowHeight <= 60.dp
@@ -155,8 +175,8 @@ fun LiveChannelRowCard(
Row(horizontalArrangement = Arrangement.spacedBy(4.dp), verticalAlignment = Alignment.CenterVertically) {
StatusPill(label = liveLabel, containerColor = AppColors.Live)
sourceBadgeLabel?.takeIf { it.isNotBlank() }?.let { StatusPill(label = it, containerColor = AppColors.SurfaceEmphasis, contentColor = AppColors.TextPrimary) }
- if (channel.isFavorite) StatusPill(label = "Saved", containerColor = AppColors.Warning, contentColor = Color.Black)
- if (hasArchive) StatusPill(label = "Catch-up", containerColor = AppColors.Brand)
+ if (channel.isFavorite) StatusPill(label = savedLabel, containerColor = AppColors.Warning, contentColor = Color.Black)
+ if (hasArchive) StatusPill(label = catchUpLabel, containerColor = AppColors.Brand)
}
}
Text(text = buildString { channel.number.takeIf { it > 0 }?.let { append(it.toString().padStart(2, '0')); append(" ") } ?: append("-- "); append(channel.name) }, style = if (dense) MaterialTheme.typography.bodyLarge else MaterialTheme.typography.titleSmall, color = AppColors.TextPrimary, maxLines = 1, overflow = TextOverflow.Ellipsis)