Skip to content

Extend stack info data model#1988

Open
tk-o wants to merge 9 commits intomainfrom
feat/extend-stack-info-data-model
Open

Extend stack info data model#1988
tk-o wants to merge 9 commits intomainfrom
feat/extend-stack-info-data-model

Conversation

@tk-o
Copy link
Copy Markdown
Member

@tk-o tk-o commented Apr 23, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary

  • Extended the stack info data model
    • Introduced EnsIndexerStackInfo data model which includes ensIndexerPublicConfig and ensRainbowPublicConfig.
    • Introduced EnsDbStackInfo data model which extends EnsIndexerStackInfo, and includes ensDbPublicConfig.
    • Updated EnsNodeStackInfo data model which extends EnsDbStackInfo, and includes ensApiPublicConfig.
  • The ensRainbow: EnsRainbowPublicConfig is now required field across all stack info data models
    • Please note we don't write the EnsNodeStackInfo object into ENSNode Metadata table in ENSDb yet, so we while creating EnsNodeStackInfo object in ENSApi runtime, we leverege the fact that ensIndexerPublicConfig.ensIndexerPublicConfig is always present.

Why

  • Why this change exists. Link to related GitHub issues where relevant.

Testing

  • Tested by running ENSNode locally, and going though ENSAdmin views (including mocked ones).
    • Feel free to give it a try yourself: click here to see the preview of the changes

Notes for Reviewer (Optional)

  • Please review commit-by-commit.
  • No visual updates were intended.
  • This is prep PR to enable introduction of the IndexingMetadataContext data model.
  • Out-of-scope (will be done in the PR introducing IndexingMetadataContext data model).
    • Dropping ensIndexerPublicConfig field from EnsApiPublicConfig data model.
    • Dropping ensRainbowPublicConfig field from EnsIndexerPublicConfig data model.
    • Dropping recordsCount field from EnsRainbowPublicConfig data model.

Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

Copilot AI review requested due to automatic review settings April 23, 2026 15:54
@tk-o tk-o requested a review from a team as a code owner April 23, 2026 15:54
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 23, 2026

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

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Apr 23, 2026 4:25pm
ensnode.io Ready Ready Preview, Comment Apr 23, 2026 4:25pm
ensrainbow.io Ready Ready Preview, Comment Apr 23, 2026 4:25pm

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

🦋 Changeset detected

Latest commit: 2955218

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
ensadmin Major
@ensnode/ensnode-sdk Major
ensapi Major
ensindexer Major
ensrainbow Major
fallback-ensapi Major
@namehash/ens-referrals Major
@ensnode/ensdb-sdk Major
@ensnode/ensnode-react Major
@ensnode/ensrainbow-sdk Major
@ensnode/integration-test-env Major
@namehash/namehash-ui Major
@docs/ensnode Major
@docs/ensrainbow Major
enssdk Major
enscli Major
enskit Major
ensskills Major
@ensnode/datasources Major
@ensnode/ponder-sdk Major
@ensnode/ponder-subgraph Major
@ensnode/shared-configs Major
@ensnode/enskit-react-example Patch

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Walkthrough

A PR introducing EnsIndexerStackInfo and EnsDbStackInfo data models with refactored EnsNodeStackInfo extending EnsDbStackInfo. It adds new serialization/deserialization modules and Zod validators while renaming UI components from ENSNodeConfig* to EnsNodeStackInfo* naming convention.

Changes

