Skip to content

Juan.naranjo/fresh idea - #3727

Draft
JuanNaranjoDD wants to merge 17 commits into
developfrom
juan.naranjo/fresh-idea
Draft

Juan.naranjo/fresh idea#3727
JuanNaranjoDD wants to merge 17 commits into
developfrom
juan.naranjo/fresh-idea

Conversation

@JuanNaranjoDD

Copy link
Copy Markdown

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)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.60194% with 69 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.26%. Comparing base (3951995) to head (d0752e7).
⚠️ Report is 23 commits behind head on develop.

Files with missing lines Patch % Lines
...droid/sessionreplay/_SessionReplayInternalProxy.kt 62.50% 2 Missing and 13 partials ⚠️
...eplay/internal/embedded/EmbeddedContentReceiver.kt 84.00% 5 Missing and 7 partials ⚠️
...ernal/recorder/mapper/EmbeddedContentViewMapper.kt 89.87% 4 Missing and 4 partials ⚠️
...oid/sessionreplay/internal/SessionReplayFeature.kt 87.23% 2 Missing and 4 partials ⚠️
...y/internal/embedded/EmbeddedContentSlotRegistry.kt 89.58% 0 Missing and 5 partials ⚠️
...ssionreplay/internal/processor/MutationResolver.kt 88.89% 2 Missing and 2 partials ⚠️
...nreplay/internal/recorder/SessionReplayRecorder.kt 86.21% 1 Missing and 3 partials ⚠️
...sessionreplay/internal/processor/WireframeUtils.kt 66.67% 0 Missing and 3 partials ⚠️
...replay/internal/embedded/EmbeddedRecordTimeline.kt 91.67% 0 Missing and 2 partials ⚠️
...essionreplay/internal/recorder/SnapshotProducer.kt 50.00% 0 Missing and 2 partials ⚠️
... and 6 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3727      +/-   ##
===========================================
- Coverage    73.51%   73.26%   -0.26%     
===========================================
  Files          999     1005       +6     
  Lines        36570    37016     +446     
  Branches      6183     6449     +266     
===========================================
+ Hits         26884    27117     +233     
- Misses        7980     8040      +60     
- Partials      1706     1859     +153     
Files with missing lines Coverage Δ
.../sessionreplay/internal/DefaultRecorderProvider.kt 93.75% <100.00%> (+0.04%) ⬆️
...sionreplay/internal/SessionReplayRecordCallback.kt 100.00% <100.00%> (ø)
...replay/internal/SessionReplayRumContextProvider.kt 94.12% <100.00%> (+1.81%) ⬆️
...id/sessionreplay/internal/processor/BoundsUtils.kt 70.83% <100.00%> (+2.65%) ⬆️
...onreplay/internal/processor/HeatmapWireframeExt.kt 100.00% <100.00%> (ø)
...ssionreplay/internal/processor/MobileSegmentExt.kt 100.00% <100.00%> (ø)
...replay/internal/processor/RecordedDataProcessor.kt 96.59% <100.00%> (-1.14%) ⬇️
...sionreplay/internal/processor/ResourceProcessor.kt 100.00% <100.00%> (ø)
...nreplay/internal/recorder/ViewOnDrawInterceptor.kt 89.19% <100.00%> (+0.95%) ⬆️
...lay/internal/resources/ResourceDataStoreManager.kt 94.03% <100.00%> (+1.05%) ⬆️
... and 17 more

... and 108 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonathanmos

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +35 to 39
"slotId": {
"type": "string",
"description": "Unique ID of the slot that generated this record.",
"readOnly": true
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +163 to +164
writer.write(bundleRecordInEnrichedRecord(newRumContext, records))
reportPlaceholders(newRumContext.viewId, timestamp, wireframes)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +72 to +74
val listeners = decorOnDrawListeners.values.toSet()
listeners.forEach { it.onDraw() }
return listeners.isNotEmpty()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +24 to +28
if (!resourceDataStoreManager.markResourceAsSentIfNew(identifier)) {
return
}

resourcesWriter.write(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

3 participants