Skip to content

feat(gateways): add gateway stats widgets and new gateway pages#410

Open
rickstaa wants to merge 43 commits intomainfrom
feat/add-gateway-dashboard
Open

feat(gateways): add gateway stats widgets and new gateway pages#410
rickstaa wants to merge 43 commits intomainfrom
feat/add-gateway-dashboard

Conversation

@rickstaa
Copy link
Member

@rickstaa rickstaa commented Nov 22, 2025

This pull request introduces new gateway widgets and pages to display stats for active gateways that have distributed fees in the last 90 days. Adds a gateways widget to the main page, a dedicated gateway tab, and a gateway account page for detailed gateway stats and activity.

Warning

Needs upstream pull request livepeer/subgraph#168 to be merged and deployed for this to work!
Please remove the patch in codegen.yaml before merging.=!

@rickstaa rickstaa requested a review from ECWireless as a code owner November 22, 2025 12:19
@vercel
Copy link
Contributor

vercel bot commented Nov 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Mar 18, 2026 10:04am

Request Review

Introduce new gateway widgets and pages to display stats for active
gateways that have distributed fees in the last 90 days. Adds a gateways widget to
the main page, a dedicated gateway tab, and a gateway account page for detailed
gateway stats and activity.
Ensure that paid tickets also show up on the GatewayHistory.
Ensure the orchestrators button has the right background when the
`/orchestrators` page is selected and the user is logged out.
@rickstaa rickstaa force-pushed the feat/add-gateway-dashboard branch from 3a6d1a3 to 3adb176 Compare December 28, 2025 10:31
Ensure that the gateways tab is highlighted when on a gateway profile
and the orchestrator tab when on a orchestrator profile.
Ensure we include gateways that were activated in the last year or did
send tickets in the last 90D. Also improve the UI to make this behavoir
more visible.
Ensure gateway tab is shown before the delegator tab if an entity is
both a orchestrator and gateway.
rickstaa and others added 2 commits March 16, 2026 12:16
The broadcasting page renders AccountLayout without passing
sortedOrchestrators, which is only needed for the delegating view.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rickstaa and others added 5 commits March 17, 2026 11:43
Pre-build top 250 gateway pages at deploy time via getStaticPaths,
with fallback: "blocking" for on-demand generation of other gateways.
Server-side self-redeem status check eliminates client-side loading
flash. Pages revalidate every 10 minutes via ISR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bad merge resolution left inconsistent spacing on the Gateways button.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ators

The merge from main dropped the useEffects that enrich VoteEvent and
TreasuryVoteEvent with parsed proposal titles (attributes.title),
causing vote history entries to render with empty titles. Restore the
IPFS and proposal-text enrichment logic from main.

Also revert sortedOrchestrators to required in AccountLayout since the
DelegatingWidget on all pages depends on it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hide the "Arbitrum" text label on screens narrower than 1800px (bp4) to
prevent nav items from wrapping when the Gateways link is present. Also
add flexWrap: nowrap to the nav container as a safety guard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The hook is unnecessary since isSelfRedeeming is always fetched
server-side in broadcasting.tsx getStaticProps. Default the prop
to false so the warning is hidden if SSR data is unavailable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rickstaa and others added 2 commits March 17, 2026 13:17
…ation TODO

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ccounts

- Restore /accounts match for Orchestrators nav highlight, excluding
  /broadcasting which highlights Gateways instead
- Always hide chain selector label (icon-only) to prevent nav overflow
- Add gateway check to 404 logic in delegating, history, and orchestrating
  pages so gateway-only accounts don't return 404

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace <A> (anchor) with <Badge as="span"> using onClick/window.open
to avoid invalid HTML when TransactionBadge is rendered inside a
parent anchor in HistoryView.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show only the wallet avatar icon between bp3 (1200px) and bp4 (1800px)
to prevent nav overflow when logged in. Hide chain status since it's
already shown separately via ContractAddressesPopover.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rickstaa
Copy link
Member Author

@ECWireless the subgraph has been udpated and this pull request rebased we can merge this now after your review.

@rickstaa rickstaa marked this pull request as ready for review March 17, 2026 13:55
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestions:

  1. PageProps type requires account, sortedOrchestrators, and fallback fields, but the catch block only returns {hadError: true}, causing type safety violation
  1. Missing required PageProps fields in getStaticProps catch block causing type contract violation
  1. Type contract violation in catch blocks - PageProps missing required fields when error occurs

Fix on Vercel

Comment on lines +149 to +154
(!accountAddress || !isMyAccountPage) &&
(asPath.includes("/orchestrators") ||
(asPath.includes("/accounts") && !asPath.includes("/broadcasting")));
const isGatewaysNavActive =
(!accountAddress || !isMyAccountPage) &&
(asPath.includes("/gateways") || asPath.includes("/broadcasting"));
Copy link
Contributor

@vercel vercel bot Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Navigation button highlighting fails for account-specific pages due to inverted boolean logic that requires non-account-page context

Fix on Vercel

hadError: true,
},
revalidate: 60,
};
Copy link
Contributor

@vercel vercel bot Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the error catch block at line 114, the returned props object only sets {hadError: true} but PageProps type requires all fields (account, sortedOrchestrators, isSelfRedeeming, fallback) to be present, causing a type safety violation.

Fix on Vercel

@rickstaa
Copy link
Member Author

@ECWireless rebased ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants