v0.0.19: contact list + message history (local, persistent)

Storage:
- contacts sled tree: auto-tracked on send/receive
  - fingerprint, alias, first_seen, last_seen, message_count
- history sled tree: all messages stored locally
  - key: hist:<peer_fp>:<timestamp>:<uuid> for ordered scan
  - sender, text, is_self, timestamp

TUI commands:
- /contacts or /c — list all contacts (sorted by most recent)
  Shows alias, fingerprint, message count
- /history or /h — show last 50 messages with current peer
- /h <fingerprint> — show history with specific peer

Auto-tracking:
- On send: touch_contact + store_message (is_self=true)
- On receive: touch_contact + store_message (is_self=false)
- Both KeyExchange and Message variants tracked

Backup: contacts + history included in export_all (encrypted backup).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-27 20:16:22 +04:00
parent 741e6fbcfd
commit 1601decf33
4 changed files with 160 additions and 7 deletions

10
warzone/Cargo.lock generated
View File

@@ -2789,7 +2789,7 @@ dependencies = [
[[package]]
name = "warzone-client"
version = "0.0.17"
version = "0.0.18"
dependencies = [
"anyhow",
"argon2",
@@ -2822,7 +2822,7 @@ dependencies = [
[[package]]
name = "warzone-mule"
version = "0.0.17"
version = "0.0.18"
dependencies = [
"anyhow",
"clap",
@@ -2831,7 +2831,7 @@ dependencies = [
[[package]]
name = "warzone-protocol"
version = "0.0.17"
version = "0.0.18"
dependencies = [
"base64",
"bincode",
@@ -2856,7 +2856,7 @@ dependencies = [
[[package]]
name = "warzone-server"
version = "0.0.17"
version = "0.0.18"
dependencies = [
"anyhow",
"axum",
@@ -2883,7 +2883,7 @@ dependencies = [
[[package]]
name = "warzone-wasm"
version = "0.0.17"
version = "0.0.18"
dependencies = [
"base64",
"bincode",