android: show the chain daemon's sync height on the wallet status line #130

Owner

The phone half of the SDK change in #129 (rust-dev parent t_bd2e2cd0).

Base is the parent branch, not main. The card's step 2: git rev-list --count origin/main..origin/<parent> is 1, so WalletChildStatus carries height / target_height only there and Kotlin cannot compile against them on main. This PR should be merged after #129 (or rebased onto main once it lands).

What it does

  • WalletChildInput gains height / targetHeight as ULong — the generated uniffi.onionwire_sdk.WalletChildStatus declares kotlin.ULong for both, checked against the generated bindings rather than assumed. Defaults are 0uL, so every existing fixture is byte-identical.
  • walletChildLine appends · sync h/t after the source (and after the node segment when the source is in-process), before the error em-dash, and only when either value is non-zero:
connecting · in-process mainnet pruned · node starting · sync 1160/3090939
syncing · in-process mainnet pruned · node syncing · sync 4549/0
off · receive-only

0/0 is unknown — the last probe failed or the daemon is not up — so the segment is absent rather than printed as 0%. No percent, no progress bar, no ETA.

  • WalletScreen.toInput() copies both fields field-for-field. The status row's screen-reader sentence moved to walletChildStatusDescription, which carries the same sync h/t the eye reads. The row is still one Text — no second widget.
  • android/CUPRATE_DAEMON.md no longer claims WalletChildStatus has no height field.

Evidence

:app:testDebugUnitTest — 114 tests, 0 failures. New: the no-height case (asserts the · sync segment is absent, since syncing is a phase word), sync 1160/3090939, sync 4549/0 with no %, height-before-failure-text, and the spoken row. The locked strings (off · receive-only, connecting · local node, ready · remote onion daemon, · node, CUPRATE_PREPRODUCTION_WARNING) are untouched and their assertions still pass.

Not device-proven; no release cut. android-ci builds the APK on this PR.

