From 629546a50c9820fe27d9c9442c7fdfd17dfe2af4 Mon Sep 17 00:00:00 2001 From: Elijah Date: Sat, 24 Oct 2026 13:11:45 -0700 Subject: [PATCH] Smooth section switches and first row moves on weaker TVs Measured every browse transition on the onn, a Fire TV Stick 4K and a TCL TV with a new framestats harness and atrace breakdowns. - Stage card artwork and titles a few cards per frame while a section enters, so its first frame no longer composes every card at once. - Give every discovery list the lookahead cache window and nudge it once after a section settles, so the first move down composes nothing. - Activate a focused top tab two frames later, so its highlight responds before the section switches; start the page entrance after composition settles, using per-draw alpha instead of an offscreen layer. - Limit Coil to two concurrent decodes, drop the redundant window background, size card image requests explicitly, and skip a coroutine per card for focus restoration. Home -> Movies UI stalls drop from 150-200 ms to 70-90 ms and Movies row moves no longer skip frames. Device scripts can now target any authorized serial and tolerate the TCL's flaky network ADB link. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 4 +- .../main/java/tv/kaleido/app/BrowseScreens.kt | 8 +- .../main/java/tv/kaleido/app/FocusedBrowse.kt | 62 +++++++++--- .../java/tv/kaleido/app/KaleidoApplication.kt | 5 +- .../main/java/tv/kaleido/app/MainActivity.kt | 2 + app/src/main/java/tv/kaleido/app/Screens.kt | 14 ++- .../main/java/tv/kaleido/app/StartupSplash.kt | 3 +- app/src/main/java/tv/kaleido/app/Theme.kt | 6 ++ docs/design-system.md | 4 +- docs/runtime-verification.md | 26 +++++ scripts/device.py | 22 +++-- scripts/profile_transitions.py | 99 +++++++++++++++++++ scripts/trace_transition.py | 49 +++++++++ scripts/verify_ui.py | 8 +- 14 files changed, 282 insertions(+), 30 deletions(-) create mode 100644 scripts/profile_transitions.py create mode 100644 scripts/trace_transition.py diff --git a/AGENTS.md b/AGENTS.md index 1636a99..6790c32 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ - Ask clarifying questions before proceeding when more information is needed. Otherwise make reasonable decisions and complete the authorized work. - This is a real native Android TV Plex client: Kotlin, Jetpack Compose, Media3/ExoPlayer. Preserve working Plex functionality; do not substitute mock content or prototype playback. -- The authorized test device is the onn at **192.168.50.195:5555**, package **tv.kaleido.app**, activity **.MainActivity**. Always specify the ADB serial. Do not modify its launcher, accessibility services, other apps, or other devices. +- The primary test device is the onn at **192.168.50.195:5555**, package **tv.kaleido.app**, activity **.MainActivity**. The user also authorized two weaker devices for performance testing: a Fire TV Stick 4K (Fire OS 8, 32-bit) at **192.168.50.146:5555** and a TCL Smart TV Pro (MT5896, slowest GPU) at **192.168.50.200:5555**. Scripts target the onn unless `KALEIDO_DEVICE` names another serial. Always specify the ADB serial. Do not modify any device's launcher, accessibility services (the onn runs two, which add per-frame semantics work), settings, or other apps. The TCL's network ADB link drops intermittently; `device.py` reconnects and retries. - `.env` contains `PLEX_SERVER_URL` and `PLEX_TOKEN` for local testing. Never print, commit, or embed credentials in source, resources, APKs, or logs. Keep `.env`, signing keys, toolchains, and private evidence ignored. - Use the existing encrypted session. `scripts/device.py seed` provisions an installed **debug** build only when needed; the app encrypts and deletes its bootstrap file. Never clear app data or sign out just to reset a test. @@ -49,6 +49,8 @@ Use `& $KaleidoPython` before the Python commands below. Run only checks relevan | `scripts/repro_runtime.py credits` | Visible Skip credits, season/related rows and cancellable countdown; **debug** | | `scripts/device.py screenshot ` | Capture to ignored `evidence/private/`; also supports `hierarchy`, `logs`, `launch`, `key` | | `scripts/profile_browse.py` | Targeted atrace investigation when navigation performance regresses | +| `scripts/profile_transitions.py