Prevent same-second outgoing collision now that we can send faster.

Also add pending ack tracking
This commit is contained in:
Jack Kingsman
2026-03-13 21:43:50 -07:00
parent bafea6a172
commit f41c7756d3
7 changed files with 487 additions and 133 deletions
+2 -3
View File
@@ -51,9 +51,8 @@ CREATE TABLE IF NOT EXISTS messages (
sender_name TEXT,
sender_key TEXT
-- Deduplication: identical text + timestamp in the same conversation is treated as a
-- mesh echo/repeat. Second-precision timestamps mean two intentional identical messages
-- within the same second would collide, but this is not feasible in practice — LoRa
-- transmission takes several seconds per message, and the UI clears the input on send.
-- mesh echo/repeat. Outgoing sends allocate a collision-free sender_timestamp before
-- transmit so legitimate repeat sends do not collide with this index.
-- Enforced via idx_messages_dedup_null_safe (unique index) rather than a table constraint
-- to avoid the storage overhead of SQLite's autoindex duplicating every message text.
);