Skip to content

feat: add builders for notes to decrease boilerplate#237

Merged
sevenzing merged 4 commits into
dev/acfrom
ll/at-03
Jun 20, 2026
Merged

feat: add builders for notes to decrease boilerplate#237
sevenzing merged 4 commits into
dev/acfrom
ll/at-03

Conversation

@sevenzing

@sevenzing sevenzing commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

Adds a shared notes.tsx builder library for the deposit-addresses best practice and migrates the 11 benchmarked apps to it — hand-written note JSX becomes typed buildPassNoteForAT* / buildFailNoteForAT* / buildNotApplicableFor* calls. Also renames the 8 acceptance tests to a short, ordered at0N-… slug scheme.

Why it matters: even though this adds a ~400-line builder module, the diff is net −400 lines (1345 insertions / 1767 deletions across 41 files). And we still have 21 apps with unbenchmarked deposit-addresses stubs — each one now goes from ~180 lines of repeated markup to a handful of builder calls, so the boilerplate savings compound as we benchmark the rest.

@sevenzing sevenzing requested a review from a team as a code owner June 20, 2026 13:49
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
ensawards.org Ready Ready Preview, Comment Jun 20, 2026 2:09pm

@sevenzing sevenzing changed the base branch from main to dev/ac June 20, 2026 13:50
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b2407ef9-62c9-4a7b-91bd-2a171f48d30e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Introduces a new "deposit-addresses" ENS best practice with 8 acceptance tests, a notes.tsx builder library, and technicalDetails.tsx. Renames the resolution category from ensv2-readiness to resolution, renames useCaseSummary to ensBestPracticeOverview, and adds AcceptanceTest.order with order-based sorting in UI components. Refactors inline benchmark definitions across ~11 apps into split resolution/ modules, adds deposit-addresses placeholder stubs to ~21 more apps, updates URL redirects, and ships two AI agent skill documents.

Changes

ENS Awards deposit-addresses best practice rollout

Layer / File(s) Summary
Core type contracts
ensawards.org/data/ens-best-practices/types.ts, ensawards.org/data/acceptance-tests/types.ts, ensawards.org/data/ens-best-practices/styles.ts, ensawards.org/data/shared/test-utils.tsx, CONTRIBUTING.md
Renames useCaseSummaryensBestPracticeOverview in BestPracticeTechnicalDetails, adds optional order?: number to AcceptanceTest, and introduces shared bestPracticeTechnicalDetailsCodeStyles. Updates mock utils and docs to match.
Resolution category rename + ensv2-ready-resolution wiring
ensawards.org/data/ens-best-practices/resolution/index.ts, ensawards.org/data/ens-best-practices/resolution/ensv2-ready-resolution/index.ts, ensawards.org/data/ens-best-practices/resolution/ensv2-ready-resolution/technicalDetails.tsx, ensawards.org/astro.config.mjs
Replaces ENSv2ReadinessCategory with ENSResolutionCategory (slug resolution), wires ensv2-ready-resolution to the new category, updates technicalDetails.tsx to use ensBestPracticeOverview and shared code styles, and adds URL redirects from .../ensv2-readiness/... to .../resolution/....
deposit-addresses best practice: index, technicalDetails, notes builders
ensawards.org/data/ens-best-practices/resolution/deposit-addresses/index.ts, .../technicalDetails.tsx, .../notes.tsx
Defines the depositAddresses best practice with 8 acceptance tests (exported ENS/address spans, example pass/fail benchmarks), and a complete notes.tsx library of pass/fail/not-applicable builder functions used by per-app benchmark modules.
Contract-naming technicalDetails rename
ensawards.org/data/ens-best-practices/contract-naming/.../technicalDetails.tsx (3 files)
Updates the three contract-naming best practices to use ensBestPracticeOverview instead of useCaseSummary in their exported technicalDetails objects.
UI components: EnsBestPracticeOverview + order-based sorting
ensawards.org/src/components/molecules/technicalDetails/shared.tsx, .../bestPractice/index.tsx, .../benchmark/index.astro
Replaces UseCaseSummary with EnsBestPracticeOverview; sorts acceptance tests by order (ascending, POSITIVE_INFINITY for undefined) with slug tie-breaker, using getAcceptanceTestBySlug for invariant validation.
Per-app benchmark refactoring: inline → split resolution modules
ensawards.org/data/apps/1inch-defi/benchmarks/..., ambire-wallet/..., binance-wallet/..., blockscout-explorer/..., coinbase-wallet/..., etherscan-explorer/..., readyx-wallet/..., robinhood-wallet/..., walletchan-wallet/..., worldapp-wallet/..., zerion-wallet/...
For 11 apps with existing or new benchmarks, replaces inline ensv2-ready-resolution/deposit-addresses definitions in each benchmarks/index.tsx with imports from new resolution/<best-practice>/index.tsx split modules. Also introduces walletchan contract-naming split modules.
Per-app deposit-addresses undefined placeholder stubs
ensawards.org/data/apps/aave-defi/benchmarks/..., binance-exchange/..., coinbase-exchange/..., cryptocom-*/..., frame-wallet/..., gemini-wallet/..., kraken-*/..., lido-defi/..., metamask-wallet/..., okx-*/..., phantom-wallet/..., rabby-wallet/..., rainbow-wallet/..., robinhood-exchange/..., safe-wallet/..., status-wallet/..., trust-wallet/..., uniswap-defi/...
Adds deposit-addresses benchmark category with at01at08 entries set to undefined in the benchmarks/index.tsx for 21 apps not yet benchmarked.
Agent skills, contributor, gitignore, docs
.agents/skills/generate-app-benchmark/SKILL.md, .agents/skills/rearrange-app-benchmarks/SKILL.md, ensawards.org/data/contributors/index.ts, .gitignore, CONTRIBUTING.md
Adds two AI agent skill docs for generating and rearranging app benchmarks; adds llev contributor; ignores manual.json benchmark files; updates CONTRIBUTING.md for ensBestPracticeOverview, order, and notes.tsx builder usage.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • namehash/ensawards#233: Directly implements the deposit-addresses best-practice shape (technicalDetails, notes, order wiring) that this PR consumes to generate per-app benchmark modules.
  • namehash/ensawards#235: Shares the same core refactors — useCaseSummaryensBestPracticeOverview, AcceptanceTest.order sorting, and the generate-app-benchmark/rearrange-app-benchmarks skill docs.
  • namehash/ensawards#228: Both PRs extend ensawards.org/data/acceptance-tests/types.ts — the retrieved PR adds exampleNotApplicable and NotApplicable result typing, while this PR adds order?: number.

