Repository navigation
feat: Save report — stats and log in one file, from the app and the debug page (#207) - #208
Conversation
…ebug page (#207) - DebugServer.reportText(): header (app, version, git hash, device, Android, time, uptime), /stats.json pretty-printed, the log ring; redacted again as a whole. The same text for both ways. - /report.txt: text/plain, Content-Disposition attachment with report-YYYYMMDD-HHMMSS.txt; LAN-only like the other paths. Save report button in the page header next to JSON and Log. - App: long press on Debug (touch, long OK on a remote, or Menu on Debug) saves Download/OpenIPC/report-....txt off the UI thread (MediaStore on Android 10+, storage permission on 6-9 with the app's own folder as a fallback), shows a toast and opens the Share sheet if an app can take it. - Docs: debug.md (endpoint, Save report, bug reports), usage.md, toys.md, security.md. Tests: report composition and redaction, /report.txt headers. - 2.11 (36). Fixes #207
PR Summary by QodoSave a combined debug report from the app or debug page
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Code Review by Qodo
1.
|
…K, MediaStore publish (Qodo on #208) - The chooser excludes the decoder (EXTRA_EXCLUDE_COMPONENTS, own package skipped in the target check), and shared text starting with the report title is not taken as a camera link. - Android 9 and older: a free name (report-...-2.txt) instead of truncating an earlier file. - MediaStore: the IS_PENDING update is checked and inside the cleanup path. - A held OK toggles the menu once: its repeats no longer reopen the menu after a long OK on Debug closed it.
…aries, so chatty graphics logs no longer push them out (#187)
|
Qodo's remaining requirement gap (system lines below Info in the report): fixed in b8e944c. That is the same |
…K, MediaStore publish (Qodo on #208) - The chooser excludes the decoder (EXTRA_EXCLUDE_COMPONENTS, own package skipped in the target check), and shared text starting with the report title is not taken as a camera link. - Android 9 and older: a free name (report-...-2.txt) instead of truncating an earlier file. - MediaStore: the IS_PENDING update is checked and inside the cleanup path. - A held OK toggles the menu once: its repeats no longer reopen the menu after a long OK on Debug closed it.
feat: Save report — stats and log in one file, from the app and the debug page (#207)
…K, MediaStore publish (Qodo on #208) - The chooser excludes the decoder (EXTRA_EXCLUDE_COMPONENTS, own package skipped in the target check), and shared text starting with the report title is not taken as a camera link. - Android 9 and older: a free name (report-...-2.txt) instead of truncating an earlier file. - MediaStore: the IS_PENDING update is checked and inside the cleanup path. - A held OK toggles the menu once: its repeats no longer reopen the menu after a long OK on Debug closed it.
feat: Save report — stats and log in one file, from the app and the debug page (#207)
Fixes #207
What
One report file with a header (app, version + code, git hash, device, Android, time, uptime),
== stats.json ==(the same object as/stats.json, pretty-printed) and== log ==(the 500-line ring). Built in one place,DebugServer.reportText(); the sources are redacted already and the whole text goes throughredactonce more.Download/OpenIPC/report-YYYYMMDD-HHMMSS.txton a background thread: MediaStore.Downloads on Android 10+ with no permission; Android 6–9 ask for WRITE_EXTERNAL_STORAGE like screenshots and fall back to the app's own external folder if it is refused. Then a toastReport saved: Download/OpenIPC/report-….txtand the Share sheet (ACTION_SEND text/plain; the content URI with FLAG_GRANT_READ_URI_PERMISSION on 10+; on older versions there is no FileProvider, so EXTRA_TEXT cut at 50 000 characters with the file's path). If no app can take it (TV boxes), there is no share sheet;<queries>for SEND text/plain makes that check work on Android 11+./report.txt,Content-Type: text/plain; charset=utf-8,Content-Disposition: attachment; filename="report-YYYYMMDD-HHMMSS.txt", LAN-only like the rest.The Debug-on toast now says
Debug text on · hold Debug to save a report.Docs: debug.md (endpoints table, Save report, bug reports), usage.md (Debug long press), toys.md (save on the toy's Wi-Fi, send later), security.md.
Tests: report composition (header, sections, redaction of a URL with a password,
password=, Authorization), report name and uptime,/report.txtresponse headers throughDebugServer.serve()(the routing now sits in a package-private method;handle()keeps the LAN check and request parsing).Version 2.11 (36); other open PRs also use 2.11, re-bump at merge.
Device test
/sdcard/Download/OpenIPC/, share sheet, no passwords in the filecurl -sD- http://<phone>:8085/report.txtheaders