perf: reduce initial explorer bundles#295
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Xaroz
left a comment
There was a problem hiding this comment.
another round of review, but overall looks good, my biggest concern probably is still that we are building basically a mini-multiprovider/chain manager, so if any changes happen in the SDK we might need to update here too
|
Replying to the high-level concern about us growing a mini multiprovider / chain manager here: agreed this is a real maintenance risk if it calcifies. The intent with this PR is more of a bridge for the current perf split than a permanent second implementation. We are already upstreaming the relevant pieces of this path-splitting work in:
And there is already a concrete follow-on example of consuming those extracted SDK primitives in Explorer here: So the plan is to move the shared read-only / lightweight metadata path into the upstream libs/templates, then simplify Explorer back around those shared primitives afterwards rather than permanently owning an Explorer-only mini chain manager. |
|
@claude final review |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 12 total unresolved issues (including 10 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Summary
This PR makes the explorer do much less on the hot path.
The main idea is to split:
That lets the home page and the first detail paint load a much smaller shell up front, then progressively pull in heavier code only when needed.
What changed
1. Split metadata-only state from provider-backed runtime state
metadataStore.tsfor registry metadata, overrides, scraped domains, banner state, and lazily built warp-route mapsstore.tsfocused on syncingMultiProtocolProviderfrom that metadata when runtime/provider features are actually neededChainMetadataResolverplus metadata-only helpers so read-only UI no longer needsMultiProtocolProvider2. Turn home/detail into staged client shells
MessageSearchPageMessageDetailsPage -> MessageDetailsInner -> MessageDetailsRuntime_appshows route-shaped loading shells during the SSR-to-hydration gap instead of a blank body3. Warm up detail navigation
hover,focus,touch,click) now prefetches the detail route, a stub cache entry, and full detail data when safe4. Move metadata and warp-route work off startup
loadChainMetadata.ts5. Tighten message-page SSR / OG behavior
/message/[messageId]only fetches OG-specific data for bot requestsprivate, no-storeto avoid bot/human cache poisoning6. Review-driven correctness follow-ups included here
Why
Before this PR, the explorer still paid heavy JS/startup cost on both home and detail routes, and detail navigation still felt rough:
This PR attacks that by keeping the initial path lightweight, then staging enrichment only after the user has already landed on useful UI.
Measured impact
Latest successful measurement on this branch:
7.61 MB132 kB/8.86 MB121 kB/message/[messageId]8.82 MB350 kBUser-visible result:
Validation
pnpm run lintpnpm run typecheckpnpm run test -- metadataManager.test.tsNEXT_TELEMETRY_DISABLED=1 pnpm run buildon this branch for bundle measurementsRemaining work
Note
Cursor Bugbot is generating a summary for commit 5fdd2ff. Configure here.