Skip to content

UI/UX: Graceful service degradation: Home page#3233

Merged
tom2drum merged 16 commits intomainfrom
tom2drum/issue-1835
Feb 24, 2026
Merged

UI/UX: Graceful service degradation: Home page#3233
tom2drum merged 16 commits intomainfrom
tom2drum/issue-1835

Conversation

@tom2drum
Copy link
Copy Markdown
Collaborator

Description and Related Issue(s)

Resolves #1835

This PR implements graceful service degradation for the home page, allowing it to display data from a public RPC node when the Blockscout API is unavailable. When the API fails, the home page shows recent blocks and transactions fetched directly from the RPC, ensuring users can still access essential blockchain information.

Proposed Changes

  • Added degraded view components (LatestBlocksDegraded, LatestTxsDegraded) that fetch data from RPC when API is unavailable
  • Created RPC data formatting utilities (formatBlockData, formatTxData) to transform RPC responses into the expected data structure
  • Updated home page components (LatestBlocks, LatestTxs) to automatically fall back to degraded views on API errors
  • Added shared fallback components (FallbackBox, FallbackChart) for consistent error and loading states
  • Fixed transaction degraded view when initial query is refetching
  • Fixed memory leak by calling unwatch when components unmount
  • Fixed tab title flickering on home page graphs
  • Added comprehensive tests and visual regression tests for degraded views

Breaking or Incompatible Changes

None.

Additional Information

The implementation follows the design specifications in issue #1835, which outlines what data can be retrieved from RPC nodes (recent blocks, recent transactions, latest block height, gas price) when the API is unavailable.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@tom2drum tom2drum added the design For issues and PRs related to UI and UX improvements label Jan 16, 2026
@tom2drum tom2drum marked this pull request as ready for review January 22, 2026 10:08
@tom2drum tom2drum merged commit 45caa44 into main Feb 24, 2026
12 checks passed
@tom2drum tom2drum deleted the tom2drum/issue-1835 branch February 24, 2026 10:16
zeekay pushed a commit to luxfi/explore that referenced this pull request Mar 6, 2026
Key upstream changes:
- Chakra UI bump to v3.33.0
- Graceful service degradation for home page (blockscout#3233)
- Multichain explorer v2 (replaces OP Superchain)
- Secure cookies, historical tx $ value, sankey diagrams
- Various bug fixes and improvements

All Lux customizations preserved:
- Custom TopBar with NetworkSelector, ChainSwitcher, nav links
- NetworkOverview homepage
- OIDC auth (lux.id)
- Lux monochrome theme colors
- Footer links (lux.network, docs, discord)
- LUX_DECIMALS=6 fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design For issues and PRs related to UI and UX improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI/UX: Graceful service degradation: Home page

2 participants