feat(crash): privacy-respecting crash reporting via Gitea issue
Capture uncaught exceptions on-device and let the user submit them, by hand, as a Gitea issue — no network access, no auto-upload (the app holds no INTERNET permission). Closes prod-readiness item 10; the issue templates also close item 7. - CrashReporter: uncaught-exception handler installed first in CalendulaApp.onCreate so startup crashes are caught too. Persists an allowlist-only report (app/Android/device version, locale, time, stack trace — nothing else) to filesDir/crash, then chains to the previous handler so the process still dies normally. Crash-loop detection + markHealthy reset. - buildCrashReport is pure/testable; CrashReportBuilderTest asserts the header is exactly the allowlisted lines (guards against PII creep). - Surfacing: next-launch dialog showing the full report verbatim (the privacy backstop) with a dismissed-marker so it doesn't nag; a Settings "Report a problem" row; and a minimal standalone CrashReportActivity that MainActivity routes to on a startup crash-loop, kept clear of the Hilt graph / DataStore theme. - submitCrashReport copies the report to the clipboard and opens the prefilled Gitea issues/new URL (long traces fall back to paste). - .gitea/ISSUE_TEMPLATE: crash_report, bug_report, feature_request. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -279,6 +279,8 @@
|
||||
<string name="settings_about_source">Source</string>
|
||||
<string name="settings_about_version">Version %1$s</string>
|
||||
<string name="settings_about_logo_desc">Calendula app icon</string>
|
||||
<string name="settings_report_problem">Report a problem</string>
|
||||
<string name="settings_report_problem_hint">Send a crash report or open the issue tracker</string>
|
||||
|
||||
<!-- Calendar manager -->
|
||||
<string name="calendars_title">Calendars</string>
|
||||
@@ -340,4 +342,19 @@
|
||||
|
||||
<string name="about_source_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/calendula</string>
|
||||
<string name="about_license_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/calendula/src/branch/main/LICENSE</string>
|
||||
|
||||
<!-- Crash reporting: a captured report the user can submit, by hand, as a
|
||||
Gitea issue (the app sends nothing automatically). -->
|
||||
<string name="crash_dialog_title">Calendula crashed</string>
|
||||
<string name="crash_dialog_message">Calendula closed unexpectedly last time. You can help fix it by sending this report as an issue. It stays on your device until you choose to share it, and includes no personal data or calendar content — only the technical details below.</string>
|
||||
<string name="crash_dialog_report">Report</string>
|
||||
<string name="crash_dialog_dismiss">Not now</string>
|
||||
<string name="crash_report_issue_title">Crash report</string>
|
||||
<string name="crash_report_clip_label">Calendula crash report</string>
|
||||
<string name="crash_report_copied">Report copied to your clipboard</string>
|
||||
<string name="crash_report_open_failed">Couldn\'t open the issue tracker. The report is on your clipboard.</string>
|
||||
<string name="crash_report_body_template">Thanks for reporting a crash in Calendula. Please add anything you remember about what you were doing, then submit.\n\n### What happened\n\n\n### Crash report\n%1$s\n</string>
|
||||
<string name="crash_report_body_paste">_(The report was too long for this link — paste it from your clipboard here.)_</string>
|
||||
<string name="report_issue_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/calendula/issues/new</string>
|
||||
<string name="report_issue_choose_url" translatable="false">https://gitea.jeanlucmakiola.de/makiolaj/calendula/issues/new/choose</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user