Skip to content

feat(shadow-explorer): internal Shadow Explorer for evaluating release health - #80

Open
wbj-cb wants to merge 7 commits into
mainfrom
feat/tips-shadow-blocks
Open

feat(shadow-explorer): internal Shadow Explorer for evaluating release health#80
wbj-cb wants to merge 7 commits into
mainfrom
feat/tips-shadow-blocks

Conversation

@wbj-cb

@wbj-cb wbj-cb commented Aug 20, 2026

Copy link
Copy Markdown

What

Surfaces shadow blocks inside TIPS (no separate section) and computes the shadow-vs-canonical delta in the UI.

  • Canonical block detail lists its shadow blocks (linked); dedicated shadow-block detail page
  • "Show shadow Δ" toggle on Latest Blocks (dashboard) and the /tips/blocks explorer — gas/tx deltas rendered inline as % (+abs unit)
  • Deltas computed client-side against the canonical block TIPS already has (gasUsed threaded through the dashboard block list); absolute delta still shown when the percentage is undefined (canonical value 0)
  • Batch shadow fetches key on the visible canonical-hash set (no refetch per poll); added fetch timeouts; proxy routes validate + cap the canonical-hash input
  • Per-chain backend URL via TIPS_<CHAIN>_SHADOW_METRICS_URL
Screenshot 2026-08-21 at 1 10 06 PM Screenshot 2026-08-21 at 1 09 59 PM Screenshot 2026-08-21 at 1 09 32 PM

Why

Release-health evaluation needs shadow blocks next to their canonical counterparts. Folding this into TIPS (rather than a standalone section) reuses existing block data and keeps deltas correct without server-side coupling.

Test

tsc --noEmit, eslint, and the explorer-format vitest suite pass. Verified live end-to-end against seeded mainnet blocks (50276480–482): toggle renders deltas; proxy returns 200 for valid canonical hashes and 400 for invalid/over-cap input.

Note: internal-only surface — ships via deploy.config.mjs gating; no generated llms.txt/AGENTS.md drift (page edits, not adds/renames).

wbj-cb and others added 5 commits August 20, 2026 11:05
Internal-only explorer surface listing reorged-out shadow candidate blocks
paired with the canonical block that replaced them, with gas and transaction
deltas. Chain-aware API route proxies the shadow-metrics /shadow-blocks
endpoint; offset-paginated to match upstream.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
…nal section

Move the shadow-blocks surface out of TIPS into a standalone, internal-only
Shadow Explorer section modeled for 1:N shadow chains per network:

- SHADOW_<NET>_CHAINS server-side registry (chain URLs never sent to client)
  + /api/shadow-explorer/{chains,shadow-blocks} route handlers and guard.
- Path routing /shadow-explorer/<network>/<chain>/shadow-blocks with network
  + shadow-chain selectors; top-level nav entry.
- deploy.config surface (internal-only) with middleware/llms/sitemap exclusion
  and the CI public-build-excludes-internal check extended.
- Revert the TIPS ExplorerNav/config/client/types shadow additions.
- Guard listShadowBlocks against a missing upstream totalCount.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
Make shadow block rows clickable and add a server-rendered block detail page
(/shadow-explorer/<network>/<chain>/block/<id>) that proxies the shadow-metrics
/blocks/{id} endpoint: overview + per-tx table.

Keep canonical block inspection in TIPS to avoid double duty: the Canonical
cell and the detail's canonical-replacement link point at /tips/block/<hash>,
and the block page redirects any non-reorged (canonical) hit to TIPS so
Shadow Explorer renders only reorged-out shadow candidates.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
…reakdown in drilldown

Replace the per-metric columns (gas, gas delta, txns, fee inversions) with a
single server-computed Health X/N verdict per row; the banner now counts blocks
that failed one or more checks. The block drilldown fetches the single-block
summary (GET /shadow-blocks/{id}) and renders each check pass/fail with its
detail.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
Validate the chain server-side (resolveShadowChainUrl) and notFound() when it
is not configured, matching the overview and block-detail pages, instead of
rendering chrome and a generic client fetch error.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
@cb-heimdall

cb-heimdall commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/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 20, 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 21, 2026 9:08pm

Request Review

jowparks
jowparks previously approved these changes Aug 20, 2026
wbj-cb and others added 2 commits August 21, 2026 13:29
…ggle on block lists

Integrate shadow blocks into TIPS instead of a separate section: the canonical
block detail lists its shadow blocks (linking to /tips/shadow-block/[hash]), and
the Latest Blocks + block explorer lists get a 'Show shadow delta' toggle showing
gas and tx deltas vs canonical (inline % + absolute). Adds tips shadow proxies
(shadow-candidates, shadow-candidates-batch, shadow-block) + client/types.
Removes the /shadow-explorer section and all shadow health UI.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
Backend now returns shadow-only summaries, so gas/tx deltas are computed
in the UI against the canonical block TIPS already has (gasUsed threaded
through the dashboard block list). Show absolute delta even when the
percentage is undefined (canonical value 0). Batch shadow fetches key on
the visible canonical-hash set to avoid refetching every poll; add fetch
timeouts; validate/cap canonical-hash input in the proxy routes.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
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