Chat Modernization - #6179
Draft
rohvani wants to merge 20 commits into
Draft
Conversation
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.
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.
Arm a bounded discovery confirmation when the first direct IM is sent to a resident absent from the validated conversation list. Preserve the existing priority placeholder across the first validated miss, then retry the shared list path after the manager-wide delay. Leave listed conversations and inbound priority behavior unchanged, and retire the unresolved candidate after a second miss so no general live-message debounce or parallel scheduler is introduced. Validated with the RelWithDebInfo secondlife-bin build and the LLChatServiceHistoryCore test suite.
Recover missing sender UUIDs for plaintext transcript rows from existing name caches while normalizing stitched history. Preserve explicit ChatService and system IDs so resident headers regain icons and profile actions without scheduling name lookups. Validated with the RelWithDebInfo secondlife-bin build and the LLChatServiceHistoryCore test suite (11 tests).
Replace exact legacy transcript occurrences with canonical ChatService rows while preserving local ordering and consuming repeated messages one-for-one. Carry service timestamps into normalized IM history and keep system sender identity null. Filter authoritative P2P history refreshes against same-minute live rows so open sessions do not display duplicate messages after asynchronous reloads.
Track one resettable quiet deadline for each direct-message resident so multiple outgoing messages coalesce into one head refresh after the last send. Preserve immediate bounded discovery for new conversations and reuse the existing priority and follow-up path at pacing, response, and archive-preparation boundaries. Retire deadlines when consent, blocking, or deletion makes work ineligible, preventing a failed deletion from leaving a rapid wake loop. Leave inbound priority and tab switching unchanged. Validated with the RelWithDebInfo secondlife-bin build and the LLChatServiceHistoryCore test suite.
Keep authoritative mute-list source classification in one testable predicate so full, empty, and server-validated cache responses remain eligible while fallback cache stays gated. Log compact gate, list, history, and archive publication outcomes so device-specific synchronization failures can be diagnosed without recording message content.
Compare fallback sender identities as canonical resident usernames when either stitched source lacks a UUID. This lets legacy First Last ChatService names match viewer first.last names, preventing the first outbound live IM from retaining a duplicate history row. Cover legacy-to-resident matching and distinct-resident rejection in the LLChatServiceHistoryCore tests. Validated with the Release secondlife-bin build and the LLChatServiceHistoryCore test suite (13 tests).
Create P2P conversation metadata when the first durable service archive is published, so history downloaded on a new device is discoverable without a live IM session. Preserve Conversation Log consent, deduplicate existing rows, and persist through the existing observer contract. Add focused coverage for cross-device discovery, duplicate publication, retained metadata, and disabled logging. Validated with the Release secondlife-bin build, the LLConversationLog test suite (2 tests), and the LLChatServiceHistoryCore test suite (13 tests).
Defer IM transcript replay until the frame after clearing chat history, allowing deferred inline notification panels to finish destruction before replacements are embedded. Keep message updates paused during that interval so existing live rows and all notification-backed offers are rebuilt through the normal generic path. Validated with the Release secondlife-bin build.
Detach chat-owned inline views before clearing and rebuild the transcript synchronously so an empty editor never reaches draw. Track notification panels as concurrent instances while deferred deletion overlaps old and replacement projections. Route offer updates to the live IM panel and ignore retiring friendship panels during deduplication. Validated with the RelWithDebInfo secondlife-bin build and the existing LLInstanceTracker test suite.
Compare normalized historical overlays before replacing the visible transcript, and retain the current bounded history when durable live rows only roll the oldest entries out of the 200-message window. Let an active history read observe newer archive generations and restart itself instead of scheduling overlapping reads from snapshot callbacks. Validated with the RelWithDebInfo secondlife-bin build and the LLChatServiceHistoryCore test suite.
Publish Conversation Log metadata after both replace and append ChatService archive changes. Upsert existing P2P rows only from newer archive timestamps so mobile conversations become discoverable and dates refresh before a live IM session opens, while preserving retained metadata and consent. Notify and persist only real timestamp advances, leaving equal or older history as a no-op. Add coverage for exact archive times, monotonic updates, observer behavior, metadata retention, deduplication, and disabled logging. Validated with the Release secondlife-bin build, the LLConversationLog test suite (3 tests), and the LLChatServiceHistoryCore test suite (13 tests).
Match exact dated legacy and ChatService overlaps before applying the durable archive seam, so canonical replacements retain their legacy positions ahead of undated rows. Continue dropping unmatched post-boundary plaintext and append only remaining service rows after the undated seam. Validated with the RelWithDebInfo secondlife-bin build and the LLChatServiceHistoryCore test suite (13 tests).
Treat an existing actionable friendship panel as a duplicate only when its notification belongs to the same resident. This preserves same-sender suppression and dead-panel replay behavior while allowing simultaneous offline requests from different residents to render in their own sessions. Validated with the RelWithDebInfo secondlife-bin build.
Apply the durable archive boundary before reconciling dated legacy overlaps so post-boundary messages stay in canonical service order and survive consumer caps. Name the offset-less SLT conversion at the seam and cover capped archive summaries and UTC-7/UTC-8 boundary cases. Validated with the RelWithDebInfo secondlife-bin build, the LLChatServiceHistoryCore suite (14 tests), the LLConversationLog suite (3 tests), and all 19 newview CTest targets.
various fixes for chat modernization project viewer
Contributor
NOTES Anti-virus false positive report: |
bridie-linden
approved these changes
Sep 2, 2026
There was a problem hiding this comment.
Chat Modernization Alpha Approved
viewer = 26.3.0.33643480083
build = https://github.com/secondlife/viewer/releases/tag/Second_Life_Project%2356b34b33-ChatModernization
cohort = Chat Modernization
desired = 0
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
as of = 2026-09-04 for PV deploy
build = https://github.com/secondlife/viewer/releases/tag/Second_Life_Project%2356b34b33-ChatModernization
cohort = Chat Modernization
deployed = https://github.com/secondlife/viewer/releases/tag/Second_Life_Project%2356b34b33-ChatModernization
desired = 0
relnotes:
Chat Modernization Alpha
We’re improving Second Life chat so it’s easier to keep up with your conversations across desktop and mobile. Recent direct messages will be available across supported clients (mobile and desktop), so you can more easily pick up where you left off when you switch devices or log back in later.
What's new?
These initial improvements apply to one-to-one direct messages between Residents. Group chat and multi-person conversations are not yet supported.
*A supported client like this current Alpha is required to view cross-device DM history.
Help Us Improve
We welcome your feedback as we continue improving the experience.
Share feedback and report issues: Feedback Portal