feat(omnigraph): ENSIP-15 beautified Name & Label fields#2161
Conversation
Add display-only `CanonicalName.beautified` and `Label.beautified` fields (new BeautifiedName/BeautifiedLabel scalars) and a `beautifyInterpretedLabel` helper in enssdk. Closes #1501. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: ab136c7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
Adds ENSIP-15 “beautified” (display-only) name/label representations to the Omnigraph API and the ENS SDK, so consumers can render beautified canonical names/labels directly from GraphQL without client-side beautification.
Changes:
enssdk: introducebeautifyInterpretedLabel+BeautifiedLabelbranded type, and refactorbeautifyInterpretedNameto use it.ensapiOmnigraph: addBeautifiedName/BeautifiedLabelscalars and exposeCanonicalName.beautified+Label.beautified.- Update generated Omnigraph schema/types + add Changesets for
enssdkandensapi.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/enssdk/src/omnigraph/graphql.ts | Adds scalar mappings for BeautifiedName/BeautifiedLabel in gql.tada client types. |
| packages/enssdk/src/omnigraph/generated/schema.graphql | Regenerated schema reflecting new scalars and fields. |
| packages/enssdk/src/lib/types/ens.ts | Introduces BeautifiedLabel branded type and ENSIP-15 docs for beautified types. |
| packages/enssdk/src/lib/beautify.ts | Adds beautifyInterpretedLabel and refactors beautifyInterpretedName to map per-label. |
| packages/enssdk/src/lib/beautify.test.ts | Adds unit tests for beautifyInterpretedLabel and keeps name beautification coverage. |
| apps/ensapi/src/omnigraph-api/schema/scalars.ts | Adds Pothos scalar definitions for BeautifiedName/BeautifiedLabel. |
| apps/ensapi/src/omnigraph-api/schema/label.ts | Adds Label.beautified resolver using SDK beautification. |
| apps/ensapi/src/omnigraph-api/schema/canonical-name.ts | Adds CanonicalName.beautified resolver using SDK beautification. |
| apps/ensapi/src/omnigraph-api/builder.ts | Extends builder scalar typing to include BeautifiedName/BeautifiedLabel. |
| .changeset/enssdk-beautify-interpreted-label.md | Changeset for new SDK helper/type. |
| .changeset/ensapi-beautified-fields.md | Changeset for new Omnigraph scalars/fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR introduces ENSIP-15 beautification server-side, exposing a new
Confidence Score: 5/5Safe to merge — purely additive changes with no modifications to existing resolution or lookup paths. All changes are additive: new fields, new types, and a clean refactor of No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[InterpretedLabel] --> B{isEncodedLabelHash?}
B -- yes --> C[return label verbatim]
B -- no --> D[ens_beautify label]
D --> E[BeautifiedLabel]
C --> E
F[InterpretedName] --> G[interpretedNameToInterpretedLabels]
G -- empty string root --> H["[] join dot returns empty"]
H --> I[BeautifiedName]
G -- normal name --> J["[InterpretedLabel, ...]"]
J --> K[map beautifyInterpretedLabel]
K --> L["join dot"]
L --> I
M[CanonicalName.beautified resolver] --> N{domain.canonicalName?}
N -- null --> O[throw Invariant Error]
N -- present --> F
P[Label.beautified resolver] --> Q[parent.interpreted]
Q --> A
Reviews (3): Last reviewed commit: "fix(ensapi): grammar in omnigraph scalar..." | Re-trigger Greptile |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@greptile review |
Summary
beautifyInterpretedLabel(Encoded LabelHashes verbatim, elseens_beautify) +BeautifiedLabelbranded type;beautifyInterpretedNamenow maps over it.BeautifiedName/BeautifiedLabelscalars,CanonicalName.beautified: BeautifiedName!, andLabel.beautified: BeautifiedLabel!(beautified per ENSIP-15).Why
canonical { name { beautified } }directly instead of callingbeautifyInterpretedNameclient-side. closes Return beautified display names #1501.Testing
beautifyInterpretedLabelunit tests (normalized label + Encoded LabelHash passthrough).pnpm generate, fullpnpm typecheck,pnpm lint, and affectedpnpm test --project enssdk --project ensapiall pass.Notes for Reviewer (Optional)
beautifiedfields are display-only —interpretedremains the value to use for navigation targets and lookup keys; descriptions say so and link ENSIP-15.beautifyInterpretedNameclient-side; migrating them to the new fields is deferred to Migrate beautifyInterpretedName consumers to Omnigraph beautified fields #2160 (sub-issue of Epic: ENSv2 Adoption of ENSNode #1360), gated on 1.14.x prod + v2-sepolia canonical materialization.Checklist