From 54afbf95e7fdaf723c107e7c598eb9345eba0241 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 30 Jul 2026 22:58:05 -0400 Subject: [PATCH] docs(notifications): describe the cold-start floor as what it is MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment called it a backward-paging boundary that asks for everything older than the feed's oldest card. It is neither: backward paging lives in AccountNotificationsHistoryEoseManager, and `since` means newer-than, so it floors the query at the depth the feed already reaches instead of asking all-time again. It is also read only until a relay has an EOSE. Records that it is always null for an account with no UI, since nothing fills that feed — which is what makes the field inert on a headless path. Co-Authored-By: Claude Opus 5 (1M context) --- .../AccountNotificationsEoseFromInboxRelaysManager.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip01Notifications/AccountNotificationsEoseFromInboxRelaysManager.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip01Notifications/AccountNotificationsEoseFromInboxRelaysManager.kt index c73b0dd9c0..4da8494533 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip01Notifications/AccountNotificationsEoseFromInboxRelaysManager.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/relayClient/reqCommand/account/nip01Notifications/AccountNotificationsEoseFromInboxRelaysManager.kt @@ -49,9 +49,13 @@ class AccountNotificationsEoseFromInboxRelaysManager( key: AccountQueryState, since: SincePerRelayMap?, ): List { - // Backward-paging boundary: once the feed has filled a page, ask for everything older than - // its oldest card. It stays null until then — see the note on the missing week floor below, - // which is what let it stay null forever on a quiet inbox. + // A cold-start floor, NOT paging — backward paging lives in + // [AccountNotificationsHistoryEoseManager]. Read only when a relay has no EOSE yet; once it + // does, the EOSE time wins and this is never consulted. + // + // `since` means *newer than*, so this floors the query at the depth the feed already reaches + // rather than asking all-time again. It stays null until the feed holds a full page — and is + // therefore always null for an account with no UI, since nothing fills that feed. val pagingBoundary = key.feedContentStates.notifications.lastNoteCreatedAtIfFilled() val inbox =