Skip to content

feat(android): crash reporting, analytics opt-in, settings IA, i18n, open/share/fonts#1

Merged
willwade merged 2 commits into
mainfrom
feat/android-broadening
Jun 28, 2026
Merged

feat(android): crash reporting, analytics opt-in, settings IA, i18n, open/share/fonts#1
willwade merged 2 commits into
mainfrom
feat/android-broadening

Conversation

@willwade

Copy link
Copy Markdown
Contributor

What

Tier-2 and Tier-3 parity work for Dasher-Android, implementing RFCs 0001 / 0003 / 0006 / 0009. Built on top of \main; full \�ssembleDebug\ is green.

Tier 3 (parity niceties)

  • Open file (.txt) via SAF into the output pane. DasherCore has no CAPI to seed the edit buffer (only get/reset), so the loaded text is kept as a frontend prefix and combined with the engine's append-since-reset output for display / copy / save / share (Dasher writes forward).
  • Share sheet (\Intent.ACTION_SEND) on the full output text.
  • Output-pane font family (System / Sans / Serif / Monospace) + size slider (10–48 sp), persisted in a \dasher_output\ SharedPreferences. Canvas glyph font remains the engine \SP_DASHER_FONT\ param (Customization tab).
  • TopBar gains Open + Share buttons (Lucide \FolderOpen\ / \Share2).

Tier 2 (robustness / polish)

  • Crash reporting (RFC 0009). New \DasherApp\ Application installs a \Thread.setDefaultUncaughtExceptionHandler\ early; on a crash it writes a \pending_crash.txt\ envelope (exception type, thread, scrubbed stack + engine log tail) and delegates. \ lushPendingCrash\ on next launch sends it via PostHog (only if opted in) and deletes it; files older than 7 days are discarded. An engine-log ring buffer (64 lines / 8 KB) is fed from \dasher_set_log_callback\ so each crash report carries what DasherCore was doing. Home-dir paths and emails are scrubbed (RFC 0001 no-PII). v1 is JVM-level; a native SIGSEGV shim for crashes inside \libdasher.so\ is a flagged follow-up.
  • Analytics opt-in (RFC 0001). First-run \AlertDialog\ ('Help improve Dasher' / 'Not now') shown when !hasPrompted; no events before the choice. PostHog init moved to \DasherApp.
  • Settings progressive disclosure (RFC 0006). Simple/Advanced \Switch\ in Settings filters params on the engine's binary \�dvanced\ flag (Simple is default). A 3-tier (common/advanced/expert) waits on a future \dasher_get_parameter_tier\ CAPI.
  • Frontend i18n (RFC 0003). \LocaleHelper\ wraps the Application base context so Compose \strings.xml\ follows the user-chosen locale on every API level (no AppCompat dep). Picking a locale in Settings now also recreates the Activity so chrome re-localises. Extracted toolbar / settings / analytics / output strings to \strings.xml\ with a German (\�alues-de) translation as a pipeline proof. Full string migration + more locales are ongoing follow-up.

Notes

  • Commit messages cross-reference the RFCs they implement.
  • DCO: all commits are \Signed-off-by.
  • Suggested follow-ups (not in this PR): native crash shim, full i18n extraction, RFC 0008 IME-onboarding code.

willwade added 2 commits June 28, 2026 09:36
Tier-3 parity items mirroring Apple/Windows:

- Open file (.txt) via SAF into the output pane. DasherCore has no CAPI to
  seed the edit buffer (only get/reset output), so the loaded text is kept on
  the frontend as a prefix and combined with the engine's append-since-reset
  output for display, copy, save, share (Dasher writes forward).
- Share sheet (Intent.ACTION_SEND) on the full output text.
- Output-pane font family (System / Sans / Serif / Monospace) + size slider
  (10-48 sp), persisted in a dasher_output SharedPreferences. Canvas glyph
  font remains the engine SP_DASHER_FONT param (Customization tab).
- TopBar gains Open + Share buttons (Lucide FolderOpen / Share2).

Signed-off-by: will wade <willwade@gmail.com>
Tier-2 parity items, implementing RFCs 0001/0003/0006/0009 on Android.

Crash reporting (RFC 0009):
- DasherApp (Application) installs a Thread.setDefaultUncaughtExceptionHandler
  early; on a crash it writes a pending_crash.txt envelope (exception type,
  thread, scrubbed stack trace + engine log tail) to filesDir, then delegates.
- flushPendingCrash on next launch sends it via PostHog (only if opted in)
  and deletes it; crash files older than 7 days are discarded.
- An engine-log ring buffer (64 lines / 8 KB) is fed from DasherCore's
  dasher_set_log_callback via the existing onLogListener, so each crash
  report carries what the engine was doing. Home-dir paths and emails are
  scrubbed (RFC 0001 no-PII).
- v1 is JVM-level; a native SIGSEGV shim for crashes inside libdasher.so is
  a follow-up.

Analytics opt-in (RFC 0001): first-run AlertDialog ('Help improve Dasher' /
'Not now') shown when !hasPrompted; no events before the choice. PostHog
init moved to DasherApp.

Settings progressive disclosure (RFC 0006): Simple/Advanced Switch in
Settings filters params on the engine's binary \�dvanced\ flag (Simple is
default). A future 3-tier (common/advanced/expert) waits on a
dasher_get_parameter_tier CAPI.

Frontend i18n (RFC 0003): LocaleHelper wraps the Application base context
so Compose strings.xml follows the user-chosen locale on every API level
(no AppCompat dep). Picking a locale in Settings now also recreates the
Activity so chrome re-localises. Extracted the toolbar / settings /
analytics / output strings to strings.xml with a German (values-de)
translation as a pipeline proof; full string migration + more locales are
ongoing.

Signed-off-by: will wade <willwade@gmail.com>
@willwade willwade merged commit 230a894 into main Jun 28, 2026
2 checks passed
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.

1 participant