- Add 'F6 h' to tests/tui_chrome.rs needle list (help_overlay_text already
documents the history binding; test must assert it)
- Add dump_history_pr_frames to tests/tui_frames.rs: empty, mixed
verified/unverified list, detail view, and hostile memo (C0 + bidi) at
80x24 and 120x40
Signed-off-by: tui-design <tui-design@hermes>
Add Screen::History with draw_history, history_row_text, history_detail.
- Per-friend payment list: direction marker, amount, verified state, age, txid
- Enter opens detail view; Esc closes
- h key from main + wallet opens history via Node::list_payments
- Empty state: 'no payments with this friend yet'
- ASCII fallback: drops ✓/✗ glyphs, uses words only
- Peer text (memo, address) sanitized via display_text
- Tests: 5 new in tui_spec.rs (row text, detail, empty, ascii), 2 frame dumps in tui_frames.rs
Signed-off-by: tui-design <tui-design@hermes>
- Badge now '[!] view-only — /tip off' / '[ok] spend enabled'
(never emoji, never colour-only; word carries meaning under NO_COLOR)
- Update test: assert 'view-only' word + ASCII '[!]' glyph present
- Add wallet frame dumps to dump_audit_frames: receive-only,
local synced, local syncing, remote unreachable, view-only badge,
QR modal — at 80x24 and 120x40
- Add wallet_screen_no_line_exceeds_frame_at_80_and_120: asserts
every rendered line stays within frame width (chars_count metric)
- Add wallet_view_only_badge_renders_at_80_and_120: badge present
and within width at both sizes
Tests: 21 tui_frames, 19 tui_chrome, 23 tui_spec all green
Clippy: clean --locked --all-targets -- -D warnings
- Screen::Wallet.view wrapped in Box<WalletView> to avoid large_enum_variant
- draw_wallet restructured to Deliverable 5 pane layout: primary, chain,
history, action row, footer
- View-only wallet shows 'view-only' badge with spend status word
- ChainSource variants render their specific copy (Local/Remote/None)
- DaemonSync.reachable=false renders 'sync: unknown' with no balance claim
- Address copy via OSC 52 escape sequence; 'y' key; fallback hint on screen
- QR modal resized to fit 80x24 without clipping
- wallet_screen_at_with() test helper for copy_note parameter
- 33 new tests covering receive-only, local synced/syncing, remote
unreachable, view-only badge, QR modal, address copy escape sequence
All 52 TUI tests pass (10 tui_frames + 19 tui_chrome + 23 tui_spec).
Clippy clean on lib and all three test targets.
Re-exposes the existing Store::list_payments as one typed read method so
src/tui.rs can render a friend's payment history without ever touching the
store. Maps the store error to Result<_, String> exactly like the
neighbouring list_messages / wallet_recent_transfers, and returns
store::Payment as-is (id, dir, kind, amount_atomic, address, memo, txid,
verified, created_at).
Read-only: no schema change, no migration, no new frame, no new column, no
docs/PROTOCOL.md change, and no store handle becomes reachable from the TUI.
An unknown friend is empty history (Ok(vec![])), not an error.
Test placement deviates from the card, deliberately: it lives in
src/node.rs's #[cfg(test)] mod tests instead of tests/pay.rs, because Node
has no constructor that avoids Tor (Node::start* is the only public one) and
ingest_receipt is private, so tests/pay.rs cannot build a Node at all. The
test uses an unbootstrapped Arti client plus a null deliverer over a real
encrypted store in a temp dir, writes the outbound row directly and drives
the inbound row through the node's own ingest_receipt.
Add the TUI control plane for the wallet child and chain source,
stacked on the wallet-child-lifecycle card:
- Chain-source picker (s): receive-only / local monerod / remote daemon
with daemon-address entry + trust-shift warning for clearnet hosts
- Node control (n): start/stop the app-owned monero-wallet-rpc child,
with fail-closed onion+SOCKS guard in the status line
- Wallet screen refreshes after picker/child changes, shows sync progress
from the daemon and the chain-source/free-space/storage status line
- Honest spend guard: wallet view reflects real WalletStatus + Readiness
so balance/transfer rendering only claims authority when the daemon is
reachable, never while the child is silent
- Help overlay + footer hints updated for the new 's'/'n' keys
- Tests: chain-source round-trip through sealed record, saved-source
starts the child, parse_source handles the 'none' kind
The only input path for the wallet was env. Add the same three remote-mode
fields as stored config so the F7 screen can set them and headless runs read
one source of truth:
- `wallet_config` table in the encrypted store (one row; the login is sealed
with the store data key under `onionwire/wallet-config/v1`, on top of
SQLCipher). Empty URL clears it. `Store::load_wallet_config` /
`save_wallet_config`.
- `WalletConfig { rpc_url, rpc_login: Zeroizing<String>, no_spend }` with a
redacting `Debug`; `Wallet::from_config`, and `Wallet::for_boot` which
prefers stored config, falls back to env, and refuses to dial a bad stored
endpoint. Node::start* now reads the store before constructing the wallet.
- `WalletStatus { configured, connected, last_error, balance_line,
receive_address }`: `connected` only ever comes from a probe
(`Wallet::status`, get_address + get_balance); config alone leaves it false.
`Node::wallet_status` is the cheap draw-path read, `wallet_refresh` the
probe that folds into it.
- One-shot `Wallet::ping(rpc_url, rpc_login) -> PingResult { ok, status,
error }` for the Test-connection button: same loopback/digest rules, errors
redacted and capped.
- `readiness(configured, connected, no_spend, is_tip) -> Readiness` plus
`Node::wallet_readiness` (async, block_on-friendly): not configured →
NOT_CONFIGURED_MSG; /tip on a no-spend wallet → VIEW_ONLY_MSG before any
dial; configured but not connected → NOT_CONNECTED_MSG; else ready.
- `Node::wallet_save_config` persists, validates first, then re-reads so the
live wallet and snapshot follow a Save without a restart.
- `Node::wallet` is now a Mutex<Wallet> (cloned out before each await) so the
wallet can be re-pointed mid-session.
Local-mode fields stay reserved: the child lifecycle is t_69ce8e46 and is not
wired here. docs/WALLET.md documents the stored config, boot precedence and
the exact guard copy.
Tests: 38 in tests/wallet.rs including exact-refusal-copy, boot precedence,
sealed-on-disk login, ping sanitization and connected-only-after-probe.
The app now owns monero-wallet-rpc (and monerod when the chain source is
local) instead of requiring the user to start them and export
ONIONWIRE_WALLET_RPC.
- ChainSource enum: None / Local { monerod_bin, datadir } / Remote { host,
port }. No default remote node; Remote is only constructed from explicit
user input. A .onion Remote is refused without a SOCKS proxy (separate
card).
- WalletChild in src/wallet_child.rs spawns monero-wallet-rpc with
--rpc-bind-ip 127.0.0.1, a random free loopback port, generated
--rpc-login, and --wallet-dir /wallet; monerod too for a
local source. --trusted-daemon is never passed.
- Generated RPC creds are sealed in the encrypted SQLCipher store
(wallet_child table, AEAD on top of whole-db encryption), never a
plaintext file. The Wallet client is built from the generated loopback
URL, not from_env.
- Readiness predicate: chain_ready() requires synchronized==true, height>0,
height>=target_height; can_spend() and can_verify_receipts() gate on it.
Unsynced -> receipts stay verified=0, spend refused with a clear message.
- Backend-aware timeouts: local management calls keep 5s; chain-dependent
calls (get_info, get_transfers, transfer) get 60s (CHAIN_RPC_TIMEOUT),
because a first sync or a remote daemon outlasts 5s and a 5s cap there
is what left receipts permanently unverified.
- node.rs ingest_receipt gates on can_verify_receipts() instead of
configured() alone.
- docs/WALLET.md rewritten for the child lifecycle + chain source.
Base: feat/wallet-create-import (PR #66). Do not rebase onto main.
Co-Authored-By: Hermes Agent <agent@local>
/ 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.
Expose wallet balance/address/transfers plus one-shot invoice and tip on
the UniFFI SDK. Wire a Compose wallet route (QR, composers) without dropping
wipe-chat. Ignore machine-local android/.cargo NDK paths.
README still claimed "peer down → send fails / no outbox" after the local
chat outbox, TUI/Android delivery markers, SDK SendState/outbox rows,
view-only wallet switch, zeroize, Keystore-wrapped passphrase, and
foreground keep-alive all landed on main. Align the operator-facing
summary with PROTOCOL.md / THREAT_MODEL.md / TUI.md / WALLET.md:
- intro + first-run: local outbox for chat, fail-closed for fil/rcp
- replace Fail closed section with Local outbox (chat) and fail closed
- Monero: prefer view-only + ONIONWIRE_WALLET_NO_SPEND
- seized laptop: zeroize + pending outbox rows in the same store
- Android: SendState/outbox rows, delivery UI, FGS keep-alive, Keystore;
android-release is dispatch-only
- Not in v1: ban is server-side outbox only
Consumes the SDK surface from PR #58 (`Wire.outbox(pubkeyHex)` →
`OutboxRow { messageId, status, attempts, nextAttemptAt, lastError }` and
`outboxMaxAttempts()`): a queued chat row now says *why* it is still queued
instead of a flat `queued`.
* `OutboxDetail.kt` — `retryInText` mirrors `src/tui.rs::retry_in_text`
(`<= 0` → `retry now`; `< 60` → `retry {n}s`; else `retry {ceil-minutes}m`),
and `outboxDetails` joins the SDK's rows onto the chat rows. The denominator
is the core's `outboxMaxAttempts()`/`Rust` budget, fetched once — never 8.
* A terminal `"failed"` row keeps the marker's own `failed: <reason>` and gets
**no** countdown: `nextAttemptAt` on a failed row is the last time it was
scheduled for, so a countdown there would promise an attempt that never comes.
`"sending"` stays bare, matching the TUI.
* `ChatScreen` polls the outbox rows on the same 2s cadence as the bodies and
renders the countdown against an injectable `nowSeconds` (the store holds an
absolute instant, the app computes the age).
* The join is positional — `ChatMessage` carries no `messages.id` — and
fail-closed: mismatched row counts, an unknown status, or a status that
contradicts the one the SDK resolved for that message drops every detail and
leaves the flat markers. `ChatMessage.id` would remove the positional part;
filed as follow-up.
* `OutboxDetailTest` (17 tests) asserts the three `retry_in_text` buckets, the
`queued (try 3/8, retry 45s)` wording, that a failed row shows no countdown,
that the denominator comes from the caller, and the three fail-closed cases.
32 unit tests, 0 failures.
Android base: PR #56 (`feat/android-outbox-state`, t_f46a9863) — the Android
half of the #52/#56 duplicate pair, which is not merged here. SDK base: PR #58
on PR #51.
`OutboxRow::message_id` documents itself as *the* join key (the
`messages.id` a `ChatMessage` belongs to), but the record carried no id,
so the Android client could only pair the two lists positionally.
Add `ChatMessage.id: i64` as the first field, copied straight from the
`messages.id` the store already selects. Additive over UniFFI: Kotlin
consumers only gain a constructor field and the bindings regenerate.
The id mapping moves into a `chat_message` helper so the join property is
testable without a Node: the new test builds a real store, queues an
outbox row for a message, and asserts the id on the message equals the
`message_id` the outbox row reports for that same row.
# Conflicts:
# crates/onionwire-sdk/src/lib.rs
The TUI can say why a queued row is still queued ('queued (try n/8,
retry 45s)') because it reads OutboxEntry::attempts and next_attempt_at
directly. The SDK exposed neither: ChatMessage.delivery is a flat
'queued'/'sending'/'failed: <reason>' string and Wire had no outbox
accessor, so an Android chat row could only invent a countdown.
Adds OutboxRow { message_id, status, attempts, next_attempt_at,
last_error } and Wire::outbox(pubkey_hex) over Node::outbox_pending, plus
outbox_max_attempts() so the client renders 'try n/8' against the core's
own budget instead of a hardcoded 8. Additive: Wire::send() and
ChatMessage.delivery are untouched.
# Conflicts:
# crates/onionwire-sdk/src/lib.rs
Renders the core's own Queued/Sending/Sent/Failed per outgoing row instead of
implying a message either sent or did not: a clock for queued, a progress
spinner for sending, a double-check for delivered and an error marker with the
short reason for a terminal failure, plus a chat-level `N queued` footer that
keeps a fail-closed `send failed: <reason>` statement on screen.
States are read verbatim from ChatMessage.delivery (Node::outbox_status_of_message
over UniFFI) — no parallel enum, nothing guessed from a timeout. A missing or
unrecognised status renders as queued, never delivered.
WireViewModel.send() now returns the SDK SendState instead of dropping it, so the
composer can say a send is queued rather than pretend it landed, and the empty-chat
copy no longer claims 'there is no outbox in v1'.
Accessibility: every marker carries an explicit contentDescription sentence and a
test tag; the glyph is never what a screen reader announces.
Node::send() became Result<OutboxStatus, String> in the local-outbox work,
which broke crates/onionwire-sdk — and nothing noticed, because the SDK is a
separate cargo workspace that root CI never compiles.
- Wire::send() returns WResult<SendState> (Sent | Queued)
- ChatMessage.delivery for outgoing rows
- New sdk job in ci.yml (own target volume; rustls workspace)
- Refresh SDK Cargo.lock + README (SQLCipher / outbox facts)
Rebased onto main after #50/#54: no src/node.rs changes (WAL checkpoint lives
in Store now). README at-rest claims kept from #55.
Neither decoupled trigger fires on Forgejo 10.0.3: a tag created by the CI
(API or git push) is an Actions-user push and is not dispatched back into
Actions, and reusable workflows need Forgejo >= 12. The release procedure is
therefore two dispatches: release.yml, then android-release with that tag.
POST /tags sends no push event on this Forgejo (the v0.2.0 tag it created
produced no android-release run), so the tag is now created locally and
pushed, which does fire android-release.yml's `push: tags` trigger.