Skip to content

feat(internal-explorer): confirm before switching explorer hosts - #93

Open
niran wants to merge 1 commit into
mainfrom
niran/explorer-host-switch
Open

feat(internal-explorer): confirm before switching explorer hosts#93
niran wants to merge 1 commit into
mainfrom
niran/explorer-host-switch

Conversation

@niran

@niran niran commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Internal Explorer chain toggle stays on this origin for same-host chains (Mainnet ↔ Sepolia on prod; any chain when BASE_UI_*_HOST is unset). Other-host toggles open a confirm modal, then window.location.assign to the destination with ?chain= and other query params preserved.
  • Default chain when ?chain= is missing follows the request host: zeronet on BASE_UI_ZERONET_HOST, mainnet on the mainnet/sepolia host, mainnet when hosts are unset. Explicit ?chain= is never redirected on load.
  • Hosts are runtime env (BASE_UI_ZERONET_HOST, BASE_UI_MAINNET_HOST, BASE_UI_SEPOLIA_HOST), matching protocols/ui#21. Same image on both deploys; no NEXT_PUBLIC_*.

Test plan

  • Local npm run dev:internal with hosts unset: /internal-explorer defaults to Mainnet; toggling chains does not prompt
  • With Helm hosts set, Host: base-ui.aws-dev.cbhq.net /internal-explorer defaults to Zeronet; Host: base-ui.aws.cbhq.net defaults to Mainnet
  • ?chain=mainnet on aws-dev stays on aws-dev (no auto-redirect); audit for that chain is disabled there
  • Toggle Mainnet on aws-dev: modal names the prod host; Cancel leaves chain/host unchanged; Continue navigates to prod with ?chain=mainnet
  • Check Don't show this again, Continue, then toggle again: navigates immediately
  • npx vitest run app/api/internal-explorer/hosts.test.ts

type=routine
risk=low
impact=sev5

aws-dev cannot reach prod audit, so toggling Mainnet or Sepolia there
must send the user to the prod Internal Explorer after they confirm.
@vercel

vercel Bot commented Aug 25, 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 25, 2026 9:11pm

Request Review

@cb-heimdall

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

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.

2 participants