From 812e070d1880cf92879d1a6a9243f79829ae0f35 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Mon, 19 Oct 2026 19:34:58 +0000 Subject: [PATCH] plans: upsert of earlier items: split left by an Around load --- plans/apps-upsert-old-item-updates.md | 1 + 1 file changed, 1 insertion(+) diff --git a/plans/apps-upsert-old-item-updates.md b/plans/apps-upsert-old-item-updates.md index e6ba8315ac..f3a105cf48 100644 --- a/plans/apps-upsert-old-item-updates.md +++ b/plans/apps-upsert-old-item-updates.md @@ -58,5 +58,6 @@ Not changed: - Page loads, both platforms: an update of an item of a page that arrives while the page is read is applied to neither the loaded items nor the page (above). Applying kept updates to a merged page cannot tell whether the page already has the update, because the reported `updatedAt` does not change with it. A fix needs either an event sequence counter in the apps, to apply only updates kept after the page read started, or the core reporting a new `updatedAt` for edits, status changes and deletions. - Items the core creates from updates (`ChatItemUpdated` of a message the user never received) are not added and do not notify while the newest items of the chat are not loaded, or after the user sent a message before the update arrived; they are shown, without a notification, when the newest items are loaded. - Groups: items are ordered by timestamp, so an update of a message received late, placed above more than a page of messages but with a higher ID than every loaded item and the preview, is still added at the bottom. +- Both platforms: opening a chat around an item among the newest (e.g. "go to item" from search) leaves a split at the last loaded item even when it is the newest, and loading further down does not clear it, so the newest items count as not loaded: an item the core creates from an update in that state is not added and gives no notification until a new item arrives or the chat is reopened. - Both platforms: when the bottommost loaded item is removed (`ChatItemsMerger` `itemsRemoved`), its split is dropped, because the split is moved to the item below the removed one and there is none, so the newest items count as loaded although they are not. In the main chat the preview's item ID still bounds the IDs, except where it does not (groups, a deleted last item, above); member support chats and reports are bounded only by the loaded items. - Core alternative: the core reporting items it creates from updates as new items (`NewChatItems`) would let the apps never add an item from an update, and would remove the bottom-of-chat check, the ID rule and the group timestamp case above.