Cohort / File(s) Summary
Changesets
.changeset/clear-rabbits-punch.md, .changeset/fifty-games-smash.md
New version bump entries for ensadmin (minor) and ensnode-sdk (minor) documenting stack info type renames and new data models.
Mock Stack Info Structure
apps/ensadmin/src/app/mock/stack-info/page.tsx, apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts
New mock stack-info page component with state management for variant selection and computed props based on deserialization; includes 413 lines of serialized mock dataset covering normal variants and error scenarios.
Mock Data Removal
apps/ensadmin/src/app/mock/config-info/data.json, apps/ensadmin/src/app/mock/config-info/page.tsx
Deletion of legacy mock configuration page and JSON data file (197 + 95 lines removed); replaced by new stack-info structure.
Mock Navigation
apps/ensadmin/src/app/mock/page.tsx
Updated first mock navigation entry to point from /mock/config-info to /mock/stack-info with renamed label from ENSNodeConfigInfo to EnsNodeStackInfo.
Component Refactoring
apps/ensadmin/src/components/connection/cards/ensnode-stack-info.tsx, apps/ensadmin/src/components/connection/index.tsx
Renamed exported components: ENSNodeConfigCardDisplayEnsNodeStackInfoCardDisplay, ENSNodeConfigInfoViewDisplayEnsNodeStackInfo, ENSNodeConfigInfoLoadAndDisplayEnsNodeStackInfo; updated rainbow config data access path; updated connection display import and render call.
Stack Info Core Models
packages/ensnode-sdk/src/stack-info/ensindexer-stack-info.ts, packages/ensnode-sdk/src/stack-info/ensdb-stack-info.ts, packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts
New EnsIndexerStackInfo interface and builder; new EnsDbStackInfo extending EnsIndexerStackInfo; refactored EnsNodeStackInfo to extend EnsDbStackInfo and updated builder signature to accept explicit indexer/rainbow configs.
Serialization Modules
packages/ensnode-sdk/src/stack-info/serialize/ensindexer-stack-info.ts, packages/ensnode-sdk/src/stack-info/serialize/ensdb-stack-info.ts, packages/ensnode-sdk/src/stack-info/serialize/ensnode-stack-info.ts
New serialized DTOs and serialization functions for EnsIndexerStackInfo and EnsDbStackInfo; refactored SerializedEnsNodeStackInfo to extend SerializedEnsDbStackInfo with delegation pattern.
Deserialization Modules
packages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.ts, packages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.ts, packages/ensnode-sdk/src/stack-info/deserialize/ensnode-stack-info.ts
New deserialization utilities with two-stage Zod validation pipelines; unvalidated intermediate builders; error handling with formatted messages; refactored ensnode-stack-info deserialization to delegate ENSDb portion to new helper.
Zod Schema Validation
packages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.ts, packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts, packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts
New schemas for EnsIndexerStackInfo and EnsDbStackInfo with custom invariant checks; modified EnsNodeStackInfo schema to require ensRainbow (previously optional).
Public API Exports
packages/ensnode-sdk/src/stack-info/index.ts
Added six new re-exports for EnsIndexerStackInfo and EnsDbStackInfo serialize/deserialize modules.
Cache Layer Update
apps/ensapi/src/cache/stack-info.cache.ts
Updated loadEnsNodeStackInfo to pass ensIndexerPublicConfig and ensRainbowPublicConfig as explicit parameters to buildEnsNodeStackInfo.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~55 minutes

Possibly related PRs

Poem

🐰 New stacks now rise, well-organized and neat,
With schemas validated, the models complete,
From Indexer to Database, the info now flows,
Where Rainbow and Config in harmony grows,
Component names gleaming in EnsNodeStackInfo's light!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 59.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Extend stack info data model' directly and clearly describes the main change—introducing new data models (EnsIndexerStackInfo, EnsDbStackInfo) and extending EnsNodeStackInfo in the stack info hierarchy.
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.
Description check ✅ Passed PR description follows the required template structure with all major sections completed: Summary, Why, Testing, Notes for Reviewer, and Pre-Review Checklist.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/extend-stack-info-data-model

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
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR extends the stack info data model by introducing two new intermediate types — EnsIndexerStackInfo (ENSIndexer + ENSRainbow) and EnsDbStackInfo (extends EnsIndexerStackInfo + ENSDb) — and updates EnsNodeStackInfo to extend EnsDbStackInfo instead of being a flat interface. The refactor also adds new cross-service version-compatibility invariants enforced via Zod v4 schemas, and replaces the old mock/config-info page with a new mock/stack-info page that exercises the new deserialization path.

The previous P1 concern (missing invariant_ensRainbowCompatibilityWithEnsIndexer in makeEnsNodeStackInfoSchema) is fully resolved. The explicit re-application of that invariant at each .extend() layer is correct: Zod v4 does not carry over .check() refinements across .extend() calls, so each schema level must register it explicitly.

Confidence Score: 5/5

Safe to merge — the previous P1 concern is resolved and all remaining findings are minor style suggestions.

