feat(android): a diagnostics page answers why the fleet row is stale

A stale "last seen" had no client-side answer: a dead worker, a down
claw, and a claw that drops writes all looked identical from the
settings screen. The new page separates them: the WorkManager jobs'
live state (a cancelled schedule renders as "not scheduled"), the two
clocks — the phone's last landed report against the claw's last stamp
— whose disagreement names the broken end, auto-detected system checks
(battery optimization, background restriction, notifications) with
jumps into the exact settings page, a report-now kick, and a 200-line
in-memory flight recorder where every worker run logs its outcome.
This commit is contained in:
vhaudiquet committed 2026-10-25 10:28:38 +02:00
1 parent e4f4a3a10b
commit 7225dfddd3
10 files changed
+564 -14

No files matched your search

@@ -97,6 +97,51 @@
<string name="reporting_on">on</string>
<string name="reporting_allow">Allow</string>
<string name="settings_entry_diagnostics">Diagnostics</string>
<string name="settings_entry_diagnostics_desc">Background work, claw reachability, and the app log</string>
<string name="card_diag_work">Background work</string>
<string name="diag_work_hint">The scheduled jobs and their next window</string>
<string name="diag_work_status">Status reporting</string>
<string name="diag_work_notify">Notification poll</string>
<string name="diag_work_commands">Command queue</string>
<string name="diag_work_next_fmt">next run in %1$s</string>
<string name="diag_work_attempts_fmt">%1$d attempts</string>
<string name="diag_state_checking">checking</string>
<string name="diag_state_enqueued">waiting</string>
<string name="diag_state_running">running</string>
<string name="diag_state_failed">failed</string>
<string name="diag_state_blocked">blocked</string>
<string name="diag_state_cancelled">cancelled</string>
<string name="diag_state_not_scheduled">not scheduled</string>
<string name="diag_report_now_title">Report now</string>
<string name="diag_report_now_desc">Runs the status worker immediately, network permitting.</string>
<string name="diag_report_now">Run</string>
<string name="card_diag_clocks">Claw and phone clocks</string>
<string name="diag_clock_phone">Phone last landed</string>
<string name="diag_clock_phone_desc">When a full report last reached the claw, by this phone\'s own record.</string>
<string name="diag_clock_claw">Claw last heard</string>
<string name="diag_clock_claw_desc">When the claw last stamped this device, by its fleet row.</string>
<string name="diag_clock_never">never</string>
<string name="diag_clock_unreachable">unreachable</string>
<string name="diag_callout_unreachable">The claw is unreachable from this phone (%1$s). Reads and reports fail until it is back; nothing is lost — reporting resumes on the next run.</string>
<string name="diag_callout_not_landing">This phone is reporting, but the claw is not storing it. The claw is up but degraded — a full disk or a read-only database — or something between them swallows posts.</string>
<string name="diag_callout_never_landed">No full report has landed yet. The first run posts everything at once; until then this is normal.</string>
<string name="card_diag_checks">Checks</string>
<string name="diag_check_ok">ok</string>
<string name="diag_check_battery">Battery optimization</string>
<string name="diag_check_battery_desc">Unrestricted lets the 15-minute reports survive Doze and OEM app sleeping.</string>
<string name="diag_check_battery_fix">Unrestrict</string>
<string name="diag_check_background">Background restriction</string>
<string name="diag_check_background_desc">Android is blocking all background work for this app until it is lifted.</string>
<string name="diag_check_background_fix">Open app settings</string>
<string name="diag_check_notifications">Notifications</string>
<string name="diag_check_notifications_desc">Needed for the claw\'s alerts and questions to come through.</string>
<string name="diag_check_notifications_fix">Open settings</string>
<string name="card_diag_log">App log</string>
<string name="diag_log_hint">Newest first, last 60 of 200</string>
<string name="diag_log_empty">Nothing logged yet. A run appears here within 15 minutes of the app being alive — or tap Report now.</string>
<string name="diag_log_copy">Copy</string>
<string name="sessions_group_interactive">Interactive</string>
<string name="sessions_group_other">Other keys</string>