Skip to content

Cross-chain: ICTT users index, bridged tokens tab, and stats layout#3351

Open
tom2drum wants to merge 18 commits intomainfrom
tom2drum/issue-3314
Open

Cross-chain: ICTT users index, bridged tokens tab, and stats layout#3351
tom2drum wants to merge 18 commits intomainfrom
tom2drum/issue-3314

Conversation

@tom2drum
Copy link
Copy Markdown
Collaborator

@tom2drum tom2drum commented Apr 8, 2026

Description and Related Issue(s)

This pull request adds cross-chain–related UI and API integration for the work tracked in #3314. It introduces an ICTT users index page backed by the interchain indexer, integrates bridged tokens as a tab on the main Tokens page (with dedicated token and bridged-token query hooks), the new charts for cross-chain messages statistics, and fixes the layout of statistics counters on the stats page. Navigation, metadata, and multichain ecosystem list presentation are updated to support these flows.

Related to #3314.

Proposed Changes

  • ICTT users: New ictt-users page, navigation entry, and interchain indexer client/stub extensions to load and display ICTT user data.
  • Tokens page: Refactor to a tabbed layout so bridged tokens appear alongside the standard token list; add useTokensQuery and useBridgedTokensQuery; remove the superseded tokens action bar pattern in favor of the new structure.
  • Stats page: Adjust number widgets layout so counter statistics display consistently.
  • Shared: Updates to PageTitle, ChainSnippetList, ecosystem table/list items, routing types, and related metadata or tracking hooks where the new routes require them.

No environment variables were added or changed in this pull request.

Breaking or Incompatible Changes