Poem

🐇✨ A rabbit hops through benchmark land,
Where useCaseSummary once did stand —
Now ensBestPracticeOverview takes the stage,
With deposit-addresses on every page!
Eight acceptance tests, all sorted by order,
Split modules tidy up the ENS border. 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to verify relatedness to the changeset. Add a description explaining the motivation, scope, and key changes introduced by this feature (note builders and related refactoring).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat: add builders for notes to decrease boilerplate' accurately describes the primary change: introducing note builder functions throughout the codebase to reduce repetitive benchmark note code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ll/at-03

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR introduces a shared notes.tsx builder module for the deposit-addresses best practice and migrates 11 benchmarked apps from hand-written JSX markup to typed builder calls. It also renames all 8 acceptance test slugs to a short at0N-… scheme and updates the agent skill documentation accordingly.

  • notes.tsx (new): 408-line module exporting buildPassNoteForAT*, buildFailNoteForAT*, buildEnsNotSupportedNote, buildNotApplicableForNonEvmChain, buildNotApplicableForFailedTest, and the low-level buildBenchmarkNote escape hatch; bakes per-test ENS name, address, and chain constants into each builder so app files only supply method, proof, and the result builder name.
  • App benchmark files (11 migrated): each file drops its hand-written <div>/<p>/<img> blocks, *Span imports, style imports, and per-entry as const satisfies AcceptanceTestBenchmark casts in favour of a single builder call per entry and a single as const satisfies AcceptanceTestBenchmarks at the object level.
  • Slug rename: all 8 acceptance test keys are renamed consistently across technicalDetails.tsx, every migrated app file, and the 21 stub-only benchmarks/index.tsx files.

Confidence Score: 5/5

Safe to merge; the change is a mechanical refactor with no logic mutations — builder output is structurally equivalent to the hand-written JSX it replaces for all single-proof entries, and the only observable difference is a vertical vs. horizontal multi-image layout for worldapp-wallet's AT1 screenshots.

