Skip to content

Staking Dashboard fixes#2386

Merged
Marketen merged 16 commits intomateu/staking-dashboardfrom
mateu/dashboard-fixes
Feb 24, 2026
Merged

Staking Dashboard fixes#2386
Marketen merged 16 commits intomateu/staking-dashboardfrom
mateu/dashboard-fixes

Conversation

@mateumiralles
Copy link
Copy Markdown
Contributor

This pull request refactors and optimizes the way network and validator statistics are fetched and processed in the admin UI, particularly in the useNetworkStats hook. The changes consolidate multiple backend requests into a single call, ensure only relevant data for installed clients is fetched, and improve the reliability and efficiency of the dashboard. Additionally, there are minor improvements and cleanup in system health reporting.

Network and Validator Data Refactor:

  • Refactored useNetworkStats to fetch validator data (active, attesting, balances) in a single backend call (validatorsDataByNetwork), reducing the number of beacon chain API requests and simplifying state management. Also, the hook now dynamically determines which networks have installed clients before fetching data, ensuring only relevant information is retrieved and displayed. [1] [2] [3] [4] [5] [6]

  • Updated the mock backend (__mock-backend__/index.ts) to provide the new combined validatorsDataByNetwork response structure, replacing the previous separate endpoints for active, attesting, and balances.

System Health Improvements:

  • Fixed the formatting of memory and disk usage in useSystemHealth to use the correct arguments for humanFileSize, ensuring consistent display of units.

Code Cleanup and Removal:

  • Removed the old implementation of useSystemHealth.ts, which is now superseded by the improved version.

Type and Utility Improvements:

  • Added a type guard utility isClientError to help distinguish error results from valid client results.
  • Updated imports and usage in dashboard components to use the new utility.

@mateumiralles mateumiralles requested a review from a team as a code owner February 23, 2026 14:37
@github-actions github-actions bot temporarily deployed to commit February 23, 2026 14:38 Inactive
@github-actions
Copy link
Copy Markdown

@Marketen
Copy link
Copy Markdown
Contributor

@copilot review this pr

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

@Marketen I've opened a new pull request, #2390, to work on those changes. Once the pull request is ready, I'll request review from you.

@Marketen Marketen merged commit cf19adb into mateu/staking-dashboard Feb 24, 2026
6 checks passed
@Marketen Marketen deleted the mateu/dashboard-fixes branch February 24, 2026 08:50
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.

3 participants