Smooth section switches and first row moves on weaker TVs
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m16s

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 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-10-24 13:11:45 -07:00
parent 0f926c0435
commit 629546a50c
14 changed files with 282 additions and 30 deletions

View file

@ -1,14 +1,24 @@
"""Operate only Kaleido on the authorized onn streamer. Credentials stay on stdin."""
import argparse, json, pathlib, subprocess, sys, time, xml.etree.ElementTree as ET
"""Operate only Kaleido on an authorized streamer. Credentials stay on stdin."""
import argparse, json, os, pathlib, subprocess, sys, time, xml.etree.ElementTree as ET
ROOT=pathlib.Path(__file__).resolve().parents[1]
ADB=pathlib.Path(r'C:\Users\Elijah\Desktop\platform-tools\adb.exe')
DEVICE='192.168.50.195:5555'
# The onn is the default; KALEIDO_DEVICE selects the authorized Fire TV Stick (192.168.50.146:5555).
DEVICE=os.environ.get('KALEIDO_DEVICE','192.168.50.195:5555')
OUT=ROOT/'evidence/private'
OUT.mkdir(parents=True,exist_ok=True)
def adb(*args, data=None):
p=subprocess.run([str(ADB),'-s',DEVICE,*args],input=data,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
if p.returncode: raise RuntimeError(p.stderr.decode(errors='replace'))
return p.stdout
for attempt in range(4):
p=subprocess.run([str(ADB),'-s',DEVICE,*args],input=data,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
error=p.stderr.decode(errors='replace')
# The TCL's network ADB link drops intermittently; reconnecting restores it.
if p.returncode and attempt<3 and ('closed' in error or 'offline' in error):
subprocess.run([str(ADB),'disconnect',DEVICE],capture_output=True);time.sleep(2)
subprocess.run([str(ADB),'connect',DEVICE],capture_output=True);time.sleep(2);continue
# It also occasionally fails a shell command silently. Retry, except key input,
# which may already have been delivered.
if p.returncode and attempt<3 and not error.strip() and args[:2]!=('shell','input'):time.sleep(1);continue
if p.returncode: raise RuntimeError(error)
return p.stdout
def screenshot(name):
path=OUT/(name+'.png');path.write_bytes(adb('exec-out','screencap','-p'));print(path)
def hierarchy():