The previous P1 (missing invariant_ensRainbowCompatibilityWithEnsIndexer in makeEnsNodeStackInfoSchema) is fully addressed. Zod v4 confirmed not to carry checks over .extend(), so the explicit re-application at each level is intentional and correct. Only P2 items remain: a misleading inline comment and a duplicated mock constant.

No files require special attention.

Important Files Changed

Filename Overview
packages/ensnode-sdk/src/stack-info/ensindexer-stack-info.ts New EnsIndexerStackInfo interface and buildEnsIndexerStackInfo builder — clean foundation for the new model hierarchy.
packages/ensnode-sdk/src/stack-info/ensdb-stack-info.ts New EnsDbStackInfo interface extending EnsIndexerStackInfo and buildEnsDbStackInfo builder — correctly composes the lower-level stack info.
packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts EnsNodeStackInfo updated to extend EnsDbStackInfo; buildEnsNodeStackInfo now requires explicit ensIndexerPublicConfig and ensRainbowPublicConfig params instead of deriving them from nested fields — breaking change handled in stack-info.cache.ts.
packages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.ts New schema file with makeEnsIndexerStackInfoSchema that correctly applies invariant_ensRainbowCompatibilityWithEnsIndexer; extracted invariant function enables reuse at higher layers.
packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts Correctly re-applies invariant_ensRainbowCompatibilityWithEnsIndexer after .extend() (necessary since Zod v4 .extend() does not carry over parent checks); safe.
packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts New version-compatibility invariants added for ENSApi/ENSIndexer/ENSRainbow/ENSNormalize; the Rainbow/Indexer invariant is re-applied explicitly (correct for Zod v4). Minor misleading comment on line 15.
apps/ensapi/src/cache/stack-info.cache.ts Extracts ensIndexerPublicConfig and ensRainbowPublicConfig from ensApiPublicConfig and passes them explicitly to updated buildEnsNodeStackInfo — correct.
apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts New mock data file; well-structured with helper functions, but contains two identical constants (COMMON_ENS_RAINBOW / ENS_RAINBOW_PUBLIC_CONFIG) used by different helpers.
apps/ensadmin/src/app/mock/stack-info/page.tsx New mock page replacing the old config-info mock; directly calls deserializeEnsNodeStackInfo with the new model — clean and correct.

Class Diagram

%%{init: {'theme': 'neutral'}}%%
classDiagram
    class EnsIndexerStackInfo {
        +EnsIndexerPublicConfig ensIndexer
        +EnsRainbowPublicConfig ensRainbow
    }
    class EnsDbStackInfo {
        +EnsDbPublicConfig ensDb
    }
    class EnsNodeStackInfo {
        +EnsApiPublicConfig ensApi
    }
    EnsIndexerStackInfo <|-- EnsDbStackInfo
    EnsDbStackInfo <|-- EnsNodeStackInfo
    class SerializedEnsIndexerStackInfo {
        +SerializedEnsIndexerPublicConfig ensIndexer
        +SerializedEnsRainbowPublicConfig ensRainbow
    }
    class SerializedEnsDbStackInfo {
        +SerializedEnsDbPublicConfig ensDb
    }
    class SerializedEnsNodeStackInfo {
        +SerializedEnsApiPublicConfig ensApi
    }
    SerializedEnsIndexerStackInfo <|-- SerializedEnsDbStackInfo
    SerializedEnsDbStackInfo <|-- SerializedEnsNodeStackInfo
Loading

Reviews (2): Last reviewed commit: "Update OpenAPI Spec" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts (1)

14-34: 🧹 Nitpick | 🔵 Trivial

Consider composing via makeEnsDbStackInfoSchema for consistency.

The serialize/deserialize layer and the SerializedEnsNodeStackInfo type both compose via the new EnsDbStackInfo helpers. These Zod schemas still enumerate all fields directly. For consistency (and to pick up the invariant_ensRainbowCompatibilityWithEnsIndexer check that makeEnsDbStackInfoSchema applies), consider:

♻️ Proposed refactor
 export function makeSerializedEnsNodeStackInfoSchema(valueLabel?: string) {
   const label = valueLabel ?? "ENSNodeStackInfo";
-  return z.object({
-    ensApi: makeSerializedEnsApiPublicConfigSchema(`${label}.ensApi`),
-    ensDb: makeEnsDbPublicConfigSchema(`${label}.ensDb`),
-    ensIndexer: makeSerializedEnsIndexerPublicConfigSchema(`${label}.ensIndexer`),
-    ensRainbow: makeEnsRainbowPublicConfigSchema(`${label}.ensRainbow`),
-  });
+  return makeSerializedEnsDbStackInfoSchema(label).extend({
+    ensApi: makeSerializedEnsApiPublicConfigSchema(`${label}.ensApi`),
+  });
 }

