tui: the F6 wallet screen draws its body in the slot that has the height #167
Loading…
Reference in a new issue
No description provided.
Delete branch "onionwire/t_716400d7-onionwire-tui-the-f6-wallet-screen-clips"
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?
What was wrong
draw_walletinsrc/tui.rssplit its area into five rows:Length(2)title,Min(4),Length(2),Length(3)help,Length(1). Theaddress/balance/recent transfersparagraph was rendered into theLength(2)slot, whose block borders consume both rows (inner height 0), while the tallMin(4)slot above it was never rendered into. Every install — configured or not — showed an empty wallet screen, and theno addressline had never been seen.Frame at 80x24 before (real
App::draw,TestBackend, bare install)What changed
The body is rendered into the slot that has the height. The dead
Length(2)row is dropped, so the layout isLength(2)title /Min(4)body /Length(3)help /Length(1)leftover: the body moves fromcols[2]tocols[1], the help line fromcols[3]tocols[2]. Nothing else indraw_walletmoves.Frame at 80x24 after, bare install
Frame at 80x24 after, filled receive address
Tests (through the real
App::draw,TestBackend)Added to
mod wallet_store_tests, which already had theframe_texthelper;frame_textnow delegates to a newframe_at(app, width, height)so each case is checked at 80x24, 120x40 and 200x60 where relevant. Two small inspect helpers (flattened,unwrapped) drop the pane border glyphs so a wrapped address still reads as one string without collapsing the whitespace that separates a heading from its value.the_wallet_screen_draws_its_body_on_a_bare_install—F6on an install with no wallet (the#161degrade path): the frame carriesaddress,no address,balance,recent transfers,(none)and the help line at 80x24 / 120x40 / 200x60, and never the node's refusal textno receive address — set profile xmr or ONIONWIRE_WALLET_RPC.the_wallet_screen_shows_the_filled_address— a profile address reaches the screen intact at 80x24 (it is wider than the pane, so the wrap is checked too) and 200x60.an_empty_transfer_list_still_names_recent_transfers— an empty history still rendersrecent transfers (none)at 80x24 and 120x40.RED first: with the fix absent, all three fail (
test result: FAILED. 8 passed; 3 failed), the first dump being exactly the empty frame quoted above. The doc comment onf6_on_a_bare_install_never_draws_the_error_and_states_the_way_forward, which said the body was a separate card, now points at these tests.Evidence
Known flake, not from this change: one full-suite run hit
tests/tui_spec.rs::wallets_settings_menu_frame_shows_the_shipped_footer(footer glyphokvs✓— the NO_COLOR env race that PR #164 fixes); it passed standalone and in the next full run on the same tree.rustfmt --edition 2024 --check src/tui.rsreports the same 16 inherited hunks asorigin/main(identical diff bodies), none of them in the added code.Scope, base and sequencing
Only
src/tui.rschanged (one commit, 143 insertions, 9 deletions).src/wallet.rs,src/node.rs,src/store.rs,src/main.rs,docs/,Cargo.tomluntouched.Open against
main. The card suggested basing on the still-open F7 branch (PR #165), but F7 does not touchdraw_walletat all (git diff origin/main...origin/onionwire/t_00c81aa6...touchesdraw_wallet_setup_configand the footers only), and the bare-installF6path this card's test 1 exercises needs the#161degrade that is onmainbut not yet on that branch.git merge-tree --write-tree HEAD origin/onionwire/t_00c81aa6-onionwire-tui-f7-setup-screen-configureexits 0, so this branch merges cleanly into F7's branch either way.No new crates, no network, no wallet RPC dial: the frames come from
TestBackendover the offline node harness the existing tests use.