All 11 migrated app files were checked: builder selections match the recorded pass/fail/N-A results, slug renames are applied consistently across technicalDetails.tsx, every app file, and all 21 stub files. The one visual delta (worldapp-wallet's two side-by-side screenshots becoming stacked) is aesthetic and does not affect benchmark data or site functionality.

ensawards.org/data/apps/worldapp-wallet/benchmarks/resolution/deposit-addresses/index.tsx — its AT1 previously used a bespoke side-by-side image layout that the generic builder does not replicate.

Important Files Changed

Filename Overview
ensawards.org/data/ens-best-practices/resolution/deposit-addresses/notes.tsx New shared builder module; logic is clean and well-documented. Multi-proof layout uses flex-col (stacked) rather than the original flex-row side-by-side used by worldapp-wallet.
ensawards.org/data/ens-best-practices/resolution/deposit-addresses/technicalDetails.tsx Renames 8 acceptance test slugs and updates 4 image imports to match renamed GIF files; purely mechanical, no logic changes.
ensawards.org/data/apps/zerion-wallet/benchmarks/resolution/deposit-addresses/index.tsx Migrated to builders; AT2 correctly uses buildBenchmarkNote escape hatch with a two-image array for the custom nuanced prose about inconsistent normalization behavior.
ensawards.org/data/apps/worldapp-wallet/benchmarks/resolution/deposit-addresses/index.tsx AT1 has two proof images; old code used flex-row side-by-side layout, new builder stacks them vertically (flex-col), losing the responsive horizontal arrangement.
ensawards.org/data/apps/ambire-wallet/benchmarks/resolution/deposit-addresses/index.tsx Clean migration to builders; builder selections correctly match the old AT results (pass AT1–3, fail AT4–5, N/A AT6–8 cascading from AT5).
ensawards.org/data/apps/coinbase-wallet/benchmarks/resolution/deposit-addresses/index.tsx Clean migration; preserves the existing undefined for at06-resolve-bitcoin-address with its TODO comment, which is intentional carry-over.
.agents/skills/generate-app-benchmark/SKILL.md Updated to document builder-first authoring flow; legacy inline-markup path preserved as a fallback for best practices without a notes.tsx.
CONTRIBUTING.md Adds a new 'Use a best practice's note builders (preferred)' section with examples and links; the hand-written fallback section now cites walletchan-wallet/benchmarks/index.tsx for non-deposit-address best practices.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[App benchmark index.tsx] --> B{notes.tsx exists?}
    B -- Yes --> C[Import builder from notes.tsx]
    B -- No --> D[Hand-write JSX inline]
    C --> E{Result type}
    E -- Pass --> F["buildPassNoteForAT1–8({ method, proof })"]
    E -- Fail --> G["buildFailNoteForAT1–8({ method, proof, extra? })"]
    E -- ENS not supported --> H["buildEnsNotSupportedNote({ method, proof })"]
    E -- Non-EVM chain --> I["buildNotApplicableForNonEvmChain({ chain, proof })"]
    E -- Prerequisite failed --> J["buildNotApplicableForFailedTest({ testNumber, scope? })"]
    E -- Custom / unusual --> K["buildBenchmarkNote({ children, proof })"]
    F & G & H & I & J & K --> L[buildBenchmarkNote renders container]
    L --> M{proof count}
    M -- 0 --> N[prose only]
    M -- 1 --> O[prose + direct img sibling]
    M -- 2+ --> P[prose + flex-col wrapper with stacked imgs]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[App benchmark index.tsx] --> B{notes.tsx exists?}
    B -- Yes --> C[Import builder from notes.tsx]
    B -- No --> D[Hand-write JSX inline]
    C --> E{Result type}
    E -- Pass --> F["buildPassNoteForAT1–8({ method, proof })"]
    E -- Fail --> G["buildFailNoteForAT1–8({ method, proof, extra? })"]
    E -- ENS not supported --> H["buildEnsNotSupportedNote({ method, proof })"]
    E -- Non-EVM chain --> I["buildNotApplicableForNonEvmChain({ chain, proof })"]
    E -- Prerequisite failed --> J["buildNotApplicableForFailedTest({ testNumber, scope? })"]
    E -- Custom / unusual --> K["buildBenchmarkNote({ children, proof })"]
    F & G & H & I & J & K --> L[buildBenchmarkNote renders container]
    L --> M{proof count}
    M -- 0 --> N[prose only]
    M -- 1 --> O[prose + direct img sibling]
    M -- 2+ --> P[prose + flex-col wrapper with stacked imgs]
Loading

Reviews (3): Last reviewed commit: "apply greptile feedback" | Re-trigger Greptile

Comment thread ensawards.org/data/ens-best-practices/resolution/deposit-addresses/notes.tsx Outdated
Comment thread ensawards.org/data/ens-best-practices/resolution/deposit-addresses/notes.tsx Outdated
@sevenzing

Copy link
Copy Markdown
Member Author

@greptile review

@sevenzing sevenzing merged commit 5383065 into dev/ac Jun 20, 2026
7 checks passed
@sevenzing sevenzing deleted the ll/at-03 branch June 20, 2026 14:14
sevenzing added a commit that referenced this pull request Jun 22, 2026
* dev: Add `deposit-address` best practice (#233)

* Action Item 1

* Action Item 2

* Apply 06/18/26 GitHub review feedback & AI agents' suggestions, pt.1

* Apply AI agents' suggestions, pt.2

* feat: etherscan acceptance test (#234)

* Action Item 1

* Action Item 2

* Apply 06/18/26 GitHub review feedback & AI agents' suggestions, pt.1

* Add etherscan acceptance test for deposit address

* revert mockedExampleBenchmark

* delete file

* oops

* add not-applicable

---------

Co-authored-by: y3drk <ziebura.jedrzej@gmail.com>

* feat: ATs for blockscout and 1inch  (#235)

* add skill to rearrange app benchmark

* rearrange blockscout-explorer to new structure

* add blockscout-explorer case

* p lint

* rearrange 1inch-defi benchmark to new structure

* update skill to use values from technicalDetails

* generate benchmark for 1inch

* p lint

* update benchmark of blockscout and etherscan accordingly

* apply fixes for AI review

* feat: Benchmark wallets on `deposit-addresses` best practice (#236)

* Action Item 1

* Action Item 2

* Apply 06/18/26 GitHub review feedback & AI agents' suggestions, pt.1

* Add benchmarks for ambire + example pass for AT1 and example fail for AT4

* Add benchmarks for binance wallet + example fail for AT1

* Add benchmarks for coinbase wallet

* Add benchmarks for readyx

* Add benchmarks for world app wallet

* Add benchmarks for robinhood wallet

* Adjust benchmarked apps to the newly established structure

* Add benchmarks for zerion

* Add benchmarks for walletchan

* unify code with my PR

* p lint

* add more images or at-2 in  zerion

---------

Co-authored-by: sevenzing <lymarenko.lev@gmail.com>

* feat: add builders for notes to decrease boilerplate (#237)

* rename ATs and use notes.tsx to remove boilerplate

* rename images

* add indexed key

* apply greptile feedback

* feat: rearrange benchmarks folders for all apps (#238)

* rearrange to new structure

* remove useless skill

* p lint

* feat: add benchmarks for aave, uniswap and lido (#239)

* add aave and uniswap

* fix uniswap case

* add lido

* yeah i forgot at7 and 8

* just rename deposit-address -> deposit-addresses

* feat: Benchmark wallets on `deposit-addresses` best practice, batch 2 (#241)

* Add benchmarks for okx wallet & crypto.com wallet + add bitcoin benchmark for coinbase wallet + add example passes for ATs 5-8

* Add benchmarks for phantom & rabby + add example pass for AT2 and example fails for ATs 3 & 5

* Update method context notes for AT5 pass/fail template

* Add benchmarks for safe{wallet} + add extra explanations for failed benchmarks + add example pass for AT3

* Add benchmarks for gemini wallet & metamask + update CONTRIBUTING.md + add example fails for ATs 2 & 8

* Apply AI agents' suggestions, pt.1

* feat: add benchmarks for `binance`, `bybit` and `okx` (#240)

* benchmark binance,bybit,okx

* add ensv2 for bybit

* reexport icon for bybit

* add benchmarks for raibow-wallet,status-wallet,trust-wallet (#243)

* add benchmarks for raibow-wallet,status-wallet,trust-wallet

* rename to deposit-addresses

* Add benchmarks for exchanges: coinbase, crypto.com and robinhood + add example fails for ATs 6 & 7 (#242)

* add explain why AT8 is failed in example (#245)

* small fix

---------

Co-authored-by: Jędrzej Ziebura <ziebura.jedrzej@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant