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/CMakeLists.txt | 6 +-
indra/newview/app_settings/settings.xml | 11 +
indra/newview/llappviewer.cpp | 5 +
indra/newview/llavataractions.cpp | 5 +-
indra/newview/llchathistory.cpp | 6 +-
indra/newview/llchatservicehistory.cpp | 2346 ++++++++++++++++++++
indra/newview/llchatservicehistory.h | 72 +
indra/newview/llchatservicehistorycore.cpp | 580 +++++
indra/newview/llchatservicehistorycore.h | 111 +
indra/newview/llconversationlog.cpp | 3 +-
indra/newview/llconversationloglist.cpp | 6 +-
indra/newview/llfloaterconversationlog.cpp | 7 +-
indra/newview/llfloaterconversationpreview.cpp | 240 +-
indra/newview/llfloaterconversationpreview.h | 18 +
indra/newview/llfloaterimcontainer.cpp | 14 +-
indra/newview/llfloaterimsession.cpp | 21 +
indra/newview/llfloaterimsession.h | 1 +
indra/newview/llfloaterimsessiontab.cpp | 11 +-
indra/newview/llfloaterpreference.cpp | 25 +-
indra/newview/llfloaterpreference.h | 1 +
indra/newview/llimview.cpp | 209 +-
indra/newview/llimview.h | 14 +
indra/newview/lllogchat.cpp | 287 ++-
indra/newview/lllogchat.h | 11 +
indra/newview/llnotificationhandlerutil.cpp | 6 +-
indra/newview/llpanelpeoplemenus.cpp | 5 +-
indra/newview/llpanelprofile.cpp | 6 +-
indra/newview/llviewerregion.cpp | 3 +-
.../xui/en/floater_conversation_preview.xml | 24 +
.../skins/default/xui/en/floater_im_session.xml | 24 +
.../newview/skins/default/xui/en/notifications.xml | 9 +-
.../tests/llchatservicehistorycore_test.cpp | 201 ++
32 files changed, 4147 insertions(+), 141 deletions(-)
create mode 100644 indra/newview/llchatservicehistory.cpp
create mode 100644 indra/newview/llchatservicehistory.h
create mode 100644 indra/newview/llchatservicehistorycore.cpp
create mode 100644 indra/newview/llchatservicehistorycore.h
create mode 100644 indra/newview/tests/llchatservicehistorycore_test.cpp
(limited to 'indra/newview')
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0b62bdf0b0..622ebceac0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -127,6 +127,8 @@ set(viewer_SOURCE_FILES
llchathistory.cpp
llchatitemscontainerctrl.cpp
llchatmsgbox.cpp
+ llchatservicehistory.cpp
+ llchatservicehistorycore.cpp
llchiclet.cpp
llchicletbar.cpp
llclassifiedinfo.cpp
@@ -810,6 +812,8 @@ set(viewer_HEADER_FILES
llchathistory.h
llchatitemscontainerctrl.h
llchatmsgbox.h
+ llchatservicehistory.h
+ llchatservicehistorycore.h
llchiclet.h
llchicletbar.h
llclassifiedinfo.h
@@ -2333,6 +2337,7 @@ if (LL_TESTS)
include(LLAddBuildTest)
SET(viewer_TEST_SOURCE_FILES
llagentaccess.cpp
+ llchatservicehistorycore.cpp
lldateutil.cpp
# llmediadataclient.cpp
lllogininstance.cpp
@@ -2461,4 +2466,3 @@ 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 4f7826adb8..ac026b80bd 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16495,6 +16495,17 @@
Value
0
+ChatServiceEnabled
+
SingleModeDoubleClickOpenWindow