TUI chat interface with real-time E2E encrypted messaging

`warzone chat [peer-fp] -s <server>` launches an interactive terminal UI:
- Header: your fingerprint, peer fingerprint, server URL
- Message area: color-coded (green=you, yellow=peer, cyan=system)
- Input bar with cursor at bottom
- Background polling every 2s for incoming messages
- Full X3DH + Double Ratchet on send/receive
- Session persistence across messages

Commands in TUI:
- /peer <fingerprint> — set who you're chatting with
- /info — show your fingerprint
- /quit or /q or Esc or Ctrl+C — exit

Usage:
  warzone chat "6baf:6d0b:4541:9cae:f06b:83da:69bc:05ee" -s http://localhost:7700

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-26 22:59:08 +04:00
parent 6d4a09a0c6
commit a298c9430c
3 changed files with 510 additions and 6 deletions

View File

@@ -1,3 +1,3 @@
// TUI scaffold — ratatui app.
// TODO: implement in Phase 1 step 10.
pub mod app;
pub use app::run_tui;