-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: Track when RPC update from network banner is completed #37751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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/core-extension-ux (1 files, +6 -2)
|
4a8230a to
5d75564
Compare
Builds ready [5d75564]
UI Startup Metrics (1217 ± 84 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
mcmire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments.
ui/pages/settings/networks-tab/networks-form/networks-form.test.js
Outdated
Show resolved
Hide resolved
|
@cryptodev-2s We should make sure to add the new event to the |
Add NetworkConnectionBannerRpcUpdated event to track when users complete the RPC update flow initiated from the connection banner. Includes chain_id_caip and rpc_endpoint_url properties.
selectedRpcEndpoint cannot be undefined here because: - Save button is disabled without rpcEndpoints - trackRpcUpdateFromBanner only set for existing networks - Existing networks always have valid RPC endpoints
fb5a202 to
f4cd43d
Compare
Builds ready [f4cd43d]
UI Startup Metrics (1195 ± 85 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Done here https://github.com/Consensys/segment-schema/pull/366 |
|
@mcmire Right now we only send rpc_endpoint_url for the new RPC. I’m adding a second property to include the previous RPC URL as well, so we can easily track the ‘from → to’ transition without needing more complex aggregations. |
Description
Track RPC Update Completion from Network Banner
Summary
Adds
NetworkConnectionBannerRpcUpdatedevent to track when users complete the RPC update flow initiated from the network connection banner.Changes
NetworkConnectionBannerRpcUpdatedtrackRpcUpdateFromBannerflag is setchain_id_caip: CAIP-2 format (e.g.,eip155:1)rpc_endpoint_url: Sanitized URL (hostname for public RPCs,'custom'for private)Why
Currently we track when users click "Update RPC" (
NetworkConnectionBannerUpdateRpcClicked), but not when they complete the update.sequenceDiagram participant User participant Banner as Network Banner participant Form as Network Form participant Analytics Note over Banner: Network issue detected Banner->>User: Show "degraded" or "unavailable" banner Note over Analytics: 📊 NetworkConnectionBannerShown User->>Banner: Click "Update RPC" Banner->>Analytics: 📊 NetworkConnectionBannerUpdateRpcClicked Note right of Analytics: Existing event<br/>Tracks user INTENT Banner->>Form: Navigate to network settings User->>Form: Edit RPC endpoint User->>Form: Click "Save" Form->>Analytics: 📊 NetworkConnectionBannerRpcUpdated Note right of Analytics: NEW event (this PR)<br/>Tracks COMPLETION Form->>User: Network updated ✅Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/WPC-172
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds
NetworkConnectionBannerRpcUpdatedand tracks it on network form save when launched from the banner, including CAIP chain ID and sanitized RPC URL; wires flag through state and updates tests.MetaMetricsEventName.NetworkConnectionBannerRpcUpdated.NetworksFormsubmit whentrackRpcUpdateFromBanneris true with properties:chain_id_caip(e.g.,eip155:1) andrpc_endpoint_url(host for public endpoints,customotherwise).NetworkConnectionBannersets edited network with{ chainId, trackRpcUpdateFromBanner: true }and navigates toNETWORKS_ROUTE.NetworkListMenureadstrackRpcUpdateFromBannerfromgetEditedNetworkand passes it toNetworksForm.getEditedNetwork, and actionsetEditedNetworkto includetrackRpcUpdateFromBanner.hexToNumber,isPublicEndpointUrl).trackRpcUpdateFromBanner.NetworksFormtests to assert event emission and URL sanitization for public vs custom RPCs.Written by Cursor Bugbot for commit f4cd43d. This will update automatically on new commits. Configure here.