tui: F7 becomes the node-setup screen, and F6 goes back to being the wallet
The chain source was reachable from three places and configured from none of them properly: `F6`'s inline `1`/`2`/`3` picker wrote only the in-process choice, the `F9` menu showed the state and named keys that edited it, and `Node::set_local_monerod` / `set_remote_daemon` / `set_receive_only` — the only way to point the app at a Monero node — had **no TUI caller at all** (Kotlin only). `wallet::NOT_CONFIGURED_MSG` told users to "open F7" and there was no F7. F7 (`WalletSetupConfig`) is now the one screen that sets up the node: - The `datadir` row is new and editable. `Node::set_local_monerod_at` takes the path; `set_local_monerod` delegates with the derived default, so an existing install keeps the store it already has. An empty datadir is refused rather than silently replaced — a store that moved unasked looks like a vanished chain and resyncs somewhere the user did not choose. - The `network` row is new: it carries the Cuprate mainnet/testnet choice that `F6`'s `1`/`2`/`3` used to own, so deleting those keys loses nothing. Mainnet reads `unvalidated` before it is picked. - A `NODE` section shows the live `Node::wallet_child_status` line (state, chain source, `sync h/t`, last error) and the last save/test answer. It is the node's answer, never the draft above it, and `Ctrl-R` re-reads it. - `Ctrl-S` saves and starts the child (the daemon, and `monerod` for a local source); `Ctrl-X` stops it. Both go through the same `Node::start_wallet_child` / `stop_wallet_child` the app's own lifecycle uses, so a start that lands on a wallet with no stored passphrase still reaches the unlock prompt. F6 loses the chain picker and the `s`/`x`/`p` child keys — it is the wallet again (receive, balance, transfers, create/import) — and its footer points at `F7 node`. The `F9` menu's `child`/`sync` rows now name `F7 ctrl-s/x` and `F7 ctrl-r` instead of keys that no longer exist on F6. `set_cuprate_chain` and the `p` probe handler are deleted rather than left dead. The node's own keys are named in the body, on the section they act on: at 80 columns the footer has room for one group and the status line already spends half the width, which is the same reason the login row names `Ctrl-U`. Tests: six new cases in `src/tui.rs`'s `wallet_setup_config_tests` drive the real key path and the real node — the typed datadir reaching `ChainSource::Local`, an empty one being refused with nothing written, the live row on open, `Ctrl-S` saving then reporting the node's own refusal, the in-process network pick reaching the store, and F6 no longer owning keys it does not handle. `tests/tui_spec.rs`'s menu-key check now asserts the F7 keys; the F6 keys it asserted before no longer work.
This commit is contained in:
parent
a37712f3af
commit
5cdfbacf10
6 changed files with 509 additions and 106 deletions
|
|
@ -1030,11 +1030,13 @@ fn wallets_settings_menu_lists_both_groups_and_every_key() {
|
|||
);
|
||||
}
|
||||
// Every actionable row names the key or command that fires it, including the
|
||||
// F6 wallet screen's own keys, so the menu teaches the shortcuts it sits
|
||||
// beside instead of hiding them.
|
||||
// keys that now live on F7, so the menu teaches the shortcuts it sits beside
|
||||
// instead of hiding them. A row must never name a key that no longer works:
|
||||
// `F6 s/x` and `F6 p` moved to `F7 ctrl-s/x` and `F7 ctrl-r` with the node
|
||||
// screen, and naming the dead keys here is how they would keep looking live.
|
||||
for key in [
|
||||
"F6 s/x",
|
||||
"F6 p",
|
||||
"F7 ctrl-s/x",
|
||||
"F7 ctrl-r",
|
||||
"c copy F6 r",
|
||||
"F6 c",
|
||||
"F6 i",
|
||||
|
|
|
|||
Loading…
Reference in a new issue