Skip to content

feat(slot): regroup slot sub-tabs and rename slugs#684

Open
barnabasbusa wants to merge 3 commits into
masterfrom
bbusa/slot-tab-url-routing
Open

feat(slot): regroup slot sub-tabs and rename slugs#684
barnabasbusa wants to merge 3 commits into
masterfrom
bbusa/slot-tab-url-routing

Conversation

@barnabasbusa
Copy link
Copy Markdown
Collaborator

@barnabasbusa barnabasbusa commented May 7, 2026

Summary

The slot details bar previously exposed every consensus / execution operation as its own tab, which got long once a block carried both legacy and EL-request variants of the same operation. This PR collapses near-duplicates, shortens the slugs, and reorders the bar to follow what the user typically cares about.

URL hash behavior is unchanged from master — direct visits to `/slot/#` still activate the tab via the existing simple `location.hash` guard. A follow-up PR will add full URL hash sync (`replaceState` on tab change, `hashchange` listener, sub-pill awareness).

Tab regroup

Combined tabs (single tab, stacked sections):

  • Deposits — Deposit Requests + Legacy Deposits
  • Withdrawals — Withdrawal Requests + Executed Withdrawals
  • Slashings — Attester + Proposer Slashings

Transactions is now one top-level tab with an inner Bootstrap pills sub-nav: `Transactions` (default) and `Access List`.

Slug renames (URL hash = pane id, single source of truth in the template):

Old New
`ptcVotes` `ptc`
`blsChange` `bls`
`blobSidecars` `blobs`
`inclusionLists` `focils`
`consolidationRequests` `consolidations`
`voluntary-exits` `exits`
`attester-slashings` + `proposer-slashings` `slashings`
`depositRequests` (folded into) `deposits`
`withdrawalRequests` (folded into) `withdrawals`
`accessList` (sub-pill of) `bals`

New tab order: Overview, Transactions (with inner Tx / Access List pills), Bids, Attestations, Deposits, Consolidations, Exits, Withdrawals, Slashings, PTC, BLS, Blobs, FOCILs, Proofs, Download.

The blob loader link (`templates/slot/blobs.html`) now points at `#blobs`.

bytesToHex collision fix

`templates/slot/attestations.html` defines a different (simpler) global `bytesToHex` that doesn't decode base64. After regrouping, the BAL pane is now emitted before the attestations pane, so the simpler version overrides the base64-aware one and the BAL transaction popup ended up rendering Hash/From/To with a `0` prefix per base64 char. Renamed the BAL helper to `balBytesToHex` so the two coexist regardless of emission order.

Test plan

  • On a block with both transactions and a BAL, the Transactions tab shows the inner pills; clicking each pill switches sections.
  • On a block with both attester and proposer slashings, the Slashings tab shows both sections stacked with their own headers.
  • On a Pectra block with both EL deposit requests and legacy deposits, the Deposits tab shows both sections; same for Withdrawals.
  • BAL transaction popup shows valid hex Hash/From/To (no more `0R0B...` garbage).
  • Visiting `/slot/#bids`, `/slot/#blobs`, `/slot/#download` directly still activates the matching top-level tab.
  • Other top-level tabs (Attestations, PTC, BLS, FOCILs, Proofs) render with the new slugs.

@barnabasbusa barnabasbusa changed the title feat(slot): make sub-tabs addressable as /slot/<id>/<tab> feat(slot): regroup sub-tabs and make them addressable as /slot/<id>/<tab> May 7, 2026
@barnabasbusa barnabasbusa changed the title feat(slot): regroup sub-tabs and make them addressable as /slot/<id>/<tab> feat(slot): regroup sub-tabs and drive selection via URL hash May 7, 2026
@barnabasbusa barnabasbusa changed the title feat(slot): regroup sub-tabs and drive selection via URL hash feat(slot): regroup slot sub-tabs and rename slugs May 7, 2026
Collapses the near-duplicate slot detail tabs that grew once blocks
started carrying both legacy and EL-request variants of the same
operation, and shortens the Bootstrap tab IDs into compact slugs that
double as URL hash fragments thanks to the existing hash-sync JS.

Combined tabs (single tab, stacked sections):
  Deposits    = Deposit Requests + Legacy Deposits
  Withdrawals = Withdrawal Requests + Executed Withdrawals
  Slashings   = Attester Slashings + Proposer Slashings

Transactions is now one top-level tab with an inner Bootstrap pills
sub-nav for Transactions (default) and Access List.

Slug renames (URL hash = pane id, single source of truth in template):
  ptcVotes              -> ptc
  blsChange             -> bls
  blobSidecars          -> blobs
  inclusionLists        -> focils
  consolidationRequests -> consolidations
  voluntary-exits       -> exits
  attester-slashings + proposer-slashings -> slashings
  depositRequests folded into deposits
  withdrawalRequests folded into withdrawals
  accessList moved into transactions sub-pill (#bals)

New tab order: Overview, Transactions (with Tx / Access List pills),
Bids, Attestations, Deposits, Consolidations, Exits, Withdrawals,
Slashings, PTC, BLS, Blobs, FOCILs, Proofs, Download.

The blob loader link in templates/slot/blobs.html now anchors to
#blobs to match the renamed tab. Combined tab badges use addUI64 so
the count reflects both inner sections.
After the regroup the Block Access List pane is emitted before the
attestations pane, so the simpler bytesToHex defined in
templates/slot/attestations.html (Array.from(bytes).map(...)) now
overrides the base64-aware one in block_access_list.html. The BAL
transaction popup ended up rendering Hash / From / To with a '0'
prefix per base64 character instead of the decoded hex.

Rename the BAL helper to balBytesToHex so the two coexist regardless
of template emission order.
@barnabasbusa barnabasbusa force-pushed the bbusa/slot-tab-url-routing branch from 038cd72 to 097d1e3 Compare May 7, 2026 10:54
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