Skip to content

Auto-detect search address type#38

Open
crossagent-production-app[bot] wants to merge 2 commits into
crossagentfrom
worktree/task_00258553edf143e6-ui
Open

Auto-detect search address type#38
crossagent-production-app[bot] wants to merge 2 commits into
crossagentfrom
worktree/task_00258553edf143e6-ui

Conversation

@crossagent-production-app
Copy link
Copy Markdown
Contributor

@crossagent-production-app crossagent-production-app Bot commented May 25, 2026

Refs #2

Change:

  • Replayed the backend /api/scan/check_hash auto-detection change onto the current crossagent UI branch.
  • Updated the navbar search selector to default to Auto Detect.
  • Obvious Substrate addresses now route directly to /sub/account/<address> without using the selected block type.
  • Ambiguous hashes/EVM addresses ask /api/scan/check_hash; manual selector options remain as fallback.

Objective Evidence:

  • npm test -- --runTestsByPath src/__tests__/components/Navbar.test.tsx --runInBand passed.
  • npm run lint -- --file src/components/navbar/navbar.tsx --file src/utils/api.ts --file src/__tests__/components/Navbar.test.tsx passed.
  • go test ./util/address -run TestDetectSearchType -count=1 passed.
  • git diff --check passed.
  • PR checks are passing: Backend CI, Vercel UI, Vercel backend, Vercel preview comments, and crossagent/evidence.
  • Local npm run build got past the new navbar type-check and failed later on existing app-wide NextRouter was not mounted prerender errors across unchanged routes such as /sub/account, /address/[id], /tx/[id], and /contract/[id].

Browser Evidence:

  • Local dev server: npm run dev -- --hostname 127.0.0.1 --port 3037.
  • Playwright command: node <<'NODE' ... require('playwright') ... NODE passed against http://127.0.0.1:3037/.
  • Flow: home page -> Auto Detect search -> enter 47BHMeKG1Q36gU6WP9ZGiqFhEPF5BhfyTVn9NSaemMd9e9uP -> routed to /sub/account/47BHMeKG1Q36gU6WP9ZGiqFhEPF5BhfyTVn9NSaemMd9e9uP and rendered the account page with no framework overlay.
  • PR body image rendering was verified with Playwright on https://github.com/litentry/subscan-essentials/pull/38; the evidence image rendered at 1440x900.

heima-auto-search-substrate-account-local.png

Risks / Not Covered:

  • Live https://explorer.heima.network/ is still running the old behavior at validation time; it routed the same address as /sub/block/.... This PR proves the fixed behavior locally against the current UI branch.
  • Full backend integration still depends on deployment/configured DB data for block, extrinsic, and EVM contract disambiguation.
  • Vercel CLI log inspection was blocked by missing Vercel credentials and an interactive device-login prompt, but the PR's Vercel checks are now passing.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

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

Project Deployment Actions Updated (UTC)
subscan-essentials Ready Ready Preview, Comment May 25, 2026 3:00pm
subscan-essentials-ui-react Ready Ready Preview, Comment May 25, 2026 3:00pm

Request Review

@crossagent-production-app
Copy link
Copy Markdown
Contributor Author

crossagent-production-app Bot commented May 25, 2026

Delivery Evidence Summary

Change:

  • Auto Detect search classifies clear Substrate account and block-hash inputs so users can search without manually choosing a type first, while preserving the focused address-classifier and navbar search behavior for Issue Auto detect the search address type #2.

Objective Evidence:

  • go test ./util/address -run TestDetectSearchType -count=1 exit code 0: Address classifier coverage passed for auto-detect cases.
  • npm test -- --runTestsByPath src/__tests__/components/Navbar.test.tsx --runInBand exit code 0: Navbar tests passed for Enter-key search and Substrate account auto-detection.
  • npm run lint -- --file src/components/navbar/navbar.tsx --file src/utils/api.ts --file src/__tests__/components/Navbar.test.tsx exit code 0: Targeted frontend lint passed for the navbar search files.
  • Playwright browser check against http://127.0.0.1:3037/ using the real Heima Explorer UI exit code 0: Auto Detect search for 47BHMeKG1Q36gU6WP9ZGiqFhEPF5BhfyTVn9NSaemMd9e9uP navigated to /sub/account/47BHMeKG1Q36gU6WP9ZGiqFhEPF5BhfyTVn9NSaemMd9e9uP and captured the final browser state.
  • git diff --check exit code 0: Diff whitespace validation passed.

Visual Evidence:

  • Heima Explorer Auto Detect routes Substrate account search to Account page
  • Source Screenshot Match: Issue Auto detect the search address type #2 is text-only. The final image shows the matching Heima Explorer search surface after Auto Detect routes a Substrate account to the Account page.
  • Visible anchors: Heima Explorer navbar, Auto Detect selector, Account title, Total Balance card, Extrinsics tab, Transfers tab.

Reviewer:

  • Evidence Publisher verification: pass. The evidence is CrossAgent-published, objective commands have exit code 0, and the visual image renders the real Heima Explorer Account page reached from Auto Detect search.

Risks / Not Covered:

  • Production rollout timing can differ from the local dev-server proof. Ambiguous EVM address versus EVM contract classification still relies on the low-cost lookup path described in the issue. Full service behavior depends on chain data and API configuration.

Generated at: 2026-05-25T15:23:43.225Z

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.

1 participant