Commit graph

427 commits

Author SHA1 Message Date
2256d036d5 Merge pull request 'android: block the wallet screen on an unbacked seed, and let it be re-shown' (#139) from onionwire/t_9b2544a7-wallet-screen-block-on-an-unbacked-seed into main
All checks were successful
android-ci / android (push) Successful in 10m15s
Reviewed-on: #139
2026-09-20 16:14:29 +00:00
agent
118191c541
android: block the wallet screen on an unbacked seed, and make it re-showable
All checks were successful
android-ci / android (pull_request) Successful in 10m35s
A created wallet's seed was two lines of small text at the bottom of the
wallet page, dismissed by one tap, gone for good once the screen was left.
A real user created a wallet, never saw the seed, and the app had no way to
show it again.

- `SeedBackupGate` (new, pure Kotlin): the confirm word `SEEN` and its
  case-insensitive match mirror the TUI's own `WalletSetup::CreateSeed`
  gate; create starts unbacked, import is backed up without the gate, and
  only a correct word can confirm.
- The seed card is the whole body until the word is typed and Done is
  tapped: no Cancel, no copy button (the Android clipboard is readable by
  every other app), Done dead until `SEEN`.
- "Back up seed" re-reads the seed through the new `Wire::wallet_seed()`
  (`WireViewModel.walletSeed()`), so a seed missed the first time is not
  lost. Its failure is shown next to the button, not at the bottom of a
  long scroll.
- While unconfirmed: a warning strip stays at the top of the wallet screen
  and the receive address and Show QR are hidden — XMR received into a
  wallet whose 25 words were never written down is unrecoverable.
- The flag lives in app-local prefs (`wallet_seed_backup`), not in the
  Keystore-wrapped store, and is reset by `createWallet` itself so no
  caller can forget it.

The stored flag is nullable, and the null is load-bearing. `false` means
this install created a wallet and nobody has confirmed the seed, so the
strip is up whether or not the balance reads. `null` means nothing is
stored — an install that predates the flag, or one that has never created
a wallet here — and there the strip waits for `wallet_balance` to return a
real amount, the core's own evidence that the child has a wallet open.
Without that distinction a first-run user who had configured a chain
source but not yet created a wallet (`wallet_balance` returns "err") would
be warned about a seed they do not have.

The app-bar Back still leaves the screen, deliberately — it is the TUI's
`Esc`. It costs nothing now, because leaving no longer loses the seed.

Verification: `./gradlew :app:testDebugUnitTest` green, 135 tests
(`SeedBackupGateTest` 18 of them).
2026-09-20 12:15:47 -04:00
94d29b8354 Merge pull request 'wallet: expose an on-demand seed accessor over core + UniFFI' (#138) from onionwire/t_2142490d-wallet-seed-expose-an-on-demand-seed-acc into main
All checks were successful
ci / test (push) Successful in 5m22s
ci / sdk (push) Successful in 1m8s
ci / fuzz (push) Successful in 4m51s
android-ci / android (push) Successful in 10m7s
Reviewed-on: #138
2026-09-20 16:13:28 +00:00
agent
145036fda8
wallet: expose an on-demand seed accessor over core + UniFFI
All checks were successful
ci / test (pull_request) Successful in 5m43s
ci / sdk (pull_request) Successful in 1m21s
android-ci / android (pull_request) Successful in 11m53s
ci / fuzz (pull_request) Successful in 4m53s
Wallet::create_wallet returned the 25-word seed exactly once and nothing
could reach it afterwards, so a seed that was never backed up at creation
was unrecoverable. Add Wallet::mnemonic() (one query_key mnemonic call on
the open wallet file), Node::wallet_seed() mirroring wallet_create, and the
additive UniFFI export Wire::wallet_seed() -> Kotlin Wire.walletSeed().

No existing signature changes. The refusals stay leak-free: an unconfigured
wallet gets NOT_CONFIGURED_MSG without a dial, a watch-only wallet keeps the
RPC's -29 view-only mapping, and no error string carries the RPC login.

Tests (tests/wallet.rs) drive the per-connection Digest mock: the words come
back verbatim, a JSON-RPC error surfaces without the login or endpoint, a
rejected digest refusal does not leak the password, and an unconfigured
wallet is refused without dialing.
2026-09-20 11:53:19 -04:00
3769bd9a42 Merge pull request 'wallet: answer the Digest challenge on the connection that issued it' (#137) from fix/wallet-rpc-digest-same-connection into main
All checks were successful
ci / test (push) Successful in 5m18s
ci / sdk (push) Successful in 1m13s
ci / fuzz (push) Successful in 4m58s
android-ci / android (push) Successful in 11m38s
Reviewed-on: #137
2026-09-20 13:30:21 +00:00
sirius
cb411da813
wallet: answer the Digest challenge on the connection that issued it
All checks were successful
ci / test (pull_request) Successful in 5m37s
ci / sdk (pull_request) Successful in 1m21s
ci / fuzz (pull_request) Successful in 4m52s
android-ci / android (pull_request) Successful in 12m15s
monero-wallet-rpc (epee) keeps its Digest nonce per TCP connection: the
`http_server_auth` lives inside `http_custom_handler`, which is created per
connection, so its nonce starts empty and any request without a valid
`Authorization` field mints a fresh one. The client opened a *second* connection
for the authenticated retry, presenting a nonce that socket never issued — so a
real wallet RPC answered 401 forever, however correct the login was. That is the
`wallet RPC HTTP HTTP/1.1 401 Unauthorized` the TUI and Android showed; the
canned mocks replayed the challenge on any socket, so they stayed green.

- `post_digest`/`http_digest`: one `TcpStream` for the challenge and the retry,
  no `Connection: close` on the challenge (epee closes the socket with the 401
  when the request asks for it), `read_one_response` honouring `Content-Length`
  (a keep-alive response never ends in EOF; with no length the body ends at EOF,
  which is what keeps the 1 MiB cap meaningful for an open RPC).
- A 401 after our *own* challenge now reads: the login does not match the
  child's `--rpc-login`.
- Mocks in `tests/wallet.rs` and `src/node.rs` model the per-connection nonce:
  `serve_one_conn`/`serve_rpc_conns`. Two tests pin it — one RPC call uses one
  connection, and a nonce presented on another connection is refused.
- `docs/WALLET.md`: what a 401 means and why it is not the flow.

Verified end-to-end against `monero-wallet-rpc` v0.18.5.1 (`--rpc-login`,
`--offline`, real wallet open): unfixed tree → `wallet RPC HTTP HTTP/1.1 401
Unauthorized`; fixed tree → `connected: true` with the wallet's real address.
2026-09-20 09:17:05 -04:00
b805bd4ad9 Merge pull request 'docs(android): the APK poller now calls wallet_child_refresh' (#136) from onionwire/t_4afe292a-android-docs-live-poller into main
All checks were successful
android-ci / android (push) Successful in 11m16s
Reviewed-on: #136
2026-09-20 12:47:24 +00:00
agent
0a8105584f
docs(android): the APK poller now calls wallet_child_refresh
All checks were successful
android-ci / android (pull_request) Successful in 10m19s
#135 merged against fa0e4b2-era docs that said the loop was still
wallet_status. #134 already landed: first paint is cached, every later
tick is Wire::wallet_child_refresh.
2026-09-20 00:56:08 -04:00
53b5e6c762 Merge pull request 'docs(android): rewrite the Android docs to match the tree' (#135) from onionwire/t_4afe292a-docs-android-audit-rewrite-the-android-d into main
All checks were successful
android-ci / android (push) Successful in 10m12s
Reviewed-on: #135
2026-09-20 04:53:12 +00:00
agent
c65946bfd5
docs(android): rewrite Android docs to match the tree
All checks were successful
android-ci / android (pull_request) Successful in 10m14s
android/README.md, CUPRATE_DAEMON.md and MONERO_BINARIES.md were the
half PR #133 left out. Releases are two manual dispatches, not a push
to main; the APK version comes from the tag android-release checks out;
the layout now includes wallet/ and keepalive/; the status line's
sync h/t is documented; the APK poller still calls wallet_status, not
wallet_child_refresh.
2026-09-20 00:52:43 -04:00
d2d49d27c5 Merge pull request 'android: poll the live wallet-child probe so the wallet sync line moves' (#134) from wt/t_07542df0 into main
All checks were successful
android-ci / android (push) Successful in 10m26s
Reviewed-on: #134
2026-09-20 04:48:14 +00:00
Lance
4d2528351b
android: poll the live wallet-child probe so the sync line moves
All checks were successful
android-ci / android (pull_request) Successful in 10m51s
The wallet screen's 2s loop read Wire::wallet_status, which only re-reads the
snapshot the last probe left in the store — so the `sync h/t` segment sat frozen
until a chain-mode tap ran start_wallet_child (which probes on its way out).

The loop now paints once from the cached read (non-dialing, so the screen has a
record immediately) and then calls Wire::wallet_child_refresh for every tick:
one live probe of the child's loopback wallet RPC, and of the configured local
daemon's get_info when that RPC does not answer. Same 2s cadence, same
Dispatchers.IO, same sticky walletChildError, same one-poller guarantee.

The loop is a top-level function taking its two reads as parameters, which is
the only seam a JVM test has — requireWire() is NodeHost.requireOpen(), a
process-global only a real Arti bootstrap sets. WalletChildRefreshLoopTest pins
that the cached read paints exactly once and every tick after it is the live
probe, that a probe slower than the tick is never overlapped, and that
cancelling the loop (leaving the screen) stops the dialing.
2026-09-20 00:48:57 -04:00
fa0e4b2f6c Merge pull request 'sdk: expose a live wallet-child probe over UniFFI (wallet_child_refresh)' (#132) from wt/t_0a355a62 into main
All checks were successful
android-ci / android (push) Successful in 12m2s
ci / test (push) Successful in 5m15s
ci / sdk (push) Successful in 1m7s
ci / fuzz (push) Successful in 5m3s
Reviewed-on: #132
2026-09-20 04:32:38 +00:00
803567635f Merge pull request 'docs: rewrite README + docs to match main (audit in PR body)' (#133) from onionwire/t_96d3bd1a-docs-audit-the-onionwire-source-against into wt/t_0a355a62
All checks were successful
android-ci / android (pull_request) Successful in 12m13s
ci / test (pull_request) Successful in 5m16s
ci / sdk (pull_request) Successful in 1m6s
ci / fuzz (pull_request) Successful in 4m54s
Reviewed-on: #133
2026-09-20 04:30:46 +00:00
agent
f95c1e7ca7
docs: rewrite README and living docs to match the tree
Audit the operator docs against the source: pin downloads to v0.14.0,
document the real CLI/flags/env/F-keys (including F9, no F7), keep 18081
as the app-owned daemon port, describe the local chat outbox vs a
server-side one, and stop implying SECURITY_AUDIT.md is a third-party
audit. Spike reports stay; they get a status header only.
2026-09-20 00:31:07 -04:00
rust-dev
db12f4838b
sdk: expose wallet_child_refresh — a live wallet-child probe over UniFFI
All checks were successful
ci / test (pull_request) Successful in 5m16s
ci / sdk (pull_request) Successful in 1m17s
android-ci / android (pull_request) Successful in 13m18s
ci / fuzz (pull_request) Successful in 18m36s
Wire::wallet_status() is the cheap cached read (no dial); only
Node::wallet_child_refresh() writes state/height/target_height, and it was
reachable over UniFFI from exactly one place — start_wallet_child. An Android
refresh loop polling wallet_status() therefore shows a frozen sync line.

Add the additive export, reusing the existing child_status mapper so the record
is the same shape as wallet_status(), and the core probe as the only probe
path. Docs: one sentence in docs/WALLET.md, which enumerates the SDK
wallet-child surface.

Tests: SDK-level (a Wire cannot be built offline in this crate — open_wire
bootstraps Arti): the unprobed child maps to the same 'off' record both reads
report, pinned with an exhaustive record literal; and the probe on a stopped
handle is a typed WireError.Stopped.
2026-09-20 00:20:32 -04:00
69a7b106ee Merge pull request 'android: show chain sync height on the wallet status line (onto main)' (#131) from onionwire/android-sync-height-on-main into main
Some checks failed
android-ci / android (push) Has been cancelled
Reviewed-on: #131
2026-09-20 02:59:26 +00:00
agent
e697045515
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
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.
2026-09-19 22:59:09 -04:00
d203594294 Merge pull request 'wallet: show the chain daemon's sync height/target on the child status' (#129) from onionwire/t_bd2e2cd0-onionwire-wallet-show-daemon-sync-height into main
All checks were successful
ci / test (push) Successful in 5m19s
ci / sdk (push) Successful in 1m15s
ci / fuzz (push) Successful in 5m30s
android-ci / android (push) Successful in 12m9s
Reviewed-on: #129
2026-09-20 00:12:16 +00:00
onionwire
0a91744924
wallet: show the chain daemon's sync height and target on the child status
All checks were successful
ci / test (pull_request) Successful in 5m50s
ci / sdk (pull_request) Successful in 1m34s
ci / fuzz (pull_request) Successful in 4m54s
android-ci / android (pull_request) Successful in 12m39s
The user watching an in-process Cuprate node on Android saw only a phase
word (connecting, with 'wallet connect: Connection refused (os error
111)') and asked to see height vs tip.

- WalletChildStatus gains height / target_height, and line() appends
  'sync h/t' when a probe read either number. No percentage is invented
  when the daemon reports no target (h/0 is honest), and an off/exited
  child reports 0/0.
- Node::wallet_child_refresh fills them: one wallet-RPC get_info now
  answers both the readiness gate and the numbers (Wallet::chain_info,
  with chain_ready built on the same parse), and when the wallet RPC is
  down while the chain source is local/in-process, the loopback daemon
  is asked directly (ChildConfig::daemon_probe_addr). A refused daemon
  stays 0/0 — unknown, not caught up. Only refresh dials; the draw path
  reads two atomics.
- UniFFI WalletChildStatus carries the same two u64 fields so Android can
  show them; SDK test covers the round trip.

Tests: cargo test --locked --target x86_64-unknown-linux-gnu (all
green), clippy -D warnings clean; crates/onionwire-sdk cargo test
--locked + clippy clean (separate workspace).
2026-09-19 19:38:52 -04:00
bc74b4f4af Merge pull request 'fix(cuprate): seed XDG so Android parse does not poison LazyLock' (#128) from onionwire/cuprate-android-xdg into main
Some checks failed
ci / test (push) Failing after 3m44s
ci / sdk (push) Successful in 1m9s
ci / fuzz (push) Successful in 4m57s
android-ci / android (push) Successful in 11m32s
Reviewed-on: #128
2026-09-19 21:56:12 +00:00
agent
c00c9d4151
fix(cuprate): seed XDG so Android parse does not poison LazyLock
All checks were successful
ci / sdk (pull_request) Successful in 1m7s
ci / test (pull_request) Successful in 5m20s
ci / fuzz (pull_request) Successful in 5m2s
android-ci / android (pull_request) Successful in 12m23s
Cuprate's serde defaults call ArtiConfig::default, which unwraps
dirs::data_dir(). On Android HOME is unset and dirs-sys has no
getpwuid fallback, so the first Start panics and a retry reports
"LazyLock instance has previously been poisoned". Point XDG at the
chain datadir before parse and set tor.arti.directory_path in TOML.
2026-09-19 17:54:44 -04:00
fb87903137 Merge pull request 'fix(cuprate): catch launch panics and give the thread 8 MiB stack' (#127) from onionwire/cuprate-launch-panic into main
All checks were successful
ci / test (push) Successful in 5m16s
ci / sdk (push) Successful in 1m9s
android-ci / android (push) Successful in 10m46s
ci / fuzz (push) Successful in 5m1s
Reviewed-on: #127
2026-09-19 19:47:40 +00:00
agent
a7daf2c768
fix(cuprate): catch launch panics and give the thread 8 MiB stack
All checks were successful
ci / test (pull_request) Successful in 5m25s
ci / sdk (pull_request) Successful in 1m12s
android-ci / android (pull_request) Successful in 10m50s
ci / fuzz (pull_request) Successful in 4m59s
Android's default pthread stack is ~1 MiB. Cuprate+RandomX overflow it,
the launch thread dies before tx.send, and the UI only says "the launch
thread died before answering". Catch unwind so a Rust panic is the error
string, and size the launch thread plus tokio workers at 8 MiB.
2026-09-19 15:47:51 -04:00
0c21eb7bf0 fix(android): tapping a Cuprate mode starts the node (#126)
All checks were successful
android-ci / android (push) Successful in 11m48s
fix(android): tapping a Cuprate mode starts the node
2026-09-19 18:45:02 +00:00
agent
3868452a4a
fix(android): tapping a Cuprate mode starts the node
All checks were successful
android-ci / android (pull_request) Successful in 12m50s
Selecting mainnet pruned only persisted ChainConfig, so the screen
updated the storage line and nothing else. Store, then Start when the
storage floor allows. Filled button is the stored choice.
2026-09-19 14:33:30 -04:00
82d6dd9082 Merge pull request 'feat(wallet): mainnet pruned and full on-device chain modes' (#125) from onionwire/chain-mainnet-pruned-full into main
All checks were successful
ci / test (push) Successful in 5m8s
ci / sdk (push) Successful in 1m13s
ci / fuzz (push) Successful in 4m54s
android-ci / android (push) Successful in 12m17s
Reviewed-on: #125
2026-09-19 17:34:33 +00:00
95ca45dc17 Merge branch 'main' into onionwire/chain-mainnet-pruned-full
All checks were successful
ci / test (pull_request) Successful in 5m19s
ci / sdk (pull_request) Successful in 1m8s
ci / fuzz (pull_request) Successful in 4m48s
android-ci / android (pull_request) Successful in 12m8s
2026-09-19 17:08:55 +00:00
agent
5080652e3b
feat(wallet): mainnet pruned and full on-device chain modes
All checks were successful
ci / test (pull_request) Successful in 5m45s
ci / sdk (pull_request) Successful in 1m34s
ci / fuzz (pull_request) Successful in 4m51s
android-ci / android (pull_request) Successful in 13m2s
Cuprate in-process and TUI keys 1/2/3 pick mainnet pruned, mainnet
full, or experimental testnet. Datadirs are split so a prune store
cannot mix with a full one. Android storage floors scale with the
choice. Cuprate remains pre-production; mainnet is unvalidated.
2026-09-19 12:54:35 -04:00
cd1acd3c0d Merge pull request 'android: Start wallet no longer looks like a no-op while Cuprate launches' (#124) from onionwire/android-cuprate-start-feedback into main
All checks were successful
ci / test (push) Successful in 5m8s
ci / sdk (push) Successful in 1m7s
ci / fuzz (push) Successful in 4m55s
android-ci / android (push) Successful in 12m14s
Reviewed-on: #124
2026-09-19 16:39:10 +00:00
agent
0acf89a0b4
android: Start wallet no longer looks like a no-op while Cuprate launches
All checks were successful
ci / test (pull_request) Successful in 5m34s
ci / sdk (pull_request) Successful in 1m22s
android-ci / android (pull_request) Successful in 10m48s
ci / fuzz (pull_request) Successful in 4m52s
Tapping Start held the SQLCipher mutex for the whole in-process Node::launch
and blocked the UniFFI tokio worker, so wallet_status stayed off with no
error. Drop the store lock until creds are needed, spawn_blocking the sync
start, and show that Start is in flight.

The APK still runs Cuprate testnet only; this does not add mainnet or prune.
2026-09-19 12:03:01 -04:00
2df10124ef Merge pull request 'fix(tui): invite payload gets a chrome-free region so mouse-copy is exact' (#122) from onionwire/t_af8b509e-onionwire-tui-invite-mouse-copy-must-not into main
Some checks failed
ci / test (push) Successful in 5m17s
android-ci / android (push) Has been cancelled
ci / sdk (push) Successful in 1m5s
ci / fuzz (push) Successful in 4m48s
Reviewed-on: #122
2026-09-19 14:46:42 +00:00
87196e2297 Merge branch 'main' into onionwire/t_af8b509e-onionwire-tui-invite-mouse-copy-must-not
All checks were successful
ci / test (pull_request) Successful in 5m17s
ci / sdk (pull_request) Successful in 1m11s
ci / fuzz (pull_request) Successful in 4m52s
android-ci / android (pull_request) Successful in 12m17s
2026-09-19 14:46:33 +00:00
04fa7ec7f1 Merge pull request 'tui: peer payment history behind the F9 payments row (key p)' (#121) from onionwire/t_ef1d35d2-tui-payments-row-on-f9-render-peer-payme into main
All checks were successful
ci / test (push) Successful in 5m12s
ci / sdk (push) Successful in 1m5s
ci / fuzz (push) Successful in 4m48s
android-ci / android (push) Successful in 11m51s
Reviewed-on: #121
2026-09-19 12:59:59 +00:00
0c00c6f912 Merge branch 'main' into onionwire/t_ef1d35d2-tui-payments-row-on-f9-render-peer-payme
All checks were successful
ci / test (pull_request) Successful in 5m13s
ci / sdk (pull_request) Successful in 1m6s
ci / fuzz (pull_request) Successful in 4m45s
android-ci / android (pull_request) Successful in 11m59s
2026-09-19 12:59:51 +00:00
agent
c1d13178b6
tui: settings-menu frame dumps use the footer the app renders
All checks were successful
ci / test (pull_request) Successful in 5m17s
ci / sdk (pull_request) Successful in 1m8s
ci / fuzz (pull_request) Successful in 4m50s
android-ci / android (pull_request) Successful in 10m19s
The same defect as the peer-payments fixture, one screen over: after the
clean-look chrome redesign (now merged) `App::draw` renders the F9 menu's one
status line with `status_footer_phased` and the hint from `footer_hints`, while
`tests/tui_spec.rs::render_menu` still built a phase-free `status_footer` from a
hand-copied hint string — so every menu frame in the PR body showed a footer the
app does not draw (no Tor phase).

- `wallets_settings_footer_hint()` is now the single source for that hint, the
  way `peer_payments_footer_hint()` is for the history screen.
- `render_menu` makes the app's own two calls, `TorPhase::Ready` for the
  healthy-wallet state the fixture describes.
- `wallets_settings_menu_frame_shows_the_shipped_footer` pins the dumped frame's
  last line to the shipped one (RED first: the fixture's line read
  `TOR  me:… Esc back c copy ? help`, the app's `✓ TOR ready  me:…`).

`cargo test --locked` 384 passed / 0 failed, clippy clean.
2026-09-19 01:18:47 -04:00
agent
e9b4156cf5
ci: re-trigger android-ci for cbe8890 (run 458 was cancelled after 19s)
All checks were successful
ci / test (pull_request) Successful in 5m13s
ci / sdk (pull_request) Successful in 1m5s
ci / fuzz (pull_request) Successful in 4m52s
android-ci / android (pull_request) Successful in 10m38s
The merge commit cbe8890 got a green ci/test and ci/sdk, but its android-ci run
(actions/runs/458) was cancelled by the runner 19 seconds in, which Forgejo
records as a failure on the commit. Nothing in this commit changes the tree;
it exists so the android job runs against the same content.
2026-09-19 01:06:00 -04:00
ca4c2c4562 Merge pull request 'fix(android): the SDK linked static bionic, so openWire segfaults at dlopen and the app dies after the passphrase' (#123) from wt/android-sdk-libc-link into main
All checks were successful
android-ci / android (push) Successful in 10m27s
Reviewed-on: #123
2026-09-19 04:40:48 +00:00
apk-dev
519f0e66c3
fix(android): link the SDK against the dynamic libc, not static bionic
All checks were successful
android-ci / android (pull_request) Successful in 30m59s
`openWire` segfaults at `dlopen` on every ABI, so the app dies the moment the
passphrase is submitted and the onion never publishes. The tombstone:

    signal 11 (SIGSEGV), fault addr 0x0
    #00 libonionwire_sdk.so (getauxval+21)
    #01 libonionwire_sdk.so (__cxa_atexit+604)
    #02 libonionwire_sdk.so (_GLOBAL__sub_I_superscalar.cpp+891)
    #06 libjnidispatch.so (Java_com_sun_jna_Native_open+68)
    #42 uniffi.onionwire_sdk.Onionwire_sdkKt.openWire+0

`_GLOBAL__sub_I_superscalar.cpp` is RandomX's, and RandomX arrived with the
`cuprate-daemon` feature (#113). It calls `getauxval` from a static
initializer — and `libonionwire_sdk.so` had linked bionic **statically**, so
that `getauxval` read an auxv vector only the dynamic linker ever fills in.
The first SDK call is the first `dlopen`, which is the first time anything
touches the library: the crash lands exactly on "user typed the password".

The static libc came in with the same commit that added the C++ link flags.
`linkFlags()` passes `-L<ndk>/sysroot/usr/lib/<triple>` for the libc++
archives; that directory also holds the static `libc.a`, while the dynamic
`libc.so` stub lives in the per-API subdirectory that cargo-ndk's linker
wrapper normally supplies — and that wrapper is bypassed on purpose here, so
the per-API directory was no longer on the search path at all and `-lc`
resolved to `libc.a`. Both directories are now passed, the per-API one first,
and `verifyDynamicLibc` fails the build if `libc.so` ever leaves DT_NEEDED
again.

    before (v0.9.0 arm64): NEEDED liblog.so only, local getauxval/__cxa_atexit
    after:                 NEEDED libstdc++.so, libdl, liblog, libm, libc.so, no local libc

Also: the keep-alive notice is re-announced with the locator once the node
publishes. It is anchored at the Open tap with an empty onion (so the shade
does not claim a reachable node while Tor bootstraps), and only the
POST_NOTIFICATIONS callback ever replaced it — on a device that already
granted notifications there is no callback at all, so the notice claimed
"OnionWire is starting" forever.
2026-09-19 00:40:02 -04:00
agent
cbe889024b
Merge origin/main into the peer-payments branch
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Successful in 5m44s
ci / sdk (pull_request) Successful in 1m26s
ci / fuzz (pull_request) Successful in 4m45s
main moved under this PR when #120 (clean-look chrome redesign) landed, which
touched the same three files (src/tui.rs, tests/tui_spec.rs, docs/TUI.md) and
left PR #121 unmergeable.

- docs/TUI.md: both sections kept — the peer-payment-history section from this
  branch, then #120's chrome-redesign section.
- tests/tui_spec.rs: #120's `fit_cells` flake relaxation kept (it is a superset
  of the one on this branch: same cut point plus the ellipsis assertion).
- src/tui.rs merged cleanly; `cargo test --locked` 383 passed / 0 failed and
  `cargo clippy --locked --all-targets -- -D warnings` clean afterwards.

The peer-payments frames are byte-identical after the merge, so the dumps in
this PR body still hold.
2026-09-19 00:36:38 -04:00
agent
b8fefe9c18
tui: F9 works on the peer-payments screen, and frames dump the real footer
Some checks failed
ci / test (pull_request) Successful in 6m33s
ci / sdk (pull_request) Successful in 1m31s
ci / fuzz (pull_request) Successful in 4m49s
android-ci / android (pull_request) Has been cancelled
Review round 1 on the F9 `payments` row found two false affordances.

1. `footer_hints(Screen::PeerPayments)` prints `F9 menu`, and docs/TUI.md says
   F9 reopens the menu, but the `KeyCode::F(9)` arm opened it only from
   `Screen::Main`, so pressing F9 on the peer history did nothing.

   The function keys are now routed through one table, `function_key_for(screen,
   code)`, and the F9 arm no longer has the Main-only guard: it opens (or
   reopens) the menu from `Main`, `WalletsSettings` and `PeerPayments`. A screen
   that names a key has to answer it while it is open — that is what the table
   encodes, and `mod function_key_tests` locks it, including a test that reads
   the screen's own hint and asserts every `F<n>` it names is answered there.

2. The PR's frame dumps passed `"Esc back  up/down select  ? help"` to
   `status_footer` by hand, so every dumped frame showed a footer the app never
   renders. `peer_payments_footer_hint()` is now the single source both
   `footer_hints` and the fixture read, and
   `peer_payments_frame_shows_the_shipped_footer` pins the dumped frame's last
   line to the shipped one.

Also restores the rustfmt-only reflow of unrelated tests in `tests/tui_spec.rs`
(`queued_row`, a `failed_row` call, `rgb_tokens_…`, `alert_line_…`), keeping this
card's real edits there.

Presentation only: no wire, store, session, send-path or `Node` change.
2026-09-19 00:31:42 -04:00
5ae9a8f7aa Merge pull request 'tui: clean-look chrome redesign (one accent, honest tor phase, real frames)' (#120) from onionwire/t_bcf0ae45-onionwire-tui-clean-look-chrome-redesign into main
Some checks failed
android-ci / android (push) Has been cancelled
ci / test (push) Successful in 5m7s
ci / sdk (push) Successful in 1m6s
ci / fuzz (push) Has been cancelled
Reviewed-on: #120
2026-09-19 04:19:47 +00:00
8cbdcbbd94 Merge branch 'main' into onionwire/t_bcf0ae45-onionwire-tui-clean-look-chrome-redesign
All checks were successful
ci / test (pull_request) Successful in 5m46s
ci / sdk (pull_request) Successful in 1m30s
ci / fuzz (pull_request) Successful in 4m40s
android-ci / android (pull_request) Successful in 10m28s
2026-09-19 04:19:35 +00:00
b46d858a4d Merge pull request 'node: expose peer payment history (Node::list_payments)' (#119) from onionwire/t_21787cec-node-expose-peer-payment-history-node-li into main
Some checks failed
android-ci / android (push) Has been cancelled
ci / test (push) Has been cancelled
ci / sdk (push) Has been cancelled
ci / fuzz (push) Has been cancelled
Reviewed-on: #119
2026-09-19 04:09:05 +00:00
agent
c3116eb19e
fix(tui): invite payload gets a chrome-free region so mouse-copy is exact
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
ci / sdk (pull_request) Has been cancelled
ci / fuzz (pull_request) Has been cancelled
Mouse-selecting the invite copied the pane border: draw_share rendered the
payload inside themed_block, which is Borders::ALL, so every wrapped row sat
between a leading and a trailing glyph. OnionWire enables no mouse capture,
so the terminal's own drag-select is the copy path and it picks up chrome.

The payload now has its own region — flush at column 0, full frame width,
no block, no title, no gutter on any row it occupies — with the block
(title, fp, onion, copy hint) above it. Measured in cells, not chars.

Also add C: OSC 52 hand the payload to the terminal clipboard (same
sequence the F9 menu uses), with the key named on the screen and the mouse
selection named as the fallback for terminals that block the sequence.

Regression tests reconstruct the payload out of the rendered frame at
80x24, 120x40, 200x60 and 60x20 (they fail on base: the leading border
column) and assert no payload row carries a border glyph.
2026-09-18 23:54:07 -04:00
Lance Walters
2fa3466019
tui: peer payment history behind the F9 payments row (key p)
All checks were successful
ci / test (pull_request) Successful in 5m47s
ci / sdk (pull_request) Successful in 1m28s
ci / fuzz (pull_request) Successful in 4m51s
android-ci / android (pull_request) Successful in 10m36s
The F9 / `/settings` menu's only payment row showed the wallet's own transfer
list (`Node::wallet_recent_transfers`, F6). The signed `/pay` invoices and
`/tip` receipts a peer sent live in the `payments` table and had no path from
the TUI, so they were invisible. `Node::list_payments` (PR #119) closes that
gap; this wires it into a screen.

- `Screen::PeerPayments { state }` + `PeerPaymentsState` /
  `PeerPaymentRow`, built by `PeerPaymentsState::from_payments` from
  `Node::list_payments`' rows (newest first: the store returns `payments.id`
  ascending, the screen windows the vector).
- Key handler: `p` on the F9 screen opens it (`open_peer_payments`); `up`/`down`
  (or `k`/`j`) move the selection, `Esc` goes back, `F9` reopens the menu.
- Rows carry direction, kind, amount (`pay::atomic_to_xmr_str`, the same
  piconero formatter the chat lines use), memo (sanitized at draw time) and the
  receipt's `verified` / `unverified` word; the focused row is marked with `>`
  and bold. The selected row's txid and address sit under the rows — the
  address wrapped over two lines rather than clipped.
- States: populated, `no payments with {peer}`, `could not read payments`, and
  a menu row that refuses when no friend is selected. An empty history is a
  state, never an error.
- Menu: the wallet's own list is retitled `transfers` (F6, unchanged), and the
  new `payments` row (key `p`) names the peer and the count. Two histories, two
  rows, no ambiguity.
- Widths are measured in cells (`Span::width`); trailing columns are dropped
  before they can wrap, so the body fits 80x24 (20 inner rows of 21) as well as
  120x40 and 200x60.

Tests: new `tests/tui_payments.rs` (11 tests) dumps and asserts the screen at
80x24, 120x40 and 200x60 including the empty history, asserts a memo carrying
ESC/BEL/C1/bidi/newline bytes never reaches the frame buffer, and asserts the
window/column invariants for every width from 20 to 200.

Also relaxes one width assertion in `tests/tui_spec.rs`: `fit_cells` was
asserted to start with `"abcdef"`, which only holds when another test's
in-flight `ONIONWIRE_ASCII` mutation is not visible — the suite mutates env vars
without a global lock, so that test flaked (it also fails on an unmodified tree,
1 run in 2). It now accepts either chrome's cut point, which is what the comment
already claimed.

Docs: `docs/TUI.md` gains the screen's section, the retitled/replaced rows and
the updated row count; the "peer payment history" gap entry is closed.
2026-09-18 23:53:10 -04:00
agent
b1a6796742
Merge remote-tracking branch 'origin/onionwire/t_21787cec-node-expose-peer-payment-history-node-li' into onionwire/t_ef1d35d2-tui-payments-row-on-f9-render-peer-payme 2026-09-18 23:19:27 -04:00
agent
eefa7e5cc6
tui: clean-look chrome redesign (one accent, honest tor phase, real frames)
All checks were successful
ci / test (pull_request) Successful in 5m42s
ci / sdk (pull_request) Successful in 1m29s
ci / fuzz (pull_request) Successful in 4m41s
android-ci / android (pull_request) Successful in 10m45s
Applies the bitchat-tui clean-look principles to the OnionWire main screen.

- Hierarchy: header, roster + one primary chat pane, one status line, one
  footer hint line. The header gives up the accent (the accent is reserved
  for focus), so it stops competing with the panes.
- Tor phase is a first-class state: Node::tor_state() -> TorPhase (glyph +
  word, header and footer) so connecting / ready / degraded / off are never
  colour-only and never implied. No new data field.
- Footer changes with the focused pane (pane_footer_hints) and the phase; the
  main footer drops the redundant onion (the header already prints it) and
  uses those cells for hints. status_footer keeps its signature and strings.
- Empty roster / empty chat / connecting / degraded / off are designed states
  with their own copy, not blank panes.
- draw_main_chrome + MainView: the real main render path is public and
  Node-free, so tests/tui_frames.rs dumps the actual chrome at 80x24, 120x40
  and 200x60 (12 tests, 5 states, real Message/OutboxEntry rows) instead of a
  reconstructed stand-in.
- Widths in cells everywhere touched: status_footer*, alert_line,
  main_header_line*, draw_text_overlay, roster_row_text. The roster spends its
  budget name-first, so a 22-cell pane reads `bob-the-sta…  stale` instead of
  `…  bbbbbbbb… stale`.
- draw_text_overlay is centered with a one-cell side margin and clears
  underneath; never full-bleed.

Also fixes a pre-existing race in tests/tui_spec.rs (the ellipsis-form
assertion did not tolerate ONIONWIRE_ASCII being set by a parallel test).

Co-Authored-By: Hermes <[email protected]>
2026-09-18 23:18:24 -04:00
rust-dev
86e20223cf
node: expose peer payment history as Node::list_payments
Some checks failed
ci / test (pull_request) Successful in 8m27s
ci / sdk (pull_request) Successful in 1m29s
ci / fuzz (pull_request) Failing after 16m49s
android-ci / android (pull_request) Successful in 10m52s
Store::list_payments existed but only the node's own tests called it, so the
signed /pay invoices and /tip receipts a peer sent were unreachable from the
app. Add the thinnest read-only accessor next to list_messages/friend_profile:
lock the store, map the error to String, no new state, no new schema, no dial.

Payment rows come back as stored; a renderer sanitizes memo with
sanitize::display_text at draw time, the same way it does for message bodies.
2026-09-18 22:55:23 -04:00
14f9284463 Merge pull request 'tui: analyse the landed wallet + node features and ship a WALLETS & SETTINGS menu (F9)' (#118) from onionwire/t_8bb1bac9-onionwire-tui-analyze-landed-wallet-node into main
Some checks failed
ci / test (push) Has been cancelled
ci / sdk (push) Has been cancelled
ci / fuzz (push) Has been cancelled
android-ci / android (push) Has been cancelled
Reviewed-on: #118
2026-09-19 02:41:39 +00:00