feat(efp): read-only EFP stats on address profiles#1913
Open
Quantumlyy wants to merge 24 commits into
Open
Conversation
* add `createAsyncRequestGuard` utility to manage concurrent asynchronous operations * apply guard to EFP common follower lookups to ensure only the latest request's result is processed, preventing stale data * disable EFP for `localtestnet` configuration
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds EthFollow (EFP) integration to surface follower/following stats and “common followers” in the app UI, with supporting API client, store, and tests.
Changes:
- Fetch EFP stats server-side for profile pages and hydrate client store.
- Add EFP UI components (stats + common followers) to profile/identity/supporters views.
- Introduce EFP API utilities + store + async request guard, with unit tests.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/(pages)/app/(app)/[accountId]/+page.svelte | Hydrates/reads EFP stats and looks up common followers for the viewed profile. |
| src/routes/(pages)/app/(app)/[accountId]/+page.server.ts | Loads EFP stats during SSR when enabled. |
| src/lib/utils/efp/index.ts | Adds EFP API client helpers (stats, common followers, follower state). |
| src/lib/stores/efp/efp.store.ts | Adds client-side store + caching for EFP stats/common followers. |
| src/lib/components/efp-stats/efp-stats.svelte | Adds reusable EFP stats/common-followers UI. |
| src/lib/components/supporters-section/supporters.section.svelte | Adds “supporters you follow” highlight using EFP followerState. |
| src/lib/stores/wallet/network.ts | Adds enableEfp feature flag to network config. |
| *.unit.test.ts | Adds unit tests for EFP utilities/store/component + async guard. |
Comments suppressed due to low confidence (1)
src/routes/(pages)/app/(app)/[accountId]/+page.server.ts:1
await getVotingRounds(...)insidePromise.all([...])defeats parallelism by awaiting that promise beforePromise.allstarts. Remove the innerawaitso all requests are started concurrently.
import { DRIP_LISTS_SECTION_DRIP_LIST_FRAGMENT } from '$lib/components/your-drip-lists-section/your-drip-lists-section.svelte';
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a read-only Ethereum Follow Protocol integration so address profiles and supporter lists can show public follow graph data from the EFP API. No on-chain follow actions in this PR — just stats, mutual followers, and a way to spot supporters you already follow on EFP.
Gated behind a new
enableEfpnetwork flag (same idea asenableEns: off on local testnet, on everywhere else we ship ENS).Changes
$lib/utils/efp— thin client forapi.ethfollow.xyz(stats,commonFollowers,followerState, plus batchedgetSupportersYouFollow).$lib/stores/efp— cached lookups with in-flight dedupe;hydrateStatsso SSR data from the profile load does not get re-fetched on the client.EfpStats— follower/following counts (link out to efp.app) and optional “Followers you know” pile.[accountId]/+page) — SSR stats in+page.server.ts; client fetch for common followers when viewing someone else while connected.identity-card— stats on the address card via the store (client fetch).supporters.section— “Show supporters you follow” on address profiles; tags matching supporters with aFollowinglabel.createAsyncRequestGuard— drops stale common-follower responses when navigating between profiles quickly.EfpStats, supporter address extraction, and the request guard.Not in scope: wiring EFP into
identity-badge(too noisy there), or any write/follow UI.Test plan
enableEfp: true), open an address profile with real EFP activity — follower/following counts show and link to efp.app.identity-cardwith an address) shows stats after load.dev:docker, chain 31337) — no EFP UI, no requests to the EFP API.npm run test:unit— EFP-related tests pass.npx lint-staged --concurrent falseandnpm run checkclean on touched files.