Kaleido/docs/runtime-verification.md
Elijah dedf62a19e
All checks were successful
Validate and publish Kaleido / android (push) Successful in 3m4s
Release Kaleido 0.5.0 with source bitrate, audio selection and show shuffle
2026-10-28 11:19:25 -07:00

225 lines
48 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Device regression review - 2026-10-23
For the 2026-10-26 codec/HDR sweep and its native-versus-converted playback findings, see [Dedicated playback validation](playback-validation-2026-10-26.md). It includes confirmed Dolby Vision/HDR10/HLG signaling, audio output limits, the TCL HDMI capture limitation, and the restored HDR settings.
Target: the authorized onn at `192.168.50.195:5555`, package `tv.kaleido.app`. Other applications and the launcher were not modified. Screenshots, traces, UI dumps and server-specific logs stay in ignored `evidence/private/`.
## 2026-10-28 playback quality, audio selection and show shuffle (0.5.0)
- Original quality now uses the selected media version's source bitrate; Infinity War shows `19.1 Mbps`. No source bitrate is invented when Plex omits it. The quality menu and audio-track popup were checked in actual device screenshots.
- `scripts/verify_playback_changes.py audio` passed real Infinity War track switches in Original mode and Plex conversion. Selected stereo audio was actually delivered as AC3 two-channel audio and AAC two-channel audio respectively; the paused state and timeline position survived both switches. The script restored the prior Plex audio selection and local preferences. Validation playback suppresses timeline/scrobble writes.
- Twelve focused unit checks passed (`PlaybackModelTest`, `ShuffleEpisodesTest`), along with lint and signed debug/release builds. The opt-in `PlaybackChangesIntegrationTest` passed two natural episode endings through the real player/Compose post-play path with ordinary autoplay set to Off; shuffle continued to different episodes. The test restored the original autoplay preference. Shuffle bags cover every eligible episode from all seasons before reshuffling and avoid repeating the previous episode at a bag boundary; a one-episode show explicitly recreates playback for its next cycle.
- The reported intermittent Infinity War audio stutter remains unresolved. A 45-second steady baseline near one hour played its original Dolby Vision video and EAC3 eight-channel audio without player errors or audio underruns; the user reports that rewinding does not repeat the symptom and that it also happens with boost disabled. No codec, output routing or buffer change was made without a reproduction. Release logcat now records sparse `KaleidoAudio` underrun/sink-error events with position and audio path, and the debug validation harness can fail on audio underruns with `--fail-on-audio-underrun`.
- The signed release passed the focused show/season UI check: Shuffle is remote-focusable on Silo's show page and absent on its season page. Reinstalled the release, installed its baseline profile and compiled only Kaleido with `speed-profile`, then returned the onn to Home. The user authorized publication after these local checks.
## 2026-10-28 genre-led category revision (0.4.1)
- The user requested a genre-led page instead of title-led cards: four columns, centered 22 sp genre labels, no title captions or FILM/SERIES badges, and dim artwork in the background. Natural artwork color is retained at 65% saturation after a monochrome preview was rejected. There are no added genre color tints.
- Release build/lint and the focused Movie/TV category navigation, selection and Back-restoration checks passed. The final build was installed/profile-compiled on the onn; final screenshots are `evidence/private/041-movies-unique.png`, `041-tv-unique.png` and `041-tv-lower-unique.png`. Verified different Adventure/Children shows and distinct Talk/Talk Show landscape images on the actual TV UI, traversed lower rows, and returned the signed release to Home.
- After reviewing the color preview, the user authorized publication once duplicate backgrounds were fixed. Artwork candidates are now matched across the whole selected library so categories cannot reuse a source; narrow genres get priority and overlapping groups can fetch additional pages. Selection is deterministic and applied atomically after the candidate requests, with the existing section/generation guards. The earlier 0.4.0 public APK/checksum were also verified.
- Five focused `CategoryArtworkTest` checks passed, including every three-genre/three-source overlap graph and a private read-only Plex fixture: 31 movie backgrounds from 31 titles, and 37 TV backgrounds from 36 titles. Talk and Talk Show each contain only The Grand Tour, so the remaining tile uses a different landscape from Plex's artwork list. Both images were downloaded through Plex and their SHA-256 values differ. Initial independent selection reproduced six repeated movie sources and fourteen repeated TV sources. No Plex metadata or artwork selection was changed.
## 2026-10-28 artwork, category cards, quick skips and search (0.4.0)
- Started from the latest published 0.3.1 history, retaining its episode-row reentry fix and regression script.
- Reproduced the Hazbin Hotel season artwork cutting off the character's head. Season/episode artwork now uses the full-page background rather than a cropped 322 dp header. A temporary top inset was removed after visual review: TV art fills the top edge like movies. Compared final signed-release screenshots of the show, season and 2 Fast 2 Furious; retained episode selection and season Back focus.
- Movie and TV category cards display real Plex artwork from matching genres. Both pages passed horizontal/vertical navigation, scoped-category entry and selected-card restoration on Back; TV navigation also traversed six lower rows. Screenshots include The Batman for movie Action and Hazbin Hotel for TV Animation.
- Verified actual hidden-controls skips of +10 s, -10 s and repeated +20 s on real playback. The final compact cue sits near either edge, with a centered arrow above its time, a short fade and no bordered panel. Screenshots cover both directions and accumulation; normal controls/timeline still work. Debug validation suppressed timeline/scrobble writes, and the harness confirmed the Plex fixture's progress and watched state stayed unchanged.
- Verified Clear empties the query/results and returns typing focus for a new search. The Android TV keyboard must be closed before D-pad navigation to app controls. The in-app microphone is absent; final signed-release empty Search has neither "Your collection" nor "Find something worth watching."
- `scripts/verify_040.py` contains focused feature checks. Debug/release builds and lint passed; the broad device suites were not run. Restored the signed release, installed its ART profile, compiled only Kaleido with `speed-profile`, and returned to Home.
## 2026-10-27 categories, search, themes and volume boost (0.3.0)
- Removed repeated Settings category headings. Exact normalized title matches now lead search rows instead of fixed Movies-first ordering; own-title matches outrank inherited episode/show names. The Silo case was reproduced by a failing grouping regression and verified against the live server and remote UI.
- Added scoped Plex genre categories and a light grey A–Z rail to movie/show libraries and category results. Plex first-character counts use the same media type, genre and watched filters as the grid; a jump loads the required prefix without fetching its artwork. Movie S reached absolute index 772 and TV S index 200. Both Animation categories, details Back, selected-category Back and grid focus restoration passed. Dense rail controls require compact touch targets, otherwise Android TV accessibility hides overlapping letters despite correct visual focus.
- Theme music defaults Off, with independent 10–100% volume. Plex themes inherit from show metadata on season/episode pages. Real Silo theme playback, season/episode pages, background stop and video stop were checked. The server currently supplies no movie theme fixtures; movie theme parsing is tested and uses the same playback path. Returning through a launcher can reopen Home, where music correctly remains silent; reopening a supported title starts its theme.
- Boost defaults Off and supports +3/+6/+9/+12 dB. It processes decoded 16-bit PCM across all channels and disables encoded passthrough/offload only while enabled; Off preserves the normal audio path. Unit tests cover gain, clipping without integer wrap and unchanged samples at zero gain. Real +6 dB playback of HEVC/EAC3 episode 7599 and converted movie 9776 confirmed PCM processing, advancing audio and rendered video. No acoustic loudness measurement was made. Validation mode avoided Plex progress changes.
- Checks: 26 unit tests, debug/release compilation and lint, three new live integration tests, existing Settings remote/dialog tests, the scoped library/jump checks and `verify_audio_preferences.py --playback-only`. The full audio UI batch separately verified setting changes, dialog focus and cold-start persistence; its fixture assertions now accept labels such as `Resume from 2:01`. Prior audio preferences were restored exactly. Private screenshots and audio/video validation logs remain ignored.
See [the navigation comparison](performance-2026-10-27.md) for matched release/profile benchmarks against 0.1.11 and 0.2.1. The final 0.3.0 release was restored on Home with ART speed-profile compilation. Publication and ADB installation do not constitute an in-app updater installation test.
## 2026-10-27 one season layout (0.2.1)
- 0.2.0 gave seasons a vertical episode list whose items opened an episode page with a horizontal season row, so the same season appeared in two layouts and selecting an episode never played it. Season and episode pages now share the episode header and horizontal season row: focusing a card shows that episode (summary row data at once, full metadata after 250 ms, keeping the row's progress), and OK on the card or Play plays it. The header has a fixed height so moving along the row never shifts the page. Up from the row returns to Play; Down from Play enters the shown episode.
- The shown episode is kept per page in the ViewModel. Back from playback shows the last episode played and reloads the season's progress; focus returns to the card you played, or to Play when playback started there. Recording focus whenever the action row gained focus broke related-title focus restoration (`verify_details.py`), so only Play/Start over clicks record it.
- Go to show left the season/episode header (it stays in quick actions). `ActionButton` primary actions are a tint until focused.
- Verified on the onn with Cyberpunk: Edgerunners and the Silo fixtures (Play → 8594, card → 7604, return focus, Back to the show), `verify_ui.py browse` and `player`, `repro_runtime.py controls/episode/postplay/credits/sections/browse` (profiled release median 16 ms / p95 36 ms), `verify_details.py`, `verify_details_layout.py`, `verify_movie_details.py`, `verify_settings.py` and the unit tests. `verify_details_layout.py` now moves right until Synopsis (the fixture gained a Trailer button), and `verify_settings.py` accepts the saved Remote quality and Subtitle style rather than requiring defaults.
## 2026-10-27 audit fixes, quick actions, extras, voice search and new settings (0.2.0)
Addresses the findings in [the 0.1.11 audit](audit-2026-10-27.md).
- Search had no remote path from the text field to its results and was untested. Down, Right-at-end and the keyboard's Search action now leave the field; results are grouped rows (Movies, TV shows, Seasons, Collections, Episodes, People). `verify_ui.py browse` gained a Search step (type, keyboard Search, open a result, Back restores it, Back returns to the previous tab). The microphone uses Google TV's `com.google.android.katniss` voice input directly; the onn otherwise shows a recognizer chooser. `ACTION_SEARCH` intents open Search with their query.
- Back from Home rows now focuses the hero (Discover on Movies/TV) before exiting. Focus must move before the list scrolls, or the removed card clears it.
- A `focusRestorer()` without a fallback overrode explicit `down` targets and chose the geometrically nearest card (e.g. the second cast member below Play). Rows now pass their entry card as the fallback.
- Long-press OK / Menu actions use a `Modifier.Node`. A `composed {}` modifier and a per-card focus animation on every Home card measurably slowed browsing (median 25 ms / p95 38 ms); with the node and a layer-only lift, five profiled-release runs of `repro_runtime.py browse` measured median 15–17 ms and p95 29, 32, 32, 38 and 46 ms. Four met the <40 ms target; the variance is device noise around the 0.1.11 record (15 ms / 27 ms). The baseline profile now covers `ScreensKt`, the actions node, `Title` and `Media`.
- Moving the skip-marker lookup to the top of the player recomposed the whole player every position tick, re-applying subtitle styling and keeping the window from going idle. It is now `derivedStateOf`.
- `repro_runtime.py episode` and `credits` pressed Pause at a fixed 6–9 s after a cold launch and failed identically on 0.1.11 code; they now wait for the player's READY log like `controls`.
- Verified on the onn: all `verify_ui.py browse` (8) and `player` (7) checks, `verify_settings.py`, `verify_details.py`, `verify_details_layout.py`, `verify_movie_details.py`, `repro_runtime.py sections/controls/episode/postplay/credits/browse`, 25 instrumentation tests and 14 unit tests. Hands-on: actions sheet, season episode list, episode season row, Trailer playback ending back on the movie page, View all, chapter numbering, the Version picker on the server's one two-version episode, voice input and the subtitle preview.
- Not verified on a device: remote-connection quality (no remote connection here; `isLocalAddress` is unit-tested), stacked multi-part playback (no such files on the server), automatic server re-discovery after an address change, and subtitle styles over real subtitles in playback (the Settings preview uses the player's own `SubtitleView`).
## 2026-10-27 movie details and foreground library sync (0.1.11)
- Movies now share TV shows' fitted poster, cinematic backdrop and safe header; related movie cards come from Plex's related metadata endpoint, below Cast.
- Foreground sync checks the small `/library/sections` revision response every 15 seconds. Content changes trigger a staged Home/active-section refresh, with a 60-second fallback for servers without useful revision fields. Current filters and loaded range survive. No loading overlay is shown, and unchanged state compares equal to avoid unnecessary UI updates. Playback/background pause the loop; connection failures back off to 60 seconds.
- Home feature selection keeps the same random seed for the current process, avoiding reshuffling unchanged content on each refresh. Browse rails and focus requesters use stable hub/title IDs across updates; removing a focused title selects a nearby surviving card.
- Seven unit tests passed, including revision changes, unchanged-library polling, fallback refreshes and retries after failed/superseded updates. `LibrarySyncIntegrationTest` passed on the onn in 42 seconds: its local HTTP fixture changes revision/content and the real ViewModel timer updates Home and the active movie library without a restart. It substitutes only the API's in-memory endpoint, restoring it afterward; it does not import/delete media on Plex or overwrite the encrypted session. This validates the client refresh path, not a real server scan/import event.
- `scripts/verify_movie_details.py` passed against real Plex content on the profiled release: safe movie header and initial action focus, related movies, opening a related title, and Back restoration. Screenshots `movie-details-0.1.11.png` and `movie-related-0.1.11.png` were inspected for fitted artwork and readable rows. Release build and lint passed; existing lint warnings remain. No playback or broad navigation sweep was needed for these changes.
## Browsing
- Cold-start switching to Movies reproduced an empty page: tab loading cancelled server initialization before library discovery finished. Initialization now has its own job; section requests update their cache and visible results atomically. `scripts/repro_runtime.py sections` passes the same startup switch, TV loading and cached Movies return.
- Home again has the large cinematic feature with Play/Resume, information and feature navigation. Movies has the compact focused-title preview with recent-release posters and recommendations. TV has wider next-episode thumbnails, newly added seasons and new episodes. A-Z remains a separate filtered poster grid.
- All six `scripts/verify_ui.py browse` checks passed, including primary tab activation on focus, details/card focus restoration, library navigation and a live Plex PIN with cancellation preserving the connection.
- Fixed card geometry and explicit row/column navigation remove horizontal vertical drift. Cached bitmap contrast reduces backdrop GPU work. API JSON parsing is off the main thread.
- Profiling found substantial interpreted Compose/layout work immediately after ADB installation. Android reported `status=verify`, not profile-guided compilation. Installing the bundled baseline profile and compiling **only Kaleido** with `speed-profile` changed the measured browsing loop from p95 65 ms to 20 ms, median 14 ms, GPU p95 5 ms. Horizontal card bounds retained the same Y coordinate. This is a device stress measurement, not a guarantee of zero dropped frames. Baseline rules now also include app browsing paths.
For reproducible performance checks, install the release, send `androidx.profileinstaller.action.INSTALL_PROFILE` to Kaleido's ProfileInstallReceiver, compile its package with `cmd package compile -f -m speed-profile tv.kaleido.app`, then run `scripts/repro_runtime.py browse`. Do not benchmark debug builds or compare different compilation states. Ordinary sideloads receive profile-guided optimization through Android's background dex optimization; immediate first-run measurements can therefore be slower.
## Playback and account connection
- Six live Android integration tests passed: encrypted session persistence, library paging/filter/search/details/hubs, show/season/episode access, a real Plex PIN, generated JPEG previews/new seasons, and a server decision copying the supported HEVC test episode's video.
- Next episode previously crashed with `Session ID must be unique`. Each controller now owns a unique Media3 session ID. The actual episode replacement loop passes and reaches the expected next title.
- Plex HLS uses an absolute timeline. Removing the duplicate seek-start offset fixes resume/progress and credits-marker positions.
- Natural episode completion reached post-play, waited five seconds and reached READY on the next episode. Credits skipping also opened season/related rows and its autoplay cancellation test passed.
- Player tests exercised real video, scrubbing previews, audio/subtitle panels, speed changes and Direct stream selection. A separate targeted regression verifies that one Back hides controls, OK reveals them, playback auto-hides them and Back exits. Explicit preview-key handling fixes Back clearing focus before reaching the player handler.
- Direct stream is the default preference. The client augments the existing Plex HEVC target instead of supplying competing transcode targets. The server can still choose conversion for media it cannot remux using the negotiated profile. Original-file and compatibility playback remain available.
- The onn's ADB screen captures omit the tested HEVC picture even while Media3 reports rendered frames. The user confirmed that the actual TV displays the video. Do not treat that capture alone as a black-video failure or silently force transcoding.
- Skip actions use an opaque contrast surface. The timeline draws buffered and played ranges separately and shows generated server previews or chapter artwork when available.
- The release ZIP was checked for the actual private test token and `.env`: neither is present. The test connection is encrypted private device data. Settings exposes Plex account linking and server discovery.
Release compilation, unit tests and lint passed with zero lint errors (existing warnings remain). Temporary debugging log tags were removed.
The final release recheck after adding the app baseline rules passed again: median 15 ms, p95 27 ms, GPU p95 5 ms, stable row Y coordinates. Results remain dependent on device compilation state; some frames still miss a 60 Hz deadline under the burst test.
## Rating artwork and startup review - 2026-10-24
- Replaced the custom popcorn drawings with official red Hot / green Stale Popcornmeter vector paths. On-device screenshots show the red mark beside Andor's 89% and the green mark beside Matchbox's 49%; the existing IMDb score remains alongside them. Artwork fits a fixed square scaled with text, retaining the official aspect ratio and colors. See [brand-assets.md](brand-assets.md) for provenance and designation rules.
- The 2.6-second opening assembles the six original aperture facets with light trails, a soft glow, a brief facet glint and a staggered wordmark reveal. Cover dismissal follows animation completion, then the bounded loading wait and crossfade. Android animation duration scale is honored by the animations; the device was reviewed at its existing 1.0 setting.
- Built with `Build.ps1 -Release -Test`: optimized release, existing unit test and lint passed (zero errors, existing warnings/hints remain). Installed in place on the authorized onn with the existing encrypted session intact, then installed the baseline profile and compiled only Kaleido with `speed-profile`.
- Recorded and inspected the actual cold-start sequence, Home and Movies/TV screenshots, and both rating states. `verify_ui.py browse` passed all six checks; `repro_runtime.py sections` passed startup tab switching, TV loading and cached Movies return. The harness now waits for the splash's accessibility description to disappear instead of counting wordmark text nodes.
- Private evidence: `ratings-home.png`, `final-movies-discover.png`, `kaleido-startup-review.mp4`, and the trimmed `kaleido-intro.mp4` in ignored `evidence/private/`. No playback checks or new frame-pacing benchmark were needed for these cosmetic changes. Left the optimized release on Home.
## First published release and live updater test - 2026-10-24
Published [Kaleido 0.1.1](https://git.elijahkuntz.com/Elijah/Kaleido/releases/tag/v0.1.1), version code 2, from commit `c3917c6`. Both the main validation workflow and matching tag publication workflow passed. The locally signed distribution retains the installed application's signing certificate. Anonymous requests to the release API, APK and checksum returned HTTP 200 without redirects; the release asset and immutable tagged repository APK matched the local SHA-256 (`6f1d42ee5167dcb3743b7dafbecfed9942e496ee10b8b277ba2a3ba66c6407ba`). The packaged APK was also checked for the private Plex token, `.env` and signing keys; none were embedded.
The onn stayed on version 0.1.0 / code 1 until the actual in-app installation. No ADB install of 0.1.1, downgrade, sign-out or app-data reset was used:
1. In Settings, the existing app's manual check reached the public server. Before a Forgejo release existed, it discovered 0.1.1 using `distribution/latest.json` and its immutable tag URLs.
2. After the tag workflow published the release, another manual check discovered the published release. Selecting **Download & install 0.1.1** completed download, checksum, package, increasing-version and signing-certificate validation, then opened Android's source-permission screen.
3. Enabled **Kaleido only** in Install unknown apps. Returning to Kaleido automatically opened Android's **Do you want to update this app?** confirmation. Selected **Update**, and Android reported **App installed.**
4. Selected **Open**. Live Plex Home returned with the existing encrypted connection intact. Settings retained Direct stream, 1080p / 20 Mbps conversion quality and the 80% watched threshold.
5. Android and Kaleido both reported 0.1.1 / code 2. The APK pulled from the installed package matched the published APK byte for byte. Another manual check reported **Kaleido is up to date.**, with no redundant download action.
6. Reinstalled the baseline profile and compiled only Kaleido with `speed-profile`; left the updated release on Home.
For future live checks, start with an installed lower version signed by the same key, publish a genuinely higher version/code, navigate to Settings > Software updates with the D-pad, and follow the sequence above. Never clear app data to manufacture an update scenario. Android's source permission is a one-time, per-app step; the package installer still requires explicit confirmation for each update. Wait for the TV Settings source list to populate before selecting Kaleido.
Private evidence remains in ignored `evidence/private/`: `updater-results.json`, `published-release.json`, `updater-before.png`, `updater-fallback-discovery.png`, `updater-release-discovery.png`, `updater-source-allowed.png`, `updater-confirmation.png`, `updater-installed.png`, `updater-after.png` and `updater-final-home.png`. This verifies manual discovery, the manifest fallback and a real release download/install. It does not independently test the six-hour automatic-check interval, permission denial/retry, or rejection of deliberately corrupted/wrong-signed APKs.
## Navigation sounds and Home scroll performance - 2026-10-24
The specific hero-to-Continue Watching movement now has a dedicated check: `scripts/profile_home.py <label>`. It resets frame statistics for each Down transition, waits until it finishes, samples completed frames, then returns to the hero outside the measured interval. UI hierarchy dumps do not run during the measured animation. Its p95 limit is 33.34 ms; `--cold --cycles 1` skips the warm-up scroll and `--trace` records app layout/rendering spans. Use an optimized release with the baseline profile installed and `speed-profile` compilation, and never run another device test alongside it.
The original profiled release failed across five repeated transitions: 59 frames, median 17.5 ms, p95 50.3 ms, maximum 60.5 ms, and 28.8% above 33.34 ms. A separate trace showed main-thread measure/layout passes of 40–51 ms, repeatedly composing and remembering newly exposed image cards. Render-thread spans were substantially shorter. This isolated lazy-row preparation/disposal as the primary bottleneck in this scenario.
Home now uses a bounded one-viewport-ahead / one-viewport-behind lazy-layout cache window. It prepares adjacent rows and retains the hero/nearby cards on the return path. Artwork resolution, card geometry, the cinematic hero and Movies/TV presentation are unchanged. The fix does not cache the entire catalog or change focus/scroll destinations.
With navigation sounds enabled and its hot paths included in the baseline profile, the final APK measured 66 frames across five repeated Down transitions: median 17.2 ms, p95 28.6 ms, maximum 34.8 ms, and one frame above 33.34 ms (1.5%). Its first transition after a cold process launch measured 13 frames, p95 26.9 ms and maximum 30.1 ms. These are device samples, not a guarantee of every frame meeting a 60 Hz deadline. A preliminary run where the profile-install broadcast targeted the wrong receiver was excluded from the matched comparison; the final preparation returned profile-install result 1 and package compilation Success.
Navigation sounds default to On under Settings > Interface. Shared focus targets call Android's native UI sound only after an actual focus change; startup focus, unchanged targets and disabled sounds are silent. The TV's global sound-effects setting remains authoritative and was not changed. `verify_navigation_sounds.py` reproduced the missing control on the original installation, then passed both Off and On persistence checks across cold process launches on the final build. Two unit tests cover initial/duplicate focus suppression and muting/re-enabling behavior.
For a quiet device with system effects already enabled, run `python -c "import sys; sys.path.insert(0, 'scripts'); from verify_navigation_sounds import audio; audio()"` using the configured Python runtime. It compares identical D-pad focus movements with the app preference Off/On: the final test recorded zero native audio mixer writes while muted and 141 while enabled. This confirms output through Android's audio pipeline; physical speaker listening was not performed. It leaves the preference On and returns to Home.
Private evidence includes `home-baseline-results.json`, `home-trace-baseline-atrace.txt`, `home-complete-results.json`, `home-complete-cold-results.json`, `navigation-audio-results.json`, `navigation-audio-off-atrace.txt`, `navigation-audio-on-atrace.txt`, and the On/Off setting screenshots. `Build.ps1 -Release -Test` passed with three unit tests and zero lint errors. These measurements were taken on the local optimized test build before versioning the changes as 0.1.2. The installed test build retains the existing session and was left on Home with navigation sounds On.
All six `verify_ui.py browse` checks passed with the sound setting and cache window, including focus restoration, separate Movies/TV layouts, A–Z grids and PIN cancellation preserving the session. The broader `repro_runtime.py browse` check initially failed at p95 42 ms (48 ms with tracing), with further card composition/measurement during rapid movement. Including the new sound modifier/controller in the app's baseline profile brought the final profiled release to median 15 ms / p95 36 ms, GPU p95 7 ms, and stable horizontal Y coordinates at 182 px. Some stress-test frames still miss 60 Hz. `browse --trace` now records this exact regression loop to `browse-regression-atrace.txt` for future diagnosis.
## Aperture startup animation - 2026-10-24
The cold-start splash was prototyped as a dp-accurate canvas page (ignored `evidence/private/splash/index.html`), approved, then ported to `StartupSplash.kt` with the same geometry, timings and cubic-bezier curves. The exit cuts the aperture's inner hexagon out of the splash surface with an even-odd path and zooms it about 52× in log space, so the real app beneath is revealed through the mark; the content layer scales from 1.14 to 1 only while the cover exists.
Frame statistics from three profiled release cold starts (`dumpsys gfxinfo framestats`, bucketed per 250 ms) first showed 100–125 ms frames about 0.3–0.7 s after launch: startup data arriving and Home composing beneath the splash, with high UI-thread time. Starting the animation a few frames late did not avoid them because they follow the data, not the first frame. Skipping the hidden app's draw until the exit made no measurable difference and was reverted. The final sequence instead runs a 260 ms light-gathering phase on the nearly still closed iris, then holds until `busy` clears and four consecutive frames arrive within 24 ms (capped at 700 ms). On the final build every frame from the iris opening through the start of the exit completed within 25 ms in all three runs, at 15 frames per 250 ms. Frames after the reveal include Home itself and show higher latency without dropping below 15 frames per bucket. These are device samples, not a guarantee.
The hold adds roughly 0.5 s before the iris opens when Plex data takes that long; loading previously overlapped the animation. `Build.ps1 -Release -Test` passed; `repro_runtime.py sections` passed and all six `verify_ui.py browse` checks passed on the final release. A screen recording of the actual cold start (`kaleido-aperture-startup.mp4`, contact sheet `aperture-sheet.png`) was inspected. The optimized release was left on Home.
## Browsing transitions on three devices - 2026-10-24
The user authorized two weaker devices alongside the onn: a Fire TV Stick 4K (AFTKM, Fire OS 8 / Android 11, 32-bit, 1.7 GB) and a TCL Smart TV Pro (MT5896, Android 14, 1080p UI on a 4K panel, slowest GPU). Each was provisioned with `device.py seed` on a debug build, then the optimized release was installed over it with `speed-profile` compilation. `scripts/profile_transitions.py` measures skipped vsyncs and UI-thread time for each D-pad transition from `gfxinfo framestats`; its first cycle is the first pass after launch, and gaps after fast frames or longer than 300 ms count as idle. `scripts/trace_transition.py` breaks a transition's slow UI frames into their nested atrace slices.
Findings:
- Top-tab switches were the worst stall everywhere: about 30 ms disposing the old section, then one 150 ms+ measure pass composing every visible card (Coil painters about 3 ms per card, text layout about 1.4 ms per label), while four Coil decoders and a young GC competed for four cores.
- Home's lookahead cache only fills after the list has scrolled, so the first hero → row move after launch composed the lower rows mid-animation. A screen recording on the onn showed a 204 ms freeze. Movies/TV had no cache window and skipped 1–2 frames on each row move.
- The onn runs two accessibility services (Button Mapper, Luma launcher), adding 1–3 ms of Compose semantics work per frame. Its steady frames are render-bound but drop nothing. These device settings were not changed.
- Converting contrast-baked backdrops to hardware bitmaps removed render-thread uploads but made the TCL's GPU skip 9–14 frames on Home row moves (0 with software bitmaps), so it was reverted. Explicit card image sizes and a staged-card build were also A/B tested.
Changes: staged card fill-in while a section enters, a cache window and one-time 1 px nudge on every discovery list, tab activation two frames after focus, the page entrance starting after composition settles with per-draw alpha, Coil decode parallelism 2, no redundant window background, explicit card image sizes, and no per-card restoration coroutine.
Results (skipped frames per cycle; UI-thread maximum):
| Transition | onn before → after | Fire Stick before → after |
| --- | --- | --- |
| Home → Movies | 11/7/8, 160 ms → 9/3/6/6, 88 ms | 12/5/5, 153 ms → 8/3/2/2, 69 ms |
| Movies → Home | 7/6/5, 104 ms → 3/4/5/3, 67 ms | 4/3/4, 61 ms → 2/2/2/1, 52 ms |
| Movies row → row | 2/2/1 → 0/0/0/0 | 1/1/0 → 0/0/0/0 |
| Home hero/row moves | 0–1 per move, both before and after | 0 per move, both before and after |
On the TCL, Home → Movies measured 196 ms of UI time before and 88 ms in the one completed final sample. Its final full run was skipped at the user's request because its ADB link kept dropping; the partial final run and the A/B runs showed no regressions. Movies row ← row still skips two frames on the onn. Returning from Movies still disposes and composes whole sections. Retaining sections across tabs would remove that cost but needs per-section navigation state.
`Build.ps1 -Release -Test` passed. On the onn, all six `verify_ui.py browse` checks and `repro_runtime.py sections` passed. A recording confirmed the staged cards fill in under the fade without bound changes. The final release was left installed on all three devices. Private evidence: `transitions-*.json`, `transitions-*-frames.txt`, `trace-*.txt` and the `onn-*` recordings in `evidence/private/`.
## Settings update flow on the Fire Stick - 2026-10-24
The user found that pressing "Download & install" on the Fire Stick appeared to do nothing, and after cancelling the package installer every D-pad press in Settings opened Home. Cause: the button was removed while downloading, so focus was lost with it; with nothing focused, the next press searched from the top bar and focused (which opens) Home. On TV, Compose's default bring-into-view pinned focused controls near a third of the screen height, so sideways moves scrolled Settings, and focused/unfocused primary buttons were nearly the same white. Release bodies carried the whole changelog.
The update action now stays in place and reports progress ("Downloading… n%" plus a progress bar), then offers "Install" for the verified APK, which reopens the installer without downloading again. Returning from the installer refreshes the status and restores focus to the update actions if nothing is focused. Settings scrolls only far enough to keep the focused control 56 dp from the edges, and shows only the new version's notes above the buttons. `publish_release.py` and `package_release.py` publish just the version's changelog section; `releaseNotes()` trims older full-changelog bodies, with unit coverage.
Verified on the Fire Stick with a build labelled 0.1.3 against published 0.1.4: check, download, installer, Back, then Left/Up/Down/Right all stayed within Settings with focus on "Install 0.1.4". The LAN download takes under a second, so a throwaway build that slowed the download loop (not committed) was used to capture "Downloading… 8%" with the progress bar. Completing the in-app update itself was left to the user.
## Quality setting and silent skips - 2026-10-24
Playback mode and transcode quality are now one `StreamQuality` preference: Original quality (direct stream of the source video, falling back to a 1080p conversion) and 4K/1080p/720p/480p conversions, in Settings and the player gear. Earlier `playbackModeV2`/`quality` preferences migrate on first read. With the controls hidden, a Left/Right tap now only moves a pending seek (350 ms settle, so quick taps add up); a key repeat reveals the controls with the timeline focused. Play's initial focus no longer takes focus back after a timeline reveal.
On the onn, `verify_ui.py player` passed all seven checks, including two new ones: a Right tap skipped at least 9 s (projected from the Android media-session position) with no controls, and `input keyevent --longpress 22` revealed the focused timeline. `repro_runtime.py controls` passed. While video plays with controls visible, their clock updates keep `uiautomator` from dumping and it silently returns the previous hierarchy; the player checks now wait for the `READY` log line before pausing and inspect the screen while paused. A focus-loss theory based on those stale dumps was ruled out with a temporary focus log.
## Title information, cast and Settings - 2026-10-25
Cast cards use real Plex Role portraits, names, roles and server-local actor identifiers. Selecting an actor queries every accessible movie/show section with pagination. Series information keeps Seasons ahead of Cast and Plex's related-show hubs. The labelled watched actions use Plex scrobble/unscrobble, refresh descendants and preserve full metadata when merging summary records. Writes survive navigation and repeated submissions are ignored until the refresh completes.
`verify_details.py` passed on the optimized release on the onn: movie watched/unwatched persisted in Plex; John Cena's 13 titles matched results from both libraries; actor/title/cast return focus restored; marking the eight-episode series updated every episode; related shows opened and returned to the selected card. The harness validated initially unwatched, zero-resume fixtures (Matchbox `36486`, 3 Body Problem `16413`), then restored and rechecked both. It did not play content or alter existing resume points.
The TV show header initially moved its title to y=21 px when Compose's default TV bring-into-view pinned the focused action higher on screen. `verify_details_layout.py` reproduced that failure. The revised header uses a full-screen backdrop, fitted poster and top-aligned information; scrolling only reveals controls outside the viewport. The regression check passed with title bounds `[392,136,849,212]`, Back visible and Seasons first. Text shadows and a dark fade improve description/rating contrast; filled action buttons retain crisp text without that shadow.
Settings now uses Connection / Playback / Interface / Updates categories. The underlying account, preferences and signed-updater behavior are preserved. Raw captures and server-specific verification results remain in ignored `evidence/private/`; the README gallery contains reviewed screenshots from the release build.
Final 0.1.8 verification: `Build.ps1 -Release -Test` passed; `verify_settings.py` passed category focus, Original quality / 80% dialog cancellation, live update checking and sign-out cancellation. `verify_navigation_sounds.py` passed Off and On persistence across cold starts, leaving sounds On. All six `verify_ui.py browse` checks passed, including real Plex PIN cancellation. The final signed APK (version code 9) was installed in place and profile compiled; the encrypted session and playback preferences were retained. The app was returned to Home. The release gallery includes nine new 1920 × 1080 captures, encoded as lossless WebP and checked for pixel equality with their source PNGs.
## Show details, season grouping and remote navigation - 2026-10-26 (0.1.9)
Show information now uses a 248 dp minimum header, with the fitted poster starting at 56 dp and description width capped at 560 dp. On the onn, the 3 Body Problem title stays at `[392,112,849,188]`, Back remains visible, and the full Season 1 caption fits inside the first screen. Truncated text opens a near-black, poster-led Synopsis panel with the existing typography and circular close control. The release layout check passed opening, D-pad scrolling, Close, Back and restoration to Synopsis. Scrolled Cast screenshots show a near-black background: the header artwork fades completely over the first 180 dp of scrolling, while the lower-screen scrim is opaque.
New seasons samples 100 Plex season records, deduplicates by parent show ID, then selects up to 18 groups in recency order. Multiple seasons use the actual parent show's metadata and open its season list; single seasons still open directly. Identity/order/limit tests and the live Plex query passed. The TV screenshot shows one Punkin Chunkin card among the other shows.
A rapid Right/Down sequence reproduced a dropped Down press in 0.1.8. Tab activation waited two frames, and delayed initial-focus effects could reclaim focus after the next move. The release queues entry for the intended destination, records already-focused tabs, and enters the fixed Discover control without waiting for catalog resets. Rapid Movies/Down and TV/Down, re-entry after catalog scrolling, and a four-step horizontal out-and-back check passed on the onn. The startup section regression and all six `verify_ui.py browse` checks passed, including live PIN cancellation preserving the session.
Performance was measured with the signed release and confirmed ART `speed-profile` compilation, retaining both accessibility services and all device settings. Initial browsing samples missed the p95 <40 ms gate. A controlled comparison rebuilt unchanged 0.1.8 source with version code 10 solely to allow an in-place install; it measured median 16 ms / p95 53 ms on the same current content. Tracing showed offscreen composition and layout between rapid key events. Horizontal rows now cache one viewport ahead and half a viewport behind, stage new card content at fixed bounds, and commit pending column changes on frame boundaries. Spaced presses retain their animation; presses less than 160 ms apart snap to the latest anchor and defer speculative artwork until 70 ms of settling. Up at the top bar does not run a lazy focus search. The final onn browsing check passed with median 17 ms / p95 34 ms, GPU p95 7 ms and zero horizontal Y drift (63 rendered frames). Some frames still missed 60 Hz; this is a device sample, not a guarantee.
The macOS checkout was reattached to the existing repository history without replacing its source files. Builds reused an existing JDK 17 with Gradle 8.13 and an isolated SDK 36, and used the original private signing key. `assembleRelease testDebugUnitTest lintDebug` passed (five unit tests); the signed debug build passed all 21 Android integration tests against the existing encrypted session. An outdated integration-test transcode argument was updated to `StreamQuality.Original`. Scripts accept `KALEIDO_ADB` for the local ADB executable and retain the authorized serial selection. Private keys, toolchains and raw device evidence remain ignored.
On the TCL (`192.168.50.200:5555`), 0.1.9 installed in place and ART confirmed `speed-profile` after a lost compilation reply. Rapid tab/Down, scrolled catalog re-entry and the horizontal round-trip passed. A longer transition run lost its ADB transport; `device.py` now reconnects when the serial disappears as well as on closed/offline errors. A shorter, complete Movies sample (`profile_transitions.py --skip-home`) measured tab → Discover p95 22.7 ms, Discover → row 23.2 ms and row → row 46.1 ms (baseline 74.8 ms). Entering Movies measured p95 94.2 ms / maximum 106.4 ms, versus baseline 106.8 / 150.1 ms. These are individual samples; the weaker TV still misses frames on section composition, and the interrupted run is not counted as a complete pass. Both comparisons retained the existing session and settings.
## Native playback and release performance — 2026-10-26 (0.1.10)
Original quality now opens the actual file first. On the ONN, the default path retained 3840×2160 HEVC/AAC 5.1 and 3840×1608 Dolby Vision/EAC3 7.1 instead of the baseline's 1080p/stereo conversion. Plex-selected audio is applied to native tracks, Subtitles Off disables native text tracks, and unsupported selected tracks retain server fallback. A nonempty audio-only track list for a declared video now triggers fallback: the VC-1 sample automatically reached rendered 1080p HEVC through Plex. Stream preparation is serialized, and fallback checks its session generation before replacing a newer stream. Movie controls identify server conversions.
The failing mono WAV contained a center-only PCM speaker mask. The audio sink normalizes one-channel PCM to Android's standard mono output, preserving rate, channel count, timeline and channel mapping. The 24-bit/96 kHz source played at 96 kHz through the existing 16-bit PCM sink; standard 16-bit/48 kHz stereo also passed. Multichannel PCM and encoded bitstreams retain their layout. This is a playback compatibility fix, not a new claim of bit-perfect 24-bit output.
Debug functional checks passed native Dolby Vision profiles 5/8/10, EAC3 7.1, AV1/TrueHD 7.1, Opus 7.1, DTS-HD input with DTS-core output, FLAC, selected AC3, and backward seeking. The AV1/TrueHD steady run covered 61.8 seconds with 1,483 rendered frames, one dropped frame and no later buffering samples. All seven remote player checks passed, including switching a conversion to Original quality. The Android runner reported OK for 24 tests (the capability inventory is opt-in); five host unit tests and release/debug builds plus lint passed. Native next-episode validation was not completed after the testing interruption and is not counted as a pass.
The user reported severe lag while the devices still had temporary debug APKs installed. Both were confirmed `DEBUGGABLE`, version code 11, with ART `run-from-apk`. They were restored to the exact published 0.1.9 release, without clearing data, and profile compiled. A subsequent controlled ONN comparison used only non-debuggable production-signed APKs with ART `speed-profile`. Three cold starts measured activity startup median 431 ms for 0.1.9 versus 423 ms for 0.1.10. Home readiness, including UI-dump polling overhead, was 6.720 versus 6.773 seconds. A full Home/Movies transition cycle recorded 26 versus 23 skipped vsyncs overall; Movies entry p95 was 79.7 versus 75.6 ms, with 11 skipped vsyncs in each. Individual transitions varied by a few milliseconds. The release comparison showed no material navigation/startup regression; it does not promise zero stutter. The TCL repeat was skipped at the user's request.
The signed 0.1.10 APK uses the existing production certificate, version code 11. APK checks found neither private session data nor debug playback intent strings. Raw comparison records remain in ignored `evidence/private/release-comparison/`. The new benchmark scripts reject debuggable APKs and require `speed-profile`, so functional debug results cannot be mistaken for release performance evidence. The user explicitly authorized leaving Dolby Vision/HDR10 enabled; cleanup must not restore the earlier disabled list.
The actual non-debuggable release was also opened through Search and title details and played the 4K HEVC fixture from the beginning. Playback reached PLAYING/READY in 2.565 seconds; the recorded 30-second steady sample had zero BUFFERING transitions and one READY event. A preceding one-minute session also completed without a second READY event, but its harness incorrectly expected Home instead of the originating details page, so it is not counted as a fully completed benchmark. The corrected run returned normally and restored the exact previous resume point with the watched count unchanged. This checks real release playback, rather than ignored debug test intents.