android: show the chain daemon's sync height on the wallet status line
All checks were successful
android-ci / android (pull_request) Successful in 12m45s
All checks were successful
android-ci / android (pull_request) Successful in 12m45s
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.
This commit is contained in:
parent
d203594294
commit
e697045515
4 changed files with 134 additions and 5 deletions
|
|
@ -133,10 +133,18 @@ above is the other half of the proof — request and artifact, separately checka
|
|||
* The status line renders the core's words verbatim and grows a `node <word>`
|
||||
segment from `WalletChildStatus.node_state` for this source only. An unrecognised
|
||||
word is never rendered as ready.
|
||||
* **No sync height.** `WalletChildStatus` has no height field — the core keeps a
|
||||
`chain_height()` internally (`src/cuprate.rs`) but does not expose it over
|
||||
UniFFI, so the screen does not show a number it cannot get. A height on the
|
||||
status line is a follow-up on the SDK surface, not something the UI can invent.
|
||||
* **The daemon's sync height is on the line.** `WalletChildStatus.height` /
|
||||
`target_height` (Rust `u64` → UniFFI/Kotlin `ULong`) carry the blocks the chain
|
||||
daemon had at the last probe — read from the wallet RPC, or, when that RPC is
|
||||
refused (the 111 case) and the source is local/in-process, from the daemon over
|
||||
loopback. The status line appends ` · sync h/t` after the source (and after the
|
||||
`node` segment) whenever either is non-zero: `0/0` means the last probe failed
|
||||
or the daemon is not up, so it is *unknown*, not `0%` — there is no percent, no
|
||||
progress bar and no ETA anywhere in the UI, and a zero target still prints as
|
||||
`/0`. This is the **daemon's** chain height, not the wallet's scan height. The
|
||||
same string is what the status row's screen-reader `contentDescription` carries
|
||||
(`walletChildStatusDescription`), so the spoken row is never shorter than the
|
||||
visible one. Cross-compiled and unit-tested on the JVM; still not device-proven.
|
||||
* **Storage honesty.** The card shows the free space on the filesystem the fjall
|
||||
store grows into (`StatFs` on the app's data dir) and refuses Start below a
|
||||
3 GiB floor, or when that filesystem cannot be read at all. The floor is a
|
||||
|
|
|
|||
Loading…
Reference in a new issue