feat(builders): curated builder icons backed by a builder profile table (ROO-94) - #2185
Open
sleyter93 wants to merge 1 commit into
Open
feat(builders): curated builder icons backed by a builder profile table (ROO-94)#2185sleyter93 wants to merge 1 commit into
sleyter93 wants to merge 1 commit into
Conversation
…le (ROO-94) Builders rendered a generated identicon everywhere, so the Builders table and the "builders you may want to back" cards showed geometric noise instead of the projects' own marks. The plumbing for a real image already existed but nothing fed it: `BuilderCard` never passed `imageIpfs` to `BuilderHeader`, and the `Builder` type had no image field at all. Four call sites bypassed `IpfsAvatar` and used `Jdenticon` directly. Adds `dao_data.BuilderProfiles`, an app-owned table keyed by builder address — which is already the builder's id in the indexer. The indexer database and `dao_data` sit behind two different connections, so the two are merged in `BuilderContext` rather than joined in SQL; the profiles request runs in parallel with the on-chain reads that already gate the page, so it adds no latency to the critical path. The `image` column holds a reference, not a blob: a root-relative path to an asset in `public/`, or an IPFS CID. Assets ship in the repo so they need no `remotePatterns` entry and render in local development, which the Pinata gateway does not allow without a key. Moving a builder to IPFS later is an UPDATE on that row, with no schema or component change. Ships icons for 7 builders. Any builder without a row keeps the identicon, so a missing icon is never a broken image. Notes: - `IpfsAvatar` gains `fallbackClassName`: the light backing belongs to the identicon only. Painting it behind a real logo made white-on-transparent marks disappear. - The seed prunes rows dropped from the manifest, so the manifest stays the source of truth instead of leaving rows pointing at deleted assets. - The migration is committed but not applied to any remote environment.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
Closes ROO-94.
Builders render a generated identicon everywhere, so the Builders table and the
"builders you may want to back" cards show geometric noise instead of the projects'
own marks — the exact screenshot attached to the ticket.
Why it happened
The plumbing for a real image already existed, but nothing fed it:
BuilderCardcalledBuilderHeaderwithout ever passingimageIpfs, soIpfsAvataralways fell through to the identicon.Buildertype had no image field at all — theimageIpfsthat circulates in the app comes from the delegates/RNS path, not from builders.IpfsAvatarentirely and usedJdenticondirectly.Approach
Adds
dao_data.BuilderProfiles, an app-owned table keyed by builder address — whichis already the builder's id in the indexer (
Builder.id). It is deliberately a tablerather than a static map because ROO-94 itself anticipates growth: "this will help
with visibility later on for builder profiles", and ROO-96/ROO-97 build on it.
The indexer database and
dao_datasit behind two different connections, so theycannot be joined in SQL. They are merged in
BuilderContext, which alreadycentralises the builders map and feeds the table, spotlight and cards from one place.
The merge costs nothing: the builder list is assembled client-side from five
dependent waves of on-chain reads, and the profiles request runs in parallel with
them. It is not on the critical path.
The
imagecolumn holds a reference, not a blobEither a root-relative path to an asset in
public/, or an IPFS CID. Assets ship inthe repo so they need no
images.remotePatternsentry and render in localdevelopment, which the Pinata gateway does not permit without
NEXT_PUBLIC_PINATA_GATEWAY_KEY. Moving a builder to IPFS later is anUPDATEonthat row — no schema change, no component change, since
IpfsAvataralready routesanything not starting with
/through the gateway.Coverage
Ships icons for 7 builders: MoneyOnChain, Boltz, Steer Protocol, Vottun, Symbiosis,
Beexo Wallet and OpenOcean (which occupies two rows —
0x7A1a…is a reward-receivermigration of the same builder, self-proposed from
0x1D11…, not a second project).A builder with no row keeps the identicon, so a missing icon is never a broken
image. The remaining 12 are pending better source assets; the fastest path for most
of them is asking the builders directly.
Stelios & Mick (Geyser Team)isintentionally left on the identicon — they are individuals, and their application
explicitly states that Geyser is not the applicant, so the Geyser logo would
misattribute the entry.
Worth a reviewer's attention
IpfsAvatargainsfallbackClassName. The light backing belongs to the identicon only. The table cells previously paintedbg-whiteon the container, which is right for a dark-on-transparent identicon but made white-on-transparent logos vanish. Verified by rendering every asset at 88px and 40px.public/images/builders/README.md.Migration
prisma/migrations/2_builder_profilesis committed but has not been applied to anyremote environment — that is a deploy decision. Applied and verified against the
local
dao-datapostgres only.Verification
tsc --noEmitclean,eslint .clean, 1390 tests pass across 145 files.npm run db:seed:builders→ database →GET /api/builder-profilesreturning the 8 expected rows.<img>for the seeded builder and identicons for the rest.One gap: the icons could not be seen on the real builders page locally, because local
dev runs testnet while these are mainnet addresses. The pipeline is proven end to end
with a testnet address; this specific set of logos will first be visible on deploy.