fix: custom emoji sets not loading on startup#374
Merged
Conversation
Three issues prevented emoji packs from loading: 1. SharedFlow buffer overflow — the relayEvents buffer (1024) filled up during busy startup, causing tryEmit to silently drop emoji set events before EventRouter could process them. Increased to 4096. 2. Self-data filter count — 15 individual filters in a single REQ risked hitting relay filter-count limits, with emoji filters last to be dropped. Consolidated into 2 filters (replaceable + addressable kinds). 3. Missing emoji set fetch used read relays only — packs from other authors weren't reachable. Now uses outbox routing to query each author's write relays, with read+top relay fallback. Also waits 4s instead of closing on first EOSE (which was often a relay with 0 results). Additionally, await the emoji list (kind 10030) from EventRouter before fetching missing sets, fixing a race where fetchMissingEmojiSets ran before the emoji list was processed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
relayEventsbuffer (1024) filled during busy startup, silently dropping emoji set events viatryEmit. Bumped to 4096.fetchMissingEmojiSetsnow queries each pack author's write relays instead of only read relays, with read+top relay fallback. Waits 4s for responses instead of closing on first EOSE.fetchMissingEmojiSetscould run before EventRouter processed the kind 10030 emoji list. Now awaits the list reactively before fetching.Test plan