tui: F7 wallet setup — configure the wallet RPC endpoint and chain source in-app #165
Loading…
Reference in a new issue
No description provided.
Delete branch "onionwire/t_00c81aa6-onionwire-tui-f7-setup-screen-configure"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
F7: wallet setup — the RPC endpoint and the chain source, on screen
Implements kanban
t_00c81aa6. Stacked on the parent branchonionwire/t_6aa61cf8-onionwire-tui-a-fresh-install-must-not-o(base verified through the API below).wallet::NOT_CONFIGURED_MSGhas always read "wallet not configured — open F7 to setit up, or set ONIONWIRE_WALLET_RPC", and there was no
F7. This makes the copy true.What landed
src/tui.rsFunctionKey::Setupbound toF7, live onMain,WalletsSettingsandPeerPayments— the same never-no-op invariantF9follows.Screen::WalletSetupConfig { state }holdingWalletSetupConfigState: a snapshot ofplain data taken once when the screen opens (
Node::wallet_config+Node::wallet_child_config), never a handle ontoNode, so a repaint cannot re-readthe store mid-frame.
url,login,view-only,chain,daemon,monerod,prune.Tab/Shift-Tabmove,spacetoggles/cycles,Entersaves,Ctrl-Ttests,Ctrl-Uclears the focused field,Escleaves.hidden · set/(none)), neverreaches the status row or a
PingResult::line(), andDebugfor the state is writtenby hand to redact it.
Ctrl-TcallsNode::wallet_test_connectionand shows the sanitized line. Savingnever dials.
ChainSourcecases. An untouched chain row isnot written, so opening F7 to fix a port cannot silently undo
F6's in-processchoice. Picking a remote daemon prints one line, in the project's voice, at the moment
the user takes on that trust:
a daemon you do not run sees this wallet's chain traffic.endpointrow of theF9menu now namesF7, the key that edits it.F7added tomain_footer_hintsand to the threepane_footer_hintsarms.src/node.rs— three setters mirroringset_in_process_cuprate, each building onself.wallet_child_config()and persisting throughset_wallet_child_config, sowallet_child.rs's validator stays the only validator:set_remote_daemon(host, port) -> Result<(), String>set_local_monerod(monerod_bin, prune) -> Result<(), String>(datadir underself.home.join("chain"))set_receive_only()—ChainSource::None, the way back to zero.Nothing in
src/wallet.rs,src/wallet_child.rs,src/store.rs,src/main.rs,Cargo.tomlorCargo.lockwas touched. No new crates.Docs —
docs/TUI.md(screens table,FunctionKeytable, the "There is noF7" paragraph, footer hints, theF9menu's "no on-screen editor" paragraph, plus anew
## Wallet setup (F7)section) anddocs/WALLET.md:210-213("No TUI screenwrites them. There is no
F7.") now describe what ships.Evidence
15 new tests in
tui::wallet_setup_config_testsdrive the real key path and read theframes the app actually paints; 4 new tests in
src/node.rs::testscover the settersand the save path:
Frames through the real
App::drawpath80x24:
120x40 (body identical, full footer):
Footer hint widths (cells, measured in
cell_width=Span::width)main_footer_hintspane_footer_hints(Composer)pane_footer_hints(Roster)pane_footer_hints(Chat)The status line is drawn from the focused pane's hint, and the compactor drops
tokens from the front, so
F7had to go in bothmain_footer_hintsand the pane arms —and the neighbouring
F9lost its word (F9 settings→F9) to pay for it. Therendered 80-column Main footer is asserted to contain
F7and to fit 80 columns bythe_footer_offers_f7_where_the_screen_is_reachable.The F7 screen's own hint is
Esc back Enter save Ctrl-T test(33 cells + the statusline's
? help). At 80 columns TOR + fingerprint + locator leave only ~26 cells, so thefirst draft (
Enter save Ctrl-T test Tab field Ctrl-U clear Esc back, 66 cells) showedonly its tail —
Ctrl-U clear Esc back— and had to be cut down; the two keys a saveneeds are now the tail that survives.
Taband?are universal, andCtrl-Uis namedon the login row it clears.
Not verified
monero-wallet-rpcdial: there is no wallet in this environment, soCtrl-Tis exercised only against the harness's disabled wallet (the test asserts theanswer is non-empty and carries no secret, not that it says
connected).monerodor Cuprate child start:set_local_monerod/set_in_process_cupratepersistence is tested, process start is not..oniondaemon:ChainSource::is_onionand the SOCKS child path were nottouched, and the remote case is tested for storage, not for a dial.