Skip to content

fix: only load funkit checkout on pages with Supply actions#3064

Open
yogurtandjam wants to merge 1 commit into
aave:mainfrom
yogurtandjam:fix/funkit-guest-statsig-loop
Open

fix: only load funkit checkout on pages with Supply actions#3064
yogurtandjam wants to merge 1 commit into
aave:mainfrom
yogurtandjam:fix/funkit-guest-statsig-loop

Conversation

@yogurtandjam

@yogurtandjam yogurtandjam commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The funkit checkout host (@funkit/connect) was mounted app-globally in _app, so its runtime chunk loaded and ran on every route — including the markets page, where that background activity noticeably degraded navigation.

This scopes the checkout host to the only two routes that actually have Supply buttons — dashboard and reserve-overview — each mounting <FunkitCheckout /> when the page renders. All other pages (markets, history, staking, governance, …) no longer load the SDK at all. Supply clicks fall back to the native supply modal if the checkout isn't ready yet, matching existing behavior.

Test plan

  • tsc --noEmit / lint clean
  • Local prod build: browsing markets no longer loads the funkit chunk — main-thread long-tasks on markets navigation drop from ~53 to ~3 (measured via PerformanceObserver('longtask'))
  • Connected: Supply on a Core-market asset (cbBTC/WBTC/USDC/USDT) from dashboard and reserve-overview opens the funkit checkout, including immediately after connecting
  • Markets/history/etc.: no funkit network activity

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

@yogurtandjam is attempting to deploy a commit to the Aave Team on Vercel.

A member of the Team first needs to authorize it.

@yogurtandjam yogurtandjam force-pushed the fix/funkit-guest-statsig-loop branch from 206ca83 to 7aa741d Compare July 3, 2026 18:32
@sammdec sammdec changed the base branch from main to fix/funkit-guest-statsig-loop July 3, 2026 18:46
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
interface Ready Ready Preview, Comment Jul 3, 2026 9:34pm

Request Review

@sammdec sammdec changed the base branch from fix/funkit-guest-statsig-loop to main July 3, 2026 18:50
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

❌ CI run has failed!
Please see logs at https://github.com/aave/interface/actions/runs/28678597433'

@yogurtandjam yogurtandjam force-pushed the fix/funkit-guest-statsig-loop branch from 7aa741d to 926c3d0 Compare July 3, 2026 20:36
@yogurtandjam yogurtandjam changed the title fix: don't mount funkit checkout provider for guests/watch mode fix: only load funkit checkout on pages with Supply actions Jul 3, 2026
The funkit checkout host was mounted app-globally, so the @funkit/connect
runtime chunk loaded and ran on every route — including the markets page,
where that background activity degraded navigation. Scope the host to the
two routes that actually have Supply buttons (dashboard, reserve-overview);
other pages (markets, history, etc.) no longer load the SDK at all. Supply
clicks fall back to the native supply modal until the checkout is available.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

❌ CI run has failed!
Please see logs at https://github.com/aave/interface/actions/runs/28684402744'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant