mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Finding [L5] AppShell.tsx:161-164 — 4 archive/ingestion hooks mounted unconditionally at first render competed with first paint. Gate the two archive *seed* hooks (useObserverArchiveSeed, useAgentMetricArchiveSeed) behind startupReady by passing deferredPubkey instead of the eager identityQuery pubkey, matching the existing presence/user-status deferral pattern. useArchiveSync (the eager live-save path) stays unchanged — it owns live event ingestion and must not be deferred. Only the one-shot first-run seeds (mergeSaveSubscriptionKinds) move off the boot critical path. The seeds' explicit-choice guard is untouched: each hook already early-returns on `if (!pubkey) return`, so a deferred (undefined) pubkey is a no-op until startup completes, then the seed fires exactly once with identical semantics. Confirmed by useObserverArchiveSeed/ useAgentMetricArchiveSeed test suites (18/18), incl. test_undefined_pubkey_does_nothing and test_explicit_choice_set_does_not_reseed. Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz>