Phase 1 of the Cuprate integration strategy: the chain daemon can run inside
the OnionWire process instead of a spawned `monerod`. `monero-wallet-rpc` is
unchanged — it still dials the unrestricted loopback RPC on 127.0.0.1:18081,
which is the address `WalletChild::daemon_address` already returned — so no
wallet-layer code moves.
- Cargo.toml: `cuprated` (git, rev 4f8fcd1b) + `toml`, both optional, behind a
`cuprate-daemon` feature that is OFF by default. Cuprate's own `arti` feature
stays off: its arti-client 0.44 cannot unify with this crate's 0.46, and the
in-process daemon is clearnet-only, so this keeps one Tor stack in the
process. `Cargo.lock` gains the graph; no arti 0.44 appears in it.
- src/cuprate.rs (new): `CuprateNode` builds the cuprated config as TOML
(testnet, unrestricted RPC on loopback, restricted RPC disabled, inbound P2P
off), launches it, and owns it. Dropping the value is the teardown;
`shutdown()` is called before the drop so the services can drain. The type
exists in every build: without the feature `launch` fails with the feature
name instead of silently doing nothing, so the chain-source type, its stored
record and the picker do not fork on a cargo feature.
- src/wallet.rs: `ChainSource::InProcessCuprate { datadir }`.
- src/wallet_child.rs: starts/holds/stops the node, serializes the choice as
`kind = "cuprate"`, and adds `chain_datadir` so the storage gate covers both
local sources. It takes the app's Tokio handle (`with_runtime`): the launch is
async and `start()` runs on the TUI's blocking thread.
- src/node.rs: `wallet_child_start(runtime)`, `default_in_process_chain_source`.
- src/tui.rs: a fourth picker row, its testnet caveat, the chain block copy, and
a stop of the app-owned children on the quit path so they are not orphaned.
- tests/wallet.rs: a `cuprate-daemon`-gated end-to-end test that launches the
node and drives get_info / get_height / get_block through the typed daemon
client, including the above-the-tip 500 and the listener closing on drop.
- docs/WALLET.md: the fourth chain source, the feature flag, the +5.6 MB
stripped overhead, and the two limits (testnet only, no Tor in the chain
path).
Also repaired tests/tui_spec.rs, which the parent commit left un-compilable
(the Phase 2a commit had dropped all but the new imports and four new tests,
1221 lines of body); it is restored from the pre-breakage version, with the
Phase 2a imports and tests re-applied.
- 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.
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