e1e84d7d71
The fire-and-forget prefetch had a fundamental race: React renders all NoteCards immediately when the feed query resolves, before the prefetch has a chance to populate the cache. Each card's useAuthor call finds an empty cache and opens its own relay subscription — 20+ concurrent REQ messages per relay, which hits subscription limits and most fail silently. The only reliable fix is to await the prefetch inside the queryFn before returning items. This ensures ['author', pubkey] is in cache for every pubkey on the page when React renders the cards. useAuthor finds fresh data and never opens a relay subscription. Authors and stats are fetched in parallel (Promise.all), so the extra latency is max(author_time, stats_time) not their sum. With eoseTimeout at 500ms this adds ~500ms per page — a worthwhile tradeoff for reliable author resolution vs the broken fire-and-forget approach. Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>