feat(tui): add MLS epoch indicator, online/offline status, and 9 rendering tests

Enhance v2 TUI with connected/mls_epoch state fields, colored connection
indicator in status bar, MLS epoch display, and wildcard match for new
SDK event variants. Add 9 tests using ratatui TestBackend covering
rendering, navigation, scroll bounds, status bar content, and unread
count display. Also fix rand 0.8 compat issue in v2_repl.rs.
This commit is contained in:
2026-03-04 20:52:27 +01:00
parent 372dd67a3b
commit f667281831
2 changed files with 184 additions and 10 deletions

View File

@@ -937,8 +937,9 @@ async fn do_devices(client: &mut QpqClient, args: &str) -> anyhow::Result<()> {
}
let rpc = client.rpc().map_err(|e| anyhow::anyhow!("{e}"))?;
// Generate a random device ID (16 bytes).
use rand::Rng;
let dev_id: Vec<u8> = rand::rng().random::<[u8; 16]>().to_vec();
use rand::RngCore;
let mut dev_id = vec![0u8; 16];
rand::rngs::OsRng.fill_bytes(&mut dev_id);
let was_new =
quicproquo_sdk::devices::register_device(rpc, &dev_id, name).await?;
if was_new {