fix(tui): do not freeze the UI on chat send
Some checks failed
ci / test (pull_request) Failing after 1s

Enter used block_on(Node::send), which retries for 180s on the TUI
thread so event::read never ran. Spawn send on the runtime, poll keys
at 100ms, show sending/sent/send failed on the footer.
This commit is contained in:
Sirius DevOps 2026-09-11 22:33:55 -04:00
commit 7d8363a761
No known key found for this signature in database
3 changed files with 75 additions and 7 deletions

View file

@ -110,7 +110,7 @@ or `cargo run --release`.
On start you are prompted for a store passphrase (echo off, like other CLI passwords) or set `ONIONWIRE_STORE_PASSPHRASE`. Empty passphrase is rejected; a wrong passphrase does not open chat. Then you should see `onionwire: bootstrapping Arti…` on stderr. Directory bootstrap is usually under a minute; the onion is ready once a probe connect works (combined Arti status may still say Bootstrapping). Fail closed at 360s. Data lives in `ONIONWIRE_HOME` if set, otherwise `~/.local/share/onionwire/` (`onionwire.db` + Arti state, mode 0700). First open creates an ed25519 identity key. That key **is** you.
Then `F2` to share your invite, `F3` to paste a friend’s. Mouse-select the `onionwire:v1:…` line to copy. Highlight them in the roster, type in the composer, Enter to send. Fail closed: if their onion is down, send fails — no outbox.
Then `F2` to share your invite, `F3` to paste a friend’s. Mouse-select the `onionwire:v1:…` line to copy. Highlight them in the roster, type in the composer, Enter to send. Footer shows `sending`, then `sent` or `send failed` — the TUI stays usable while Tor retries (up to 180s). Fail closed: if their onion is down, send fails — no outbox.
## Friends are keys