MOBILE-311: Heal poisoned in-app WebView cache - #36
Merged
Conversation
There was a problem hiding this comment.
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.
enotniy
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://tracker.yandex.ru/MOBILE-311