From 473d6c2558c72a8dbbcf591e387c080baf2f531a Mon Sep 17 00:00:00 2001
From: pepper <3782201+rohvani@users.noreply.github.com>
Date: Tue, 11 Aug 2026 21:02:47 -0400
Subject: Implement ChatService persistent history stitching
Synchronize eligible direct IM conversations through the ChatService
capabilities into durable per-resident CSV archives. Validate deterministic
conversation IDs, UUIDv1 ordering, complete discovery and history payloads,
and the account-wide deletion cutoff before a bounded pass can append or
rebuild an archive.
Run discovery, pacing, retries, metadata resolution, and participant paging
through one account-scoped manager. Immediately prioritize new Direct
sessions, P2P previews, and accepted inbound IMs while honoring transcript
consent, authoritative mute state, capability changes, and fail-closed
account state.
Stitch ordinary and monthly legacy plaintext before the oldest accumulated
service row, keep normal plaintext logging active, and merge the first
validated service page in memory while older backfill continues. Drive
Direct and Preview reloads and their nonmodal loading status from shared
resident snapshots.
Maintain the human-readable chat_service_index.csv manifest and protect
archive updates with strict validation, torn-tail repair, corrupt-file
preservation, private file stamps, and atomic replacement. Extend Delete
Transcripts with a durable TimeUUID boundary and an asynchronous sweep that
suppresses every historical source until cleanup completes safely.
Add core coverage for deterministic IDs, UUIDv1 and timestamp validation,
strict page and list contracts, RFC 4180 CSV quoting, archive scanning, torn
tails, and corrupt records.
---
indra/newview/llnotificationhandlerutil.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview/llnotificationhandlerutil.cpp')
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index cdf7f05ada..ca11107f61 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -327,11 +327,11 @@ void LLHandlerUtil::decIMMesageCounter(const LLNotificationPtr& notification)
{
LLSD arg;
arg["session_id"] = session_id;
- session->mNumUnread--;
+ session->mNumUnread = llmax(0, session->mNumUnread - 1);
arg["num_unread"] = session->mNumUnread;
- session->mParticipantUnreadMessageCount--;
+ session->mParticipantUnreadMessageCount =
+ llmax(0, session->mParticipantUnreadMessageCount - 1);
arg["participant_unread"] = session->mParticipantUnreadMessageCount;
LLIMModel::getInstance()->mNewMsgSignal(arg);
}
}
-
--
cgit v1.3
From e3c57f57c7585c1cf99d4b86fd70b06b1ce2b58d Mon Sep 17 00:00:00 2001
From: pepper <3782201+rohvani@users.noreply.github.com>
Date: Thu, 13 Aug 2026 13:40:10 -0400
Subject: Improve ChatService history readability
Add phase-oriented comments around history synchronization, archive validation, asynchronous view updates, and transcript deletion.
Expand dense control flow and restore readable spacing throughout the ChatService implementation and its integration points without changing behavior. Restore unrelated end-of-file formatting so it drops out of the overall PR diff.
---
indra/llmessage/llavatarnamecache.cpp | 1 +
indra/newview/CMakeLists.txt | 1 +
indra/newview/app_settings/settings.xml | 20 +-
indra/newview/llappviewer.cpp | 3 +
indra/newview/llavataractions.cpp | 7 +-
indra/newview/llchathistory.cpp | 6 +-
indra/newview/llchatservicehistory.cpp | 933 ++++++++++++++++++---
indra/newview/llchatservicehistory.h | 24 +
indra/newview/llchatservicehistorycore.cpp | 147 +++-
indra/newview/llchatservicehistorycore.h | 29 +-
indra/newview/llconversationlog.cpp | 1 +
indra/newview/llconversationloglist.cpp | 2 +
indra/newview/llfloaterconversationlog.cpp | 5 +
indra/newview/llfloaterconversationpreview.cpp | 143 +++-
indra/newview/llfloaterconversationpreview.h | 6 +
indra/newview/llfloaterimcontainer.cpp | 20 +-
indra/newview/llfloaterimsession.cpp | 19 +-
indra/newview/llfloaterimsession.h | 2 +
indra/newview/llfloaterimsessiontab.cpp | 3 +
indra/newview/llfloaterpreference.cpp | 8 +-
indra/newview/llfloaterpreference.h | 2 +
indra/newview/llimview.cpp | 148 +++-
indra/newview/llimview.h | 16 +-
indra/newview/lllogchat.cpp | 51 +-
indra/newview/lllogchat.h | 6 +-
indra/newview/llnotificationhandlerutil.cpp | 1 +
indra/newview/llpanelprofile.cpp | 1 +
indra/newview/llviewerregion.cpp | 1 +
.../tests/llchatservicehistorycore_test.cpp | 61 +-
29 files changed, 1427 insertions(+), 240 deletions(-)
(limited to 'indra/newview/llnotificationhandlerutil.cpp')
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index c024c2092f..86b36315dc 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -924,3 +924,4 @@ bool max_age_from_cache_control(const std::string& cache_control, S32 *max_age)
}
return false;
}
+
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 622ebceac0..0b5d41b9dd 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -2466,3 +2466,4 @@ if (LL_TESTS)
endif (LL_TESTS)
check_message_template(${VIEWER_BINARY_NAME})
+
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ac026b80bd..bde77cc6c5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16496,16 +16496,16 @@
0
ChatServiceEnabled
-
+
SingleModeDoubleClickOpenWindow