PANA-5681: Integrate HeatmapIdentifierRegistry into Session Replay for heatmaps [4 of 4]#3206
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39a5a2b5af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
39a5a2b to
2f8955a
Compare
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/heatmaps #3206 +/- ##
====================================================
+ Coverage 72.04% 72.16% +0.12%
====================================================
Files 967 970 +3
Lines 35499 35656 +157
Branches 5887 5936 +49
====================================================
+ Hits 25575 25730 +155
+ Misses 8304 8300 -4
- Partials 1620 1626 +6
🚀 New features to boost your workflow:
|
ViewIdentityResolver into Session Replay for heatmapsViewIdentityResolver into Session Replay for heatmaps [4 of 4]
cbfbf76 to
9a2e330
Compare
ViewIdentityResolver into Session Replay for heatmaps [4 of 4]HeatmapIdentifierRegistry into Session Replay for heatmaps [4 of 4]
HeatmapIdentifierRegistry into Session Replay for heatmaps [4 of 4]9a2e330 to
e63b7f4
Compare
6210b4b to
fa8baf8
Compare
803a051 to
11ba9b6
Compare
11ba9b6 to
2df9570
Compare
0014da6 to
03802d0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03802d0335
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Validate that the cached path's own component matches the freshly computed one. | ||
| // Guards against stale entries when a view changes sibling position without being | ||
| // detached (e.g. notifyItemMoved with an in-place animator). | ||
| ?.takeIf { it.viewPath.lastOrNull() == pathComponent } |
There was a problem hiding this comment.
Recompute cached descendants when ancestor path changes
When a non-clickable ViewGroup with clickable descendants is reordered among same-type siblings, the container's nodePath changes but each child keeps the same direct parent and child component. This cache check only validates the child's last path component, so resolveIdentity() reuses the old viewPath/permanentId for the descendant and publishIfChanged() may skip updating the registry, causing heatmap actions for the moved child to correlate to its previous hierarchy position. Include the current nodePath prefix in the cache validation before reusing the entry.
Useful? React with 👍 / 👎.
What does this PR do?
Wires
ViewIdentityResolverinto Session Replay to populatepermanentIdon wireframes. This enables correlating wireframes with RUM action events for heatmap visualization.Key changes:
ViewIdentityProviderinterface for Session Replay's view identity resolutionViewIdentityResolver(from RUM feature context) viaViewIdentityResolverAdapterviewIdentityProvidertoMappingContextfor use by all wireframe mapperspermanentIdin all wireframe types (Shape, Text, Image, Placeholder, Webview)onWindowRefreshed()on each draw pass to index the current view hierarchyMotivation
Support mobile heatmaps. This is the final piece connecting Session Replay wireframes to RUM actions.
Additional Notes
MappingContextForgeryFactoryinsession-replay-composeandsession-replay-materialtest suites.Review checklist (to be filled by reviewers)