Skip to content

feat(names): render KNS and INS names as design-spec cards - #332

Merged
leobragaz merged 1 commit into
mainfrom
feat/names-grid-cards
Sep 3, 2026
Merged

feat(names): render KNS and INS names as design-spec cards#332
leobragaz merged 1 commit into
mainfrom
feat/names-grid-cards

Conversation

@leobragaz

@leobragaz leobragaz commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Replaces the vertical row list on Dashboard → Names with the 3-column card grid from Figma — file 0p1fiysKpbwjRsPp6cGCGX, node 10641-155418.

KNSItem and INSItem are deleted in favour of a single NameCard, mirroring the design's shared container/kns&text component. Names.tsx was their only consumer.

What changed

  • Containerspace-y-2flex flex-wrap gap-[12px] (104+12+104+12+104 = 336 in 340). Skeletons now match the card box; empty state, sentinel and spinner take w-full so they don't inline beside cards. Infinite-scroll IntersectionObserver untouched.
  • Card — 104×120, rounded-[12px], border daintree-700 (#203c49, exact design token), three-stop gradient.
  • Name — steps through 16/14/12/10px by length so long names still fit the 88px box. Tracking is -0.02em at every step (−0.32/16 = −0.28/14 = −0.24/12 = −0.20/10).
  • Source lockup — 31×10 bottom-left: Kaspa mark + wordmark for .kas, Igra lockup for .igra.
  • Removed — the 40×40 leading avatar and the truncated KNS owner address, both per the design.

Verification badge — deliberate divergence from the design

The badge is an opt-in prop. KNS passes asset.isVerifiedDomain, a real gate. INS omits it.

The design draws a badge on the .igra cards. We do not build it: INS exposes no verification flag, so a badge that can never be absent would assert "verified" for every INS name on a send-destination surface. INS resolution currently has no on-chain verification against the Igra registry at all. The call site carries this reasoning as a comment.

KNS keeps its badge — the gate there is real.

Assets

Four exported Figma assets vendored, none redrawn:

File Node Size
network-logos/kaspa-lockup-mark.svg 12720:51438 10.0125 × 10
network-logos/kaspa-lockup-text.svg 12720:51442 17.7516 × 6.73626
network-logos/igra-lockup.png raw image fill 314 × 100 → 31.4 × 10 @10×
badge-verified.svg 12720:51311 14.0029 × 14

igra.svg, kaspa.svg, kasplex.svg, badge-check.svg and link.svg are untouched.

The Kaspa lockup ships as two files because the combined Figma export is a padded 39×18 box that would misalign both leaves against the designed 30.8×10 slot. The two tight exports match the design's leaf dimensions exactly and are composed with the designed offsets.

The badge asset is 14px because it carries its drop shadow as a 37.5% bleed per side (8.003 × 1.75 = 14.005); insetting 7px puts the 8px glyph back on its designed right-10 top-10.

Verification

  • tsc --noEmit — clean in tracked source
  • eslint — no issues
  • prettier --check — formatted
  • npm run build — succeeds; every leaf dimension confirmed present in the compiled CSS (10.0125px, 17.7516px/6.73626px at left:13.05px/top:2.51px, 31.4px, 50.98px, 88px, 104px, 120px, badge right:7px/top:7px at 14×14, plus the exact gradient)

Not yet verified visually. The evidence above is compiled CSS and a successful build, not pixels. Loading the extension against a wallet holding real KNS + INS names is the outstanding QA step.

Follow-ups, not in this PR

  • The TEXT tab uses the same container/kns&text component in the design; KNSTextItem.tsx is unchanged and NameCard is not yet wired to it.
  • The KNS detail screen redesign (node 11417-153539) is a separate change.
  • Local prtriage/ mirrors still import the deleted components and add two TS2307 errors to npm run compile. Untracked and gitignored; no effect on CI or on this diff.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added unified name cards for Kaspa and IGRA assets.
    • Added verified badges, network branding, responsive name sizing, and click-through navigation.
    • Updated the dashboard layout to display cards in a wrapping grid-style arrangement.
  • Improvements

    • Refined loading placeholders and empty-state alignment for a more consistent dashboard experience.

Replace the vertical row list on Dashboard -> Names with the 3-column card
grid from Figma (file 0p1fiysKpbwjRsPp6cGCGX, node 10641-155418).

KNSItem and INSItem are deleted in favour of a single NameCard, matching
the design's shared `container/kns&text` component. Names.tsx was their
only consumer.

NameCard details:
- 104x120 tile, rounded-[12px], border daintree-700 (#203c49), with the
  three-stop gradient from the design.
- Name steps through 16/14/12/10px by length so long names still fit the
  88px text box; tracking is -0.02em at every step.
- Bottom-left source lockup, 31x10: Kaspa mark + wordmark for .kas,
  Igra lockup for .igra.
- Verification badge is an opt-in prop. KNS passes asset.isVerifiedDomain,
  which is a real gate. INS omits it deliberately: INS exposes no
  verification flag, and a badge that can never be absent would assert
  "verified" for every INS name on a send-destination surface. The design
  draws one on INS; we do not build it.

The leading avatar and the truncated KNS owner address are dropped, per
the design.

Assets are exported Figma bytes, not redrawn. The Kaspa lockup ships as
two files because the combined Figma export is a padded 39x18 box that
would misalign both leaves against the designed 30.8x10 slot.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 1, 2026 20:17
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized keys: "labels", "include_paths", "exclude_paths", "filters", "review", "pull_request", "limits", "commands", "messages"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Team

Run ID: ac075dcd-7ba2-4a86-a4da-fabaf259ab78

📥 Commits

Reviewing files that changed from the base of the PR and between 3d2378f and 4b9c4f2.

⛔ Files ignored due to path filters (4)
  • assets/images/badge-verified.svg is excluded by !**/*.svg
  • assets/images/network-logos/igra-lockup.png is excluded by !**/*.png
  • assets/images/network-logos/kaspa-lockup-mark.svg is excluded by !**/*.svg
  • assets/images/network-logos/kaspa-lockup-text.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • components/dashboard/INSItem.tsx
  • components/dashboard/KNSItem.tsx
  • components/dashboard/NameCard.tsx
  • components/dashboard/Names.tsx
💤 Files with no reviewable changes (2)
  • components/dashboard/INSItem.tsx
  • components/dashboard/KNSItem.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The dashboard replaces separate KNS and INS item components with a shared NameCard. The card supports network-specific branding, verification badges, adaptive name sizing, route navigation, and a wrapped fixed-size layout.

Changes

Dashboard name cards

Layer / File(s) Summary
Shared name card component
components/dashboard/NameCard.tsx
Adds a button-styled card with adaptive name sizing, optional verification badge, and Kaspa or IGRA branding.
Dashboard list integration
components/dashboard/Names.tsx, components/dashboard/INSItem.tsx, components/dashboard/KNSItem.tsx
Replaces the separate item components with NameCard, preserves KNS and INS navigation routes, and updates loading and empty states for the wrapped card layout.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 4b9c4

This change replaces the dashboard name list with shared KNS and INS cards while preserving existing data and navigation behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: rendering KNS and INS names as design-spec cards.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/names-grid-cards

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.

Copilot AI left a comment

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.

Pull request overview

This PR updates the Dashboard → Names view to match the 3-column card-grid design by replacing the prior row-based KNS/INS list items with a shared NameCard component and adding the required lockup/badge assets.

Changes:

  • Replace the Names list layout with a flex-wrapped card grid and update loading/empty-state layout to span full width.
  • Introduce NameCard to unify KNS/INS rendering (including optional verification badge for KNS only).
  • Add new Kaspa lockup SVGs and a new verification badge SVG; remove the legacy KNSItem/INSItem components.

Reviewed changes

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

Show a summary per file
File Description
components/dashboard/Names.tsx Switches Names to a card grid and routes KNS/INS clicks via navigate.
components/dashboard/NameCard.tsx New shared card component implementing the design-spec sizing, gradient, lockups, and optional verification badge.
components/dashboard/KNSItem.tsx Deleted legacy row-based KNS list item (superseded by NameCard).
components/dashboard/INSItem.tsx Deleted legacy row-based INS list item (superseded by NameCard).
assets/images/network-logos/kaspa-lockup-text.svg Adds new Kaspa text lockup SVG used by NameCard.
assets/images/network-logos/kaspa-lockup-mark.svg Adds new Kaspa mark lockup SVG used by NameCard.
assets/images/badge-verified.svg Adds new verification badge SVG used when isVerified is true.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

key={name}
name={name}
source="igra"
onClick={() => navigate(`/ins/${name}`)}
@leobragaz
leobragaz merged commit 63dbc49 into main Sep 3, 2026
5 checks passed
@leobragaz
leobragaz deleted the feat/names-grid-cards branch September 3, 2026 14:55
leobragaz added a commit that referenced this pull request Sep 3, 2026
#332 was squash-merged to main as 63dbc49, while this branch carries the
same work as its own commit 4b9c4f2. Git saw two unrelated histories
adding NameCard.tsx and rewriting Names.tsx, so both conflicted.

Verified 63dbc49 is byte-identical to 4b9c4f2 across all eight files it
touches (INSItem.tsx and KNSItem.tsx are deleted on both sides), so main
carries nothing this branch lacks. Both conflicts resolved to this
branch's side, which holds the later detail-screens and on-chain-verify
work on top. The merged tree is identical to the pre-merge tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.

2 participants