Debloat your Android TV, install apps, browse and transfer files on it, all from your phone. Just 3 MB, no tracking, no root, no PC.
Group the ⋮ menu under its TV, and fold the list source into Settings' Advanced
jesse-agent-232a1656408c6e3
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 183d60d..0b2a453 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -20,6 +20,7 @@ until this file has a section for its version.- **Fixed:** The upload icon draws properly again. [#74](../../pull/74)- **New:** Switch home back to the TV's own launcher in one tap; list keeps only warn. [#76](../../pull/76)- **Improved:** Search apps sits under the Apps buttons and opens to every matching app, full screen. [#78](../../pull/78)+- **Improved:** The ⋮ menu names its TV and groups its items; Settings folds the list source under Advanced. [#78](../../pull/78)- **Fixed:** Welcome and pairing buttons no longer hide under the phone's navigation buttons. [#69](../../pull/69)## 0.5.0 — 2026-10-24diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 4280d5b..f8202c7 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -26,7 +26,7 @@ The per-TV lists behind **Suggested for this TV** live in the [tellyscope-device### Using your own lists-You don't have to trust ours. Fork tellyscope-devices, edit the lists in your fork, and keep `index.json` on schema 1 with each file's sha256 updated. Then in the app open **Settings** (in the ⋮ menu at the top right), tap **Change** under **Debloat lists**, and paste the raw address of the folder that holds `index.json`, for example `https://raw.githubusercontent.com/<you>/tellyscope-devices/main/`. Only HTTPS is accepted, and a source that doesn't serve a schema 1 index is refused without changing anything. Switching drops the cached lists. While your source is in use, the review step says where the list came from. The built-in protected list still wins over any list, and **Reset to default** goes back to tellyscope-devices.+You don't have to trust ours. Fork tellyscope-devices, edit the lists in your fork, and keep `index.json` on schema 1 with each file's sha256 updated. Then in the app open **Settings** (in the ⋮ menu at the top right), open **Advanced** at the bottom, tap **Use your own debloat lists**, and paste the raw address of the folder that holds `index.json`, for example `https://raw.githubusercontent.com/<you>/tellyscope-devices/main/`. Only HTTPS is accepted, and a source that doesn't serve a schema 1 index is refused without changing anything. Switching drops the cached lists. While your source is in use, the review step says where the list came from. The built-in protected list still wins over any list, and **Reset to default** goes back to tellyscope-devices.## README screenshotsdiff --git a/NOTICE b/NOTICEindex d822099..e4429f0 100644--- a/NOTICE+++ b/NOTICE@@ -25,8 +25,8 @@ The TV and HDMI (streaming stick) device icons use the path data of the"tv" and "settings_input_hdmi" icons, the Debloat button that of"cleaning_services", the off-Wi-Fi screen that of "wifi_off", and theApps, Files and Tweaks tabs those of "apps", "folder" and "tune", the-Upload files button that of "upload", and the empty Movies folder that of-"movie".+Upload files button that of "upload", the empty Movies folder that of+"movie", and the links in Settings that of "open_in_new".--------------------------------------------------------------------------------cleanyourtv — https://github.com/Gathin23/cleanyourtvdiff --git a/README.md b/README.mdindex 678584e..d822101 100644--- a/README.md+++ b/README.md@@ -80,13 +80,13 @@ The full rules are under [Safety rules](#safety-rules).Tellyscope is a phone app that talks to your Android TV, Google TV or Fire TV over the network using ADB, the same debugging protocol developers use.- **Find and connect.** It looks for TVs on your Wi-Fi, or you add one by IP address. Classic network debugging (port 5555) and Android 11+ wireless debugging with a 6-digit pairing code both work. **Add your TV** walks through turning debugging on one step at a time, with the menu names for Google TV, Android TV, Fire TV, Xiaomi or XGIMI, then lists the TVs it found. Each TV opens its own screen: the pairing code, or the Allow box with this phone's key to check against the one the TV shows. The first launch opens a short welcome with the three setup steps, and on Android 17 or newer asks for the local-network permission it needs to reach the TV.-- **Remembers your TVs.** They reconnect on their own after a restart of the app or the TV. You can rename a TV (the name stays on your phone) or forget it.+- **Remembers your TVs.** They reconnect on their own after a restart of the app or the TV. You can rename a TV (the name stays on your phone) or forget it. The **⋮** menu shows which TV it's for on top, then this TV's items and the app's in two blocks.- **How it's doing.** Every tab of a TV's page opens with the TV itself: its name, maker and model, and a one-line summary such as "Running fine" or "Storage almost full". Scroll, and its icon and name shrink and slide up into the top bar, where a Connected or Offline badge joins them. On Overview, below that is a chip per TV to switch between them, then a **+ Device** chip. Then comes free space as a bar, with CPU, RAM, temperature and network speed. When a TV is offline, it shows the storage from the last time Tellyscope saw it. Its address and how long it's been on are under Advanced.- **The main jobs up front.** Big **Install app**, **Debloat** and **Send file** tiles sit right under the vitals. Debloat shows a count while the TV's list still has apps on, or while apps Tellyscope turned off are back on, often after a TV update. When there's nothing left, it opens Apps instead. Under **Suggested for this TV**, one line says how many of the list's apps are off. If any came back on, a red line says so. Below that are the TV's Android version, when it last updated, and **Check for updates**, which opens the TV's own update screen. The Apps tab has an **Install app** button, and Files has **Upload files**.- **Advanced.** Every number in one place: memory, storage, CPU, temperature, uptime and screen state, CPU and RAM by app, processes, network and data used, and the TV's address.- **Apps.** Every app on the TV with its real name and icon, under three buttons: **Running** (what's using memory now), **Installed** (only the apps you put on the TV) and **Built-in** (what came with it). The buttons stay pinned under the bar as you scroll. Stop, disable or turn back on any app that isn't protected; each button says what it will do and asks first. Apps you installed yourself also offer **Uninstall**, which asks in a dialog that names the app and says it can't be undone. On Running and Built-in, the protected apps sit last under **System**, which folds away with a tap and stays folded until you open it again. **Search apps** sits under the buttons and pins with them. Tap it and the field moves to the top, the TV and the buttons step aside, and every matching app shows in one list. ← or Back brings them back.- **Another home screen.** With a second launcher such as Projectivy installed, its row in Apps offers **Set as default launcher**. Tellyscope makes it Home, checks that Home really opens it, and only then disables the old launcher, so the TV can't switch back by itself. One Undo in History turns the old launcher back on and makes it Home again. Later, the new launcher's row offers **Switch home back to** the one it replaced, or the TV's own if there was no switch: it's turned back on if it's off and made Home, and the added launcher stays, free to uninstall. Settings and other apps that only answer Home as a fallback are never offered as launchers. On Google TV, the Apps row and the Live tab are part of the old launcher and go with it.-- **Debloat.** It finds your TV among 230+ tested clean-up lists (adapted from [cleanyourtv](https://github.com/Gathin23/cleanyourtv)) and opens on every app it will turn off, with the model on top. With no list for the model, it shows apps from the maker's other lists, none ticked. With none for the maker either, you tick the TV's own apps by hand; the ones it needs aren't shown. **Not this TV?** searches every list. Your pick is remembered, and the TV's page then says how many of the list's apps are still on. Apps are pre-ticked only when the TV runs the Android version the list was tested on; untick anything you use, and you confirm before anything is disabled. If you'd rather not trust our lists, point the app at your own fork of them in Settings (see [CONTRIBUTING](CONTRIBUTING.md#using-your-own-lists)).+- **Debloat.** It finds your TV among 230+ tested clean-up lists (adapted from [cleanyourtv](https://github.com/Gathin23/cleanyourtv)) and opens on every app it will turn off, with the model on top. With no list for the model, it shows apps from the maker's other lists, none ticked. With none for the maker either, you tick the TV's own apps by hand; the ones it needs aren't shown. **Not this TV?** searches every list. Your pick is remembered, and the TV's page then says how many of the list's apps are still on. Apps are pre-ticked only when the TV runs the Android version the list was tested on; untick anything you use, and you confirm before anything is disabled. If you'd rather not trust our lists, point the app at your own fork of them under **Advanced** in Settings (see [CONTRIBUTING](CONTRIBUTING.md#using-your-own-lists)).- **History.** Every change is listed with an Undo, and **Restore everything** turns back on what Tellyscope turned off. Undoing a **Turn on** asks first, since it disables the app again. History is kept per TV, across restarts.- **Install apps.** Pick an APK, several split APKs or an `.apks`/`.xapk`/`.apkm` bundle on your phone. Before installing, Tellyscope shows the app's name, version and size and says whether it's new, an update, a reinstall or an older version. It won't install an older version over a newer one unless you tick the box. If the TV refuses, you get the reason in plain words.- **TV tweaks.** **Block ads with Private DNS** sends the TV's address lookups to an ad-blocking DNS provider (AdGuard by default, or any other you type in). Tellyscope then checks the TV can still look addresses up, and puts the old setting back if not. It needs Android 9 or newer. **Faster animations** makes menus move at twice the speed. Both land in History with an Undo. **Clear caches** frees space by clearing every app's temporary files; app data and sign-ins stay. **Take screenshot** saves what the TV shows to your phone.diff --git a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt b/app/src/main/java/app/tellyscope/ui/DeviceTabs.ktindex 9a704fd..675762f 100644--- a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt+++ b/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt@@ -45,7 +45,6 @@ import androidx.compose.material3.ExperimentalMaterial3Apiimport androidx.compose.material3.ExperimentalMaterial3ExpressiveApiimport androidx.compose.material3.ExtendedFloatingActionButtonimport androidx.compose.material3.FilterChip-import androidx.compose.material3.HorizontalDividerimport androidx.compose.material3.Iconimport androidx.compose.material3.IconButtonimport androidx.compose.material3.ListItem@@ -374,7 +373,10 @@ private fun Muted(text: String) {Text(text, style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant)}-/** The overflow: this TV's own items first, named so it's clear which TV they touch, then the app-wide ones. */+/**+ * The overflow: the TV on top, so it's clear which TV its items touch, then two blocks, this TV's+ * items and then the app-wide ones.+ */@Composableprivate fun AppMenu(state: UiState, actions: DeviceActions) {var open by remember { mutableStateOf(false) }@@ -394,18 +396,40 @@ private fun AppMenu(state: UiState, actions: DeviceActions) {if (renaming) RenameDialog(device.nickname.orEmpty(), device.model ?: networkName(device), onSave = { renaming = false; actions.rename(device.id, it) }, onDismiss = { renaming = false })Box {IconButton(onClick = { open = true }) { Icon(Icons.Default.MoreVert, contentDescription = "More options") }- DropdownMenu(open, onDismissRequest = { open = false }) {- Text(name(device), style = MaterialTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(horizontal = 12.dp, vertical = 8.dp))- DropdownMenuItem(text = { Text("Rename this TV") }, leadingIcon = { Icon(Icons.Default.Edit, null) }, onClick = { open = false; renaming = true })- DropdownMenuItem(text = { Text("Forget this TV") }, leadingIcon = { Icon(Icons.Default.Delete, null) }, onClick = { open = false; forgetting = true })- HorizontalDivider()- DropdownMenuItem(text = { Text("Advanced") }, leadingIcon = { Icon(Icons.Default.List, null) }, onClick = { open = false; actions.advanced() })- DropdownMenuItem(text = { Text("Settings") }, leadingIcon = { Icon(Icons.Default.Settings, null) }, onClick = { open = false; actions.settings() })- DropdownMenuItem(text = { Text("About & licences") }, leadingIcon = { Icon(Icons.Default.Info, null) }, onClick = { open = false; about = true })+ DropdownMenu(open, onDismissRequest = { open = false }, shape = MaterialTheme.shapes.large) {+ Row(Modifier.padding(start = 12.dp, end = 16.dp, top = 4.dp, bottom = 8.dp), verticalAlignment = Alignment.CenterVertically) {+ Cookie(device, 40.dp)+ Spacer(Modifier.width(12.dp))+ Column {+ Text(name(device), style = MaterialTheme.typography.titleSmall)+ val made = makerLine(device)+ if (made.isNotEmpty()) Text(made, style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant)+ }+ }+ MenuBlock {+ DropdownMenuItem(text = { Text("Rename this TV") }, leadingIcon = { Icon(Icons.Default.Edit, null) }, onClick = { open = false; renaming = true })+ DropdownMenuItem(text = { Text("Forget this TV") }, leadingIcon = { Icon(Icons.Default.Delete, null) }, onClick = { open = false; forgetting = true })+ DropdownMenuItem(text = { Text("Advanced") }, leadingIcon = { Icon(Icons.Default.List, null) }, onClick = { open = false; actions.advanced() })+ }+ Spacer(Modifier.height(4.dp))+ MenuBlock {+ DropdownMenuItem(text = { Text("Settings") }, leadingIcon = { Icon(Icons.Default.Settings, null) }, onClick = { open = false; actions.settings() })+ DropdownMenuItem(text = { Text("About & licences") }, leadingIcon = { Icon(Icons.Default.Info, null) }, onClick = { open = false; about = true })+ }}}}+/** One group of the menu, as a slightly darker rounded block inside it. */+@Composable+private fun MenuBlock(items: @Composable () -> Unit) {+ Surface(+ shape = MaterialTheme.shapes.medium,+ color = MaterialTheme.colorScheme.surfaceContainerHighest,+ modifier = Modifier.padding(horizontal = 8.dp),+ ) { Column { items() } }+}+/** "Search apps" under the Apps buttons, pinned with them; a tap opens the search at the top. */@Composableprivate fun SearchPill(enabled: Boolean, onClick: () -> Unit) {diff --git a/app/src/main/java/app/tellyscope/ui/SettingsScreen.kt b/app/src/main/java/app/tellyscope/ui/SettingsScreen.ktindex 7778b31..9504892 100644--- a/app/src/main/java/app/tellyscope/ui/SettingsScreen.kt+++ b/app/src/main/java/app/tellyscope/ui/SettingsScreen.kt@@ -1,7 +1,9 @@// SPDX-License-Identifier: GPL-3.0-only+// The open-in-browser icon is the Material Icons "open_in_new" (Apache-2.0), see NOTICE.package app.tellyscope.ui+import androidx.compose.foundation.clickableimport androidx.compose.foundation.layout.Arrangementimport androidx.compose.foundation.layout.Columnimport androidx.compose.foundation.layout.PaddingValues@@ -9,15 +11,23 @@ import androidx.compose.foundation.layout.Rowimport androidx.compose.foundation.layout.fillMaxSizeimport androidx.compose.foundation.layout.fillMaxWidthimport androidx.compose.foundation.layout.padding+import androidx.compose.foundation.layout.size+import androidx.compose.foundation.layout.width+import androidx.compose.foundation.layout.Spacerimport androidx.compose.foundation.lazy.LazyColumnimport androidx.compose.foundation.selection.toggleableimport androidx.compose.material.icons.Iconsimport androidx.compose.material.icons.automirrored.filled.ArrowBack+import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight+import androidx.compose.material.icons.filled.KeyboardArrowDown+import androidx.compose.material.icons.filled.KeyboardArrowUp+import androidx.compose.material.icons.filled.Starimport androidx.compose.material3.AlertDialogimport androidx.compose.material3.Buttonimport androidx.compose.material3.Cardimport androidx.compose.material3.CardDefaultsimport androidx.compose.material3.ExperimentalMaterial3Api+import androidx.compose.material3.HorizontalDividerimport androidx.compose.material3.Iconimport androidx.compose.material3.IconButtonimport androidx.compose.material3.MaterialTheme@@ -37,10 +47,27 @@ import androidx.compose.runtime.saveable.rememberSaveableimport androidx.compose.runtime.setValueimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifier+import androidx.compose.ui.graphics.Color+import androidx.compose.ui.graphics.PathFillType+import androidx.compose.ui.graphics.SolidColor+import androidx.compose.ui.graphics.vector.ImageVector+import androidx.compose.ui.graphics.vector.PathParser+import androidx.compose.ui.platform.LocalUriHandlerimport androidx.compose.ui.semantics.Roleimport androidx.compose.ui.unit.dp+import app.tellyscope.data.RELEASES+import app.tellyscope.data.sourceName-/** App-wide choices, not tied to one TV. */+/** Where the lists come from, credited in Settings. Its star count is written in, not fetched. */+internal const val CLEANYOURTV = "https://github.com/Gathin23/cleanyourtv"++/** CONTRIBUTING's guide to pointing the app at your own lists. */+internal val OWN_LISTS_GUIDE = RELEASES.removeSuffix("/releases") + "/blob/main/CONTRIBUTING.md#using-your-own-lists"++/**+ * App-wide choices, not tied to one TV: update checks first, then a folded Advanced with where the+ * debloat lists come from and how to use your own.+ */@OptIn(ExperimentalMaterial3Api::class)@Composablefun SettingsScreen(@@ -56,6 +83,9 @@ fun SettingsScreen(snackbar: SnackbarHostState = remember { SnackbarHostState() },) {var editing by rememberSaveable { mutableStateOf(false) }+ var advanced by rememberSaveable { mutableStateOf(false) }+ val browser = LocalUriHandler.current+ val open = { url: String -> runCatching { browser.openUri(url) }; Unit }if (editing) SourceDialog(listSource, onSave = { editing = false; onListSource(it) }, onDismiss = { editing = false })Scaffold(snackbarHost = { SnackbarHost(snackbar) },@@ -73,17 +103,6 @@ fun SettingsScreen(contentPadding = PaddingValues(start = 16.dp, end = 16.dp, bottom = 32.dp),verticalArrangement = Arrangement.spacedBy(12.dp),) {- item {- Card(colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceContainer)) {- Column(Modifier.fillMaxWidth().padding(16.dp)) {- Text("Debloat lists", style = MaterialTheme.typography.titleSmall)- Row(verticalAlignment = Alignment.CenterVertically) {- Text(Copy.listSource(listSource), style = MaterialTheme.typography.bodyMedium, modifier = Modifier.weight(1f))- TextButton(onClick = { editing = true }) { Text("Change") }- }- }- }- }if (checkUpdates != null) item {Card(colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceContainer)) {Row(@@ -104,10 +123,77 @@ fun SettingsScreen(}}}+ item {+ Row(+ Modifier.fillMaxWidth()+ .toggleable(advanced, role = Role.Button, onValueChange = { advanced = it })+ .padding(horizontal = 4.dp, vertical = 12.dp),+ verticalAlignment = Alignment.CenterVertically,+ ) {+ Text("Advanced", style = MaterialTheme.typography.titleSmall, modifier = Modifier.weight(1f))+ Icon(if (advanced) Icons.Default.KeyboardArrowUp else Icons.Default.KeyboardArrowDown, contentDescription = null)+ }+ }+ if (advanced) item {+ Card(colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceContainer)) {+ ListsFrom(listSource, onOpen = { open(CLEANYOURTV) })+ HorizontalDivider(color = MaterialTheme.colorScheme.surface)+ Column(Modifier.fillMaxWidth().padding(16.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) {+ Text("Change", style = MaterialTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant)+ Text(+ "Paste the HTTPS raw folder that holds index.json, e.g. raw.githubusercontent.com/<you>/tellyscope-devices/main/",+ style = MaterialTheme.typography.bodyMedium,+ )+ Row(Modifier.clickable { open(OWN_LISTS_GUIDE) }.padding(vertical = 4.dp), verticalAlignment = Alignment.CenterVertically) {+ Text("How to use your own lists", style = MaterialTheme.typography.labelLarge, color = MaterialTheme.colorScheme.primary)+ Spacer(Modifier.width(4.dp))+ Icon(OpenInNew, contentDescription = null, Modifier.size(16.dp), tint = MaterialTheme.colorScheme.primary)+ }+ }+ HorizontalDivider(color = MaterialTheme.colorScheme.surface)+ Row(Modifier.fillMaxWidth().clickable { editing = true }.padding(16.dp), verticalAlignment = Alignment.CenterVertically) {+ Text("Use your own debloat lists", style = MaterialTheme.typography.bodyLarge, modifier = Modifier.weight(1f))+ Icon(Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = null)+ }+ }+ }}}}+/**+ * Where the lists come from: cleanyourtv with its stars, opening its GitHub page, or the user's own+ * source by name once they've set one.+ */+@Composable+private fun ListsFrom(source: String?, onOpen: () -> Unit) {+ val c = MaterialTheme.colorScheme+ Row(+ Modifier.fillMaxWidth().then(if (source == null) Modifier.clickable(onClick = onOpen) else Modifier).padding(16.dp),+ verticalAlignment = Alignment.CenterVertically,+ ) {+ Column(Modifier.weight(1f)) {+ Text("Lists from", style = MaterialTheme.typography.labelMedium, color = c.onSurfaceVariant)+ Row(verticalAlignment = Alignment.CenterVertically) {+ Text(if (source == null) "cleanyourtv" else sourceName(source), style = MaterialTheme.typography.titleMedium)+ if (source == null) {+ Spacer(Modifier.width(8.dp))+ Icon(Icons.Default.Star, contentDescription = null, Modifier.size(16.dp), tint = Color(0xFFE0A100))+ Text(" 30k+", style = MaterialTheme.typography.bodyMedium, color = c.onSurfaceVariant)+ }+ }+ }+ if (source == null) Icon(OpenInNew, contentDescription = "Open cleanyourtv on GitHub", tint = c.onSurfaceVariant)+ }+}++private val OpenInNew = ImageVector.Builder("OpenInNew", 24.dp, 24.dp, 24f, 24f)+ .addPath(+ PathParser().parsePathString("M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z").toNodes(),+ pathFillType = PathFillType.NonZero, fill = SolidColor(Color.Black),+ )+ .build()+/** Edits the list source: an HTTPS folder holding `index.json`, or back to the default. */@Composableprivate fun SourceDialog(source: String?, onSave: (String?) -> Unit, onDismiss: () -> Unit) {diff --git a/app/src/main/java/app/tellyscope/ui/TvHeader.kt b/app/src/main/java/app/tellyscope/ui/TvHeader.ktindex 804473f..a3ff281 100644--- a/app/src/main/java/app/tellyscope/ui/TvHeader.kt+++ b/app/src/main/java/app/tellyscope/ui/TvHeader.kt@@ -120,7 +120,7 @@ private fun LayoutCoordinates.rectInRoot() = Rect(positionInRoot(), size.toSize(/** The TV's cookie tile: primary while it's connected, grey when it isn't. */@OptIn(ExperimentalMaterial3ExpressiveApi::class)@Composable-private fun Cookie(device: Device, size: Dp) {+internal fun Cookie(device: Device, size: Dp) {val kind = deviceKind(device)val c = MaterialTheme.colorSchemeval on = device.state == DeviceState.Online@@ -162,9 +162,7 @@ fun TvHero(state: UiState, live: Snapshot?, actions: DeviceActions, chips: Boole)}Column(Modifier.graphicsLayer { alpha = detailAlpha(collapse()) }, horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) {- // Under a model-name title, the model would only say it twice.- val maker = device.manufacturer ?: device.hit.maker- val made = if (name(device) == device.model) maker.orEmpty() else made(maker, device.model)+ val made = makerLine(device)if (made.isNotEmpty()) Text(made, style = MaterialTheme.typography.bodyMedium, color = c.onSurfaceVariant)val health = live?.let { Copy.health(it, heaviest(it, state.device.apps)) }Surface(shape = CircleShape, color = if (health?.ok == false) c.errorContainer else c.secondaryContainer) {@@ -182,6 +180,12 @@ fun TvHero(state: UiState, live: Snapshot?, actions: DeviceActions, chips: Boole}}+/** "XGIMI · Horizon Pro" under the TV's name; under a model-name title, the model would only say it twice. */+internal fun makerLine(device: Device): String {+ val maker = device.manufacturer ?: device.hit.maker+ return if (name(device) == device.model) maker.orEmpty() else made(maker, device.model)+}+/*** The collapsed hero, in the bar: small cookie, the TV's name, and whether it's connected. It's* laid out from the start, so the cookie and name have somewhere to travel to, and shows themdiff --git a/app/src/test/java/app/tellyscope/ScreenshotTest.kt b/app/src/test/java/app/tellyscope/ScreenshotTest.ktindex b68baa5..768f6d5 100644--- a/app/src/test/java/app/tellyscope/ScreenshotTest.kt+++ b/app/src/test/java/app/tellyscope/ScreenshotTest.kt@@ -87,6 +87,11 @@ import app.tellyscope.ui.SideloadUiimport app.tellyscope.ui.TransferUiimport app.tellyscope.ui.brandsimport app.tellyscope.ui.name+import app.tellyscope.ui.SettingsScreen+import app.tellyscope.data.RELEASES+import androidx.compose.ui.platform.UriHandler+import androidx.compose.ui.platform.LocalUriHandler+import androidx.compose.runtime.CompositionLocalProviderimport app.tellyscope.ui.UiStateimport app.tellyscope.ui.theme.TellyscopeThemeimport com.github.takahirom.roborazzi.ExperimentalRoborazziApi@@ -534,6 +539,68 @@ class ScreenshotTest {compose.onNodeWithText("System", substring = true).assertDoesNotExist()}+ @Test fun tabs_menuItemsWork() {+ val state = tabsState()+ val calls = mutableListOf<String>()+ compose.mainClock.autoAdvance = false+ compose.setContent {+ TellyscopeTheme(dark = false, dynamic = false) {+ DeviceTabsScreen(state, DeviceActions(advanced = { calls += "advanced" }, settings = { calls += "settings" }))+ }+ }+ fun pick(item: String) {+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNodeWithContentDescription("More options").performClick()+ compose.mainClock.advanceTimeBy(1_000)+ // Both blocks are there: this TV's items, then the app's.+ for (i in listOf("Rename this TV", "Forget this TV", "Advanced", "Settings", "About & licences")) compose.onNodeWithText(i).assertExists()+ compose.onNodeWithText(item).performClick()+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNodeWithText("About & licences").assertDoesNotExist()+ }+ pick("Advanced")+ pick("Settings")+ assertEquals(listOf("advanced", "settings"), calls)+ pick("Rename this TV")+ compose.onNodeWithText("Only this phone sees the name. Nothing on the TV changes.").assertExists()+ compose.onNodeWithText("Cancel").performClick()+ pick("Forget this TV")+ compose.onNodeWithText("Forget ${name(state.selected!!)}?").assertExists()+ compose.onNodeWithText("Cancel").performClick()+ pick("About & licences")+ compose.onNodeWithText("About Tellyscope").assertExists()+ }++ private fun settings(opened: MutableList<String> = mutableListOf()) = @Composable {+ val links = object : UriHandler { override fun openUri(uri: String) { opened += uri } }+ CompositionLocalProvider(LocalUriHandler provides links) {+ SettingsScreen(null, onListSource = {}, checkUpdates = true, alphaBuild = false, onCheckUpdates = {}, back = {})+ }+ }++ @Test fun settings_advancedFoldedAndLinks() {+ val opened = mutableListOf<String>()+ shot("81_settings") { settings(opened)() }+ // Check for updates leads; Advanced starts folded.+ compose.onNodeWithText("Check for updates").assertExists()+ compose.onNodeWithText("Use your own debloat lists").assertDoesNotExist()+ compose.onNodeWithText("Advanced").performClick()+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNodeWithText("cleanyourtv").assertExists()+ compose.onNodeWithText(" 30k+").assertExists()+ compose.onNodeWithText("cleanyourtv").performClick()+ compose.onNodeWithText("How to use your own lists").performClick()+ assertEquals(listOf("https://github.com/Gathin23/cleanyourtv", RELEASES.removeSuffix("/releases") + "/blob/main/CONTRIBUTING.md#using-your-own-lists"), opened)+ assertTrue(opened[1].startsWith("https://github.com/") && opened[1].contains("/tellyscope/blob/main/CONTRIBUTING.md"))+ compose.onNodeWithText("Use your own debloat lists").performClick()+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNodeWithText("Where the lists come from").assertExists()+ }++ @Test fun settings_dark() = shot("81_settings", dark = true) { settings()() }+ @Test fun settings_advanced() = shot("82_settings_advanced", before = { compose.onNodeWithText("Advanced").performClick(); Unit }) { settings()() }+ @Test fun settings_advanced_dark() = shot("82_settings_advanced", dark = true, before = { compose.onNodeWithText("Advanced").performClick(); Unit }) { settings()() }+private fun appMenu(dark: Boolean) {val open = {compose.onNodeWithContentDescription("More options").performClick()