feat(android): surface outbox delivery state in chat (queued/sending/delivered/failed) #56

Merged
sirius merged 5 commits from feat/android-outbox-state into wt/t_9a29fd3c 2026-09-12 23:58:16 +00:00
Owner

What

The Compose chat now renders the core's own outbox state per message and at chat level, instead of implying a message either sent or did not.

State Marker in the row Screen reader hears
delivered ✓✓ "Delivered"
queued ◷ queued "Queued, not delivered yet: retrying their onion"
sending spinner + » sending "Sending"
failed (terminal) ✗ failed: <reason> "Failed: "

Plus a chat-level footer while anything is outstanding — N queued, and a fail-closed send failed: <reason> statement that stays visible after retries are exhausted (mirrors src/tui.rs::OutboxSummary::note, so both clients read the same).

Also fixed, because it is now false:

  • ChatScreen's empty-chat copy no longer says "Sends fail closed … There is no outbox in v1" — it now describes the local outbox and that a queued message is local-only until the peer's onion takes it.
  • WireViewModel.send() (WireViewModel.kt:118) returns the SDK SendState instead of dropping it; a QUEUED send shows "Queued: their onion is unreachable. The message stays on this device and is retried until it lands."

The exact API consumed

Nothing was added to the SDK — this card's scope is android/ only.

Consumed Defined
uniffi.onionwire_sdk.SendState (SENT / QUEUED), returned by Wire::send crates/onionwire-sdk/src/lib.rs:95, :229
ChatMessage.delivery: String? — "sent" / "queued" / "sending" / "failed: <reason>", null for inbound crates/onionwire-sdk/src/lib.rs:113 (filled by :319 delivery_of)
Node::outbox_status_of_message — the source of that string src/node.rs:558 (over src/outbox.rs:200, over OutboxStatus at src/store.rs:104)

No parallel enum and no timeout guessing: Delivery is a 1:1 projection of the four statuses, and a missing or unrecognised status renders as queued, never delivered, because the only direction that cannot lie is "not confirmed delivered yet".

Base / stack — read before merging

The SDK accessor this UI consumes is not on main yet — it lands with PR #51. Per this card's instruction ("if the SDK lifecycle PR exists … base on that branch instead"), this branch is stacked:

base:        origin/wt/t_9a29fd3c   (PR #51 @ 08a4acc)
merge order: #48 -> #50 -> #51 -> this

My own diff is android/ only — 4 files, +482/−21:

$ git diff --stat origin/wt/t_9a29fd3c HEAD
 .../onionwire/WireViewModel.kt                      |  12 +-
 .../onionwire/ui/ChatScreen.kt                      | 135 ++++++++++++---
 .../onionwire/ui/MessageDelivery.kt                 | 176 +++++++++++++++++
 .../onionwire/ui/MessageDeliveryTest.kt             | 180 +++++++++++++++++

Forgejo will report mergeable: false until #48/#50/#51 land — same as its siblings; the branch was not rebased onto those branches' work-in-progress Rust files (they are outside this card's scope).

Verification (real output)

$ cd android && CARGO_TARGET_DIR=/var/tmp/ow-t_f46a9863 \
    ./gradlew --no-daemon :app:assembleDebug :app:testDebugUnitTest
BUILD SUCCESSFUL in 3m 46s
67 actionable tasks: 29 executed, 22 from cache, 16 up-to-date

APK:

$ sha256sum android/app/build/outputs/apk/debug/app-debug.apk
d32f621919a5294c66ab98a4c5c958672bab98c5c22e2b3aa05e3ff34a50630d  app-debug.apk
$ unzip -l app-debug.apk | grep -E 'libonionwire_sdk.so|classes'
 18552536  classes.dex
   142568  classes2.dex
   235816  classes4.dex
 29530040  lib/arm64-v8a/libonionwire_sdk.so

Proof the new UI + SDK surface is actually packaged (not just compiled):

$ unzip -p app-debug.apk classes4.dex > d.dex; strings d.dex | grep -E 'MessageDelivery|delivery-|SendState'
1 MessageDelivery.kt
/Queued, not delivered yet: retrying their onion
1Lcom/siriusdevops/onionwire/ui/MessageDeliveryKt;
Luniffi/onionwire_sdk/SendState;

Unit tests — MessageDeliveryTest, 10 tests, 0 failures (app/build/test-results/testDebugUnitTest/TEST-com.siriusdevops.onionwire.ui.MessageDeliveryTest.xml):

<testsuite name="com.siriusdevops.onionwire.ui.MessageDeliveryTest"
           tests="10" skipped="0" failures="0" errors="0">
  every_core_state_is_rendered_with_its_own_handle_and_sentence
  markers_are_visually_distinct_per_state
  every_state_announces_words_not_a_bare_glyph
  failed_reason_is_sanitized_tailed_and_capped_like_the_tui
  an_unrecognised_status_is_queued_never_delivered
  a_missing_delivery_on_an_outgoing_row_is_not_called_delivered
  the_core_reporting_sent_is_the_only_way_to_render_delivered
  inbound_rows_carry_no_delivery_state
  blank_failure_reason_still_says_failed
  footer_reports_pending_sends_and_keeps_a_failure_statement

The test asserts the assertable semantics, not a screenshot: each of the four states must produce its own testTag (delivery-sent / delivery-queued / delivery-sending / delivery-failed) and its own contentDescription sentence, the four handles and the four sentences must be pairwise distinct, and no glyph may appear in any announcement.

compose.ui.test is not on the JVM unit-test classpath and android/app/build.gradle.kts is outside this card's allowed scope (android/app/src/{main/java,res,test}), so the assertion target is the state model the Composable renders from — the Composable applies exactly d.testTag and d.contentDescription, so a marker change without an announcement change fails the test. Same shape as InviteAddFlowTest.

Not done — and why

ChatScreen's marker for a queued row reads queued, without the TUI's (try n/8, retry 45s). Those two numbers live on OutboxEntry.attempts / next_attempt_at (src/store.rs:149-159), and the SDK exposes no record for them: ChatMessage.delivery is a String, and Wire has no outboxPending()/outboxStatusOfMessage(). Adding one means touching crates/onionwire-sdk/**, which this card forbids. The exact accessor needed:

// crates/onionwire-sdk/src/lib.rs
#[derive(uniffi::Record)]
pub struct OutboxRow {
    pub message_id: i64,
    pub status: String,        // "queued" | "sending" | "sent" | "failed"
    pub attempts: u32,
    pub next_attempt_at: i64,  // absolute unix seconds
    pub last_error: Option<String>,
}
impl Wire {
    pub async fn outbox(&self, pubkey_hex: String) -> WResult<Vec<OutboxRow>>;  // -> Node::outbox_pending
}

Filed as a follow-up card rather than blocking this one, because the four states this card's acceptance criteria name are all renderable today.

README (deferred)

README.md is owned by another open PR; not touched. Proposed wording (for the Android feature list, if it needs one):

Android chat shows delivery state. An outgoing message is marked ✓✓ delivered, ◷ queued (their onion was unreachable — the message is stored in a local outbox on your device and retried with backoff, never handed to a third party), » sending while an attempt is in flight, or ✗ failed: <reason> when retries are exhausted. A chat-level N queued line is shown while anything is still outstanding.

Hotspot

android/app/src/main/java/com/siriusdevops/onionwire/WireViewModel.kt — PR #49 (feat/tor-lifecycle, mine, open) also edits this file (lock()/onCleared() → stopNode(), unlock() joins the teardown scope). The hunks do not overlap (send() vs. the history/teardown lifecycle), but whoever merges second should rebase.

## What The Compose chat now renders the **core's own outbox state** per message and at chat level, instead of implying a message either sent or did not. | State | Marker in the row | Screen reader hears | |---|---|---| | delivered | `✓✓` | "Delivered" | | queued | `◷ queued` | "Queued, not delivered yet: retrying their onion" | | sending | spinner + `» sending` | "Sending" | | failed (terminal) | `✗ failed: <reason>` | "Failed: <reason>" | Plus a chat-level footer while anything is outstanding — `N queued`, and a fail-closed `send failed: <reason>` statement that stays visible after retries are exhausted (mirrors `src/tui.rs::OutboxSummary::note`, so both clients read the same). Also fixed, because it is now false: * `ChatScreen`'s empty-chat copy no longer says *"Sends fail closed … There is no outbox in v1"* — it now describes the local outbox and that a queued message is local-only until the peer's onion takes it. * `WireViewModel.send()` (`WireViewModel.kt:118`) returns the SDK `SendState` instead of dropping it; a `QUEUED` send shows "Queued: their onion is unreachable. The message stays on this device and is retried until it lands." ## The exact API consumed Nothing was added to the SDK — this card's scope is `android/` only. | Consumed | Defined | |---|---| | `uniffi.onionwire_sdk.SendState` (`SENT` / `QUEUED`), returned by `Wire::send` | `crates/onionwire-sdk/src/lib.rs:95`, `:229` | | `ChatMessage.delivery: String?` — `"sent"` / `"queued"` / `"sending"` / `"failed: <reason>"`, `null` for inbound | `crates/onionwire-sdk/src/lib.rs:113` (filled by `:319 delivery_of`) | | `Node::outbox_status_of_message` — the source of that string | `src/node.rs:558` (over `src/outbox.rs:200`, over `OutboxStatus` at `src/store.rs:104`) | No parallel enum and no timeout guessing: `Delivery` is a 1:1 projection of the four statuses, and a *missing* or unrecognised status renders as **queued**, never delivered, because the only direction that cannot lie is "not confirmed delivered yet". ## Base / stack — read before merging The SDK accessor this UI consumes is **not on `main` yet** — it lands with PR #51. Per this card's instruction ("if the SDK lifecycle PR exists … base on that branch instead"), this branch is stacked: ``` base: origin/wt/t_9a29fd3c (PR #51 @ 08a4acc) merge order: #48 -> #50 -> #51 -> this ``` My own diff is `android/` only — 4 files, +482/−21: ``` $ git diff --stat origin/wt/t_9a29fd3c HEAD .../onionwire/WireViewModel.kt | 12 +- .../onionwire/ui/ChatScreen.kt | 135 ++++++++++++--- .../onionwire/ui/MessageDelivery.kt | 176 +++++++++++++++++ .../onionwire/ui/MessageDeliveryTest.kt | 180 +++++++++++++++++ ``` Forgejo will report `mergeable: false` until #48/#50/#51 land — same as its siblings; the branch was not rebased onto those branches' work-in-progress Rust files (they are outside this card's scope). ## Verification (real output) ``` $ cd android && CARGO_TARGET_DIR=/var/tmp/ow-t_f46a9863 \ ./gradlew --no-daemon :app:assembleDebug :app:testDebugUnitTest BUILD SUCCESSFUL in 3m 46s 67 actionable tasks: 29 executed, 22 from cache, 16 up-to-date ``` APK: ``` $ sha256sum android/app/build/outputs/apk/debug/app-debug.apk d32f621919a5294c66ab98a4c5c958672bab98c5c22e2b3aa05e3ff34a50630d app-debug.apk $ unzip -l app-debug.apk | grep -E 'libonionwire_sdk.so|classes' 18552536 classes.dex 142568 classes2.dex 235816 classes4.dex 29530040 lib/arm64-v8a/libonionwire_sdk.so ``` Proof the new UI + SDK surface is actually packaged (not just compiled): ``` $ unzip -p app-debug.apk classes4.dex > d.dex; strings d.dex | grep -E 'MessageDelivery|delivery-|SendState' 1 MessageDelivery.kt /Queued, not delivered yet: retrying their onion 1Lcom/siriusdevops/onionwire/ui/MessageDeliveryKt; Luniffi/onionwire_sdk/SendState; ``` Unit tests — `MessageDeliveryTest`, 10 tests, 0 failures (`app/build/test-results/testDebugUnitTest/TEST-com.siriusdevops.onionwire.ui.MessageDeliveryTest.xml`): ``` <testsuite name="com.siriusdevops.onionwire.ui.MessageDeliveryTest" tests="10" skipped="0" failures="0" errors="0"> every_core_state_is_rendered_with_its_own_handle_and_sentence markers_are_visually_distinct_per_state every_state_announces_words_not_a_bare_glyph failed_reason_is_sanitized_tailed_and_capped_like_the_tui an_unrecognised_status_is_queued_never_delivered a_missing_delivery_on_an_outgoing_row_is_not_called_delivered the_core_reporting_sent_is_the_only_way_to_render_delivered inbound_rows_carry_no_delivery_state blank_failure_reason_still_says_failed footer_reports_pending_sends_and_keeps_a_failure_statement ``` The test asserts the **assertable semantics**, not a screenshot: each of the four states must produce its own `testTag` (`delivery-sent` / `delivery-queued` / `delivery-sending` / `delivery-failed`) and its own `contentDescription` sentence, the four handles and the four sentences must be pairwise distinct, and no glyph may appear in any announcement. `compose.ui.test` is not on the JVM unit-test classpath and `android/app/build.gradle.kts` is outside this card's allowed scope (`android/app/src/{main/java,res,test}`), so the assertion target is the state model the Composable renders *from* — the Composable applies exactly `d.testTag` and `d.contentDescription`, so a marker change without an announcement change fails the test. Same shape as `InviteAddFlowTest`. ## Not done — and why `ChatScreen`'s marker for a queued row reads `queued`, without the TUI's `(try n/8, retry 45s)`. Those two numbers live on `OutboxEntry.attempts` / `next_attempt_at` (`src/store.rs:149-159`), and the SDK exposes no record for them: `ChatMessage.delivery` is a `String`, and `Wire` has no `outboxPending()`/`outboxStatusOfMessage()`. Adding one means touching `crates/onionwire-sdk/**`, which this card forbids. The exact accessor needed: ```rust // crates/onionwire-sdk/src/lib.rs #[derive(uniffi::Record)] pub struct OutboxRow { pub message_id: i64, pub status: String, // "queued" | "sending" | "sent" | "failed" pub attempts: u32, pub next_attempt_at: i64, // absolute unix seconds pub last_error: Option<String>, } impl Wire { pub async fn outbox(&self, pubkey_hex: String) -> WResult<Vec<OutboxRow>>; // -> Node::outbox_pending } ``` Filed as a follow-up card rather than blocking this one, because the four states this card's acceptance criteria name are all renderable today. ## README (deferred) `README.md` is owned by another open PR; not touched. Proposed wording (for the Android feature list, if it needs one): > **Android chat shows delivery state.** An outgoing message is marked `✓✓` delivered, `◷ queued` (their onion was unreachable — the message is stored in a local outbox on your device and retried with backoff, never handed to a third party), `» sending` while an attempt is in flight, or `✗ failed: <reason>` when retries are exhausted. A chat-level `N queued` line is shown while anything is still outstanding. ## Hotspot `android/app/src/main/java/com/siriusdevops/onionwire/WireViewModel.kt` — PR **#49** (`feat/tor-lifecycle`, mine, open) also edits this file (`lock()`/`onCleared()` → `stopNode()`, `unlock()` joins the teardown scope). The hunks do not overlap (`send()` vs. the history/teardown lifecycle), but whoever merges second should rebase.
feat(outbox): local retry queue for chat sends
All checks were successful
ci / test (pull_request) Successful in 3m22s
068b655c19
Queue a chat send locally when the peer's v3 onion is unreachable and retry
it with exponential backoff (30s doubling, capped at 30 min, 8 attempts then
terminal Failed). Still peer-to-peer: no server, no store-and-forward relay,
no new frame prefix — every attempt is a fresh Noise IK handshake.

- src/outbox.rs: Outbox + Deliverer + ArtiDeliverer, pure backoff_secs(),
  is_permanent_send_error(), background worker (15s scan).
- store: `outbox` table (no body column — the body is read from the joined
  messages row, under that row's existing AEAD + AAD), append_message_id(),
  queue/due/pending/mark_* helpers, reset_sending_outbox(), wipe.
- Node::send() returns Result<OutboxStatus, String> (Sent/Queued) instead of
  Err on transport failure; protocol errors still fail immediately and are
  never queued.
- Retry triggers: timer, unlock/foreground (spawn_flush_all), and "that peer
  was just seen" (handshake or connect_onion -> spawn_flush_friend).
- File transfer and payment/rcp frames stay fail-closed.
- docs/PROTOCOL.md + docs/THREAT_MODEL.md: replace the no-queue statements;
  add the seizure/cadence delta to the threat model.

src/tui.rs gets one forced arm change (Ok(()) -> Ok(_)); UI surfacing is
child card t_d9a5b065.
Merge remote-tracking branch 'origin/feat/local-outbox' into feat/tui-outbox-state
All checks were successful
ci / test (pull_request) Successful in 3m16s
7c6de696a1
feat(tui): per-message outbox delivery state + N queued footer
All checks were successful
ci / test (pull_request) Successful in 3m20s
ebd3a306e8
Chat rows now carry the state the local outbox actually holds: `✓` delivered,
`◷ queued (try n/8, retry 45s)` while the retry worker still has it, `» sending`
mid-attempt and `✗ failed: <short reason>` once attempts are exhausted. The
footer replaces the flat `sent` / `send failed` copy with the live count
(`2 queued`), and keeps a fail-closed `send failed: …` statement as long as any
row is terminally failed.

States come from the outbox API (`Node::outbox_pending` → `Queued` / `Sending` /
`Failed`; a delivered row is deleted, so absence is `Sent`). No parallel state
model, no new wire prefix. Every new glyph has an ASCII fallback (`ok` plus the
state word) exercised by a test.

- `chat_with_delivery()` / `delivery_tag()` / `retry_in_text()` /
  `short_send_reason()` / `OutboxSummary::note()` are pure and unit-tested.
- `draw_chat()` is now the real chat-pane renderer (extracted from
  `App::draw_main`) so width/wrap is testable without a `Node`.
- docs/TUI.md: delivery markers, copy, and the 80x24 floor / 120x40 target.

Verified: cargo test 26/26 suites ok (tui_spec 20/20, incl. a real Store +
Outbox::send -> pending() -> render path); clippy --all-targets -D warnings clean.
feat(tui): join outbox rows to chat rows by message id
All checks were successful
ci / test (pull_request) Successful in 3m27s
afff5f8dff
`chat_with_delivery` matched pending outbox rows to chat rows by body
because `store::Message` carried no id, so an older send that was still
queued showed a delivered mark whenever a newer send of the same text had
already crossed the circuit.

`store::Message` now carries its `messages.id`, and the TUI joins
`OutboxEntry::message_id` == `Message::id`. The body match and its
newest-first fallback are gone.

`list_messages()` keeps its signature; callers that do not need the id
are untouched.
fix(sdk): surface Sent/Queued on send(), and build the SDK in CI
All checks were successful
ci / test (pull_request) Successful in 3m37s
ci / sdk (pull_request) Successful in 10m7s
08a4accf37
`Node::send()` became `Result<OutboxStatus, String>` in the local-outbox work,
which broke `crates/onionwire-sdk` (E0308 at src/lib.rs:195) — and nothing
noticed, because the SDK is a separate cargo workspace that root CI never
compiles and android-release.yml only builds on a v*.*.* tag.

- `Wire::send()` now returns `WResult<SendState>` (`Sent` | `Queued`) instead
  of swallowing the outcome as `()`. A queued send is local-only until the
  retry worker gets a circuit through, so the Kotlin boundary must be able to
  tell it apart from a delivered one.
- `ChatMessage` gains `delivery: Option<String>` ("sent" | "queued" |
  "sending" | "failed: <reason>"), populated from the message's outbox row;
  `None` for incoming messages. An outgoing row with no outbox row was accepted
  on the first attempt, so it reads "sent".
- New `sdk` job in `.forgejo/workflows/ci.yml`: `cargo test --locked` +
  `cargo clippy --locked --all-targets -- -D warnings` in `crates/onionwire-sdk`
  in the same rust:1.91-bookworm container, with its own target volume (the SDK
  resolves the root crate with rustls, so sharing the root job's target dir
  would thrash feature-unified artifacts).
- Drift found while un-rotting it: the SDK `Cargo.lock` was stale (missing
  `sha2`, added to the root crate by the zeroize work), so `--locked` failed;
  and the SDK README still said "no outbox, no spool in v1" and "identity keys
  in sqlite are plaintext", both untrue since the outbox and SQLCipher landed.

Tests: crates/onionwire-sdk 4 passed (2 new unit tests over the status
mapping), clippy clean; root `cargo test --locked` clean. The CI job body was
smoke-run locally in the same container image before being committed.
feat(android): surface outbox delivery state in chat
All checks were successful
ci / test (pull_request) Successful in 3m1s
ci / sdk (pull_request) Successful in 51s
e0e4bed498
Renders the core's own Queued/Sending/Sent/Failed per outgoing row instead of
implying a message either sent or did not: a clock for queued, a progress
spinner for sending, a double-check for delivered and an error marker with the
short reason for a terminal failure, plus a chat-level `N queued` footer that
keeps a fail-closed `send failed: <reason>` statement on screen.

States are read verbatim from ChatMessage.delivery (Node::outbox_status_of_message
over UniFFI) — no parallel enum, nothing guessed from a timeout. A missing or
unrecognised status renders as queued, never delivered.

WireViewModel.send() now returns the SDK SendState instead of dropping it, so the
composer can say a send is queued rather than pretend it landed, and the empty-chat
copy no longer claims 'there is no outbox in v1'.

Accessibility: every marker carries an explicit contentDescription sentence and a
test tag; the glyph is never what a screen reader announces.
sirius changed target branch from main to wt/t_9a29fd3c 2026-09-12 21:11:06 +00:00
sirius force-pushed feat/android-outbox-state from e0e4bed498
All checks were successful
ci / test (pull_request) Successful in 3m1s
ci / sdk (pull_request) Successful in 51s
to a7fefce5d8 2026-09-12 21:11:07 +00:00
Compare
sirius force-pushed feat/android-outbox-state from a7fefce5d8 to e9ea041385 2026-09-12 21:11:59 +00:00 Compare
sirius force-pushed feat/android-outbox-state from e9ea041385 to b91101d17a 2026-09-12 21:15:43 +00:00 Compare
sirius force-pushed feat/android-outbox-state from b91101d17a to 3106562040 2026-09-12 22:15:13 +00:00 Compare
sirius force-pushed feat/android-outbox-state from 3106562040 to c4b824a83d 2026-09-12 23:14:53 +00:00 Compare
The TUI can say why a queued row is still queued ('queued (try n/8,
retry 45s)') because it reads OutboxEntry::attempts and next_attempt_at
directly. The SDK exposed neither: ChatMessage.delivery is a flat
'queued'/'sending'/'failed: <reason>' string and Wire had no outbox
accessor, so an Android chat row could only invent a countdown.

Adds OutboxRow { message_id, status, attempts, next_attempt_at,
last_error } and Wire::outbox(pubkey_hex) over Node::outbox_pending, plus
outbox_max_attempts() so the client renders 'try n/8' against the core's
own budget instead of a hardcoded 8. Additive: Wire::send() and
ChatMessage.delivery are untouched.

# Conflicts:
#	crates/onionwire-sdk/src/lib.rs
`OutboxRow::message_id` documents itself as *the* join key (the
`messages.id` a `ChatMessage` belongs to), but the record carried no id,
so the Android client could only pair the two lists positionally.

Add `ChatMessage.id: i64` as the first field, copied straight from the
`messages.id` the store already selects. Additive over UniFFI: Kotlin
consumers only gain a constructor field and the bindings regenerate.

The id mapping moves into a `chat_message` helper so the join property is
testable without a Node: the new test builds a real store, queues an
outbox row for a message, and asserts the id on the message equals the
`message_id` the outbox row reports for that same row.

# Conflicts:
#	crates/onionwire-sdk/src/lib.rs
feat(android): chat row renders queued (try 3/8, retry 45s) from the SDK's outbox rows
All checks were successful
ci / test (pull_request) Successful in 3m55s
ci / sdk (pull_request) Successful in 1m2s
fc2b2197c7
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.
Reviewed-on: #58
sirius merged commit 448cb73170 into wt/t_9a29fd3c 2026-09-12 23:58:16 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!56
No description provided.