Skip to content

fix(apps/ensadmin): use next/link for client-side navigation in breadcrumbs#1853

Merged
notrab merged 2 commits intomainfrom
use-the-router-in-breadcrumbs
Mar 31, 2026
Merged

fix(apps/ensadmin): use next/link for client-side navigation in breadcrumbs#1853
notrab merged 2 commits intomainfrom
use-the-router-in-breadcrumbs

Conversation

@notrab
Copy link
Copy Markdown
Member

@notrab notrab commented Mar 31, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary

  • Replace BreadcrumbLink href= with next/link via asChild composition in all breadcrumb pages for client-side navigation.

Why

  • BreadcrumbLinkrenders a plain` tag by default, causing full-page reloads on navigation.
  • Using next/link with the asChild pattern enables client-side routing, preserving app state and improving navigation performance.

Testing

  • Manual verification that breadcrumb links navigate without full-page reloads across all affected pages (mock sub-pages and name explorer).

Notes for Reviewer (Optional)

  • All 6 breadcrumb pages follow the same mechanical change: import Link from "next/link", swap <BreadcrumbLink href={...}> to <BreadcrumbLink asChild><Link href={...}>.

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)

@notrab notrab requested a review from a team as a code owner March 31, 2026 17:22
Copilot AI review requested due to automatic review settings March 31, 2026 17:22
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 31, 2026

⚠️ No Changeset found

Latest commit: 72f7da5

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 Mar 31, 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 Mar 31, 2026 5:30pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
ensnode.io Skipped Skipped Mar 31, 2026 5:30pm
ensrainbow.io Skipped Skipped Mar 31, 2026 5:30pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

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: c7ac3dfe-9303-4f95-b30d-eaa84d36d659

📥 Commits

Reviewing files that changed from the base of the PR and between 817d48b and 72f7da5.

📒 Files selected for processing (1)
  • apps/ensadmin/src/app/@breadcrumbs/inspect/records/page.tsx

📝 Walkthrough

Walkthrough

Replaced direct href props on BreadcrumbLink components with asChild composition using next/link's Link across breadcrumb pages, changing how breadcrumb link elements are rendered while keeping labels and destinations unchanged.

Changes

Cohort / File(s) Summary
Mock Breadcrumb Link Refactoring
apps/ensadmin/src/app/@breadcrumbs/mock/config-info/page.tsx, apps/ensadmin/src/app/@breadcrumbs/mock/display-identity/page.tsx, apps/ensadmin/src/app/@breadcrumbs/mock/indexing-stats/page.tsx, apps/ensadmin/src/app/@breadcrumbs/mock/registrar-actions/page.tsx, apps/ensadmin/src/app/@breadcrumbs/mock/relative-time/page.tsx
Added next/link import and converted the "UI Mocks" breadcrumb from <BreadcrumbLink href={...}>Label</BreadcrumbLink> to <BreadcrumbLink asChild><Link href={...}>Label</Link></BreadcrumbLink> composition.
Name Breadcrumb Link Refactoring
apps/ensadmin/src/app/@breadcrumbs/name/page.tsx
Added next/link import and converted the "Names" breadcrumb to use BreadcrumbLink asChild wrapping a Link element instead of passing href directly.
Inspect Records Breadcrumb Refactor
apps/ensadmin/src/app/@breadcrumbs/inspect/records/page.tsx
Added next/link import and replaced direct href on the "Record Resolution" breadcrumb with asChild composition wrapping a Link element; conditional rendering and label remain the same.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰
A little hop from href to Link,
I nest asChild where breadcrumbs blink.
Labels stay steady, routes still true,
I nibble code and tidy the view.
Hooray — these links now bounce anew! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: refactoring breadcrumb navigation to use next/link for client-side routing instead of plain anchor tags.
Description check ✅ Passed The pull request description follows the template with all required sections: Summary, Why, Testing, Notes for Reviewer, and Pre-Review Checklist are all complete and informative.

✏️ 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 use-the-router-in-breadcrumbs

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.

@notrab notrab changed the title chore(apps/ensadmin): use next/link for client-side navigation in breadcrumbs fix(apps/ensadmin): use next/link for client-side navigation in breadcrumbs Mar 31, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 31, 2026

Greptile Summary

This PR performs a mechanical, consistent improvement across 6 breadcrumb page components in apps/ensadmin, replacing the plain <BreadcrumbLink href={...}> pattern with the Radix UI asChild composition pattern using next/link. This enables client-side navigation instead of full-page reloads when users click breadcrumb links.

Key changes:

  • All 6 breadcrumb pages follow the identical transformation.
  • BreadcrumbLink already natively supports asChild via Radix UI's Slot, so no changes to the shared component are needed.
  • The className and Radix Slot's prop-merging correctly forward all styling to the rendered <Link><a> element.
  • No logic changes — only the rendering/navigation mechanism is updated.

Confidence Score: 5/5

Safe to merge — purely mechanical improvement with no logic changes and correct use of the established asChild pattern.

All 6 files apply the exact same well-understood pattern. BreadcrumbLink already supports asChild via Radix UI Slot, next/link is the idiomatic Next.js client navigation primitive, and prop-merging works correctly. No P1/P0 findings.

No files require special attention.

Important Files Changed

Filename Overview
apps/ensadmin/src/app/@breadcrumbs/mock/config-info/page.tsx Replaces BreadcrumbLink href with asChild + next/link pattern for client-side navigation; no issues found.
apps/ensadmin/src/app/@breadcrumbs/mock/display-identity/page.tsx Same mechanical asChild + next/link swap as other mock breadcrumb pages; clean change.
apps/ensadmin/src/app/@breadcrumbs/mock/indexing-stats/page.tsx Same mechanical asChild + next/link swap; no issues.
apps/ensadmin/src/app/@breadcrumbs/mock/registrar-actions/page.tsx Same mechanical asChild + next/link swap; no issues.
apps/ensadmin/src/app/@breadcrumbs/mock/relative-time/page.tsx Same mechanical asChild + next/link swap; no issues.
apps/ensadmin/src/app/@breadcrumbs/name/page.tsx Applies the asChild + next/link pattern to the ENS Explorer name breadcrumb; no issues found.

Reviews (1): Last reviewed commit: "use next/link for client-side navigation..." | Re-trigger Greptile

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

Updates ENSAdmin breadcrumb links to use Next.js client-side navigation by composing BreadcrumbLink with next/link via the asChild pattern, avoiding full page reloads when navigating through breadcrumbs.

Changes:

  • Add next/link to breadcrumb pages.
  • Replace <BreadcrumbLink href=...> with <BreadcrumbLink asChild><Link href=... /></BreadcrumbLink> on affected routes.

Reviewed changes

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

Show a summary per file
File Description
apps/ensadmin/src/app/@breadcrumbs/name/page.tsx Switch breadcrumb “Names” link to next/link via asChild.
apps/ensadmin/src/app/@breadcrumbs/mock/relative-time/page.tsx Switch “UI Mocks” breadcrumb link to next/link via asChild.
apps/ensadmin/src/app/@breadcrumbs/mock/registrar-actions/page.tsx Switch “UI Mocks” breadcrumb link to next/link via asChild.
apps/ensadmin/src/app/@breadcrumbs/mock/indexing-stats/page.tsx Switch “UI Mocks” breadcrumb link to next/link via asChild.
apps/ensadmin/src/app/@breadcrumbs/mock/display-identity/page.tsx Switch “UI Mocks” breadcrumb link to next/link via asChild.
apps/ensadmin/src/app/@breadcrumbs/mock/config-info/page.tsx Switch “UI Mocks” breadcrumb link to next/link via asChild.

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

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.

@notrab Looks good. 1 small comment please take the lead to merge when ready 👍

@vercel vercel bot temporarily deployed to Preview – ensnode.io March 31, 2026 17:28 Inactive
@vercel vercel bot temporarily deployed to Preview – ensrainbow.io March 31, 2026 17:28 Inactive
@notrab notrab merged commit 03c9f12 into main Mar 31, 2026
16 checks passed
@notrab notrab deleted the use-the-router-in-breadcrumbs branch March 31, 2026 17:33
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