Skip to content

Fix TTFD report during warm start after session expiration#3607

Merged
aleksandr-gringauz merged 1 commit into
developfrom
aleksandr-gringauz/fix-ttfd-after-session-expired
Jul 6, 2026
Merged

Fix TTFD report during warm start after session expiration#3607
aleksandr-gringauz merged 1 commit into
developfrom
aleksandr-gringauz/fix-ttfd-after-session-expired

Conversation

@aleksandr-gringauz

@aleksandr-gringauz aleksandr-gringauz commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

TTFD for warm start was not reported.

Steps to reproduce:

  1. Turn on "don't keep Activities" in the developer settings of the device so that activity gets destroyed when you go to home screen (without killing the app).
  2. Set this to some small value, for example 10 seconds, so that you don't have to wait for a long time before reopening the app. Otherwise you need to wait for 15 minutes.
  3. Launch the app.
  4. Go to home screen of your phone.
  5. wait > 10 seconds.
  6. launch again, it will be a warm start. TTFD will not be reported.

The problem is that when this place is called during warm start, the session is in the EXPIRED state, it hasn't been renewed yet. The solution is to renew the session for the AppStartEvent event.

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

codecov-commenter commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.78%. Comparing base (fbb4569) to head (b2d3131).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3607      +/-   ##
===========================================
- Coverage    72.89%   72.78%   -0.11%     
===========================================
  Files          975      975              
  Lines        35277    35278       +1     
  Branches      5972     5972              
===========================================
- Hits         25712    25675      -37     
- Misses        7905     7929      +24     
- Partials      1660     1674      +14     
Files with missing lines Coverage Δ
...droid/rum/internal/domain/scope/RumSessionScope.kt 91.19% <100.00%> (+0.06%) ⬆️

... and 34 files with indirect coverage changes

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

@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/fix-ttfd-after-session-expired branch from f222af5 to b2d3131 Compare July 6, 2026 08:24
@aleksandr-gringauz
aleksandr-gringauz marked this pull request as ready for review July 6, 2026 08:44
@aleksandr-gringauz
aleksandr-gringauz requested review from a team as code owners July 6, 2026 08:44
@aleksandr-gringauz
aleksandr-gringauz merged commit ed5ce03 into develop Jul 6, 2026
27 checks passed
@aleksandr-gringauz
aleksandr-gringauz deleted the aleksandr-gringauz/fix-ttfd-after-session-expired branch July 6, 2026 14:24
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.

4 participants