Skip to content

Optimise docs for Unigraph examples#2202

Merged
tk-o merged 10 commits into
mainfrom
docs/improve-unigraph-examples-content
May 29, 2026
Merged

Optimise docs for Unigraph examples#2202
tk-o merged 10 commits into
mainfrom
docs/improve-unigraph-examples-content

Conversation

@tk-o
Copy link
Copy Markdown
Member

@tk-o tk-o commented May 26, 2026

This PR is a followup to PR #2199, and addresses the "Quick Feedback" (point 8., 9., and 10.) section the doc discussed in this thread.

Copilot AI review requested due to automatic review settings May 26, 2026 16:58
@tk-o tk-o requested a review from a team as a code owner May 26, 2026 16:58
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

⚠️ No Changeset found

Latest commit: 1267a7f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 26, 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 May 29, 2026 5:58pm
enskit-react-example.ensnode.io Ready Ready Preview, Comment May 29, 2026 5:58pm
ensnode.io Ready Ready Preview, Comment May 29, 2026 5:58pm
ensrainbow.io Ready Ready Preview, Comment May 29, 2026 5:58pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a7a4bb2f-3358-4e2f-a59d-35605de23394

📥 Commits

Reviewing files that changed from the base of the PR and between 2571cf2 and 1267a7f.

📒 Files selected for processing (7)
  • docs/ensnode.io/src/components/molecules/EnsDbReaderIntro.astro
  • docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro
  • docs/ensnode.io/src/components/molecules/ResultDetails.astro
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/account-domains.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/domain-by-name.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/index.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/indexing-status.mdx

📝 Walkthrough

Walkthrough

Adds four Astro documentation molecule components (ENS reader/indexer/node intros and a collapsible JSON viewer) and composes them into multiple Unigraph example MDX pages, which now export fixture JSON and render the new components in tabbed examples.

Changes

Documentation Components and Examples

Layer / File(s) Summary
Shared documentation molecules
docs/ensnode.io/src/components/molecules/EnsDbReaderIntro.astro, docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro, docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro, docs/ensnode.io/src/components/molecules/ResultDetails.astro
Adds Starlight Aside-based intro components (EnsDbReaderIntro, EnsIndexerSchemaIntro with optional ensIndexerSchemaName, EnsNodeSchemaIntro) and ResultDetails (collapsible JSON preview with a configurable title).
Example pages integration
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/account-domains.mdx, .../domain-by-name.mdx, .../index.mdx, .../indexing-status.mdx, docs/ensnode.io/src/content/docs/docs/integrate/integration-options/ensdb-cli.mdx, docs/ensnode.io/src/content/docs/docs/self-host/index.mdx
Example MDX pages import and compose the new molecules, export concrete JSON fixtures (e.g., resultJson, unigraphSqlResultJson, ensDbSdkResultJson), restructure tab content to include schema/reader intros, and render ResultDetails to show JSON outputs. Two MDX files update imports to use the @components/... alias.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • namehash/ensnode#2107: Related to ENSDb snapshots/CLI and the EnsDbSnapshotsTeaser component referenced by changed imports.
  • namehash/ensnode#2221: Related styling/fix for .starlight-aside link hover color used by the new Aside-based components.
  • namehash/ensnode#2171: Prior updates to Unigraph example pages that this PR builds upon.

Suggested labels

docs

🐰 From the rabbit's desk:

