Skip to content

Fix/506 missed blocks tooltip window - #675

Merged
alibabaedge merged 4 commits into
devfrom
fix/506-missed-blocks-tooltip-window
Jul 29, 2026
Merged

Fix/506 missed blocks tooltip window#675
alibabaedge merged 4 commits into
devfrom
fix/506-missed-blocks-tooltip-window

Conversation

@m1amgn

@m1amgn m1amgn commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

#506

Fix missed-blocks tooltip: signing window, not node lifetime

The Missed Blocks hint claimed the counter runs "since the start of the node".
It does not — it is the x/slashing missed_blocks_counter, bounded by
signed_blocks_window. Corrected the copy in all 4 namespaces × 3 locales
(NetworkNodesPage had no hint at all), and the cell tooltip now reads
"Per 10,000 blocks (~15.9 h)" instead of hardcoded English.

Duration comes from Chain.avgTxInterval (blockTime is null in production),
normalised to seconds for logos-testnet/miden-testnet. Chains without the
data — ethereum, polkadot, monero — fall back to the block count alone.

Hours, not minutes: real windows run 7.9 h (celestia) to 26.4 h (osmosis).

Also removed the 5× duplicated tooltip expression and collapsed three
hand-maintained Prisma chain selects into one typed constant.

m1amgn added 4 commits July 28, 2026 17:09
Normalize the persisted average interval into seconds for signing-window duration estimates and classify block- versus slot-based networks in one place.

Reuse one typed Prisma chain selection across validator queries, including synthetic Aztec rows, so avgTxInterval is always present without growing the legacy service. Register focused tests for Cosmos values, millisecond chains, slot precedence, missing intervals, and invalid windows.
Replace the misleading lifetime header copy in every table namespace and add the previously missing network-nodes hint in English, Russian, and Portuguese.

Render the canonical block or slot window and approximate hours in all uptime and missed-block cell tooltips. Preserve localized Aztec attestation and proposal details, use no-time variants when intervals are unavailable, and omit tooltips when the window itself is invalid.
Return a typed translation descriptor from the pure missed-window utility so block/slot and time/no-time key selection has one canonical implementation.

The three server row components now translate that descriptor directly instead of repeating the same branching. Focused tests pin key selection, value formatting, and the no-window result.
Both sides appended new entries to the single-line "test" script in
package.json, so git could not reconcile them automatically. dev added the
Ethereum total-supply and TVS suites, this branch added the missed-window
suite; the resolution keeps all three and preserves the alphabetical order
of the file list.

No other file conflicted: the Ethereum FDV work touched only the ethereum
chain tools, .env.example and CLAUDE.md, while this branch touches the
validator/node tables, locale files, chain-service and src/utils.
@alibabaedge
alibabaedge merged commit 3aeeb3c into dev Jul 29, 2026
1 check failed
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