-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Implement LatestContentProvider for WebView recovery #22493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger |
Project dependencies changeslist! Upgraded Dependencies
org.wordpress.gutenbergkit:android:283-3110b008df0edceac04a1c6f18724476ce67b3ce, (changed from v0.11.1)tree +--- project :libs:editor
-| \--- org.wordpress.gutenbergkit:android:v0.11.1
+| \--- org.wordpress.gutenbergkit:android:283-3110b008df0edceac04a1c6f18724476ce67b3ce
-\--- org.wordpress.gutenbergkit:android:v0.11.1 (*)
+\--- org.wordpress.gutenbergkit:android:283-3110b008df0edceac04a1c6f18724476ce67b3ce (*) |
|
| App Name | Jetpack | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22493-5b4967c | |
| Commit | 5b4967c | |
| Direct Download | jetpack-prototype-build-pr22493-5b4967c.apk |
|
| App Name | WordPress | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22493-5b4967c | |
| Commit | 5b4967c | |
| Direct Download | wordpress-prototype-build-pr22493-5b4967c.apk |
|
@dcalhoun I've enabled Chrome Dev Tools, but the three dot menu doesn't show a "Crash the renderer" item. Can you provide steps?
|
|
@nbradbury sorry, this was generated by Claude and the repository's |
|
To answer your question, the reference to "Crash the renderer" is a hallucination. It does not exist. |
Allow GutenbergKit to retrieve the latest content persisted in the host app as needed. This is important for allowing GutenbergKit to display the latest content after the WebView reloads or re-initializes from memory pressure or backgrounding.
71b0c66 to
3a38e04
Compare
|
|
@nbradbury this PR and its sibling wordpress-mobile/GutenbergKit#283 are formally ready for review. I updated the PR descriptions with appropriate testing instructions. Thanks in advance for the help! 🙇🏻♂️ |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22493 +/- ##
=======================================
Coverage 38.86% 38.86%
=======================================
Files 2193 2193
Lines 105926 105931 +5
Branches 14985 14986 +1
=======================================
+ Hits 41166 41168 +2
- Misses 61320 61323 +3
Partials 3440 3440 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nbradbury
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected! ![]()
|
Converting to draft. With the merge of wordpress-mobile/GutenbergKit#260, we need to integrate those changes into WordPress-Android before we can merge this PR. |






Important
DO NOT MERGE. With the merge of wordpress-mobile/GutenbergKit#260, we need to integrate those changes before we can merge this PR.
Description
Ref CMM-1123.
Implements GutenbergKit's
LatestContentProviderinterface for pull-based content recovery.When the WebView reinitializes (due to OS memory pressure or page refresh), the editor now requests the latest content from the app rather than using stale content from the initial WebView load. This ensures users don't lose their work during WebView recovery.
Changes:
getPersistedTitle()andgetPersistedContent()methods toEditorFragmentListenerinterfaceLatestContentProvideronGutenbergViewinGutenbergKitEditorFragmentGutenbergKitActivityreturning content fromEditPostRepositoryRelated PRs:
Testing instructions
chrome://inspect🤖 Generated with Claude Code