Skip to content

Fuller crash reports, preference file rules, Ctrl+Shift+K shortcut, extension points - #25

Merged
abhishek-3289 merged 1 commit into
mainfrom
crash-report-extensibility
Nov 5, 2026
Merged

abhishek-3289 merged 1 commit into
mainfrom
crash-report-extensibility

Conversation

@abhishek-3289

Copy link
Copy Markdown
Collaborator

What

Crash reports

  • Each report now has the stack trace plus App and device (version, device, Android, heap use, uptime), Steps, the last 20 network calls (method, URL, status, duration, errors, an excerpt of failed responses; secrets already masked) and the last 50 logs. Sizes: CrashReporter.networkCallsInReport, logsInReport, stepsInReport.
  • CrashReporter.addSection(title) { … } adds app-specific context to every report.
  • After a relaunch, an App crashed last time bar (View / Share / dismiss) and a Crashed last time header chip point to the new report (CrashReporter.unseenCrash, markSeen()).
  • Android 11+: ANRs (with the system's thread dump) and native crashes are imported from ApplicationExitInfo on the next launch.
  • CrashPlugin(testCrashButton = true) adds Freeze the app (test ANR).

SharedPreferences

  • PreferenceFileRules(app, library, hidden) via StoragePlugin(preferenceRules = …) / SharedPreferencesBrowser(rules = …); names are exact or a prefix ending in *.
  • Testers can Move to library files / Move to app files from a file's page; kept on the device.

Keyboard shortcut

  • Default is now Ctrl + Shift + K. The Android emulator reserves Ctrl + Shift + D (D-pad panel) and most other Ctrl + Shift letters, so the old default never reached the app there.

Extension points

  • DeckHeaderChips.add(key) { DeckHeaderChip(...) } for app header chips (sample shows the active endpoint).
  • Pill and ConfirmDeleteButton are public.

Fix

  • Updates whose version code isn't higher than the installed build are ignored (the sample header showed "New version · v1.1.0" on 1.2.0).

Compatibility

Old StoragePlugin, SharedPreferencesBrowser and CrashRecord constructor/copy signatures are kept as hidden overloads. Old crash files parse unchanged. The shortcut change is behavioural and is called out in the CHANGELOG.

Checks

  • ktlintCheck lintDebug lintRelease assembleRelease testDebugUnitTest apiCheck :sample:assembleQa pass locally; new tests for report parsing/formatting, preference rules and update version comparison.
  • Emulator (Android 17): Ctrl+Shift+K opens the drawer and Ctrl+Shift+D doesn't; a test crash after real requests produced every section; the relaunch bar and View work and clear after viewing; a SIGSEGV was imported as "Native crash: signal 11 (SIGSEGV)"; preference rules hid / grouped files and moving a file worked.
  • Not verified end to end: ANR import. The ANR fired but the emulator showed no ANR dialog, so the process wasn't killed for it.

🤖 Generated with Claude Code

…xtension points

Crash reports
- Reports include app and device details, heap use and uptime, the last 20
  network calls, the last 50 DeckLogger entries and the breadcrumbs.
- CrashReporter.addSection adds app-specific context to every report.
- After a relaunch, an "App crashed last time" bar (View, Share, dismiss) and a
  header chip point to the new report.
- On Android 11+, ANRs and native crashes are imported from
  ApplicationExitInfo on the next launch.
- CrashPlugin(testCrashButton = true) also offers a test ANR.

SharedPreferences
- PreferenceFileRules marks files as app, library or hidden (exact names or
  prefixes ending in *); testers can move a file between lists from its page.

Other
- Default shortcut is Ctrl+Shift+K: the emulator keeps Ctrl+Shift+D for its
  D-pad panel, so the old default never reached the app.
- DeckHeaderChips lets apps add header chips; Pill and ConfirmDeleteButton
  are public.
- Updates that aren't newer than the installed version code are ignored.
- Old StoragePlugin, SharedPreferencesBrowser and CrashRecord signatures are
  kept as hidden overloads.
@abhishek-3289 abhishek-3289 added this to the v1.3.0 milestone Nov 5, 2026
@abhishek-3289
abhishek-3289 merged commit cc539d2 into main Nov 5, 2026
3 checks passed
@abhishek-3289
abhishek-3289 deleted the crash-report-extensibility branch November 5, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants