chore: supplement properties on activity screen opened metric#43362
chore: supplement properties on activity screen opened metric#43362ameliejyc wants to merge 7 commits into
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨🔑 @MetaMask/accounts-engineers (2 files, +79 -15)
👨🔧 @MetaMask/core-extension-ux (2 files, +79 -15)
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 486181b. Configure here.
Builds ready [a423bc4]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [f1516a8]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 8 warn · 🔴 1 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [00f5f94]
⚡ Performance Benchmarks (Total: 🟢 18 pass · 🟡 7 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|

Description
Fires a
ActivityScreenOpenedMetaMetrics event with enriched properties when a user opens the Activity tab in the Home view.Previously the event was fired on tab click from
AccountOverviewTabs, which meant it was fired immediately — before remote EVM transaction data (fetched via React Query) had loaded, makingis_emptyandnum_pending_transactionsimpossible to report accurately at that point.The event has been moved into
ActivityListV3(ui/pages/activity/activity-list.tsx), where all three data sources (local EVM, remote EVM, non-EVM) are available. It fires exactly once per mount using auseRefguard, and only after:AssetListControlBarhas reported the initial network selection (networks !== null)!isInitialLoading)The event now includes:
network_filter— enabled networks as CAIP chain IDsis_empty— whether the list is visually empty (mirrors the conditionVirtualizedListuses to show the empty state)pending_transactions— count of pending local + non-EVM transactionsThe event is suppressed when
ActivityListis rendered in an embedded context (asset detail page), identified by the presence of thefilterprop.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
ActivityScreenOpenedfires with:network_filtermatching your enabled networks in CAIP format (e.g.["eip155:1", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"])is_empty: falsewhen transactions are present,truewhen none existnum_pending_transactionsmatching the actual count of pending items in the listActivityList— confirmActivityScreenOpenedis not fired there.ActivityScreenOpenedis not fired on those clicks.Note, I see all metrics on activity page being emitted 4 times. This is unrelated and requires separate cleanup.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Analytics-only changes with feature-flag split between V2/V3 and unit test coverage; no auth, payments, or transaction execution paths.
Overview
ActivityScreenOpened is deferred for the V3 activity list redesign: the Home Activity tab no longer fires the event on click when
extensionUxActivityListRedesignis enabled. V2 still fires on tab click withnetwork_filteronly.A new
useActivityScreenOpenedhook fires the event once per mount fromActivityList, after networks are initialized and the initial transaction query finishes. The payload addsis_emptyandpending_transactions(local + non-EVM pending), alongsidenetwork_filterfromselectEnabledNetworksAsCaipChainIds. Embedded lists (when afilterprop is passed) skip the event.AccountOverviewTabsuses the shared CAIP selector instead of localuseMemoconversion.activity-listtreatsnetworksasnulluntil the control bar reports, so “settled” gating is accurate.Reviewed by Cursor Bugbot for commit 00f5f94. Bugbot is set up for automated code reviews on this repo. Configure here.