Skip to content

Add SDK Inspector panel with real-time call visualization #7

Merged
aelmanaa merged 1 commit intomainfrom
feat/sdk-inspector-polish
Mar 9, 2026
Merged

Add SDK Inspector panel with real-time call visualization #7
aelmanaa merged 1 commit intomainfrom
feat/sdk-inspector-polish

Conversation

@aelmanaa
Copy link
Copy Markdown
Collaborator

@aelmanaa aelmanaa commented Mar 9, 2026

This pull request introduces several improvements and new features to the multichain bridge dapp, focusing on enhanced developer experience and UI clarity, especially around SDK call inspection and rate limit displays. The most significant change is the addition of an SDK Inspector panel, which provides real-time visualization and educational annotations for all SDK calls made during the bridge flow. Additionally, the bridge form and pool info components are updated to better handle and display remote token information, and the rate limit UI receives a visual overhaul for improved clarity.

SDK Inspector Integration and Instrumentation:

  • Added an SDK Inspector panel (toggleable via the UI) that visualizes all CCIP SDK calls in real time, grouped by flow phase, and provides educational annotations for each call. This includes lazy loading for performance and developer-focused documentation in the README. [1] [2] [3] [4] [5]
  • Instrumented SDK calls throughout the app (notably in hooks and in the bridge form) to record method, arguments, result, latency, and annotations for the inspector, without affecting production code paths. [1] [2]

Bridge Flow and Remote Token Handling:

  • Updated the transfer flow to handle and pass remoteToken information between components, ensuring accurate cross-chain token mapping and user feedback. [1] [2] [3] [4] [5]
  • Enhanced the PoolInfo component to report remoteToken changes to its parent via a callback, enabling the bridge form to use this information in transfers. [1] [2] [3]

UI/UX Improvements:

  • Refined the rate limit display UI for better clarity and consistency, including new styles for containers, labels, and progress bars, and added a "Rate Limits" section label. [1] [2] [3] [4] [5]
  • Added new layout styles for the app body to accommodate the inspector panel and improve overall app structure. [1] [2]

Developer Experience and Documentation:

  • Updated the README with a detailed section on the SDK Inspector, including guidance on what parts of the code are relevant for learning or production use.

Code Quality and Maintainability:

  • Ensured that inspector state is cleared when changing source networks to avoid stale instrumentation data.

These changes collectively make the bridge dapp more transparent and educational for developers, while also improving the user interface and reliability of cross-chain transfers.

…r optimizations

- SDK Inspector: new shared infrastructure (store, types, components) in shared-utils/inspector
  and shared-components/inspector with lazy-loaded panel, phase grouping, annotations, and badges
- Instrument all SDK calls in example 03 with logSDKCall wrappers across all 4 phases
  (Setup, Estimation, Transfer, Tracking)
- Optimize transfer phase: cache estimation results, pass remoteToken from PoolInfo to skip
  redundant registry lookups (11 → 5 calls)
- Harden ChainContext: dedup concurrent getChain calls, error cooldown, phase-aware logging
- Switch tracking hooks to sequential timeout-based polling to prevent connection exhaustion
- Tune polling intervals (balance 15s, rate limits 30s, message status 15s initial / 60s max)
- Improve rate limit display: card styling, taller progress bars, section label
- Add SDK Inspector README section explaining how to read through instrumented code
- Fix EVM fee token: use 0n native value when paying with ERC-20
@aelmanaa aelmanaa requested review from a team as code owners March 9, 2026 10:45
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 9, 2026

👋 aelmanaa, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@aelmanaa aelmanaa merged commit 18f4e6e into main Mar 9, 2026
8 checks passed
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