Files
baji-vc/docs/AVATAR_UI_062.md
T
zenord 9ea5eb31c1 feat: deliver clean avatar home in 0.6.2 UI debug candidate
Keep the avatar mounted while all connection, permission, privacy and diagnostic controls live in a settings sheet. Save the tested continuous-body renderer, safe transition driver and foreground HELLO/permission workflow from this session. Pin runtime03 for the code14 UI-only candidate; mouth deformation remains unresolved. Add source UI contracts, an optional sensor-free device probe, exact asset import and candidate packaging checks. Portrait binaries and diagnostics remain private and untracked.
2026-10-12 22:19:56 +08:00

8.4 KiB
Raw Blame History

0.6.2-ui-dev / code14 — clean home UI candidate

This authorized internal debug APK fixes the app UI over code13. Mouth rendering and all portrait asset bytes remain identical to runtime03; the reported mouth deformation is not fixed in this version. It is not a final natural-quality release or a certified ≤1s perceived-mouth response. No backend, provider, TTS, voice, camera model/threshold, system toolchain or service change is included.

Home and settings

Normal and offline entry show a white full-screen Fit avatar and one bottom-right settings gear. The touch target is 48dp plus safe drawing insets. No app title, connection/error strip, candidate banner, emotion/face labels, diagnostic text or mic/camera bar covers the home. System permission dialogs and OS privacy indicators remain visible.

The scrollable settings bottom sheet holds connection/retry/error and permission information, mic pause/resume, camera control, independent face-cue sharing (default off), current/previous requested emotion and selected neutral fallback, diagnostic report action/results, player diagnostics and candidate limitations. Offline Idle/Talk/Abort/Trace controls also live here. The sheet explicitly states that runtime03 mouth deformation remains unresolved.

The avatar stays in the same composition slot outside the conditional sheet. Opening or closing the sheet neither keys nor recreates the AndroidView/renderer, changes Activity lifecycle, nor calls the connection/session coordinator. Avatar time and conversation continue while settings are open. On short/landscape/tablet screens the sheet scrolls; the body uses one shared Fit transform without stretching or cropping head/feet.

Foreground still automatically connects, waits for real server HELLO, then sequentially requests MIC/CAMERA as required. Already granted permissions can immediately start recording/camera analysis. Denied camera permits voice, denied mic starts no recording, asked/denied/off choices prevent prompt loops. Permission pauses stop sensors while retaining bounded connection continuation. Genuine background releases capture/audio/camera/video, clears face/share and disconnects. No background service. Settings permissions/control actions retain these guards.

Exact assets and mouth investigation boundary

Runtime manifest SHA256: 87ad2b2ad0e96fe64943692da363c856939ad4aad57073c589d53130c2f2073c. Body SHA256: 177dbc0ab809e3c9c684899ffbd9cf3a2c357973c7037134f5d79e4e6cdfc762. Source: .runtime/avatar-imports/a01-neutral-graph-v1/runtime-03/. Accepted test static reference SHA256: 36a078ad9e1d2929612e9baa2af524bda90dafceddc4515dd448fc08121d7dd2. All pending natural/device/rights/publish flags are retained. Debug exact-hash admission grants this experiment only. Production motion hash allowlist remains empty. Portrait images/videos, logs and APKs stay ignored in Git.

The read-only code audit found no proven double-premultiplication, UV inversion or frame-index bug. Bitmap defaults to premultiplied decode, then getPixels yields straight ARGB for explicit RGBA upload. Fragment output is body*(1-g*a)+patchRGB*(g*a), opaque alpha1; fresh EGL context has fixed-function blending disabled. Patch uses GL_LINEAR. Body transform comes from SurfaceTexture; top-left patch coordinates use the logical480×848 quad. One pending decoded output is latched/timestamp-checked and its corresponding patch is composed in the same GLES draw/swap. Both share Fit. No explicit linear-light or sRGB conversion is applied.

This source audit and CPU export equality do not validate actual Android GPU color/UV/Bitmap output or rule out asset defects. Intermediate opacity mixes two lip anatomies and can ghost; feather sampling/quantization, color mismatch and translation-only registration under rotation/scale remain possible contributors. Runtime04's proposed per-body-frame aperture-level patches are a different parser/shader contract and are not admitted here. No asset directory is overwritten and no mouth alpha is suppressed to hide the issue.