Otherwise, tightening ensRainbow to required is correct given the extended-type hierarchy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts` around
lines 14 - 34, Replace the explicit field enumeration in
makeSerializedEnsNodeStackInfoSchema and makeEnsNodeStackInfoSchema with
composition via the existing EnsDb stack helpers: use
makeSerializedEnsDbStackInfoSchema(...) inside
makeSerializedEnsNodeStackInfoSchema and makeEnsDbStackInfoSchema(...) inside
makeEnsNodeStackInfoSchema (passing the same composed label) so the schemas pick
up the shared structure and the invariant_ensRainbowCompatibilityWithEnsIndexer
check applied by the EnsDb helpers instead of re-declaring ensApi, ensDb,
ensIndexer, ensRainbow locally.
packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts (1)

17-25: ⚠️ Potential issue | 🟡 Minor

Keep the builder documentation in sync with the expanded signature.

The function now also requires ENSIndexer and ENSRainbow configs, but the summary still says it builds only from ENSApi and ENSDb.

Proposed documentation update
 /**
  * Build a complete {`@link` EnsNodeStackInfo} object from
- * the given public configs of ENSApi and ENSDb.
+ * the given public configs of ENSApi, ENSDb, ENSIndexer, and ENSRainbow.
  */
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts` around lines 17 -
25, Update the JSDoc for buildEnsNodeStackInfo to reflect the expanded
parameters: mention that it builds a complete EnsNodeStackInfo from the public
configs of ENSApi, ENSDb, ENSIndexer, and ENSRainbow; update the `@param` list to
include EnsIndexerPublicConfig and EnsRainbowPublicConfig and adjust the summary
sentence accordingly so it no longer only references ENSApi and ENSDb.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/ensadmin/src/app/mock/stack-info/page.tsx`:
- Around line 27-32: The mock error case for "Loading Error" uses stale copy
referring to "ENSNodeConfigInfo" and "ENSIndexer Config"; update the returned
error object inside the case "Loading Error" (the error.title and
error.description strings) to reflect the stack info context — e.g., change
error.title to something like "StackInfo Error" and error.description to a
message about failing to fetch Stack Info — so the mock accurately matches the
stack info flow exercised by this page.tsx case.

In `@apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts`:
- Around line 7-413: The mock has large duplicated sub-objects
(ensRainbowPublicConfig, ensIndexerPublicConfig, ensIndexer, ensRainbow, ensDb,
versionInfo) inside mockSerializedEnsNodeStackInfo; extract shared fragments
like const baseVersionInfo, baseEnsDb, baseEnsRainbowPublicConfig, and
baseEnsIndexerPublicConfig and then build each variant by composing/spreading
those bases and only overriding the few fields that differ (e.g.
indexedChainIds, namespace, plugins, ensIndexerSchemaName); update
mockSerializedEnsNodeStackInfo to reference those constants so the four "happy
path" variants reuse the same base objects while preserving the final
"Deserialization Error" variant intact, and keep the overall export typed with
as const satisfies Record<string, SerializedEnsNodeStackInfo>.

In `@packages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.ts`:
- Around line 12-18: The JSDoc for the builder of EnsDbStackInfo contains a
redundant "@return" tag that merely repeats the summary; remove the "@return"
line from the JSDoc block that documents the function which constructs an
EnsDbStackInfo (referenced alongside makeEnsDbStackInfoSchema and
EnsDbStackInfo) so the doc only keeps the descriptive summary and parameter docs
without the duplicated return tag.

In `@packages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.ts`:
- Around line 12-18: Remove the redundant JSDoc `@return` tag from the JSDoc block
that documents the function building an unvalidated EnsIndexerStackInfo (the doc
that references {`@link` EnsIndexerStackInfo} and {`@link`
makeEnsIndexerStackInfoSchema}); keep the summary and the `@param` but delete the
`@return` line so the comment no longer restates the method summary.

In `@packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts`:
- Around line 8-24: The label fallback is applied only to the ensDb subpath,
causing inconsistent error path prefixes because
makeSerializedEnsIndexerStackInfoSchema and makeEnsIndexerStackInfoSchema are
called with valueLabel rather than the resolved label; change both calls in
makeSerializedEnsDbStackInfoSchema and makeEnsDbStackInfoSchema to pass the
resolved label variable (label) instead of valueLabel so nested indexer/rainbow
errors use the same unified prefix as ensDb (and keep the rest of each function
unchanged).

---

Outside diff comments:
In `@packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts`:
- Around line 17-25: Update the JSDoc for buildEnsNodeStackInfo to reflect the
expanded parameters: mention that it builds a complete EnsNodeStackInfo from the
public configs of ENSApi, ENSDb, ENSIndexer, and ENSRainbow; update the `@param`
list to include EnsIndexerPublicConfig and EnsRainbowPublicConfig and adjust the
summary sentence accordingly so it no longer only references ENSApi and ENSDb.

In `@packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts`:
- Around line 14-34: Replace the explicit field enumeration in
makeSerializedEnsNodeStackInfoSchema and makeEnsNodeStackInfoSchema with
composition via the existing EnsDb stack helpers: use
makeSerializedEnsDbStackInfoSchema(...) inside
makeSerializedEnsNodeStackInfoSchema and makeEnsDbStackInfoSchema(...) inside
makeEnsNodeStackInfoSchema (passing the same composed label) so the schemas pick
up the shared structure and the invariant_ensRainbowCompatibilityWithEnsIndexer
check applied by the EnsDb helpers instead of re-declaring ensApi, ensDb,
ensIndexer, ensRainbow locally.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 16627062-6551-4ce9-97b8-14f89d71638f

📥 Commits

Reviewing files that changed from the base of the PR and between 44b4385 and 64c4fa8.

📒 Files selected for processing (24)
  • .changeset/clear-rabbits-punch.md
  • .changeset/fifty-games-smash.md
  • apps/ensadmin/src/app/@breadcrumbs/mock/stack-info/page.tsx
  • apps/ensadmin/src/app/mock/config-info/data.json
  • apps/ensadmin/src/app/mock/config-info/page.tsx
  • apps/ensadmin/src/app/mock/page.tsx
  • apps/ensadmin/src/app/mock/stack-info/page.tsx
  • apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts
  • apps/ensadmin/src/components/connection/cards/ensnode-stack-info.tsx
  • apps/ensadmin/src/components/connection/index.tsx
  • apps/ensapi/src/cache/stack-info.cache.ts
  • packages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/deserialize/ensnode-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/ensdb-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/ensindexer-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/index.ts
  • packages/ensnode-sdk/src/stack-info/serialize/ensdb-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/serialize/ensindexer-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/serialize/ensnode-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.ts
  • packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts
💤 Files with no reviewable changes (2)
  • apps/ensadmin/src/app/mock/config-info/page.tsx
  • apps/ensadmin/src/app/mock/config-info/data.json

Comment thread apps/ensadmin/src/app/mock/stack-info/page.tsx
Comment thread apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts Outdated
Comment thread packages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.ts
Comment thread packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends @ensnode/ensnode-sdk’s “stack info” domain model into layered types (EnsIndexerStackInfoEnsDbStackInfoEnsNodeStackInfo), with corresponding zod schemas and (de)serialization helpers, and updates ENSApi + ENSAdmin to consume the updated model and renamed UI components/mocks.

Changes:

  • Added new stack-info models for ENSIndexer and ENSDb, and refactored ENSNode stack info to extend them.
  • Added serialize/deserialize + zod schemas for the new stack-info layers.
  • Updated ENSApi stack-info cache builder and ENSAdmin UI/mocks/routes to use the new stack-info naming and structure.

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts Makes ensRainbow required in ENSNode stack-info zod schemas.
packages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.ts New zod schemas + invariant check for EnsIndexerStackInfo.
packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts New zod schemas composing EnsIndexerStackInfo + ENSDb config.
packages/ensnode-sdk/src/stack-info/serialize/ensnode-stack-info.ts Refactors ENSNode stack-info serialization to compose via ENSDb stack-info serializer.
packages/ensnode-sdk/src/stack-info/serialize/ensindexer-stack-info.ts New serializer + serialized type for EnsIndexerStackInfo.
packages/ensnode-sdk/src/stack-info/serialize/ensdb-stack-info.ts New serializer + serialized type for EnsDbStackInfo.
packages/ensnode-sdk/src/stack-info/index.ts Exports new stack-info layers and their (de)serializers.
packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts EnsNodeStackInfo now extends EnsDbStackInfo; builder signature updated.
packages/ensnode-sdk/src/stack-info/ensindexer-stack-info.ts New EnsIndexerStackInfo interface + builder.
packages/ensnode-sdk/src/stack-info/ensdb-stack-info.ts New EnsDbStackInfo interface + builder extending EnsIndexerStackInfo.
packages/ensnode-sdk/src/stack-info/deserialize/ensnode-stack-info.ts EnsNodeStackInfo deserialization now composes through EnsDbStackInfo deserialization.
packages/ensnode-sdk/src/stack-info/deserialize/ensindexer-stack-info.ts New deserializer for EnsIndexerStackInfo.
packages/ensnode-sdk/src/stack-info/deserialize/ensdb-stack-info.ts New deserializer for EnsDbStackInfo.
apps/ensapi/src/cache/stack-info.cache.ts Updates stack-info construction to pass explicit indexer/rainbow configs.
apps/ensadmin/src/components/connection/index.tsx Switches connection details card to the renamed stack-info component.
apps/ensadmin/src/components/connection/cards/ensnode-stack-info.tsx Renames ENSNodeConfig* components to EnsNodeStackInfo* and updates ENSRainbow field access.
apps/ensadmin/src/app/mock/stack-info/stack-info.mock.ts Adds mock SerializedEnsNodeStackInfo variants for UI testing.
apps/ensadmin/src/app/mock/stack-info/page.tsx Adds new UI mock page to render stack-info variants via deserialization.
apps/ensadmin/src/app/mock/page.tsx Updates mock list link to the new /mock/stack-info page.
apps/ensadmin/src/app/mock/config-info/page.tsx Removes old config-info mock page.
apps/ensadmin/src/app/mock/config-info/data.json Removes old config-info mock data.
apps/ensadmin/src/app/@breadcrumbs/mock/stack-info/page.tsx Adds breadcrumbs for the new stack-info mock route.
.changeset/fifty-games-smash.md Changeset for SDK minor bump due to new stack-info models/exports.
.changeset/clear-rabbits-punch.md Changeset for ENSAdmin minor bump due to component renames.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts Outdated
Comment thread packages/ensnode-sdk/src/stack-info/ensnode-stack-info.ts
Comment thread packages/ensnode-sdk/src/stack-info/zod-schemas/ensnode-stack-info.ts Outdated
Comment thread packages/ensnode-sdk/src/stack-info/zod-schemas/ensindexer-stack-info.ts Outdated
Comment thread apps/ensadmin/src/app/mock/stack-info/page.tsx Outdated
Comment thread packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts
Comment thread packages/ensnode-sdk/src/stack-info/zod-schemas/ensdb-stack-info.ts
@tk-o
Copy link
Copy Markdown
Member Author

tk-o commented Apr 23, 2026

@greptile review

Copy link
Copy Markdown
Contributor

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestions:

  1. Breadcrumb label references old component name "ENSNodeConfigInfo" instead of "EnsNodeStackInfo"
  1. Breadcrumb label displays outdated "ENSNodeConfigInfo" instead of "EnsNodeStackInfo"

Fix on Vercel

ctx.issues.push({
code: "custom",
input: ctx.value,
message: `ENSRainbow's label set (id: ${ensRainbow.labelSet.labelSetId}) must be same as the ENSIndexer's label set (id: ${ensIndexer.labelSet.labelSetId}).`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message: `ENSRainbow's label set (id: ${ensRainbow.labelSet.labelSetId}) must be same as the ENSIndexer's label set (id: ${ensIndexer.labelSet.labelSetId}).`,
message: `ENSRainbow's label set (id: ${ensRainbow.labelSet.labelSetId}) must be the same as the ENSIndexer's label set (id: ${ensIndexer.labelSet.labelSetId}).`,

Grammar issue in error message: "must be same as the" should be "must be the same as"

Fix on Vercel

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.

2 participants