Commit Graph

20 Commits

Author SHA1 Message Date
zenord fdd91234b5 feat: add neutral avatar video call MVP in Android 0.6.0 2026-10-12 15:12:57 +08:00
zenord 4d305ad0df feat: refine role expression and diagnose camera context in 0.5.2 2026-10-12 14:02:14 +08:00
zenord 18ec4c2104 fix(gateway): constrain verified Qwen replies to emotion schema 2026-10-12 12:18:18 +08:00
zenord b521d368a5 fix: preserve camera permission intent and distinguish unknown reply expression 2026-10-12 11:33:36 +08:00
zenord d43c7d4e80 feat: merge reply emotions while preserving configurable Qwen/Doubao provider 2026-10-12 10:57:14 +08:00
zenord 19a7adccd9 chore: archive recoverable gateway source baseline 2026-10-11 20:57:05 +08:00
zenord 9b428fb76f fix: fence voice turns and playback; add opt-in face context 2026-10-11 20:50:11 +08:00
zenord 885bb3f2db fix: ABORT marks old turn as blocked, not new turn
acceptTurn() runs before ABORT handler, updating currentTurn to new value.
ABORT then set blockedTurn = currentTurn (new turn), causing all audio frames
for the new turn to be silently dropped. UI stuck at THINKING/ANSWERING.

Fix: save oldTurn before acceptTurn; ABORT marks oldTurn as blocked.
listen_start ABORT explicitly clears blockedTurn (no blocking).

Version 0.3.3
2026-10-11 19:34:33 +08:00
zenord e90b073e68 fix: audio frame sequence starts at 1 (server expects up_seq+1)
Server up_seq starts at 0, expects first frame seq=1. Client sent seq=0,
triggering sequence gap error and ws close 1008 after ~22 frames (450ms).

Also: version 0.3.2
2026-10-11 19:17:37 +08:00
zenord 71cb17036b feat: diagnostic report button, scrollable log view
- DiagnosticLog: 500-entry ringbuffer, all DebugLogUpload writes captured
- DiagnosticReportUpload: POST /debug/report with device info + logs + session state
- Button at bottom: shows sent/failed, clears sent entries on success
- Screen log scrollable, shows last 10 entries
- Gateway POST+GET /debug/report deployed on SPARK-2

Version 0.3.1
2026-10-11 19:11:06 +08:00
zenord 6494d78253 fix: audio frame size, rotation rebuild, background disconnect reason
- AudioCapture: short reads buffered and concatenated, only send when exactly 640B
- AndroidManifest: configChanges prevents rotation from recreating Activity
- onStop shows explicit disconnect reason instead of silent disconnect
- Remote debug log now works (HTTPS endpoint fixed)

Version 0.3.0
2026-10-11 19:01:28 +08:00
zenord 8652659e68 fix: abort listen_start no longer blocks new turn, debug log HTTPS fix
- ABORT with reason=listen_start no longer marks new turn as blocked
- ABORT ignored when connection lost or voice not active
- finish() logs stack trace to Logcat, truncated summary to screen/remote
- DebugLogUpload endpoint fixed to HTTPS (was cleartext HTTP to HTTPS port)
- Granular logging: onEvent entry, acceptTurn details, ABORT/LISTEN decisions,
  startCapture result, onConnection transitions, finish() caller

Version 0.2.7-m5-fix8
2026-10-11 18:40:55 +08:00
zenord c3e5481d19 fix: connection survives mic permission dialog, add reconnect reuse
- Permission dialog triggers onStop/onStart; previously each foreground() created new WS,
  causing busy-lock conflict and disconnect
- Now: onStop stops audio but keeps connection alive for 30s; onStart reuses if still open
- DebugLogUpload: runtime policy check, screen shows upload result (HTTP status / failure reason)
- Reduced audio frame log volume to avoid flooding upload queue

