Skip to content

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

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

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

Conversation

@wbj-cb

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

Copy link
Copy Markdown

Summary

Adds Shadow Explorer as an internal-only section (same pattern as TIPS and Benchmark) for evaluating the health of a release. A release-candidate "canary" builder produces shadow candidate blocks that get reorged out; this surface pairs each with the canonical block that replaced it and shows a per-block release-health verdict. It consumes the shadow-metrics HTTP API (see the companion base/base PR).

image

Internal-only

Like TIPS and Benchmark, this ships to the internal target only. It's declared as an internal surface in deploy.config.mjs, so it's unreachable in the public build: middleware 404s the route subtree, the API routes 404 via the section guard, the layout has a notFound() backstop, it's dropped from the sitemap/llms index, and the public-build-excludes-internal CI job is extended to assert its absence.

What's added

  • New /shadow-explorer section addressed by network × shadow chain in the path: /shadow-explorer/<network>/<chain>/shadow-blocks (list) and /shadow-explorer/<network>/<chain>/block/<hash> (drilldown), with an overview and network/chain selectors.
  • Per-network shadow-chain registry: a server-only SHADOW_<NET>_CHAINS JSON env (chain URLs never reach the client), surfaced via GET /api/shadow-explorer/chains; the list is proxied through /api/shadow-explorer/shadow-blocks and the drilldown fetches server-side.
  • List shows one Health X/N verdict per block (green all-pass / red failing / "pending" when unreconciled); a banner counts blocks that failed one or more checks; clicking a row drills in.
  • Drilldown leads with the release-health breakdown (each check pass/fail with its detail) followed by the block overview and transaction table.
  • Canonical block inspection is deferred to TIPS (canonical links point at /tips/block/...), so this section stays shadow-only and doesn't duplicate the canonical explorer.

Notes for reviewers

  • Independent of TIPS: its own network model and navigation, no shared ExplorerNav; the net diff leaves TIPS unchanged.
  • Requires the shadow-metrics API reachable at each configured SHADOW_<NET>_CHAINS url; the internal image is shipped via protocols/ui.

Testing

vitest covers query parsing, pagination math, and the missing-totalCount guard; tsc and lint are clean.

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 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 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 20, 2026 11:18pm

Request Review

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