Reproduce without committing portrait binaries

Use the existing private source packs. Import the accepted original arms PNG with scripts/import-standing-avatar.py --arms-reference <exact-original-PNG>. Restore controlled01 using scripts/package-avatar-engineering.py --import-only; it preserves pending flags and pins manifest e6b6e9a6e555cafb3ca7e0878600c23c4d76f13fb15d98d5f0cd8e5b192a3a09. Import runtime03 using the command below. Missing, drifted or invalid data stops packaging; on-device invalid/missing runtime falls back to the verified still image, and a missing still produces the clean white canvas with gear. No unsafe pack substitution is allowed.

/home/ubuntu/miniconda3/bin/python3 scripts/package-avatar-ui.py --import-only
python3 scripts/check-reply-regressions.py --suite avatar --runtime-manifest .runtime/avatar-imports/a01-neutral-graph-v1/runtime-03/manifest.json > logs/avatar-062/actual-manifest-tests.txt 2>&1
./scripts/check-avatar-regressions.sh
/home/ubuntu/miniconda3/envs/gori-speech/bin/python gateway/scripts/check-archive.py --vad-model /home/ubuntu/miniconda3/envs/gori-speech/lib/python3.12/site-packages/silero_vad/data/silero_vad.onnx > logs/avatar-safe-061/gateway-tests.txt 2>&1
./scripts/build.sh compileDebugKotlin assembleDebugAndroidTest -PavatarNatural=true -PavatarUiCandidate=true -PnaturalManifestSha=87ad2b2ad0e96fe64943692da363c856939ad4aad57073c589d53130c2f2073c > logs/avatar-062/android-test-compile.txt 2>&1
/home/ubuntu/miniconda3/bin/python3 scripts/package-avatar-ui.py

The packager requires current source regression hashes, actual production Kotlin manifest parsing, unchanged mouth renderer fingerprints, exact body/97patch hashes/full decode, all74 gateway tests, compiled optional UI instrumentation, package/signature/SDK/ABI and ZIP byte checks. It compares all avatar bytes with retained code13, verifies HTTP APK/checksum bytes and refuses to overwrite an existing artifact. Version0.6.2-ui-dev/code14, min26/target34/arm64-v8a, same existing debug certificate. Baseline051/052/060/code12/code13 remain byte-identical. No store/release signing is used.

Validation and physical-device boundary

Executed checks: nine existing JVM entrypoints including production MediaCodec/EGL renderer under deterministic doubles, current permission/background/auto-entry/mute tests and repeated ACTIVE coordinator drives representing settings recomposition; clean-home source contracts; actual runtime03 production parser; complete Kotlin/Android test APK compile; all74 isolated gateway tests. Clean-home source contracts verify only avatar+gear outside the sheet and that sheet state never keys the renderer/session. These are not an executed Compose UI/instrumentation test or a physical screen assertion.

An optional platform-only instrumentation probe is compiled in app/src/androidTest/java/com/gorios/lanvoice/AvatarCleanUiInstrumentation.kt. It explicitly uses offline mode, checks the accessibility home has no app text and only one48dp gear, opens/closes settings three times while verifying the identical avatar View and renderer instance, checks no VoiceSession/ExpressionController is constructed, and backgrounds the Activity to check renderer release. It captures no screenshots/audio/camera data. It has not run here; coordinator must first confirm the device is online. OEM accessibility, keyboard/navigation insets, real permission dialogs, actual decoder/GLES appearance, performance and user-perceived latency remain untested in this build.

adb -s 0123456789ABCDEF install -r lan-voice-v062-ui-candidate-arm64-debug.apk
adb -s 0123456789ABCDEF shell am force-stop com.gorios.lanvoice
adb -s 0123456789ABCDEF shell am start -W -n com.gorios.lanvoice/.MainActivity --ez avatar_offline_preview true

This exact extra returns before constructing session/audio/camera. Open the gear to find synthetic intent controls. For the optional UI probe, after installing app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk built by the commands above:

adb -s 0123456789ABCDEF shell am instrument -w com.gorios.lanvoice.test/com.gorios.lanvoice.AvatarCleanUiInstrumentation

Normal launcher entry can activate already-granted MIC/CAMERA after HELLO; use the offline command for sensor-free verification. No automatic installation, permission granting, recording or device-network configuration is performed by this task. User camera/face algorithm acceptance remains separate.