Commit graph

272 commits

Author SHA1 Message Date
agent
1aec007601
ratchet: freeze the v1 state/frame wire format with guard tests
All checks were successful
ci / test (pull_request) Successful in 4m47s
ci / sdk (pull_request) Successful in 57s
The persisted ratchet state had a version byte and typed errors but no
test that a format change would actually be caught. Add two dedicated
guards to tests/ratchet.rs that assert the frozen shape as literals
(0x01, 210-byte prefix) rather than via STATE_VERSION, so a bump breaks
them visibly, and pin that any foreign version byte is rejected with
Error::UnsupportedStateVersion before any field is read.

Document the frozen v1 state layout, the rat frame layout, and the
migration path a v2 must follow in references/ratchet-wire-frozen.md.

Verified by flipping STATE_VERSION to 2: both guards fail
("the frozen version byte changed"), then revert.
2026-09-17 20:43:31 -04:00
agent
6f267a6aba
tests: assert the DH ratchet step in lockstep on a bidirectional burst
All checks were successful
ci / test (pull_request) Successful in 4m51s
ci / sdk (pull_request) Successful in 58s
`round_trip_across_two_dh_ratchet_steps` only asserts that neither sending
ratchet key stayed put; it would still pass if the two sides stepped onto
unconnected epochs, and it never checks that either peer adopted the key the
other advertised. The new test reads dh_pub out of the wire header and pins the
adoption per step across an A->B / B->A burst:

- round 1 rotates only the lower-key (establishing) peer, so one round cannot
  lockstep both sides -- the intermediate state is asserted, not assumed;
- rounds 2 and 3 step each side in turn, asserting each receiver adopts exactly
  the key the frame advertised;
- the three-frame burst each way asserts chain reads (not extra steps), zero
  skipped keys, and that the peer that received last is keyed to the other's
  current key.

tests/ratchet.rs only; no src change, no new dependency.
2026-09-17 20:41:48 -04:00
ad1b994c08 Merge pull request 'onionwire: outbound tip() appends the sender's own [tip] chat line' (#96) from wt/t_c8441534 into main
All checks were successful
ci / test (push) Successful in 4m45s
ci / sdk (push) Successful in 58s
android-ci / android (push) Successful in 8m30s
Reviewed-on: #96
2026-09-17 21:27:04 +00:00
rust-dev
2ec88b0ce5
onionwire: outbound tip() appends the sender's own [tip] chat line
All checks were successful
ci / test (pull_request) Successful in 5m0s
ci / sdk (pull_request) Successful in 1m9s
android-ci / android (pull_request) Successful in 8m44s
The outbound tip path signed and sent a receipt frame and a tip frame and
logged the receipt line, but never the tip line, so the payer's own chat
showed only `[receipt] 0.5 XMR` — the recipient's view — for what they
had just spent. Append `pay::tip_chat_line(atomic, memo, false)` after the
receipt line so the sender sees `[tip] 0.5 XMR — memo (pending)`.

Test: outbound_tip_appends_the_senders_own_tip_chat_line in src/node.rs's
`#[cfg(test)] mod tests` — the only place a `Node` can be built offline
(Node::start bootstraps Tor). It drives the shipped tip() against a mock
wallet child (Digest challenge + one transfer) and asserts both chat rows.
2026-09-17 17:05:56 -04:00
918fa4d8a8 Merge pull request 'docs: Cuprate cross-compiles for Android aarch64 (NDK r28c, minSdk 26)' (#93) from wt/cuprate-android-crosscompile-spike into main
Reviewed-on: #93
2026-09-17 04:08:28 +00:00
rust-dev
e0bd4e4218
docs: Cuprate cross-compiles for Android aarch64 (NDK r28c, minSdk 26)
Spike evidence for the Phase 1 Android question: cargo check --release --target
aarch64-linux-android exits 0 and the PoC binary links as an Android 26 aarch64 ELF.
Documents the env recipe, the four link args the C++ RandomX build needs, the
cargo-ndk linker-wrapper bug, and the RANDOMX_DIR/DARCH no-op.
2026-09-16 23:58:25 -04:00
564036813a Merge pull request 'docs: Cuprate in-process launch spike A (testnet launch + RPC/sync evidence)' (#92) from wt/cuprate-testnet-spike into main
Reviewed-on: #92
2026-09-17 03:42:42 +00:00
agent
12db06b2ed
docs: Cuprate in-process launch spike A — testnet launch, RPC and sync evidence
Spike A of the Cuprate exploration: Node::launch(config).await runs a real
testnet chain daemon in-process (no monerod, no subprocess). Unrestricted RPC
on 127.0.0.1:18089 answers get_info, /get_height and get_block (heights 0, 1, 2,
1000) with monerod-shaped payloads, and clearnet P2P synced 0 -> 23,758 testnet
blocks in ~120s. Verdict VALIDATED with four parity gaps recorded:
out-of-range get_block returns a bare HTTP 500 with an empty body (monerod
returns a JSON-RPC error object), get_info reports zero peers while syncing,
restricted get_info returns placeholder database_size/version, and the version
label is 0.1.0-preview-release.
2026-09-16 23:39:12 -04:00
agent
c090f16dab
docs: add Cuprate phased integration strategy to payment plan
Adds strategic recommendation: Phase 1 (Cuprate in-process for chain +
monero-wallet-rpc subprocess pointing at it) and Phase 2 (monero-wallet
crate for full in-process wallet). Includes RPC compatibility note,
binary size comparison (+5.6 MB vs ~52 MB monerod), and version
conflict resolution confirmation.

See references/cuprate-integration.md and Obsidian notes for full details.
2026-09-16 23:15:55 -04:00
598270b519 Merge pull request 'ratchet: reject frames under MIN_FRAME_LEN before indexing the version byte (fixes peer-reachable panic)' (#90) from wt/t_c0566260 into main
All checks were successful
ci / test (push) Successful in 4m45s
ci / sdk (push) Successful in 56s
android-ci / android (push) Successful in 7m55s
Reviewed-on: #90
2026-09-17 02:46:17 +00:00
agent
7ba07f84ea
docs: add Cuprate in-process daemon exploration to payment plan
Adds §7a documenting the alternative approach of embedding Cuprate's
crates directly into the OnionWire binary instead of spawning monerod
as a subprocess. Includes PoC results (cargo check passed with both
arti-client 0.44 and 0.46), the wallet-layer gap, dependency bloat
assessment, and exploration card titles.

Does not change any locks — the subprocess wrapper model remains the
default path. See references/cuprate-integration.md for full test log.
2026-09-16 22:47:17 -04:00
8bedf45e53 Merge branch 'main' into wt/t_c0566260
All checks were successful
ci / test (pull_request) Successful in 5m10s
ci / sdk (pull_request) Successful in 1m14s
android-ci / android (pull_request) Successful in 8m5s
2026-09-17 02:46:03 +00:00
agent
3c78cd3e39
ratchet: reject frames under MIN_FRAME_LEN before indexing the version byte
All checks were successful
ci / test (pull_request) Successful in 4m46s
ci / sdk (pull_request) Successful in 56s
android-ci / android (pull_request) Successful in 9m54s
Frame::parse checked the prefix, then indexed frame[4] for the version byte,
then checked the length. A 4-byte `rat ` frame is a prefix hit, so it
panicked with 'index out of bounds: the len is 4 but the index is 4' instead
of being rejected. dispatch::classify routes any `rat `-prefixed message to
Kind::Ratchet, so this is reachable from any authenticated peer.

Move the MIN_FRAME_LEN check ahead of the version match: a frame that cannot
hold a header, nonce and tag is 'truncated' whatever its version byte says,
and nothing past the prefix is indexed until the length is known good. Wire
format unchanged.

Tests: tests/ratchet.rs short_frames_are_rejected_without_panicking (bare
prefix, empty slice, partial prefix, prefix + 5 bytes, MIN_FRAME_LEN - 1) and
a_wrong_frame_version_is_rejected (73-byte frame with version 2 is
BadFrame("version"); a short one is a length error). Both assert the state
stays byte-identical after every rejection.
2026-09-16 19:50:36 -04:00
cf77116143 Merge pull request 'docs: ratchet wire spec + forward-secrecy/PCS threat-model claims' (#89) from wt/t_29a71a55 into main
Reviewed-on: #89
2026-09-16 23:45:59 +00:00
agent
7f3ef8c3fc
docs: ratchet wire spec + forward-secrecy/PCS threat-model claims
PROTOCOL.md gains a 'Ratchet (v1 chat layer)' section written so a second
implementation can interoperate from the text alone: byte-exact frame layout
(rat , 0x01, dh_pub||N||PN as header and AAD, 12-byte nonce,
ChaCha20-Poly1305), the KDF_RK/KDF_CK constructions and the role-separated
epoch rule, the derived bootstrap epoch, the receive and DH-step rules, the
MAX_SKIP/MAX_SKIPPED_KEYS bounds with the replay rule, the SQLCipher
ratchet_sessions row, and what stays unratcheted.

THREAT_MODEL.md gains the corresponding gains (per-chain forward secrecy, PCS
after a DH step, header not on the wire) and honest limits (skipped-key
window, the prekey-bound bootstrap epoch, no deniability, no one-time
prekeys, compromised endpoint out of scope, no metadata gain, the no-server-
outbox lock untouched) plus the amended transport wording.

README.md documents the operator-visible consequence: no reset command yet,
prekey change / invite re-paste is the only recovery, /wipe keeps the state,
and a desync is currently stderr-only.
2026-09-16 19:40:40 -04:00
1c998e9472 Merge pull request 'ratchet verify: end-to-end + adversarial tests on the wired chat path' (#88) from wt/t_95ff7563 into main
All checks were successful
ci / test (push) Successful in 4m41s
ci / sdk (push) Successful in 57s
android-ci / android (push) Successful in 9m32s
Reviewed-on: #88
2026-09-16 23:31:23 +00:00
rust-dev
3620e4f38f
ratchet: end-to-end and adversarial tests on the wired send/receive path
All checks were successful
ci / test (pull_request) Successful in 4m54s
ci / sdk (pull_request) Successful in 1m0s
android-ci / android (pull_request) Successful in 9m26s
Drives the shipped chat ratchet offline against real SQLCipher stores and
the real encode/decode pair Node::send and Node::handle_incoming call, with
a capture-and-release Deliverer so arrival order and drops are controlled.

tests/ratchet_e2e.rs: full exchange, out-of-order arrival, a dropped frame,
a retried frame re-sent byte-identically, and a restart of both peers.

tests/ratchet_adversarial.rs: a frame claiming a jump past MAX_SKIP, a
post-compromise snapshot across a DH step, an unknown friend, a retired
epoch after an invite refresh, and five corruption shapes. Every rejected
frame is asserted to leave the persisted ratchet blob byte-identical.

src/node.rs gains a test-only module that builds a Node with an
unbootstrapped Tor client and drives Node::send plus the real receive path
(Noise IK handshake over an in-memory stream into handle_incoming).
2026-09-16 19:30:39 -04:00
4e8d8c0f25 Merge pull request 'Chat over the Double Ratchet: dispatch Kind::Ratchet + outbox payload' (#87) from wt/t_dcafd1c8 into main
All checks were successful
ci / sdk (push) Successful in 58s
ci / test (push) Successful in 4m18s
android-ci / android (push) Successful in 8m46s
Reviewed-on: #87
2026-09-16 23:08:21 +00:00
agent
69a15fe909
chat: send and receive as ratchet frames through the outbox payload
All checks were successful
ci / test (pull_request) Successful in 4m36s
ci / sdk (pull_request) Successful in 1m15s
android-ci / android (pull_request) Successful in 9m25s
Chat plaintext is ratchet-encrypted once, before the first delivery attempt,
and the frame is what the outbox stores and retries, so a retried message
re-sends identical bytes instead of advancing the sending chain twice.

- dispatch: Kind::Ratchet for the `rat ` prefix, matched before the unknown
  [a-z]{3} prefix rule
- node: encode_chat_frame / ingest_chat_frame (the wire halves of Node::send
  and handle_incoming), bootstrap derived from the peers' static prekey DH
  because the Noise handshake is frozen and carries no ratchet key
- outbox: nullable outbox.payload + Outbox::send_payload; NULL payload keeps
  the previous row-for-row behaviour
- store: additive outbox.payload migration, enqueue_outbox_payload,
  OutboxEntry::payload
- add_friend_payload: a changed prekey clears the (prekey-bound) ratchet state

tests/ratchet_wire.rs (5) covers one frame per send, byte-identical retries,
out-of-order delivery, replay, tampering and fresh-friend both directions.

tests/tui_spec.rs and crates/onionwire-sdk/src/lib.rs only gained a
`payload: None` field in their OutboxEntry test fixtures: the card's required
field on a pub struct cannot be added without it.
2026-09-16 19:02:52 -04:00
14fccd5396 Merge pull request 'store: persist per-peer ratchet session state in the SQLCipher store' (#86) from wt/t_657d57c1 into main
All checks were successful
android-ci / android (push) Successful in 8m3s
ci / test (push) Successful in 4m6s
ci / sdk (push) Successful in 59s
Reviewed-on: #86
2026-09-16 22:35:11 +00:00
agent
34c257dab5
store: persist per-peer ratchet session state in the SQLCipher store
All checks were successful
android-ci / android (pull_request) Successful in 9m3s
ci / test (pull_request) Successful in 4m11s
ci / sdk (pull_request) Successful in 59s
New additive ratchet_sessions table (friend_id PK -> friends(id) ON DELETE
CASCADE, state BLOB, updated_at), plus load/save/clear_ratchet on Store. The
blob is the opaque versioned RatchetState::to_bytes output; the store never
parses or re-serializes it. wipe_messages deliberately keeps sessions: wiping
history is not a session reset.
2026-09-16 18:30:32 -04:00
5a36338178 Merge pull request 'ratchet: Double Ratchet state machine (symmetric + DH ratchet, bounded skipped keys)' (#85) from wt/t_85aaf5a6 into main
All checks were successful
ci / sdk (push) Successful in 55s
android-ci / android (push) Successful in 9m11s
ci / test (push) Successful in 4m2s
Reviewed-on: #85
2026-09-16 22:17:10 +00:00
agent
8b2e834616
ratchet: Double Ratchet state machine for chat frames
All checks were successful
ci / sdk (pull_request) Successful in 1m25s
android-ci / android (pull_request) Successful in 9m12s
ci / test (pull_request) Successful in 4m35s
New wire-independent `src/ratchet.rs` + `tests/ratchet.rs`: KDF_RK/KDF_CK as in
the Signal spec, symmetric ratchet, DH ratchet, skipped-key store with the
MAX_SKIP / MAX_SKIPPED_KEYS bounds, versioned state serialization and zeroize
of every superseded secret.

Initiation gate: per-direction chains seeded by ratchet-key ordering (option
(a)), so both peers can build a sending chain before either has received, and a
single deterministic tie-break (lower ratchet key rotates first) keeps exactly
one rotation in flight. Documented under "Initiation and convergence" and
covered by both_peers_send_first_converges, which fails on a crossing rotation.

Adds hkdf 0.12 + hmac 0.12 (0.13 pulls digest 0.11 and will not build against
sha2 0.10) and regenerates crates/onionwire-sdk/Cargo.lock.
2026-09-16 18:05:39 -04:00
3eee27fd09 Merge pull request 'tui: extract pub ColorMode/TokenStyles/tokens_for for testable colour tokens' (#80) from wt/t_49b7c2b1 into main
All checks were successful
android-ci / android (push) Successful in 8m27s
ci / sdk (push) Successful in 57s
ci / test (push) Successful in 3m55s
Reviewed-on: #80
2026-09-15 21:51:15 +00:00
3a17a564d3 Merge branch 'main' into wt/t_49b7c2b1
Some checks failed
ci / sdk (pull_request) Successful in 1m8s
android-ci / android (pull_request) Has been cancelled
ci / test (pull_request) Successful in 4m3s
2026-09-15 21:50:53 +00:00
agent
d4b0071d1a
tui: fix clippy unnecessary_unwrap in NO_COLOR cleanup
All checks were successful
ci / test (pull_request) Successful in 3m58s
ci / sdk (pull_request) Successful in 56s
android-ci / android (pull_request) Successful in 8m16s
The alert_line_prefixes_when_no_color test stashed the prior NO_COLOR
value and restored it with is_none() + unwrap() — a clippy lint failure
under -D warnings. Replace with a match that takes ownership.

No behavior change; the restored env var is identical.

Co-authored-by: openhands <[email protected]>
2026-09-15 17:34:59 -04:00
agent
6ce97a0e3c
tui: extract pub ColorMode/TokenStyles/tokens_for for testable colour tokens
Some checks failed
ci / test (pull_request) Failing after 4m22s
ci / sdk (pull_request) Successful in 1m16s
android-ci / android (pull_request) Successful in 8m16s
Make ColorMode a pub enum with pub color_mode() fn, add TokenStyles
struct and tokens_for(mode) as the single source of truth for the
style_* helpers. Tests assert RGB/None/Ansi16 fg/bg/modifier resolution
without depending on process environment.
2026-09-15 17:29:26 -04:00
995f46013e Merge pull request 'feat(sdk): sign/encode/decode/verify invoice, receipt and tip frames' (#77) from wt/t_cd793d2c into main
All checks were successful
ci / test (push) Successful in 3m55s
android-ci / android (push) Successful in 8m42s
ci / sdk (push) Successful in 56s
Reviewed-on: #77
2026-09-15 17:38:35 +00:00
b1dd18a4a2 Merge branch 'main' into wt/t_cd793d2c
All checks were successful
ci / test (pull_request) Successful in 3m51s
ci / sdk (pull_request) Successful in 57s
android-ci / android (pull_request) Successful in 8m33s
2026-09-15 17:01:58 +00:00
agent
96d582153a
feat(sdk): sign/encode/decode/verify invoice, receipt and tip frames
All checks were successful
ci / test (pull_request) Successful in 4m24s
android-ci / android (pull_request) Successful in 8m53s
ci / sdk (pull_request) Successful in 1m17s
The SDK could already send an invoice or a tip through Node::pay_invoice /
Node::tip, but it could not touch the payment frames themselves: pay::sign_*
take the ed25519 identity secret and Node exposed only identity_pk(), so the
signing half lived nowhere the SDK could reach.

Add the signing surface to the node instead of exporting the key:

  * Node::sign_invoice / sign_receipt / sign_tip sign with the node's own
    identity key and return the core frame struct. The secret never leaves
    the process and there is no API that hands it out.
  * pay_invoice and tip now call those methods rather than signing inline, so
    there is one signing path, not two.

SDK (crates/onionwire-sdk), all backward compatible:

  * Records Invoice, Receipt, Tip mirroring src/pay.rs, sig as raw bytes so a
    frame re-encodes byte-for-byte.
  * Wire::sign_invoice / sign_receipt / sign_tip (async, over the node).
  * Free functions encode_invoice / encode_receipt / encode_tip,
    decode_invoice / decode_receipt / decode_tip (None on a foreign or
    truncated frame), verify_invoice / verify_receipt / verify_tip against
    the sender's pubkey hex (false on a bad key, never a panic).

Tests: 8 new SDK unit tests (record round-trips through the core encoders,
signer-key-only verification, tamper rejection, foreign/truncated frame,
typed Stopped error after shutdown). SDK 27 passed, 0 failed; SDK clippy
--all-targets -D warnings clean; root clippy --all-targets -D warnings
clean; root lib tests 14 passed; tests/pay.rs 11 passed.
2026-09-15 12:45:49 -04:00
3dc52edc71 Merge pull request 'fix(android): make the new launcher icon actually display (adaptive icon + roundIcon)' (#74) from wt/app-icon-adaptive into main
All checks were successful
android-ci / android (push) Successful in 8m0s
Reviewed-on: #74
2026-09-15 02:31:22 +00:00
6f69d629fb Merge branch 'main' into wt/app-icon-adaptive
All checks were successful
ci / test (pull_request) Successful in 4m19s
ci / sdk (pull_request) Successful in 1m14s
android-ci / android (pull_request) Successful in 8m19s
2026-09-15 02:25:12 +00:00
agent
faf4d1bb15
fix(android): make the new launcher icon actually show up as an adaptive icon
The icon change landed as a bitmap dropped straight into
res/mipmap-anydpi-v26/ and wired to android:icon only, so the installed app
kept showing the old art:

- android:roundIcon still pointed at @mipmap/ic_launcher (the old vector
  adaptive icon). Launchers that prefer roundIcon — Pixel Launcher, Samsung
  One UI — render it in preference to android:icon, so the new bitmap never
  appeared. Verified on the ow35 emulator drawer: old cyan/green line-art
  onion while android:icon was already the new PNG.
- a bitmap under mipmap-anydpi-v26 is a legacy icon, not an adaptive one: the
  launcher pads it into the mask itself and it is not density-aware.

Now:
- drawable-nodpi/onionwire_app_icon.png: the artwork squared to 432x432 with
  the logo at 62% of the canvas (inside the 66dp/108dp safe zone) over a
  seamless blurred backdrop of itself, so no launcher mask clips the logo.
- mipmap-anydpi-v26/ic_launcher.xml and ic_launcher_round.xml: adaptive icons
  with that bitmap as the background layer and a transparent foreground.
- AndroidManifest.xml: icon=@mipmap/ic_launcher, roundIcon=@mipmap/ic_launcher_round.
- Delete the retired vectors (ic_launcher_background/foreground.xml) and the
  misplaced mipmap-anydpi-v26/onionwire_app_icon.png.
2026-09-14 22:16:24 -04:00
33d5d080a4 Merge pull request 'docs(readme): document v0.2.1 wallet create/import, tip frame, F6 screen, SDK payment surface' (#72) from docs/readme-v0.2.1-wallet into main
Reviewed-on: #72
2026-09-14 21:11:15 +00:00
agent
e3a051a980
docs(readme): document v0.2.1 wallet create/import, tip frame, F6 screen, SDK payment surface
All checks were successful
ci / test (pull_request) Successful in 3m54s
ci / sdk (pull_request) Successful in 56s
android-ci / android (pull_request) Successful in 7m37s
2026-09-14 17:00:46 -04:00
agent
2141a6e9a5
fix(ci): resolve conflict markers left in scripts/publish-release.sh
The file reached main with an unresolved stash conflict at the auth_json
helper (line 24) and the asset-upload curl (line 133). Both publish jobs
run it directly, so every release/android-release publish dies with
"line 24: syntax error near unexpected token <<<". Keep the HTTP Basic
auth_json with the CR strip, and the single-line -X POST -u asset upload.
2026-09-14 13:22:53 -04:00
8e97b12f73 Merge pull request 'ci(android): build the APK+AAR on android/, src/ and crates/ changes' (#71) from ci/android-verify into main
All checks were successful
android-ci / android (push) Successful in 7m58s
Reviewed-on: #71
2026-09-14 16:25:55 +00:00
ef1248e730
ci(android): build the APK+AAR on android/, src/ and crates/ changes
All checks were successful
android-ci / android (pull_request) Successful in 9m30s
An android-only PR ran zero jobs: ci.yml's path allowlist never matches
android/**, and android-release.yml is dispatch-driven. #70 merged on an
empty check list.

android-ci.yml runs the release's gradle targets through the release's own
script (scripts/build-android-local.sh) on the amd64 runner, debug-signed,
publishing nothing. Same concurrency group and runner volumes as
android-release.yml so the build is warm and cannot collide with a release.
2026-09-14 12:16:40 -04:00
ce463e8568 Merge pull request 'android: one chat poller owned by the ViewModel, gated auto-scroll, Enter-to-send' (#70) from wt/t_7db68274 into main
Reviewed-on: #70
2026-09-14 16:01:34 +00:00
0150261da2 Merge branch 'main' into wt/t_7db68274 2026-09-14 15:51:43 +00:00
c169e41c33 Merge pull request 'android: wallet + roster bottom actions clipped while the keyboard is up' (#69) from wt/t_3a094045 into main
Reviewed-on: #69
2026-09-14 15:51:31 +00:00
77428789cb Merge branch 'main' into wt/t_3a094045 2026-09-14 15:51:24 +00:00
agent
04c993862c
android: one chat poller owned by the ViewModel, gated auto-scroll, Enter-to-send
The chat screen owned a LaunchedEffect(Unit) that fetched maxAttempts once and
then called loadMessages/loadOutbox every 2s forever, fed by three suspend
lambdas from MainActivity — one SDK poller per composition. The cadence now
lives in WireViewModel: openChat(peer) starts one 2s loop in viewModelScope
(closeChat stops it, re-entering the same peer is a no-op), exposed as
ChatState(messages, outbox, maxAttempts, error) and collected with
collectAsStateWithLifecycle. Same 2s cadence, maxAttempts read once, messages
and outbox refreshed together, load failures sticky on ChatState.error, and
the QUEUED notice unchanged; a send clears the load error.

Auto-scroll no longer steals the reader's place: the tail is followed only when
the last visible index is >= count - 2 (or the list has not filled yet), while
the user's own send still scrolls their message into view. The first fill keeps
its one jump to the bottom. A delivery-only change (same size) still does not
re-run the effect — documented in a comment rather than changed.

The composer keeps ImeAction.Send with maxLines = 4, documented as a deliberate
wrap limit rather than a newline affordance: the action key sends (hardware
Enter still inserts a newline inside the field).

No polling LaunchedEffect remains in ChatScreen.kt.
2026-09-14 02:54:33 -04:00
apk-dev
535a2baff9
android: wallet + roster bottom actions clipped while the keyboard is up
The two screens whose action row lives inside a non-scrollable Column could
not be un-covered by insets alone: the container had no scroll range at all.

- WalletScreen: root Column is now a verticalScroll viewport that consumes
  systemBars ∪ ime itself (screenContentInsets()) before the scroll, paired
  with Scaffold(contentWindowInsets = 0). The nested LazyColumn becomes a
  plain Column (a lazy list cannot be measured inside a scroll container with
  unbounded height) and the weight(1f) bottom spacer goes with it: a weighted
  spacer cannot live in a scrollable Column.
- RosterScreen: same inset treatment; the friends LazyColumn drops
  fillMaxSize() for weight(1f) so the wipe-confirm strip above it keeps its
  height when the IME shrinks the window.
- Insets.kt is PR #67's helper, taken verbatim (this branch does not carry #67).

Stacked on PR #67 (wt/chat-ime-insets, 08381c4) for ui/Insets.kt.
2026-09-14 02:05:03 -04:00
f95e058041 Merge pull request 'android: copy the invite with LocalClipboard, not the deprecated LocalClipboardManager' (#68) from wt/t_f495ce39 into main
Reviewed-on: #68
2026-09-14 05:01:36 +00:00
agent
9c36814eb3
android: copy the invite with LocalClipboard, not the deprecated LocalClipboardManager
LocalClipboardManager is deprecated in compose ui 1.10; the warning was the
only one in :app:compileDebugKotlin. Switch ShareInviteScreen to
LocalClipboard.setClipEntry(ClipEntry(ClipData.newPlainText(...))) on a
rememberCoroutineScope, since the new API is suspend. Same text, same
copied-state flip, same label, no permission change.
2026-09-14 00:49:49 -04:00
ba261a86eb Merge pull request 'android: keep the chat composer above the keyboard (ime insets)' (#67) from wt/chat-ime-insets into main
Reviewed-on: #67
2026-09-14 04:34:11 +00:00
agent
08381c47be
android: keep the chat composer above the keyboard (ime insets)
enableEdgeToEdge() sets decorFitsSystemWindows=false, so on API 30+ the framework
no longer resizes the window for the soft keyboard. The manifest's
android:windowSoftInputMode="adjustResize" therefore has nothing to resize and the
IME arrives as an unconsumed window inset; Scaffold's contentWindowInsets covers
systemBars only. Result: the composer row, its Send button and the typed body were
drawn underneath the keyboard and only reachable by dismissing it.

- ui/Insets.kt (new): screenContentInsets() applies systemBars ∪ ime once, at the
  screen's content root. union is per-side max, so the keyboard and the navigation
  bar are never summed; the Top side is excluded because a Scaffold's pad.top is
  already the app bar's measured height (the app bar carries its own status-bar
  inset). @Composable because WindowInsets.ime is a composable read.
- ChatScreen: Scaffold(contentWindowInsets = 0) plus the root consuming the inset;
  the body region holds weight(1f) in every branch (loading and empty included) so
  the composer can never be squeezed off the bottom; Send is always drawn instead
  of being swapped for a spinner (no layout jump under the thumb); the field sets
  ImeAction.Send so the keyboard's own action key sends; focus returns to the
  field after a send; testTag on the composer/input/send.
- InviteScreens (both screens) and RotateScreen: same inset handoff, so the
  Verify / Approve / confirm buttons under a text field stay reachable by scrolling.
- UnlockScreen: safeDrawingPadding(). It had no system-bar insets at all (title
  drawn under the status bar) and its Open button sat under the keyboard while a
  passphrase was being typed.

Verified on emulator-5554 (ow35, x86_64, API 35) with the debug build whose sources
are byte-identical to this commit:

  element        keyboard closed   keyboard open
  composer       y=2232            y=1380
  Send button    y=2253            y=1433
  keyboard top   -                 y≈1500

mInputShown=true while the draft text was visible; the message sent both via the
Send button and via the keyboard's action key (paper-plane = ImeAction.Send), each
landing with the ✓✓ delivery marker. :app:testDebugUnitTest green.

Note: no CI job covers this — ci.yml's path allowlist is src/**, crates/**,
tests/**, Cargo.*, so an android-only change runs nothing, and android-release.yml
only fires on v*.*.* tags.
2026-09-14 00:26:14 -04:00
87fc3ca1b9 Merge pull request 'wallet: in-app create/import (create takes no key) + opt-in spend policy' (#66) from feat/wallet-create-import into main
All checks were successful
ci / test (push) Successful in 3m54s
ci / sdk (push) Successful in 57s
Reviewed-on: #66
2026-09-14 03:31:19 +00:00
Lance Walters
cf0a517cd2
wallet: create/import in-app (no key paste on create) + opt-in spend
All checks were successful
ci / test (pull_request) Successful in 4m15s
ci / sdk (pull_request) Successful in 1m12s
/ wallet create generates a wallet on the RPC and shows the 25-word seed
once for backup; /wallet import is the only path that takes an existing
seed, and it is collected on a dedicated screen so it never reaches the
composer line or chat history.

Threat model now states the real policy: payments are opt-in, default is
no spend key, spend is a local authority at create/restore, and the chain
source is the user's choice (spawned local monerod or a daemon address
they supply). WALLET.md and README follow.

Tests: canned-RPC create/restore, slash parse, help overlay.
2026-09-13 23:25:25 -04:00