Skip to content

fix(scan): show validator 'Registered' timestamp on detail page#74

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/scan-validators-online-since
May 12, 2026
Merged

fix(scan): show validator 'Registered' timestamp on detail page#74
github-actions[bot] merged 1 commit into
mainfrom
fix/scan-validators-online-since

Conversation

@satyakwok
Copy link
Copy Markdown
Member

@satyakwok satyakwok commented May 12, 2026

Summary

Operator noticed scan v1's validators page has no "how long this validator has been online" indicator. The chain's legacy /validators endpoint exposes registered_at (unix seconds) but fetchValidators was only pulling name + blocks_produced from it. This carries registered_at through to the merged row and renders a Registered InfoRow on the detail page under Status.

Field already exists on ValidatorData — no chain-side change needed.

Why detail page only

List page stays clean. Showing "registered" on the detail page is the standard explorer pattern (Etherscan's "Created", Solana Beach's "Started" both live there, not on list rows).

Verification

curl https://rpc.sentrixchain.com/validators | jq '.validators[0]'
# returns: { address, blocks_produced, is_active, name, registered_at: 1777030372 }

After this PR: clicking through to a validator detail page shows e.g. "Registered: Apr 23, 2026" between Status and Stake.

Test plan

  • Visit scan.sentrixchain.com/en/validators/0x4cad... and confirm "Registered" row renders
  • Visit a testnet validator detail page — same field surfaces
  • pnpm --filter=@sentriscloud/scan typecheck green (verified locally)

Summary by CodeRabbit

Release Notes

  • New Features
    • Validator detail pages now display a registration date field in the Overview section, showing when each validator was registered.

Review Change Stack

Operator noticed the validators page has no "how long has this validator
been online" indicator. The chain's legacy /validators endpoint exposes
`registered_at` (unix seconds) but the merge in fetchValidators only pulled
name + blocks_produced from it. Now carries `registered_at` through to the
merged row and renders a "Registered" InfoRow on the detail page under
Status.

List page stays clean — detail-page surface is the standard explorer
pattern (Etherscan's "Created" / Solana Beach's "Started" both live on
the detail page, not the list).

Field already existed on ValidatorData; no chain-side change needed.
@github-actions github-actions Bot enabled auto-merge (squash) May 12, 2026 20:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 11a5da2c-eeda-4bcd-aa40-c501d3eb39c9

📥 Commits

Reviewing files that changed from the base of the PR and between 49f813c and fe88a35.

📒 Files selected for processing (2)
  • apps/scan/app/[locale]/validators/[address]/page.tsx
  • apps/scan/lib/api.ts

📝 Walkthrough

Walkthrough

This PR adds validator registration date visibility by extending the validator detail page. The API layer now preserves the registered_at field when merging data from two validator endpoints, with fallback logic to ensure the field is available downstream. The UI layer conditionally displays the registration timestamp in the validator overview using the preserved field data.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 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%. 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 accurately and concisely describes the main change: adding validator 'Registered' timestamp display on the detail page.
Description check ✅ Passed The description is comprehensive with clear Summary, Test plan, and Related sections, though the Related section uses comments rather than explicit links.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scan-validators-online-since

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot merged commit 348ab67 into main May 12, 2026
6 checks passed
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.

1 participant