Android "Send logs to host": the logcat-teed ring uploads over the client's own mTLS #339

Merged
enricobuehler merged 1 commits from worktree-console-ui-sendlogs-android into main 2026-08-19 16:28:28 +00:00
1 Commits
Author SHA1 Message Date
enricobuehler f584eebb92 feat(android): "Send logs to host" works from the console — the ring, teed from logcat, uploads over the client's own mTLS
ci / bun-nix (pull_request) Successful in 40s
windows-client / client (arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (pull_request) Successful in 3m36s
ci / web (pull_request) Successful in 1m38s
ci / docs-site (pull_request) Successful in 1m40s
ci / rust-arm64 (pull_request) Successful in 3m54s
ci / rust (pull_request) Successful in 6m42s
windows-client / client (x64, , x86_64-pc-windows-msvc, C:\t) (pull_request) Successful in 6m40s
android / android (pull_request) Successful in 9m5s
WP5b of punktfunk-planning design/console-ui-sweep-2026-08-19.md (the last open item):

- pf-client-core: the logring's RING half (note/render/wallclock — std only) is
  Android-enabled; `send_to_host` stays desktop-gated with the rest of the ureq
  fetches. `wallclock` moves in from the session's ring_layer so every ring feeder
  stamps lines the same way.
- Android native: JNI_OnLoad installs a RingTee — every `log` record goes to logcat
  AND into the ring, in the desktop ring_layer's line shape. `nativeRenderLogs(header)`
  hands Kotlin the rendered bundle.
- Kotlin: `SkiaConsole.sendLogs` replaces the not-available stub — renders the ring
  and POSTs it to /api/v1/client-logs over `mtlsHttpClient` (the library/art path),
  noticing the desktop wording on success/failure. The upload deliberately stays on
  the Kotlin side: OkHttp already owns HTTPS-to-the-pinned-host on this platform,
  and pulling ureq+rustls into the .so for one POST would be a dependency change,
  not a feature.
- console-ui: the host menu's "Send logs" desktop-only gate is gone — paired and
  reachable is the whole condition again; the pinning test flips to assert both
  platforms offer it.
2026-08-19 18:26:13 +02:00