From 1fee674350a1debb9c663f463dbb6ed7db5e53d3 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 21 Jul 2026 13:22:06 -0400 Subject: [PATCH] fix: keep event-less placeholder rooms when a deletion arrives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The additive feed path re-filters the existing list whenever an incoming batch contains a kind-5, dropping notes whose event has been deleted. Event-less notes fell into the else branch and returned false, so they were dropped too. An event-less row is a placeholder the filter synthesizes for a room with no message yet — a just-joined Concord channel, NIP-29 group, Marmot group or geohash cell. It carries no event, so it cannot have been deleted. Dropping it removed every such row from Messages the moment ANY unrelated deletion landed, and because this is the additive path the rows stayed gone until the next full rebuild. A community whose channels are all quiet looked like it had never loaded at all. Verified on device: surviving Concord placeholders in sort() went 0 -> 14, and a community that had been absent from Messages entirely now renders all of its channels. Not Concord-specific — the same placeholderNote() pattern backs NIP-29, Marmot and geohash rooms. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../amethyst/commons/ui/feeds/FeedContentState.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/feeds/FeedContentState.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/feeds/FeedContentState.kt index bc6eae3baf..9945c77fd0 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/feeds/FeedContentState.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/feeds/FeedContentState.kt @@ -161,7 +161,14 @@ class FeedContentState( if (noteEvent != null) { !cacheProvider.hasBeenDeleted(noteEvent) } else { - false + // An event-less row is a placeholder the filter synthesized for a room + // that has no message yet — a just-joined Concord channel, NIP-29 group, + // Marmot group or geohash cell. It carries no event, so it cannot have + // been deleted, and dropping it here deleted every such row from the + // Messages list the moment ANY kind-5 landed in an unrelated batch. The + // row then stayed gone until the next full rebuild, which is why a quiet + // community looked like it had never loaded at all. + true } }.toImmutableList() }