Version 0.2.6-m5-fix7
2026-10-11 18:19:04 +08:00
zenord 198fe51cec feat: remote debug log upload to gateway for LAN diagnosis
- DebugLogUpload: isolated OkHttp pool, 3s timeout, bounded queue, silent drop
- POST /debug/log on gateway: LAN-only, JSON ringbuffer (200 entries), GET to read
- Logs: app_launch, connect phases, ws events, errors (no token/audio/chat content)
- UI shows debug logging active indicator
- network_security_config: cleartext HTTP allowed for gateway host (LAN debug only)
- Gateway v0.7.1 + debug log endpoint deployed on SPARK-2

Version 0.2.5-m5-fix6
2026-10-11 12:51:51 +08:00
zenord 87f1324a68 fix: pre-WS health probe, callTimeout, granular phase logging
- HTTP GET /health probe before WebSocket: distinguishes DNS/TCP/TLS failure from WS handshake
- callTimeout 15s covers entire connect+handshake (not just connectTimeout)
- 15s Handler guard covers probe-to-hello full flow, shows timeout reason
- Phase log: submitted / dns / tcp / tls / http response / ws open / auth / hello
- Old generation callbacks isolated during probe phase too

Version 0.2.4-m5-fix5
2026-10-11 12:42:53 +08:00
zenord b2388931f1 fix: explicit CONNECTING state, handshake timeout, granular connection log
- New ConnectionStatus.CONNECTING shown as 连接中 in status pill
- Connection log distinguishes: TCP connecting / WS open / auth received / hello sent / hello received
- Failure categories: TCP unreachable / TLS cert / handshake timeout / server closed
- 15s total handshake timeout with reason display
- On-screen log shows last 3 events for user diagnosis

Version 0.2.3-m5-fix4
2026-10-11 12:03:49 +08:00
zenord 7766f9d3eb fix: wait for server HELLO event before CONNECTED, add on-screen connection log
- CONNECTED now requires receiving server hello event (not just sending client hello)
- 15s handshake timeout: if auth/hello never arrives, show timeout reason
- On-screen log shows last 3 connection events (ws open, auth ok, hello, closed, timeout)
- Generation guard covers early/duplicate auth and stale socket callbacks

Version 0.2.2-m5-fix3
2026-10-11 11:51:19 +08:00
zenord 218d905e63 fix: wait for server auth-ok before sending hello
Client sent hello immediately on WebSocket open, but server sends
auth-ok first (LAN direct / guest cookie / admin bearer) and expects
hello only after that. Client hello was parsed as auth message,
causing silent rejection and permanent disconnected state.

Fix: track authReceived, send hello only after AUTH event arrives.
Also add manual reconnect button and failure reason display.

Version 0.2.1-m5-fix1
2026-10-11 11:38:13 +08:00
zenord f1da7abf93 M5: camera expression cues via MediaPipe Face Landmarker
- CameraX ImageAnalysis + Face Landmarker (CPU, 10Hz, KEEP_ONLY_LATEST)
- Rule-based blendshape mapping: smiling/brow_furrowed/gaze/blink/face_presence
- Camera off by default, explicit user toggle, no image storage/upload
- Expression cues displayed as passive labels, never affect dialogue flow
- CameraX pinned 1.4.2 (compileSdk 34 compat), MediaPipe tasks-vision 1.1.0
- Face model bundled: face_landmarker.task (sha256 TOFU recorded)
- docs/EXPRESSION.md with rules table and privacy notes
- Version 0.2.0-m5
2026-10-11 08:40:51 +08:00
zenord 07d5f77808 M0-M2: LAN voice Android client skeleton + WSS protocol + audio pipeline
- M0: Gradle scaffold (AGP 8.5.2 / Kotlin 2.0.20 / Compose BOM 2024.09.03), arm64-v8a, minSdk 26
- M1: OkHttp WebSocket client, LV binary frame codec, connection generation guard, cert pinning
- M2: AudioRecord capture (16k PCM16 20ms), AudioTrack playback (48k), barge-in, RECORD_AUDIO
- Server address in res/values/config.xml; persona/lore resolved server-side
- PLAN.md with milestones and decisions
2026-10-11 08:19:31 +08:00