Repository navigation
feat(network): add Zcash network dashboard - #407
Merged
Merged
Conversation
7 of 12 tasks
8 tasks
MatiasOS
force-pushed
the
issue-398-zcash-dashboard
branch
from
November 20, 2026 22:11
d893615 to
da85e45
Compare
|
🚀 Preview: https://pr-407--openscan.netlify.app |
The dashboard loads stats and the tip block first, then earlier block summaries one at a time, and caches summaries across refreshes so a 90s refresh stays within hosted gateway rate limits.
The navbar polled getblockcount while the dashboard fetched getblockchaininfo for the same height. Both now read one getblockchaininfo response, shared for 30s per network and endpoint list. One caller aborting doesn't cancel it for the others, and a failed response isn't reused. The per-endpoint state (unsupported methods, chain info) now lives in a ZcashSession from getZcashSession().
- The dashboard aborts its requests when the network changes, so a slow (rate-limited) zec response can't fill the tzec page. The in-flight guard is per network, so switching no longer skips the new fetch. - Blocks that fail to load are listed as unavailable rows instead of gaps, and retried on the next refresh. - The navbar indicator shares one code path for UTXO chains and maps poll intervals by network type. - Shared ZcashKindBadge, ZcashOutputValue and ZcashSkeleton cells, typed label keys (labels.ts) and useZcashNetworkFromPath; skeleton sizes move from inline styles to CSS classes. - Relative times use the pluralized block:time keys (useTimeAgo), so useZcashTimeAgo and the zcash:common keys are gone. - Percentages follow the viewer's locale; count keys get plural forms. - Remove the unused loadingBlocks and lastUpdated fields.
Auto-sync probes every network with two or more endpoints 1.5s after the first load. With Zcash support in the latency test, that sent getblockcount to both Tatum hosts of zec and tzec on every fresh load: two of the ~5 requests per minute the mainnet gateways share per IP, spent before the dashboard's own calls. Zcash endpoints keep their order instead; the manual latency test on the RPC page still covers them.
MatiasOS
force-pushed
the
issue-398-zcash-dashboard
branch
from
November 20, 2026 23:44
da85e45 to
dbae080
Compare
8 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the Zcash network dashboard at
/zecand/tzec, and makes both networks visible across the app.The dashboard is designed around the hosted gateway limit of about 5 requests per minute per IP:
Related Issue
Part of #398. Stacked on #406.
Type of Change
Changes Made
src/config/networks.json:zecandtzecentries, taken from explorer-metadata with slugs added./zecand/tzecroutes, with a lazy-loaded page.useZcashDashboardplus the dashboard components:zcashnamespace and atooltips.zcashsection in all 5 locales.NetworkBlockIndicator: a Zcash branch with a 90s poll.useRpcLatencyTest: Zcash endpoints are tested withgetblockcount.README.mdand.claude/rules/commands.md: list the Zcash networks and slugs.e2e/tests/shared/mocked/zcash-dashboard.spec.ts, with RPC traffic served from mainnet block 3,483,400.Screenshots (if applicable)
Checked locally against mocked RPC data in dark, light and 400px-wide layouts.
Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
METADATA_VERSIONisn't bumped yet. The explorer-metadata publish of@openscan/metadata1.3.0-alpha.0 failed, because npm requires--tagfor prereleases. Until it's published:npm run test:run: 150 passing.npx playwright test --project=mocked e2e/tests/shared/mocked/zcash-dashboard.spec.ts: 2 passing.Review follow-up
getblockchaininfofor the navbar and the dashboard. The navbar's height poll usedgetblockcountwhile the dashboard fetched the same height; both now share one response for 30s.zecresponse can't fill thetzecpage. The in-flight guard is per network, so switching no longer skips the new fetch.zecandtzecon every fresh load: two of the mainnet gateways' ~5 requests per minute, spent before the dashboard's own calls.ZcashKindBadge,ZcashOutputValueandZcashSkeletoncells, typed label keys (labels.ts, moved down from feat(zcash): add transaction pages with shielded bundles and fee lookup #409) anduseZcashNetworkFromPath. Skeleton sizes are CSS classes, not inline styles.block:timekeys (useTimeAgo), souseZcashTimeAgoand thezcash:commonkeys are gone. Percentages follow the viewer's locale; count keys have plural forms.useNetworkDashboard.tsandsettings/index.tsx. Neither needs a Zcash branch: the hook is EVM-only, and RPC settings already list every network./zec/blocks,/zec/tx/…and/zec/address/…fall through to the:networkIdcatch-all.Tests after the follow-up
npm run test:run: 198 passing.