Juan.naranjo/fresh idea - #3727
Conversation
PANA-8391: Add embedded content wireframe model support
…evelop-into-flutter-support
…lutter-support Merge develop into feature/flutter-support
…lutter-support2 Merge develop into feature/flutter-support
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0752e7e35
ℹ️ 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".
| "slotId": { | ||
| "type": "string", | ||
| "description": "Unique ID of the slot that generated this record.", | ||
| "readOnly": true | ||
| } |
There was a problem hiding this comment.
Preserve the existing snapshot-record constructors
Adding this optional field changes the generated public MobileFullSnapshotRecord constructor from (Long, Data) to (Long, Data, String?); the committed .api diff confirms that the original JVM constructor is removed, and the equivalent change also affects MobileIncrementalSnapshotRecord. A precompiled SDK integration that invokes either old constructor will therefore fail with NoSuchMethodError when used with this version, so retain binary-compatible two-argument constructors while adding the field.
Useful? React with 👍 / 👎.
| writer.write(bundleRecordInEnrichedRecord(newRumContext, records)) | ||
| reportPlaceholders(newRumContext.viewId, timestamp, wireframes) |
There was a problem hiding this comment.
Gate placeholder notification on successful persistence
When the native snapshot write is rejected—for example because storage is unavailable or the event exceeds its limit—SessionReplayRecordWriter.write() returns no result and only suppresses its success callback, but this code still reports the placeholder as written. That notification releases pending embedded batches, allowing them to be stored and timestamped against a native placeholder that never landed, so the registry should only be updated from a confirmed-success callback.
Useful? React with 👍 / 👎.
| val listeners = decorOnDrawListeners.values.toSet() | ||
| listeners.forEach { it.onDraw() } | ||
| return listeners.isNotEmpty() |
There was a problem hiding this comment.
Keep capture requests pending until traversal runs
When dynamic optimization is enabled by default and its time bank rejects a frame, WindowsOnDrawListener.onDraw() merely passes the request to Debouncer, which can skip the snapshot entirely, but this method still returns true solely because a listener exists. SessionReplayRecorder consequently clears its standing capture request; if the new RUM view is otherwise static, no later draw emits the embedded placeholder and its pending records remain held indefinitely, so completion must be acknowledged only after the snapshot traversal actually runs.
Useful? React with 👍 / 👎.
| if (!resourceDataStoreManager.markResourceAsSentIfNew(identifier)) { | ||
| return | ||
| } | ||
|
|
||
| resourcesWriter.write( |
There was a problem hiding this comment.
Cache resource identifiers only after a successful write
When the resource storage write is rejected, markResourceAsSentIfNew() has already inserted and potentially persisted the identifier, while ResourcesWriter.write() exposes no success result and the entry is never rolled back. Any retry from the embedded renderer with the same identifier is then discarded by this guard, leaving referenced images or other resources permanently absent from the replay; mark the identifier from a confirmed-success callback instead.
Useful? React with 👍 / 👎.
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)