Skip to content

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

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

MOBILE-311: Heal poisoned in-app WebView cache#36
sergeysozinov merged 2 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 an Android WebView “poisoned HTTP cache” recovery path for in-app WebView prewarming by detecting HTTP errors on script subresources and retrying the content load with cache bypass, plus adds shared URL/error classification helpers and accompanying tests.

Changes:

  • Added script-resource URL detection and a shared “recoverable script HTTP error” predicate in common code.
  • Extended Android WebView controller/event listener to report HTTP errors and support toggling cache bypass.
  • Updated/added common tests for URL matching and adjusted prewarm planner test data.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mindbox-common/src/commonTest/kotlin/cloud/mindbox/mobile_sdk/inapp/webview/IsScriptResourceUrlTest.kt New tests for isScriptResourceUrl and isRecoverableScriptHttpError.
mindbox-common/src/commonTest/kotlin/cloud/mindbox/mobile_sdk/inapp/webview/InAppWebViewPrewarmPlannerTest.kt Updates expected origins to use example domains.
mindbox-common/src/commonMain/kotlin/cloud/mindbox/mobile_sdk/inapp/webview/WebViewInterfaces.kt Adds onHttpError, cache-bypass hook, and shared helper functions/constants.
mindbox-common/src/androidMain/kotlin/cloud/mindbox/mobile_sdk/inapp/webview/WebViewAndroid.kt Wires Android onReceivedHttpError into the listener and implements setCacheBypass.
mindbox-common/src/androidMain/kotlin/cloud/mindbox/mobile_sdk/inapp/webview/InAppWebViewPrewarmEngine.kt Adds one-shot no-cache retry mechanism for script HTTP errors during prewarm.

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

@sergeysozinov
sergeysozinov merged commit 4b26507 into develop Jul 27, 2026
4 checks passed
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