feat(internal-explorer): drive shadow-delta view from recent shadow blocks - #116
Merged
Conversation
Collaborator
✅ Heimdall Review Status
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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
force-pushed
the
joe/shadow-block-list
branch
from
August 31, 2026 21:17
769f442 to
6ff8c62
Compare
jowparks
marked this pull request as ready for review
August 31, 2026 23:22
wbj-cb
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-blocksendpoint (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=1URL param (via a newuseShadowDeltahook mirroringuseExplorerChain), 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).

