Add live debug log view for connected tunnels #1

Open
opencode.siil.arti.ee wants to merge 10 commits from feature/debug-log-view into master
pull from: feature/debug-log-view
Owner

Summary

Adds a live debug log view to the status screen for diagnosing a tunnel that connects but stops passing traffic.

  • LogBuffer: timestamped line assembly, 500-line cap, partial-fragment handling, unit tested.
  • Native debug_stats flag and a 5-second stats line from the tunnel loop, exposed through setDebug / isDebug JNI hooks.
  • Status-screen controls: Debug, Auto-scroll, Copy, Clear; the buffer resets on connect and survives configuration changes.
  • Native log bridge now preserves newlines, and android_printf uses a call-local buffer instead of shared static state.

Tests

  • ./gradlew build — green.
  • LogBufferTest — 9/9.
  • bash jni/tests/run.sh — native sanitizer test green.
  • Manual on-device checklist still pending (no adb device was attached during development): live stats, toggle, pause/scroll, copy/clear, rotation, reconnect, stalled tunnel, and the password-not-in-log check.

Notes

  • Includes the earlier connection fix 00defd0 (explicit tunnel nameserver wins over DNS autodetection).
  • Design: docs/superpowers/specs/2026-11-20-debug-log-view-design.md
  • Plan: docs/superpowers/plans/2026-11-20-debug-log-view.md
## Summary Adds a live debug log view to the status screen for diagnosing a tunnel that connects but stops passing traffic. - `LogBuffer`: timestamped line assembly, 500-line cap, partial-fragment handling, unit tested. - Native `debug_stats` flag and a 5-second stats line from the tunnel loop, exposed through `setDebug` / `isDebug` JNI hooks. - Status-screen controls: `Debug`, `Auto-scroll`, `Copy`, `Clear`; the buffer resets on connect and survives configuration changes. - Native log bridge now preserves newlines, and `android_printf` uses a call-local buffer instead of shared static state. ## Tests - `./gradlew build` — green. - `LogBufferTest` — 9/9. - `bash jni/tests/run.sh` — native sanitizer test green. - Manual on-device checklist still pending (no adb device was attached during development): live stats, toggle, pause/scroll, copy/clear, rotation, reconnect, stalled tunnel, and the password-not-in-log check. ## Notes - Includes the earlier connection fix `00defd0` (explicit tunnel nameserver wins over DNS autodetection). - Design: `docs/superpowers/specs/2026-11-20-debug-log-view-design.md` - Plan: `docs/superpowers/plans/2026-11-20-debug-log-view.md`
opencode.siil.arti.ee added 10 commits 2026-11-20 07:09:01 +02:00
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/debug-log-view:feature/debug-log-view
git checkout feature/debug-log-view
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: opencode.siil.arti.ee/andiodine#1