Skip to content

feat(ui): surface the owning coldkey on the validator detail page (#6427)#6510

Closed
real-venus wants to merge 1 commit into
JSONbored:mainfrom
real-venus:fix/6427-validator-coldkey-link
Closed

feat(ui): surface the owning coldkey on the validator detail page (#6427)#6510
real-venus wants to merge 1 commit into
JSONbored:mainfrom
real-venus:fix/6427-validator-coldkey-link

Conversation

@real-venus

Copy link
Copy Markdown
Contributor

Summary

validatorDetailQuery already normalizes coldkey into ValidatorDetail, but the page
only ever read it to decide whether the connected wallet owns this validator (the gate on
the take modal). A visitor had no way to tell which account operates a hotkey: the identity
chip shows self-declared operator identity — which is declared on the coldkey but never
shows it — and the raw address appeared nowhere.

What Changed

Rendered it beside the hotkey it belongs to, public and unconditional. No owner gating:
this is chain-public data every visitor can already read straight from the API, and the
issue explicitly asks not to restrict it.

<AccountAddress
  ss58={detail.coldkey}
  truncate={false}
  fallback={<span className="text-ink-muted">Not reported</span>}
/>

Why AccountAddress rather than a hand-rolled Link: it's the app's shared ss58
treatment — /accounts/$ss58 link + entity hover preview + copy button — and its own
contract already states that route "is the app's one lookup route for any ss58 value
regardless of whether it's a hotkey or coldkey, so this covers both."
A coldkey needs no
special case.

Null handling is the component's own fallback path: the query normalizes an absent
coldkey to null, so that case renders "Not reported" rather than a dead link — no extra
guard.

break-all on the value so the full 48-char address wraps at 375px instead of escaping
the viewport (verified in the mobile shots below). The hotkey above it is shown in full
too, and a truncated owner address would defeat the point of surfacing it.

Screenshots

Captured with capture-pr-screenshots.mjs at the contract's fixed viewports
(1280×800 / 768×1024 / 375×812), themes forced via mg-theme, before served from a
worktree at the merge-base with the brand faces verified loaded on both, so the pair shares
one typeface.

The after shots show COLDKEY 5GsbTgfvgCH4xdqSkiPb7EaBBFLHjWH5vfEALhJaewSFpZX9 — a real
owner address, distinct from the hotkey above it, linked to /accounts/$ss58.

Viewport · Theme Before After
Desktop · Light
before

after
Desktop · Dark
before

after
Tablet · Light
before

after
Tablet · Dark
before

after
Mobile · Light
before

after — wraps, no overflow
Mobile · Dark
before

after

Validation

  • npm run lint --workspace=apps/ui — clean
  • npm run format:check --workspace=apps/ui — clean
  • npm run typecheck --workspace=apps/ui — clean
  • npm test --workspace=apps/ui — 1062/1062 passed
  • npm run test:e2e --workspace=apps/ui — 25/26; the one failure is
    evidence-deep-link.spec.ts on /subnets/1, which reproduces identically on pristine
    main without this change
    (verified as a control) and is green on CI — a
    slow-local-hydration artifact, unrelated to this PR's route.
  • npm run build --workspace=apps/ui — clean

Registry Safety

  • Links a tracked, currently-open issue (Closes #6427) — required.
  • No secrets, PATs, wallet data, private dashboards, private URLs, or validator-local state — the coldkey is chain-public data the API already serves.
  • No generated artifacts touched — apps/ui/** only, 1 file.
  • routeTree.gen.ts untouched; screenshots hosted on a fork branch, not committed here.

Closes #6427

…ONbored#6427)

validatorDetailQuery already normalizes `coldkey` into ValidatorDetail, but the
page only ever read it to decide whether the connected wallet owns this
validator (the gate on the take modal). A visitor had no way to tell which
account operates a hotkey: the identity chip shows self-declared operator
identity, which is declared on the coldkey but never shows the coldkey itself,
and the raw address appeared nowhere.

Render it beside the hotkey it belongs to, public and unconditional -- no owner
gating, since this is chain-public data every visitor can already read from the
API.

Use AccountAddress rather than a hand-rolled Link: it is the app's shared ss58
treatment (accounts link + entity hover preview + copy button) and its own
contract notes /accounts/$ss58 resolves any ss58 whether hotkey or coldkey, so
a coldkey needs no special case. Its `fallback` covers the null the query
normalizes an absent coldkey to, so the empty case renders "Not reported"
rather than a dead link.

`break-all` on the value so the full 48-char address wraps at 375px instead of
escaping the viewport -- the hotkey above it is shown in full too, and a
truncated owner address would defeat the point of surfacing it.
@real-venus
real-venus requested a review from JSONbored as a code owner July 17, 2026 12:50
@superagent-security

Copy link
Copy Markdown

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.85%. Comparing base (632d986) to head (4b2b85f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6510   +/-   ##
=======================================
  Coverage   97.85%   97.85%           
=======================================
  Files         174      174           
  Lines       22196    22196           
  Branches     8798     8798           
=======================================
  Hits        21721    21721           
  Misses         81       81           
  Partials      394      394           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-17 17:31:31 UTC

1 file · 1 AI reviewer · no blockers · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): apps/ui/src/routes/validators.$hotkey.tsx (matched apps/ui/**).

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 3 non-blocking
  • The inline comment block above the new `<span>` is unusually long (9 lines) for a straightforward render addition; consider trimming to the non-obvious parts (fallback/break-all rationale) per repo comment conventions.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6427
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 166 registered-repo PR(s), 89 merged, 20 issue(s).
Contributor context ✅ Confirmed Gittensor contributor real-venus; Gittensor profile; 166 PR(s), 20 issue(s).
Review context
  • Author: real-venus
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Python, Rust, CSS, MDX, Svelte, Swift
  • Official Gittensor activity: 166 PR(s), 20 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 17, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Needs to be redesigned, not a fan of this implementation - feels out of place or just lazily thrown on there in relation to other elements/addresses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validator detail page fetches the owning coldkey but never surfaces or links it

2 participants