New notes and snippets, tucked in neat,
JSON previews hop out — a tidy treat.
Examples now sing, components in tune,
Docs bright as morning, beneath the moon. 🌙✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete and does not follow the required template structure. It lacks Summary, Why, Testing, and Pre-Review Checklist sections with substantive details. Complete the description using the template: add a Summary (1-3 bullets explaining what changed), Why section (linking to PR #2199 and Slack thread context), Testing details, and mark the Pre-Review Checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Optimise docs for Unigraph examples' accurately summarizes the main change in the changeset, which focuses on improving documentation content and structure for Unigraph examples across multiple MDX files and newly added Astro components.
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 docs/improve-unigraph-examples-content

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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 May 26, 2026

Greptile Summary

This PR polishes the Unigraph examples documentation by extracting repeated explanatory text into reusable Astro components (EnsDbReaderIntro, EnsIndexerSchemaIntro, EnsNodeSchemaIntro, ResultDetails) and enriches each example page with collapsible, pre-populated query result blocks.

  • Four new molecule components are added to DRY up context-setting asides and provide a consistent collapsible result viewer across all example pages.
  • All three example pages (domain-by-name, account-domains, indexing-status) are updated with result JSON, reformatted code blocks, and updated caution wording; the canonical-fields note is relocated from index.mdx to domain-by-name.mdx where it is most relevant.
  • Two existing import paths (ensdb-cli.mdx, self-host/index.mdx) are migrated from long relative paths to the @components/ alias.

Confidence Score: 4/5

Safe to merge after fixing one rendering defect in EnsIndexerSchemaIntro.astro where a backtick-formatted identifier will display as literal backtick characters in the browser.

The new EnsIndexerSchemaIntro component uses raw Markdown-style backticks inside an Astro HTML template, where they are not interpreted — users will see literal backtick characters around ENSINDEXER_SCHEMA_NAME instead of inline-code formatting. Every other identifier in the same component is correctly wrapped in code tags, making this a clear oversight.

docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro — line 18 uses backtick notation inside an HTML template where it will not be converted to code formatting.

Important Files Changed

Filename Overview
docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro New reusable aside explaining the ENSIndexer Schema concept; contains a backtick-formatted identifier that will render as literal characters in the browser instead of inline code.
docs/ensnode.io/src/components/molecules/ResultDetails.astro New reusable collapsible details component that pretty-prints a JSON value via JSON.stringify; straightforward and correct.
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/indexing-status.mdx SQL result example object is not wrapped in an array, inconsistent with the other two example pages; otherwise the large result JSON and updated caution text are fine.
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/account-domains.mdx Updated caution wording, example address changed, components integrated, SQL result correctly represented as an array of rows.
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/domain-by-name.mdx Large SQL and SDK result JSON added, canonical-fields note moved here from index, components integrated correctly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph New Molecule Components
        A[EnsDbReaderIntro.astro]
        B[EnsIndexerSchemaIntro.astro]
        C[EnsNodeSchemaIntro.astro]
        D[ResultDetails.astro]
    end
    subgraph Example Pages
        F[domain-by-name.mdx]
        G[account-domains.mdx]
        H[indexing-status.mdx]
    end
    A -->|imported by| F
    A -->|imported by| G
    A -->|imported by| H
    B -->|imported by| F
    B -->|imported by| G
    C -->|imported by| H
    D -->|imported by| F
    D -->|imported by| G
    D -->|imported by| H
Loading

Reviews (8): Last reviewed commit: "Merge branch 'docs/improve-unigraph-exam..." | Re-trigger Greptile

Comment thread docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro Outdated
Comment thread docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro Outdated
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

This PR refines the Unigraph SQL example docs by adding reusable “intro” asides and collapsible example result renderers, aiming to address follow-up feedback from #2199.

Changes:

  • Adds reusable Starlight <Aside> components to explain ENSNode Schema, ENSIndexer Schema, and ENSDb Reader usage in examples.
  • Adds a ResultDetails component and embeds example result JSON under SQL and ensdb-sdk tabs.
  • Updates the “Connect” overview page copy and relocates the “Canonical fields” note into a specific example page.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/indexing-status.mdx Adds schema/reader intro asides, example result JSON, and result rendering for indexing status.
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/index.mdx Expands EnsDbReader explanation and adjusts notes for the examples landing page.
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/domain-by-name.mdx Adds schema/reader intro asides, example result JSON, and result rendering for domain lookup.
docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/account-domains.mdx Adds schema/reader intro asides, example result JSON, and result rendering for owner domain counts.
docs/ensnode.io/src/components/molecules/ResultDetails.astro New reusable collapsible JSON result renderer for docs examples.
docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro New reusable aside explaining the ENSNode schema.
docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro New reusable aside explaining the ENSIndexer schema name used in examples.
docs/ensnode.io/src/components/molecules/EnsDbReaderIntro.astro New reusable aside pointing readers to the “Connect” section for SDK setup.
Comments suppressed due to low confidence (3)

docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/indexing-status.mdx:155

  • There is an extra trailing triple-backtick fence after </Tabs>. This will break MDX parsing / render the remainder of the page as a code block. Remove the stray ```.
</TabItem>
</Tabs>
**docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/domain-by-name.mdx:107**
* There is an extra trailing triple-backtick fence at the end of the file. This will break MDX parsing / render unintended content as code. Remove the stray ```.

docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/account-domains.mdx:53

  • There is an extra trailing triple-backtick fence at the end of the file. This will break MDX parsing / render unintended content as code. Remove the stray ```.
  </TabItem>
</Tabs>

</details>



---

💡 <a href="/namehash/ensnode/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

Comment thread docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro Outdated
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro`:
- Line 12: In the EnsNodeSchemaIntro component text there is duplicated wording
"There can just be just one ENSNode Schema per ENSDb"; update the copy in
EnsNodeSchemaIntro.astro to remove the duplicate "just" (e.g., "There can just
be one ENSNode Schema per ENSDb" or "There can be just one ENSNode Schema per
ENSDb") so the sentence reads cleanly.
🪄 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: 4fb7441b-42d6-46e9-a533-a627f5700971

📥 Commits

Reviewing files that changed from the base of the PR and between 8ce8cfe and a83d810.

📒 Files selected for processing (8)
  • docs/ensnode.io/src/components/molecules/EnsDbReaderIntro.astro
  • docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro
  • docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro
  • docs/ensnode.io/src/components/molecules/ResultDetails.astro
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/account-domains.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/domain-by-name.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/index.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/unigraph/examples/indexing-status.mdx

Comment thread docs/ensnode.io/src/components/molecules/EnsNodeSchemaIntro.astro Outdated
Copilot AI review requested due to automatic review settings May 26, 2026 17:19
@tk-o tk-o force-pushed the docs/improve-unigraph-examples-content branch from 560a791 to 5ab3e68 Compare May 26, 2026 17:19
@vercel vercel Bot temporarily deployed to Preview – ensrainbow.io May 26, 2026 17:19 Inactive
@vercel vercel Bot temporarily deployed to Preview – admin.ensnode.io May 26, 2026 17:19 Inactive
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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@tk-o Thanks for these updates. Shared a few comments please take the lead to merge when ready 👍 Please continue to advance the priority docs updates in another separate PR.

Comment thread docs/ensnode.io/src/components/molecules/ResultDetails.astro Outdated
import EnsIndexerSchemaIntro from "@components/molecules/EnsIndexerSchemaIntro.astro";
import EnsDbReaderIntro from "@components/molecules/EnsDbReaderIntro.astro";

export const resultJson = [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This example result is not interesting and doesn't communicate the big idea of the whole example. A proper example needs to include a count of ENSv2 domains too!

Comment thread docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro Outdated
Comment thread docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro Outdated
Comment thread docs/ensnode.io/src/components/molecules/EnsIndexerSchemaIntro.astro Outdated
Comment thread docs/ensnode.io/src/components/molecules/EnsDbReaderIntro.astro Outdated
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.

3 participants