feat(chat): show a progress hint while a tier-3 message is still arriving

Until now an incoming large message was invisible until every part landed.
ChatService::pendingLargeMessages() exposes the in-progress tier-3 receives
(conversation, chunks gathered / chunks needed) from the reassembly buffer, and
the chat tab renders a subtle centred line below the thread — "Receiving a large
message…  24 / 36 parts" — that updates each scan and disappears when the message
completes and surfaces as an ordinary bubble. A complete-but-withheld (sensitive
vault locked) group is not reported as incoming.

New string chat_receiving_large (English; 8 locales fall back). Unit test extended:
after the first slice the receive is reported in progress; after the whole message
arrives it is no longer pending.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 12:47:37 -05:00
co-authored by Claude Opus 4.8
parent acb6446076
commit dba97c8b35
5 changed files with 51 additions and 1 deletions
+10
View File
@@ -100,6 +100,16 @@ public:
// local vault key; while that key is absent its messages are withheld from the store on ingest/load.
bool isConversationSensitive(const std::string& conversationId) const;
// Larger-messages tier 3: a message still being received across transactions (some chunks arrived,
// not yet all). Lets the UI show an "incoming large message — N of M parts" hint until it completes
// and surfaces as an ordinary message. One entry per in-progress message; empty when none.
struct Tier3Progress {
std::string conversation_id;
int received = 0; // chunks gathered so far
int total = 0; // chunks the whole message needs
};
std::vector<Tier3Progress> pendingLargeMessages() const;
// --- Outgoing (compose) ---
// My chat public key (hex), or "" without an identity — goes in an outgoing header's "p".
std::string identityPublicKeyHex() const;