Skip to content

Show payload build source icon on landing page slot/block cards#804

Merged
qu0b merged 2 commits into
masterfrom
qu0b/index-build-source-icons
Jul 22, 2026
Merged

Show payload build source icon on landing page slot/block cards#804
qu0b merged 2 commits into
masterfrom
qu0b/index-build-source-icons

Conversation

@qu0b

@qu0b qu0b commented Jul 22, 2026

Copy link
Copy Markdown
Member

The /slots and /blocks pages indicate the payload build source on Gloas+ blocks via the proposer icon (🏠 house = self-built, 👷 hard-hat linking to the builder = builder-built, introduced in 2048c81), but the landing page's "Most recent slots" and "Most recent blocks" cards still showed the plain validator icon.

Changes

  • IndexPageDataSlots / IndexPageDataBlocks: add HasBuilder, BuilderIndex, BuilderURL (same shape as the slots/blocks page models); narrow Status to uint8 to match formatProposerWithBuildSource's signature and the other list models.
  • handlers/index.go: populate the fields from the db builder_index via a small resolveBuildSource helper, mirroring the handlers/slots.go logic (-1 → self-built / MaxUint64).
  • templates/index/recentSlots.html / recentBlocks.html: swap formatValidatorformatProposerWithBuildSource in both the server-rendered rows and the knockout template rows.
  • static/js/page-index.js: JS mirror of utils.FormatProposerWithBuildSource so the 15s live-refresh path renders the same markup (house/hard-hat icons, builder link, no icon for missed slots).

Verified by rendering the exact template cell expression against the new models for self-built, builder-built (with external URL), and missed-slot cases.

qu0b added 2 commits July 22, 2026 11:07
The slots and blocks list pages already indicate the payload build source
on Gloas+ blocks via the proposer icon (house = self-built, hard-hat
linking to the builder = builder-built), but the landing page cards still
showed the plain validator icon.

Populate builder info in the index page models and use
formatProposerWithBuildSource in the recent slots and recent blocks
cards, both for the server-rendered rows and the knockout live-refresh
path (mirrored in page-index.js). The models' Status field is narrowed to
uint8 to match the formatter signature and the slots page model.
MaxInt64 (unknown proposer) and MaxUint64 (self-built payload) exceed
2^53, so JSON.parse rounds them to the nearest double and equality
against the exact sentinel can never match. The >= comparisons against
exact BigInt literals match the rounded values instead; real indices
never come near the thresholds.
@qu0b
qu0b merged commit 100604e into master Jul 22, 2026
5 checks passed
@qu0b
qu0b deleted the qu0b/index-build-source-icons branch July 22, 2026 12:14
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