None.

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@tom2drum tom2drum added the skip checks For Pull Requests where the "Checks" workflow should not be run label Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include @coderabbitai review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f803262b-b5d3-42f1-8b12-46a3faaaa63f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tom2drum tom2drum changed the title Move bridged tokens to the tab on tokens page (#3314) Cross-chain: ICTT users index, bridged tokens tab, and stats layout (#3314) Apr 8, 2026
@tom2drum tom2drum changed the title Cross-chain: ICTT users index, bridged tokens tab, and stats layout (#3314) Cross-chain: ICTT users index, bridged tokens tab, and stats layout Apr 8, 2026
@tom2drum tom2drum removed the skip checks For Pull Requests where the "Checks" workflow should not be run label Apr 22, 2026
@tom2drum tom2drum marked this pull request as ready for review April 22, 2026 14:34
@tom2drum
Copy link
Copy Markdown
Collaborator Author

cursor review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces cross-chain UI/API integrations (ICTT users index and bridged tokens), extends interchain-indexer API resources, and refactors the stats/charts system to a new unified chart toolkit (line + sankey) with updated stats page layouts and navigation/metadata updates.

Changes:

  • Add an ICTT users index page backed by the interchain indexer (routing, nav, metadata, UI table/list).
  • Refactor Tokens into query hooks + sorting collection and add bridged tokens querying/sorting support.
  • Replace legacy stats UI with client/features/chain-stats pages/hooks and a revamped chart toolkit (LineChart + SankeyChart widgets/menus/modals, CSV/PNG/share).

Reviewed changes

Copilot reviewed 144 out of 164 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ui/tokens/utils.ts Add Chakra createListCollection sort collection + bridged chains filter helper.
ui/tokens/useTokensQuery.ts New hook for tokens list with filters/sorting/pagination.
ui/tokens/useBridgedTokensQuery.ts New hook for bridged tokens list with filters/sorting/pagination.
ui/tokens/TokensTable.tsx Align sorting handler type to Select OnValueChangeHandler.
ui/tokens/TokensActionBar.tsx Remove legacy tokens action bar component.
ui/tokens/Tokens.tsx Adjust action bar wiring and sorting handler type.
ui/shared/externalChains/ChainSnippetList.tsx New reusable chain snippet renderer (icon/name/id + copy).
ui/shared/externalChains/ChainSelect.tsx Add controlled multi-select “All chains” handling + multi label config.
ui/shared/chart/utils.ts Switch comparator types to new line chart item types.
ui/shared/chart/useChartQuery.tsx Remove legacy stats line chart query hook.
ui/shared/chart/config.ts Switch chart config types to new line chart types.
ui/shared/chart/ChartWidget.pwstory.tsx Update PW story to use LineChartWidget.
ui/shared/chart/ChartWidget.pw.tsx Update PW tests prop types to new line chart widget props.
ui/shared/Page/PageTitle.tsx Allow styling overrides for the second row via secondRowProps.
ui/pages/screenshots/Chart.pw.tsx_mobile_base-view-dark-mode-mobile-1.png Update chart screenshot artifact.
ui/pages/screenshots/Chart.pw.tsx_default_base-view-dark-mode-mobile-1.png Update chart screenshot artifact.
ui/pages/screenshots/Chart.pw.tsx_dark-color-mode_base-view-dark-mode-mobile-1.png Update chart screenshot artifact.
ui/pages/Stats.tsx Remove legacy stats index page implementation.
ui/pages/GasTracker.pw.tsx Update mocks + selector names for new chart rendering.
ui/pages/Chart.pw.tsx Remove legacy chart page PW test.
ui/multichain/stats/MultichainStats.tsx Switch multichain stats page to useChainStats + new sections/filters/counters components.
ui/multichain/ecosystems/MultichainEcosystemsTableItem.tsx Reuse new ChainSnippetList in ecosystems table row.
ui/multichain/ecosystems/MultichainEcosystemsListItem.tsx Reuse new ChainSnippetList in mobile list row.
ui/megaEth/uptime/UptimeCharts.tsx Migrate uptime charts to LineChartWidget and new axes config types.
ui/home/indicators/utils/chart.ts Migrate homepage indicator chart typing to new line chart types.
ui/home/indicators/useChartDataQuery.tsx Update hook return type to LineChartData.
ui/home/indicators/ChainIndicatorChartContent.tsx Migrate indicator chart rendering to new line chart primitives/controllers.
ui/home/indicators/ChainIndicatorChartContainer.tsx Update indicator chart container typing to new line chart types.
ui/gasTracker/GasTrackerChart.tsx Use chain-stats chart container + new stubs, rename loading prop.
ui/address/coinBalance/AddressCoinBalanceChart.tsx Replace legacy widget import with LineChartWidget.
types/client/stats.ts Remove legacy stats interval types (moved to chain-stats feature).
types/api/interchainIndexer.ts Remove local interchain indexer filter types (moved into cross-chain feature).
toolkit/utils/file.ts Simplify CSV export helper signature to accept a single 2D array.
toolkit/components/charts/types.tsx Remove old monolithic chart types module.
toolkit/components/charts/types.ts Introduce new shared chart primitives + ChartResolution enum.
toolkit/components/charts/sankey/useSankeyController.ts Rename sankey types/constants + fix import paths to new structure.
toolkit/components/charts/sankey/types.ts Rename sankey exported types (SankeyChart*).
toolkit/components/charts/sankey/parts/SankeyChartNode.tsx Rename component/types, adjust fallback rendering and tooltip formatting.
toolkit/components/charts/sankey/parts/SankeyChartMenu.tsx Add CSV/fullscreen/share menu integration for sankey charts.
toolkit/components/charts/sankey/parts/SankeyChartLink.tsx Rename component/types and format tooltip values.
toolkit/components/charts/sankey/index.ts Update exports to new sankey component names.
toolkit/components/charts/sankey/constants.ts Rename sankey default constant names.
toolkit/components/charts/sankey/SankeyChartWidget.tsx New sankey widget wrapper with header/menu/content.
toolkit/components/charts/sankey/SankeyChartModal.tsx New fullscreen modal for sankey charts.
toolkit/components/charts/sankey/SankeyChartContent.tsx New shared content wrapper usage for sankey chart.
toolkit/components/charts/sankey/SankeyChart.tsx Update to new types/constants + locale formatting and margin changes.
toolkit/components/charts/line/utils/useLineChartZoom.tsx Rename zoom hook for line charts.
toolkit/components/charts/line/utils/useLineChartLegend.tsx Rename legend hook for line charts.
toolkit/components/charts/line/utils/useLineChartController.tsx Rename controller and update imports to new chart primitives.
toolkit/components/charts/line/utils/useLineChartBrushX.tsx Rename brush hook and update import paths.
toolkit/components/charts/line/utils/lineChartAxis.ts Rename axis config types and update import paths.
toolkit/components/charts/line/utils/getDateLabel.ts Switch to shared ChartResolution.
toolkit/components/charts/line/utils/formatters.ts Switch to new LineChartItem type.
toolkit/components/charts/line/utils/animations.ts New line chart animation helpers (left/fade/none).
toolkit/components/charts/line/types.tsx New line-chart-specific types module.
toolkit/components/charts/line/parts/tooltip/utils.ts Add tooltip layout constants/helpers.
toolkit/components/charts/line/parts/tooltip/pointerTracker.ts New pointer tracking helper for tooltip interactions.
toolkit/components/charts/line/parts/tooltip/LineChartTooltipTitle.tsx Rename/refactor tooltip title rendering for line charts.
toolkit/components/charts/line/parts/tooltip/LineChartTooltipRow.tsx Rename/refactor tooltip rows and DOM selectors.
toolkit/components/charts/line/parts/tooltip/LineChartTooltipPoint.tsx Rename/refactor tooltip point rendering and selectors.
toolkit/components/charts/line/parts/tooltip/LineChartTooltipLine.tsx Rename/refactor tooltip vertical line and selector.
toolkit/components/charts/line/parts/tooltip/LineChartTooltipContent.tsx Rename/refactor tooltip content wrapper and selector.
toolkit/components/charts/line/parts/tooltip/LineChartTooltipBackdrop.tsx Rename/refactor tooltip backdrop wrapper and selector.
toolkit/components/charts/line/parts/LineChartTooltip.tsx Rename/refactor tooltip assembly to new components/resolution type.
toolkit/components/charts/line/parts/LineChartSelectionX.tsx Rename/refactor brush selection and selectors.
toolkit/components/charts/line/parts/LineChartOverlay.tsx Rename overlay component type.
toolkit/components/charts/line/parts/LineChartMenu.tsx New menu wrapper (csv/fullscreen/share) for line charts.
toolkit/components/charts/line/parts/LineChartLine.tsx Rename line component and update types/animation usage.
toolkit/components/charts/line/parts/LineChartLegend.tsx Rename legend component and update types.
toolkit/components/charts/line/parts/LineChartGridLine.tsx Rename grid line component props/type.
toolkit/components/charts/line/parts/LineChartAxis.tsx Rename axis component props/type and fix import paths.
toolkit/components/charts/line/parts/LineChartArea.tsx Rename area component props/type and fix types.
toolkit/components/charts/line/index.ts New barrel exports for line chart toolkit.
toolkit/components/charts/line/LineChartWidget.tsx New line chart widget (legend, zoom reset, menu, content).
toolkit/components/charts/line/LineChartModal.tsx New fullscreen modal for line charts.
toolkit/components/charts/line/LineChartContent.tsx New shared content wrapper usage for line charts.
toolkit/components/charts/line/LineChart.tsx Rename/refactor chart root to LineChart and new sub-components.
toolkit/components/charts/index.ts Switch to exporting new components, line, and sankey modules.
toolkit/components/charts/components/index.ts New barrel for shared chart UI components.
toolkit/components/charts/components/ChartWidget.tsx New shared widget root/header components.
toolkit/components/charts/components/ChartWatermark.tsx New shared chart watermark component.
toolkit/components/charts/components/ChartResetZoomButton.tsx New shared zoom reset button component.
toolkit/components/charts/components/ChartMenu.tsx New shared chart menu (share/copy, fullscreen, png, csv).
toolkit/components/charts/components/ChartDialog.tsx New shared dialog wrapper for fullscreen charts.
toolkit/components/charts/components/ChartContent.tsx New shared content state handler (loading/error/empty/watermark).
toolkit/components/charts/ChartWidgetContent.tsx Remove legacy chart widget content wrapper.
toolkit/components/charts/ChartWidget.tsx Remove legacy chart widget implementation.
toolkit/components/charts/ChartFullscreenDialog.tsx Remove legacy fullscreen chart dialog.
toolkit/chakra/select.tsx Add OnValueChangeHandler type + multi-select value text display config.
stubs/tx.ts Migrate stats counters stub usage to chain-stats stubs.
stubs/stats.ts Remove legacy stats stubs and switch to chain-stats stubs.
stubs/interchainIndexer.ts Extend interchain indexer stubs for chains stats + bridged tokens.
stubs/contract.ts Migrate verified contracts counters stub usage to chain-stats stubs.
public/icons/name.d.ts Add navigation icon name for ICTT users.
pnpm-lock.yaml Bump interchain-indexer-types and add d3-transition deps.
pages/stats/index.tsx Route stats index to ChainStatsIndex (or MultichainStats).
pages/stats/[id].tsx Route stats details to ChainStatsDetails (dynamic, ssr:false).
pages/ictt-users.tsx New ICTT users route page.
package.json Bump interchain-indexer-types + add d3-transition dependencies.
nextjs/nextjs-routes.d.ts Add /ictt-users route typing.
mocks/stats/main.tsx Update stats mocks import path to new chain-stats mocks.
mocks/multichain/stats.ts Update multichain stats mocks import path to chain-stats mocks.
lib/router/useQueryParams.ts Allow array values in updateQuery.
lib/mixpanel/getPageType.ts Add page type mapping for /ictt-users.
lib/metadata/templates/title.ts Add title template for /ictt-users.
lib/metadata/templates/description.ts Add description template for /ictt-users.
lib/metadata/getPageOgType.ts Add OG type mapping for /ictt-users.
lib/hooks/useNavItems.tsx Add nav entry for ICTT users.
lib/api/services/interchainIndexer.ts Add new interchain indexer resources (chains, stats, bridged tokens, message paths) + sorting types.
lib/api/resources.ts Wire interchain indexer pagination sorting into shared resource typing.
icons/navigation/ictt_users.svg Add new navigation icon asset.
docs/ENVS.md Update example interchain indexer host URL.
configs/envs/.env.numine Enable cross-chain txs + set new indexer host; add alerts content.
client/features/cross-chain-txs/utils/ictt-sort.ts Add ICTT users sorting options/sequence.
client/features/cross-chain-txs/utils/chain-stats.ts Define cross-chain charts/sections for stats integration.
client/features/cross-chain-txs/utils/bridged-tokens-sort.ts Add bridged tokens sorting options/sequence + collection.
client/features/cross-chain-txs/types/api.ts Add cross-chain filters + sorting types.
client/features/cross-chain-txs/stubs/chain-stats.ts Add stub payload for cross-chain sankey charts.
client/features/cross-chain-txs/pages/ictt-users/IcttUsersTableItem.tsx New ICTT users table row component.
client/features/cross-chain-txs/pages/ictt-users/IcttUsersTable.tsx New ICTT users table with sortable columns.
client/features/cross-chain-txs/pages/ictt-users/IcttUsersListItem.tsx New ICTT users mobile list item.
client/features/cross-chain-txs/pages/ictt-users/IcttUsers.tsx New ICTT users page with sort + pagination.
client/features/cross-chain-txs/pages/bridged-tokens/BridgedTokensTableItem.tsx New bridged tokens table row (token entity/address).
client/features/cross-chain-txs/pages/bridged-tokens/BridgedTokensTable.tsx New bridged tokens table with sortable metrics.
client/features/cross-chain-txs/pages/bridged-tokens/BridgedTokensListItem.tsx New bridged tokens mobile list item.
client/features/cross-chain-txs/pages/bridged-tokens/BridgedTokensIndex.tsx Bridged tokens list/table wrapper for tokens tab.
client/features/cross-chain-txs/hooks/useCrossChainChartQuery.ts New query hook building sankey data from message paths API.
client/features/cross-chain-txs/hooks/useBridgedTokensQuery.ts New query hook for bridged tokens (filters/sorting/pagination).
client/features/cross-chain-txs/components/ChartWidgetContainerCrossChain.tsx Sankey chart widget container for stats sections integration.
client/features/cross-chain-txs/components/ChainStatsDetailsCrossChainTxs.tsx Cross-chain stats details view with chain filter + sankey + menu.
client/features/chain-stats/utils/resolution.ts Parse resolution from query to chart resolution enum.
client/features/chain-stats/utils/interval.ts Stats interval constants + date range helpers + query parsing.
client/features/chain-stats/utils/chart.ts Helper to build absolute chart URLs.
client/features/chain-stats/types/client.ts New chain-stats feature types (sections, chart payloads, intervals).
client/features/chain-stats/stubs/counters.ts New stub counter payload for placeholders.
client/features/chain-stats/stubs/charts.ts New stub charts/sections payload for placeholders.
client/features/chain-stats/pages/index/ChainStatsSections.tsx New stats sections list (line + cross-chain sankey integration).
client/features/chain-stats/pages/index/ChainStatsIndex.tsx New stats index page composing title/counters/filters/sections.
client/features/chain-stats/pages/index/ChainStatsFilters.tsx New filters component (section select, interval select, search).
client/features/chain-stats/pages/index/ChainStatsErrorAlert.tsx Rename alert component for chain-stats context.
client/features/chain-stats/pages/index/ChainStatsCounters.tsx Fix counters grid layout + use new placeholder stubs.
client/features/chain-stats/pages/details/ChainStatsDetails.tsx New stats details page deciding between line vs cross-chain sankey.
client/features/chain-stats/pages/details/ChainStatsDetails.pw.tsx New PW coverage for stats details including cross-chain view.
client/features/chain-stats/mocks/lines.ts New mocks for stats sections/charts list.
client/features/chain-stats/mocks/cross-chain-txs-paths.ts New mocks for cross-chain message paths.
client/features/chain-stats/hooks/useChartQuery.tsx New line-chart query hook returning normalized line payload.
client/features/chain-stats/hooks/useChainStats.tsx New stats index hook merging cross-chain sections when enabled.
client/features/chain-stats/components/ChartWidgetContainer.tsx New line chart widget container for stats index tiles.
client/features/chain-stats/components/ChartIntervalSelect.tsx New interval select wired to chain-stats interval constants.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/shared/chart/utils.ts
Comment on lines +7 to 9
export const sortByDateDesc = (a: Pick<LineChartItem, 'date'>, b: Pick<LineChartItem, 'date'>) => {
return a.date.getTime() - b.date.getTime();
};
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

sortByDateDesc currently returns a.date - b.date, which sorts in ascending order, contradicting the function name. Either invert the comparator (for true descending) or rename the helper to avoid misleading callers (it’s used with .sort(sortByDateDesc) in chart preparation).

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +41
const counterPartyChainIdsFromQuery = getQueryParamString(router.query.counterparty_chain_ids);

const defaultResolution = resolutionFromQuery || DEFAULT_RESOLUTION;

const [ resolution, setResolution ] = React.useState<ChartResolution>(defaultResolution);
const [ interval, setInterval ] = React.useState<StatsIntervalIds>(intervalFromQuery ?? getIntervalByResolution(resolution));
const [ counterPartyChainIds, setCounterPartyChainIds ] = React.useState<Array<string>>(
counterPartyChainIdsFromQuery ? [ counterPartyChainIdsFromQuery ] : [ ALL_OPTION.value ],
);
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

counterparty_chain_ids is read using getQueryParamString, which joins array query params with commas. Since updateQuery can write counterparty_chain_ids as an array (multi-select), this state initialization will turn ['1','2'] into ['1,2'], breaking restoring the selected chains from the URL. Parse router.query.counterparty_chain_ids as string | string[] and normalize to string[] (e.g., accept both repeated params and comma-separated values).

Copilot uses AI. Check for mistakes.
Comment thread toolkit/components/charts/components/ChartContent.tsx
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