The phone half of the SDK change in #129 (rust-dev parent `t_bd2e2cd0`). **Base is the parent branch, not `main`.** The card's step 2: `git rev-list --count origin/main..origin/<parent>` is **1**, so `WalletChildStatus` carries `height` / `target_height` only there and Kotlin cannot compile against them on `main`. This PR should be merged after #129 (or rebased onto `main` once it lands). ## What it does * `WalletChildInput` gains `height` / `targetHeight` as **`ULong`** — the generated `uniffi.onionwire_sdk.WalletChildStatus` declares `kotlin.ULong` for both, checked against the generated bindings rather than assumed. Defaults are `0uL`, so every existing fixture is byte-identical. * `walletChildLine` appends ` · sync h/t` **after** the source (and after the `node` segment when the source is in-process), **before** the error em-dash, and only when either value is non-zero: ``` connecting · in-process mainnet pruned · node starting · sync 1160/3090939 syncing · in-process mainnet pruned · node syncing · sync 4549/0 off · receive-only ``` `0/0` is unknown — the last probe failed or the daemon is not up — so the segment is absent rather than printed as `0%`. No percent, no progress bar, no ETA. * `WalletScreen.toInput()` copies both fields field-for-field. The status row's screen-reader sentence moved to `walletChildStatusDescription`, which carries the same `sync h/t` the eye reads. The row is still one `Text` — no second widget. * `android/CUPRATE_DAEMON.md` no longer claims `WalletChildStatus` has no height field. ## Evidence `:app:testDebugUnitTest` — **114 tests, 0 failures**. New: the no-height case (asserts the ` · sync ` *segment* is absent, since `syncing` is a phase word), `sync 1160/3090939`, `sync 4549/0` with no `%`, height-before-failure-text, and the spoken row. The locked strings (`off · receive-only`, `connecting · local node`, `ready · remote onion daemon`, ` · node `, `CUPRATE_PREPRODUCTION_WARNING`) are untouched and their assertions still pass. Not device-proven; no release cut. `android-ci` builds the APK on this PR.
android: show the chain daemon's sync height on the wallet status line
All checks were successful
android-ci / android (pull_request) Successful in 13m17s
3bef342987
The SDK surface from the rust-dev parent (#129) carries `WalletChildStatus.height`
and `target_height` (Rust `u64` → generated Kotlin `ULong`), so the wallet status
line can say how far the chain daemon has got instead of only naming it.

* `WalletChildInput` mirrors both fields as `ULong` — checked against the
  generated `uniffi.onionwire_sdk.WalletChildStatus`, not assumed. Defaults stay
  `0uL` so every existing fixture is unchanged.
* `walletChildLine` appends ` · sync h/t` after the source and the `node` segment,
  before the error em-dash, and only when either value is non-zero: `0/0` is
  unknown (probe failed, daemon not up), not `0%`, and a zero target still prints
  as `/0`. No percent, no progress bar, no ETA.
* `WalletScreen.toInput()` copies both fields field-for-field; the status row's
  screen-reader sentence moved into `walletChildStatusDescription`, which carries
  the same `sync h/t` the eye reads. One line, still no second widget.
* Tests cover the three sync cases plus the spoken row; the old exact-line
  assertions (`off · receive-only`, `connecting · local node`,
  `ready · remote onion daemon`) are untouched. `:app:testDebugUnitTest`: 114
  tests, 0 failures.
* `android/CUPRATE_DAEMON.md` no longer claims the record has no height field.
Author
Owner

Merge order matters here: this PR's base is onionwire/t_bd2e2cd0-onionwire-wallet-show-daemon-sync-height (the rust-dev parent, #129), because WalletChildStatus.height / target_height exist only on that branch and Kotlin cannot compile against them on main.

  • Merge #129 first, then this one (its commits ride along into main), or merge #129 and immediately retarget/rebase this PR onto main.
  • Do not merge #129 and then merge this PR as-is: its base would be a branch already merged into main, so the merge would land on the stale branch and main would keep WalletChildInput without the two fields — the screen would compile but the status line would never show sync h/t.

Green evidence for head 3bef3429: android-ci run 507 (job succeeded, BUILD SUCCESSFUL in 9m 36s, :app:assembleRelease + :sdk:verifyDynamicLibc), APK dist/onionwire-0.1.0-android-arm64-v8a.apk 34,118,706 B, sha256 bb6ec205f91b367ec873ffcd0c29c903f15645e7a401cf942f78615c13b44bb1, lib/arm64-v8a/libonionwire_sdk.so 54,901,488 B, target_max_memory ×5 in the shipped .so. JVM suite :app:testDebugUnitTest: 114 tests, 0 failures.

Merge order matters here: this PR's base is `onionwire/t_bd2e2cd0-onionwire-wallet-show-daemon-sync-height` (the rust-dev parent, #129), because `WalletChildStatus.height` / `target_height` exist only on that branch and Kotlin cannot compile against them on `main`. * Merge **#129 first**, then this one (its commits ride along into `main`), **or** merge #129 and immediately retarget/rebase this PR onto `main`. * Do **not** merge #129 and then merge this PR as-is: its base would be a branch already merged into `main`, so the merge would land on the stale branch and `main` would keep `WalletChildInput` without the two fields — the screen would compile but the status line would never show `sync h/t`. Green evidence for head `3bef3429`: `android-ci` run 507 (job succeeded, `BUILD SUCCESSFUL in 9m 36s`, `:app:assembleRelease` + `:sdk:verifyDynamicLibc`), APK `dist/onionwire-0.1.0-android-arm64-v8a.apk` 34,118,706 B, sha256 `bb6ec205f91b367ec873ffcd0c29c903f15645e7a401cf942f78615c13b44bb1`, `lib/arm64-v8a/libonionwire_sdk.so` 54,901,488 B, `target_max_memory` ×5 in the shipped `.so`. JVM suite `:app:testDebugUnitTest`: 114 tests, 0 failures.
sirius merged commit 2a41c8883a into onionwire/t_bd2e2cd0-onionwire-wallet-show-daemon-sync-height 2026-09-20 00:12:29 +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!130
No description provided.