Skip to content

fix(scan): consistent page padding + real block cadence#106

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/scan-padding-and-blocktime
Jun 25, 2026
Merged

fix(scan): consistent page padding + real block cadence#106
github-actions[bot] merged 2 commits into
mainfrom
fix/scan-padding-and-blocktime

Conversation

@satyakwok

@satyakwok satyakwok commented Jun 25, 2026

Copy link
Copy Markdown
Member

Two fixes. The block cadence commit re-lands the change from #105, which was lost: #105 merged into the #104 branch after #104 had already squash-merged to main, so it never reached main.

Page padding

Most pages used px-4 (16px) with no responsive bump, tighter than the header (px-4 lg:px-6), so content sat 8px left of the navbar on large screens. A second class of pages (EVM/native rail, forks, api-docs, contracts, mempool, epochs, supply) rendered a bare space-y-6 root with no max-width container at all, so content ran flush to the screen edges. Standardised every page-edge container to px-5 sm:px-6 lg:px-8 (20/24/32px) and wrapped the bare pages in the same container. Verified on testnet: EVM rail content now has 20px side padding on mobile and is properly centered on desktop, instead of running edge to edge.

Block cadence

The Block Time stat read the chain-performance bucket average, which is windowed by range and inflated by past stalls (showed ~1.8s on a 1h bucket while testnet produced ~0.5s blocks). Computes it from recent block timestamps instead (now ~556ms on testnet). The target 1s subline is unchanged.

Testing: typecheck and build pass.

Summary by CodeRabbit

  • New Features
    • The home page now shows block time based on recent block activity when enough blocks are available, with fallback values if not.
  • UI Improvements
    • Updated spacing and responsive padding across many pages and shared layout areas for a more consistent, polished experience.
    • Several pages now use smoother fade-in presentation on load.
  • Bug Fixes
    • Improved the reliability of the block time stat shown in the hero section when recent data is available.

Copy

Also swept the em dashes from the EVM and native rail explainer text (colons, periods, commas).

The block time stat read the chain-performance bucket average, which is
windowed by the selected range and inflated by past stalls: it showed ~1.8s
on the 1h bucket while testnet was producing ~0.5s blocks. Compute it from
the latest blocks instead, falling back to the perf value only when there
are not enough blocks to measure.
Most pages used px-4 (16px) with no responsive bump, tighter than the header
(px-4 lg:px-6) so content sat 8px left of the navbar on large screens. A
second class of pages (EVM/native rail, forks, api-docs, contracts, mempool,
epochs, supply) rendered a bare space-y-6 root with no max-width container at
all, so content ran flush to the screen edges. Standardise every page-edge
container to px-5 sm:px-6 lg:px-8 (20/24/32px) and wrap the bare pages in the
same container.
@github-actions github-actions Bot enabled auto-merge (squash) June 25, 2026 10:09
@github-actions github-actions Bot merged commit 458133d into main Jun 25, 2026
6 of 7 checks passed
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

HomeContent now computes blockTime from recent blocks when at least two blocks are available, otherwise it falls back to latestPerf.block_time_sec and then the target block-time constant. The PR also updates responsive padding and container layout classes across the home page, shared header/footer/page wrappers, and multiple route pages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Sentriscloud/frontend#100: Touches apps/scan/app/[locale]/HomeContent.tsx and the same alert area, with related changes to the homepage banner and stats handling.

Suggested labels

javascript

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.14% 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 clearly summarizes the two main changes: page padding cleanup and block cadence accuracy.
Description check ✅ Passed The description covers the main fixes and testing, but it does not follow the exact template headings and omits the Related section.
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-padding-and-blocktime

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.

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