Skip to content

feat(internal-explorer): drive shadow-delta view from recent shadow blocks - #116

Merged
jowparks merged 5 commits into
mainfrom
joe/shadow-block-list
Sep 1, 2026
Merged

feat(internal-explorer): drive shadow-delta view from recent shadow blocks#116
jowparks merged 5 commits into
mainfrom
joe/shadow-block-list

Conversation

@jowparks

@jowparks jowparks commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The canonical chain tip rarely contains a block with a shadow replacement, so the shadow-delta list was almost always empty. When Show shadow Δ is on, the list is now driven by the new shadow-metrics /shadow-blocks endpoint (dense, newest first), resolving each canonical block by number for the base columns and delta baseline.

Also persists the Show shadow Δ toggle in a ?shadowDelta=1 URL param (via a new useShadowDelta hook mirroring useExplorerChain), so the selection survives refresh and stays consistent across the dashboard and /blocks pages.

Depends on the shadow-metrics endpoint in base/base#(recent-shadow-blocks).
Screenshot 2026-08-31 at 4 21 29 PM
Screenshot 2026-08-31 at 4 21 20 PM

@cb-heimdall

cb-heimdall commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
omni-ui Ready Ready Preview Aug 31, 2026 9:18pm

Request Review

…locks

The canonical chain tip rarely contains a block with a shadow
replacement, so the shadow-delta list was almost always empty. When
Show shadow Δ is on, drive the list from the new shadow-metrics
/shadow-blocks endpoint (dense, newest first) and resolve each canonical
block by number to fill the base columns and delta baseline.
The 'Show shadow Δ' checkbox lived in per-page useState, so it reset on
refresh and never carried between the dashboard and the /blocks page.
Extract a useShadowDelta hook backed by a ?shadowDelta=1 query param
(mirroring useExplorerChain) and use it in both places, so the selection
survives refresh, stays shareable, and is consistent across pages.
…oggle

Address review findings:
- fetchBlocksByNumbers throws BlockListUnavailableError on any missing
  block instead of silently dropping rows, matching listBlocks.
- shadow-blocks route returns 400 on malformed limit/before and maps
  ShadowUnavailableError to 503, matching shadow-block/[hash].
- Homepage 'Show shadow Δ' toggle now drives a dense shadow-block list
  (same source as the blocks page) instead of the mostly-empty tip.
… polls

On the homepage the shadow-delta effect now clears blocks and candidates
when it activates, so switching modes never shows the previous source's
rows (or leaves them if the first poll fails). An in-flight guard skips a
poll while the prior two-request chain is still running, preventing
stacked calls and out-of-order writes.
Mirror the shadow-effect hardening on the canonical effect: clear blocks
when it activates so toggling shadow off never shows stale shadow rows,
and abort the in-flight request on cleanup. The shadow effect now tracks
its active controller and aborts it too, so rapid toggles no longer leave
abandoned requests.
@jowparks
jowparks force-pushed the joe/shadow-block-list branch from 769f442 to 6ff8c62 Compare August 31, 2026 21:17
@jowparks
jowparks marked this pull request as ready for review August 31, 2026 23:22
@jowparks
jowparks added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit 99dc6be Sep 1, 2026
13 checks passed
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