onionwire/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
t 0999601e6a
feat(android): chat row renders queued (try 3/8, retry 45s) from the SDK's outbox rows
Consumes the SDK surface from PR #58 (`Wire.outbox(pubkeyHex)` →
`OutboxRow { messageId, status, attempts, nextAttemptAt, lastError }` and
`outboxMaxAttempts()`): a queued chat row now says *why* it is still queued
instead of a flat `queued`.

* `OutboxDetail.kt` — `retryInText` mirrors `src/tui.rs::retry_in_text`
  (`<= 0` → `retry now`; `< 60` → `retry {n}s`; else `retry {ceil-minutes}m`),
  and `outboxDetails` joins the SDK's rows onto the chat rows. The denominator
  is the core's `outboxMaxAttempts()`/`Rust` budget, fetched once — never 8.
* A terminal `"failed"` row keeps the marker's own `failed: <reason>` and gets
  **no** countdown: `nextAttemptAt` on a failed row is the last time it was
  scheduled for, so a countdown there would promise an attempt that never comes.
  `"sending"` stays bare, matching the TUI.
* `ChatScreen` polls the outbox rows on the same 2s cadence as the bodies and
  renders the countdown against an injectable `nowSeconds` (the store holds an
  absolute instant, the app computes the age).
* The join is positional — `ChatMessage` carries no `messages.id` — and
  fail-closed: mismatched row counts, an unknown status, or a status that
  contradicts the one the SDK resolved for that message drops every detail and
  leaves the flat markers. `ChatMessage.id` would remove the positional part;
  filed as follow-up.
* `OutboxDetailTest` (17 tests) asserts the three `retry_in_text` buckets, the
  `queued (try 3/8, retry 45s)` wording, that a failed row shows no countdown,
  that the denominator comes from the caller, and the three fail-closed cases.
  32 unit tests, 0 failures.

Android base: PR #56 (`feat/android-outbox-state`, t_f46a9863) — the Android
half of the #52/#56 duplicate pair, which is not merged here. SDK base: PR #58
on PR #51.
2026-09-12 18:17:05 -04:00
..
src feat(android): chat row renders queued (try 3/8, retry 45s) from the SDK's outbox rows 2026-09-12 18:17:05 -04:00
build.gradle.kts feat(android): wrap the store passphrase in the Android Keystore 2026-09-12 13:55:07 -04:00