• Fix feed page dropped posts: out-of-order events and race condition

    laantungir released this 2026-07-01 13:22:33 +00:00 | 8 commits to master since this release

    prependPostCard() now inserts posts in the correct sorted position within
    the existing DOM instead of falling back to a full renderFeed() rebuild
    when a post is older than the first visible post. This handles relays
    that deliver events out of order without wiping the feed.

    Also fixed a race condition in fetchFeedWindow: the fire-and-forget
    ndkFetchEvents callback was calling renderFeed() after bootstrap
    completed, which wiped prepended live posts and caused concurrent
    rebuild races. Now it only calls renderFeed() if the feed hasn't been
    rendered yet (renderedPostIds.size === 0).

    Same prependPostCard sorted-insert fix applied to post.html.

    Downloads