Skip to content

fix: custom emoji sets not loading on startup#374

Merged
barrydeen merged 1 commit intomainfrom
fix/emoji-set-fetch
Mar 31, 2026
Merged

fix: custom emoji sets not loading on startup#374
barrydeen merged 1 commit intomainfrom
fix/emoji-set-fetch

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • SharedFlow buffer overflow: relayEvents buffer (1024) filled during busy startup, silently dropping emoji set events via tryEmit. Bumped to 4096.
  • Self-data filter bloat: 15 filters in one REQ hit relay limits — emoji filters (positions 14-15) were silently dropped. Consolidated to 2 filters.
  • Outbox routing for emoji sets: fetchMissingEmojiSets now 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.
  • Race condition: fetchMissingEmojiSets could run before EventRouter processed the kind 10030 emoji list. Now awaits the list reactively before fetching.

Test plan

  • Fresh install / clear cache — custom emoji packs from other authors load on startup
  • Emoji shortcode autocomplete shows custom emojis in compose, DMs, notifications
  • Emoji pack cards embedded in notes render correctly
  • No regression in startup speed or feed loading

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>
@barrydeen barrydeen merged commit 7b9f65c into main Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant