Skip to content

fix: pre-1.2.5-a fixes (block details, BTC RPC priority, worker proxy toggles)#346

Merged
AugustoL merged 14 commits intoopenscan-explorer:devfrom
AugustoL:fix/pre-1.2.5-a
Mar 25, 2026
Merged

fix: pre-1.2.5-a fixes (block details, BTC RPC priority, worker proxy toggles)#346
AugustoL merged 14 commits intoopenscan-explorer:devfrom
AugustoL:fix/pre-1.2.5-a

Conversation

@AugustoL
Copy link
Collaborator

Description

Pre-release fixes and feature for v1.2.5-alpha targeting block page issues, BTC RPC proxy priority, and user-controllable worker proxy settings.

Related Issue

Closes #336
Closes #337
Closes #340
Closes #343

Type of Change

  • Bug fix
  • New feature

Changes Made

  • Block page More Details ([BUG] More details sections on block is missing #336, [BUG] Missing tooltips in block page #337): Auto-select "moreDetails" tab when expanding via collapse button with no prior tab selected. Add FieldLabel tooltips to all 9 fields (parentHash, stateRoot, transactionsRoot, receiptsRoot, withdrawalsRoot, logsBloom, nonce, mixHash, sha3Uncles). All fields show tooltips at all knowledge levels except nonce (beginner/intermediate only).
  • BTC worker proxy priority (BTC worker proxy defaults are overwritten by metadata RPCs #343): Reverse merge order in getEffectiveRpcUrls() so builtin worker proxy URLs take priority over metadata RPCs. Fix Bitcoin testnet network ID mismatch — align rpcStorage.ts and worker onfinalityRpc.ts to use Testnet4 CAIP-2 ID (bip122:00000000da84f2bafbbc53dee25a72ae) matching networks.json.
  • Worker proxy toggles (feat: add settings to enable/disable worker proxy for AI and RPC calls #340): Add a "Worker Proxy" section in Settings > Network with two independent toggles:
    • AI Analysis Proxy — hides/shows AIAnalysisPanel across all pages when disabled/enabled
    • RPC Proxy — filters worker proxy URLs from effective RPC list when disabled
    • Both default to enabled, persist in localStorage
    • i18n translations added for all 5 locales (en, es, ja, pt-BR, zh)

Checklist

  • I have run npm run format:fix and npm run lint:fix
  • I have run npm run typecheck with no errors
  • I have run tests with npm run test:run
  • I have tested my changes locally
  • I have updated documentation if needed
  • My code follows the project's architecture patterns

Additional Notes

The pre-existing lint warning (getAlchemyBtcUrl unused variable in settings page) is not introduced by this PR.

When expanding via the collapse button with no tab selected, auto-select
"moreDetails" so the panel shows content. Replace plain labels with
FieldLabel components for all 9 fields with tooltips visible for all
knowledge levels except nonce (beginner/intermediate only).

Closes openscan-explorer#336
Closes openscan-explorer#337
Reverse the merge order in getEffectiveRpcUrls() so builtin worker
proxy URLs take priority over metadata RPC endpoints. Also fix the
Bitcoin testnet network ID mismatch: align rpcStorage.ts and the
worker OnFinality route to use the Testnet4 CAIP-2 ID
(bip122:00000000da84f2bafbbc53dee25a72ae) matching networks.json.

Closes openscan-explorer#343
… RPC

Add a Worker Proxy section in Settings > Network with two independent
toggles: AI Analysis Proxy (hides/shows AIAnalysisPanel across all
pages) and RPC Proxy (filters worker proxy URLs from effective RPC
list). Both default to enabled. Settings persist in localStorage.

Closes openscan-explorer#340
@github-actions
Copy link

github-actions bot commented Mar 23, 2026

🚀 Preview: https://pr-346--openscan.netlify.app
📝 Commit: 0666dfd659c598ac3acad5b2ce14485137ae2e3d

@AugustoL AugustoL requested a review from josealoha666 March 23, 2026 15:47
Shard eth-mainnet into 2 parallel jobs (3 tests each). Split EVM
networks into 1 job per network (5 parallel jobs) instead of 2 shards.
Copy link
Collaborator

@josealoha666 josealoha666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked through the diff and I don't see a blocking issue in the implementation itself.

The BTC testnet CAIP-2 fix and the worker-proxy toggle wiring both make sense. The only thing I'd still sanity-check before merge is the RPC proxy toggle across a disable -> reload -> re-enable flow, just to confirm the effective RPC list comes back exactly as expected after persistence.

Change e2e workflow triggers from pull_request on dev to main, so they
run automatically for release PRs (dev→main). Keep workflow_dispatch
so they can be triggered manually on any branch/PR against dev.
Add e2e-all.yml that dispatches eth-mainnet, evm-networks, and bitcoin
workflows concurrently via workflow_call. Add workflow_call trigger to
each child workflow to support reusable composition.
@AugustoL AugustoL requested a review from MatiasOS March 23, 2026 17:48
Copy link
Member

@MatiasOS MatiasOS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to use the pr preview. It just throws for all chains

POST https://openscan-worker-proxy.openscan.workers.dev/evm/infura/eip155:1 429 (Too Many Requests)

This even brakes the fallback strategy, the race strategy, and paralle. Maybe because there is only worker RPC urls

Image

@MatiasOS
Copy link
Member

Workers toogles need some fixes:

  • UI is broken,
  • Disable RPC toogle throws an unexpected error and stops the app
image

@MatiasOS
Copy link
Member

@josealoha666 take a look on my comments

Return empty array from getRPCUrls instead of throwing when a network
has no configured endpoints. Keep networks with zero URLs in the
filtered map so they remain visible but gracefully show error states
instead of crashing the app.
Add REACT_APP_OPENSCAN_WORKER_URL to Vite define map so it is properly
replaced at build time. Switch workerConfig.ts to dot notation for
Vite compatibility. Guard isWorkerProxyUrl against empty string
matching all URLs.
Add REACT_APP_OPENSCAN_WORKER_URL to Vite define map and switch
workerConfig.ts to dot notation for proper build-time replacement.
Guard isWorkerProxyUrl against empty string matching all URLs.
Fix toggle knob alignment by adding flex-shrink: 0 and min-width
to settings-toggle class.
…cing

Concatenate metadata and builtin worker URLs per-network with
deduplication instead of using object spread which replaced entire
arrays. Worker proxy endpoints now supplement metadata RPCs as intended.
Stored user overrides were replacing default URLs entirely, causing
worker proxy URLs to disappear after page reload. Now stored URLs
are merged with defaults so builtin worker endpoints persist across
sessions and are only removed by the excludeWorkerProxy filter.
Point the openscan-groq AI provider at OPENSCAN_WORKER_URL instead of
the legacy openscan-groq-ai-proxy URL. This ensures AI requests go
through the same worker proxy that already has the Netlify preview
origin in its CORS allowlist. Remove unused REACT_APP_OPENSCAN_GROQ_AI_URL
from Vite define map.
Always show the Analyze with AI button. When the AI proxy is disabled
and no personal API keys are configured, show a warning message
guiding the user to either enable the proxy or add their own keys.
Users with their own API keys can still use AI analysis regardless
of the proxy toggle.
When workerProxyAi is false, skip the openscan-groq provider in
resolveProvider so it falls through to the user's configured API
keys. Previously it always used the free proxy first regardless
of the toggle setting.
@AugustoL
Copy link
Collaborator Author

@MatiasOS ready 4 review

@AugustoL AugustoL requested a review from josealoha666 March 25, 2026 12:09
@AugustoL AugustoL merged commit 037b82f into openscan-explorer:dev Mar 25, 2026
3 checks passed
@josealoha666 josealoha666 mentioned this pull request Mar 25, 2026
11 tasks
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