Commit graph

458 commits

Author SHA1 Message Date
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
b99d96a145 Merge branch 'main' into onionwire/t_8bb1bac9-onionwire-tui-analyze-landed-wallet-node
Some checks failed
ci / sdk (pull_request) Has been cancelled
ci / fuzz (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
android-ci / android (pull_request) Has been cancelled
2026-09-19 02:41:28 +00:00
agent
3b44cb0faf
ci: re-trigger the checks (the first attempt was cancelled by the runner, no code change)
Some checks failed
ci / test (pull_request) Successful in 5m43s
ci / sdk (pull_request) Successful in 1m36s
ci / fuzz (pull_request) Has been cancelled
android-ci / android (pull_request) Has been cancelled
2026-09-18 22:36:08 -04:00
agent
0131803f9c
tui: WALLETS and SETTINGS menu (F9 / /settings) over the landed wallet + node features
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / sdk (pull_request) Has been cancelled
ci / fuzz (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
The Monero wallet and the cuprate node shipped behind function keys only, so a
user who did not already know F6 opened the wallet could not find wallet setup,
the child wallet, the chain source or the settings.

F9 (also /settings) now opens one discoverable screen with the two groups the
card fixes: WALLET (endpoint, child, sync, receive, balance, payments, create,
import) then SETTINGS (nickname, profile, identity, colour, backup, restore,
wipe, wipe-all). Every actionable row prints the key or command that fires it,
including the F6 wallet screen's own keys, and those keys stay live on the
screen so no row can name a dead key.

- Screen, not popup: 19 rows at 80x24 against 21 inner rows; 120x40 and 200x60
  hold. The footer is the shared status_footer, so TOR / identity / ? help stay
  put.
- No credentials: WalletMenuState carries booleans, labels and display-ready
  error strings only. rpc_login, secret(), seeds and passphrases have no field
  to travel in.
- Untrusted values are display data: sanitize + newline/tab strip, then
  truncated in cells.
- Cells, not chars: cell_width() measures through ratatui's own Span::width, so
  no unicode-width dependency was added and chars().count() is never a width.
- Copy without a clipboard crate: c writes the receive address as an OSC 52
  sequence; the terminal owns the clipboard and it survives SSH.
- Colour is never the only signal: every state also spells itself out.
- F7 stays free for the endpoint config screen that names it (db208be,
  docs/WALLET.md).

F2/F3/F4/F5/F6/F8 keep working: the function keys are now handled once, for Main
and this screen, instead of inside the Main arm.
2026-09-18 22:26:57 -04:00
agent
9a1f50eadf
fix(ci): drop stale Gradle journal locks on the shared /gradle volume
All checks were successful
android-ci / android (pull_request) Successful in 11m30s
android-ci failed LockTimeoutException on /gradle/caches/journal-1: two
JVMs (PIDs a few apart) sharing onionwire-android-gradle. A cancelled job
never docker-rms the build container, so the next run mounts the same
volume while the previous Gradle still holds the lock. Also
org.gradle.parallel=true in android/gradle.properties.

Remove leftover onionwire-android-* containers (and trap EXIT), delete
stale *.lock files inside the container, and force parallel=false.
2026-09-18 22:02:22 -04:00
5c43254111 Merge pull request 'fix(ci): drop stale Gradle journal locks on the shared /gradle volume' (#117) from feat/android-ci-gradle-journal-lock into main
All checks were successful
android-ci / android (push) Successful in 11m37s
Reviewed-on: #117
2026-09-19 02:01:25 +00:00
e3fb723a91 Merge pull request 'fix(android): keep Tor bootstrap alive after the unlock activity dies' (#116) from feat/android-bootstrap-survives-ui into main
Some checks failed
android-ci / android (push) Failing after 3m32s
Reviewed-on: #116
2026-09-19 01:51:38 +00:00
agent
396e468f1a
fix(android): keep Tor bootstrap alive after the unlock activity dies
Some checks failed
android-ci / android (pull_request) Has been cancelled
Open set Phase.Opening then ran openWire on viewModelScope, and the
keep-alive refused to start until Wire existed. Closing the activity
cancelled bootstrap, so the spinner vanished and the lock screen came
back idle. Run openWire on NodeHost's process scope, start the FGS on
the Open tap, and treat in-flight bootstrap as keep-alive work. IME Go
also submits unlock the same way as the Open button.
2026-09-18 21:46:34 -04:00
77f577fcf9 Merge pull request 'android-ci: make a :app:packageRelease failure diagnosable (--stacktrace)' (#115) from onionwire/t_d81fb7bf-android-ci-make-a-app-packagerelease-fai into main
All checks were successful
android-ci / android (push) Successful in 11m0s
Reviewed-on: #115
2026-09-19 00:03:08 +00:00
apk-dev
fcdabf8d13
android-ci: pass --stacktrace to the release gradle build
All checks were successful
android-ci / android (pull_request) Successful in 10m27s
Run 414 died in :app:packageRelease with an empty cause chain (no
Caused by: line at all), so a one-off packaging failure leaves nothing
to diagnose. --stacktrace only changes output on failure; it does not
alter the build, the artifact or the timings.

scripts/build-android-local.sh is the single gradle invocation that both
android-ci.yml and android-release.yml build through, so one flag covers
both.
2026-09-18 19:53:41 -04:00
0af97e144a Merge pull request 'android-ci: echo the artifact digests and deflated native-lib sizes (evidence follow-up to #113)' (#114) from onionwire/t_f05be394-evidence-digest into main
All checks were successful
android-ci / android (push) Successful in 11m8s
Reviewed-on: #114
2026-09-18 22:53:43 +00:00
agent
c5e2cae694
android-ci: 2 GB of Gradle heap for the cuprated release packaging
Some checks failed
android-ci / android (pull_request) Failing after 2s
Run 414 (PR #114) died in `:app:packageRelease` after a clean build:

    Execution failed for task ':app:packageRelease'.
    > A failure occurred while executing
      com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable

with no `Caused by` line and nothing else in the log — and it is not
reproducible on the same content: runs 412 and 413 (this tree, 1 GB heap)
packaged fine. The one budget in this build that got tight when cuprate came in
is the single-use Gradle daemon's heap, which now compresses a 55 MB SDK lib
(plus RandomX's 1.1 MB) in-process; the runner has 15 GB and the job's peak RSS
is ~3 GB, so 2 GB of heap costs nothing and removes the most likely mechanism.
android-release.yml gets the same number: it packages the same APK.
2026-09-18 18:15:52 -04:00
agent
294cedfbff
android-ci: echo the artifact digests and the deflated native-lib sizes
Some checks failed
android-ci / android (pull_request) Failing after 9m52s
Run 412 (PR #113) proved the cuprated APK builds and carries the daemon, but
the log only ever printed `sha256sum -c ...: OK` — neither digest — and
`unzip -l`, which shows the uncompressed size of every .so and not the
deflated one the download pays for. Both are what a reader of the run needs to
identify the artifact, and neither can be recovered from the tree afterwards.

Also fills the two remaining cells of CUPRATE_DAEMON.md's CI-cost table from
that run (APK 34,445,514 B / AAR 15,728,039 B, 11m12s job, 5.6 G target
volume), and records that the first feature-on build is the 44-minute one
while later builds settle at +2 minutes over the feature-off baseline.
2026-09-18 17:51:11 -04:00
8626da225b Merge pull request 'android: build the SDK with cuprate-daemon and offer the on-device node' (#113) from onionwire/t_f05be394-android-build-the-sdk-with-cuprate-daemo into main
All checks were successful
android-ci / android (push) Successful in 10m40s
Reviewed-on: #113
2026-09-18 21:42:54 +00:00
agent
3860c3d56d
android: record what the cuprated build costs CI (baseline vs feature on)
All checks were successful
android-ci / android (pull_request) Successful in 11m12s
2026-09-18 17:30:20 -04:00
sirius
9afa22a0bf
android-ci: fix the cuprate marker gate failing its own green build
Some checks failed
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Successful in 5m7s
ci / sdk (pull_request) Successful in 1m4s
ci / fuzz (pull_request) Successful in 4m55s
Run 406 built the APK successfully (BUILD SUCCESSFUL in 44m 7s) and the gate then
reported "the cuprate-daemon feature is NOT in this APK" while the line above it
printed `target_max_memory` **5** times. The bug is the classic one:

    strings -a x.so | grep -q pattern     # under `set -o pipefail`

`grep -q` exits at the first match and closes the pipe; `strings` takes SIGPIPE
(141) and pipefail makes the pipeline status non-zero, so `if ! ...` ran. The count
is captured into a variable now (grep -c reads the whole stream, no SIGPIPE) and the
gate fails on `< 1`, which is what it always meant.
2026-09-18 17:16:05 -04:00
sirius
adcf52b8e4
android: pin the Android Rust toolchain to 1.98 (cuprated needs >= 1.93)
The Android jobs pinned `RUST_TOOLCHAIN: "1.91"` — the workspace MSRV — and the
cuprated graph does not build on it. `tapes`, a Cuprate dependency this repo cannot
patch, calls `VecDeque::pop_front_if`, stable only from 1.93:

    error[E0658]: use of unstable library feature `vec_deque_pop_if`
       --> /cargo/git/checkouts/tapes-.../src/tapes/rolling_tape.rs:396:34

1.98 is the stable release the graph is built and tested with on the dev machine
(rustc 1.98.1) and the one the cross-compile spike used. `ci.yml`, `release.yml` and
the `rust-version = "1.91"` MSRV are untouched: the feature-off workspace builds on
1.91, and moving the MSRV is a separate decision, flagged in the PR.

Both workflows, and `android/CUPRATE_DAEMON.md` records it as a pitfall.
2026-09-18 17:16:05 -04:00
sirius
0a2bcf93a2
android: install cmake in the Android build containers
RandomX is the C++ half of the in-process chain daemon and `randomx-rs`'s build
script drives it through `cmake-rs`. Neither `android-ci.yml` nor
`android-release.yml` installed `cmake` in its `debian:bookworm` container, so the
first CI run of this branch compiled 410 crates in 11m37s and then died with

    error: failed to run custom build command for `randomx-rs …`
    failed to execute command: No such file or directory (os error 2)
    is `cmake` not installed?

surfacing as Gradle's "Process 'command 'cargo'' finished with non-zero exit value
101" — which reads like a Rust error and is not one. Both workflows install it now.

`android-ci.yml` also reports the cargo target volume after the build, next to the
wall clock: the disk cost of the feature on the runner is part of the measurement
this change owes.
2026-09-18 17:16:05 -04:00
sirius
e6b6bc8dd6
android: build the SDK with cuprate-daemon and offer the on-device node
Part 3 of "cuprated built in": the chain daemon now ships inside the APK and the
wallet screen can pick it.

Build (android/sdk/build.gradle.kts)
- `cargoBuildAndroid` runs `cargo ndk … build --release --lib --features
  cuprate-daemon`. The Android target only: `cargoHostLib` / `uniffiBindgen` stay
  feature-free, because the host cdylib exists only so `uniffi-bindgen --library`
  can dlopen it and the UniFFI surface does not fork on a cargo feature.
- The link needs the NDK's libc++ and compiler-rt builtins explicitly (RandomX is
  C++ and its aarch64 JIT calls `__clear_cache`; `randomx-rs` links the NDK's stub
  `libstdc++.a`). `cargo ndk --link-builtins` covers the builtins only, so the
  whole set is spelled out as per-ABI `CARGO_TARGET_<TRIPLE>_RUSTFLAGS` — a global
  `RUSTFLAGS` would break the host build scripts. The linker is the NDK clang
  driver at the app's API level, named explicitly, because the dev machines pin
  the API 21 wrapper for `aarch64-linux-android` and API 21 fails this link.
- `ANDROID_NDK` is exported alongside `ANDROID_NDK_HOME`/`NDK_HOME`: without it
  `cmake-rs` aborts and `randomx-rs`'s build script panics.
- The task logs the feature it builds with, so CI carries the request, not just
  the task name.

Wallet screen
- Third chain source, **On-device node (Cuprate)**, beside the daemon field and
  Receive-only. Stored as `ChainChoice.InProcessCuprate` with an empty
  `monerod_datadir`, which the SDK resolves to `$ONIONWIRE_HOME/chain`. Existing
  Save daemon / Receive-only / Start / Stop behaviour is unchanged.
- The status line grows `· node <word>` from `WalletChildStatus.node_state` for
  this source only, fail-closed on an unrecognised word. No sync height: the SDK
  exposes none, so the screen does not show a number it cannot get.
- Storage honesty: free space on the chain store's filesystem, and Start is
  refused below a 3 GiB floor or when that filesystem cannot be read. The floor is
  a floor, not a sync estimate — nothing here exposes one.
- The pre-production warning (quoted user book, testnet only, Cuprate issue #278)
  is a sentence above Start, assertable in a test. Opt-in, never a default.
- The daemon field's hint no longer suggests a loopback daemon on the phone.

CI
- `android-ci.yml` extracts `lib/<abi>/libonionwire_sdk.so` from the built APK and
  fails the job unless it contains `target_max_memory`, a rodata literal compiled
  only under `cuprate-daemon`. v0.7.0's shipped `.so` has zero of them, so this
  separates "in the artifact" from "requested".

Docs
- `android/CUPRATE_DAEMON.md`: the build wiring, the link line, the CI gate, and
  an explicit "not verified on a device" section. `MONERO_BINARIES.md` points at
  it for the chain source that is not a binary.
2026-09-18 17:16:05 -04:00
773dacb062 Merge pull request 'sdk: land the on-device Cuprate chain source on main (replay of #111's SDK commit)' (#112) from onionwire/t_52f8de0f-cuprate-land-the-sdk-surface-on-main-pr into main
All checks were successful
ci / test (push) Successful in 5m9s
ci / sdk (push) Successful in 1m4s
android-ci / android (push) Successful in 8m22s
ci / fuzz (push) Successful in 4m47s
Reviewed-on: #112
2026-09-18 19:44:45 +00:00