Skip to content

MOBILE-311: Heal poisoned in-app WebView cache - #746

Merged
sergeysozinov merged 4 commits into
developfrom
feature/MOBILE-311
Jul 27, 2026
Merged

MOBILE-311: Heal poisoned in-app WebView cache#746
sergeysozinov merged 4 commits into
developfrom
feature/MOBILE-311

Conversation

@sergeysozinov

Copy link
Copy Markdown
Collaborator

Copilot AI 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.

Pull request overview

Implements a self-healing path for WebView in-apps when a cacheable HTTP error response (e.g., a transient 404 on a bootstrap script) gets persisted in Chromium’s HTTP cache, by allowing a single reload with cache bypass and enriching timeout telemetry.

Changes:

  • Added WebViewNoCacheRetryPolicy (pure JVM-testable logic) to decide when to trigger a one-shot no-cache reload based on subresource HTTP errors.
  • Wired the policy into WebViewInappViewHolder to perform a cache-bypassed reload before runtime init, prevent duplicate onShown, and include last script HTTP error context in timeout failure telemetry.
  • Updated WebView prewarm to restart the settle-release budget when a no-cache retry is initiated, with corresponding test updates/additions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewNoCacheRetryPolicy.kt Adds the retry decision policy for recoverable script HTTP errors and cache-gated one-shot reload.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewInappViewHolder.kt Integrates no-cache retry behavior into the in-app WebView flow and augments init-timeout telemetry.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/InAppWebViewPrewarmManager.kt Restarts the prewarm settle-release timer budget when a no-cache retry begins.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewNoCacheRetryPolicyTest.kt Adds unit tests covering retry eligibility, one-shot behavior, cache gate, and telemetry details.
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/presentation/InAppWebViewPrewarmManagerImplTest.kt Updates expected domain and adds a test validating settle budget restart on no-cache retry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sergeysozinov
sergeysozinov merged commit b868a0f into develop Jul 27, 2026
7 checks passed
@sergeysozinov
sergeysozinov deleted the feature/MOBILE-311 branch July 27, 2026 08:27
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