Skip to content

Conversation

@dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jan 16, 2026

Description

Ref CMM-1123.

Implements GutenbergKit's LatestContentProvider interface 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:

  • Added getPersistedTitle() and getPersistedContent() methods to EditorFragmentListener interface
  • Set up LatestContentProvider on GutenbergView in GutenbergKitEditorFragment
  • Implemented the interface methods in GutenbergKitActivity returning content from EditPostRepository

Related PRs:

Testing instructions

  1. Open a post with existing content in the GutenbergKit editor
  2. Make edits to the content (wait 2+ seconds for autosave to persist)
  3. Trigger a WebView refresh:
    • Chrome DevTools: three-dot menu → "Crash the renderer"
  4. Verify the editor recovers with the edited content, not the original

🤖 Generated with Claude Code

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.
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 16, 2026

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@dcalhoun dcalhoun requested a review from a team as a code owner January 16, 2026 22:25
@dcalhoun dcalhoun requested review from nbradbury and removed request for a team January 16, 2026 22:25
@sonarqubecloud
Copy link

@wpmobilebot
Copy link
Contributor

Project dependencies changes

list
! Upgraded Dependencies
org.wordpress.gutenbergkit:android:283-71df4ab18c674781c512a890afac2cf562ea6e75, (changed from v0.11.1)
tree
 +--- project :libs:editor
-|    \--- org.wordpress.gutenbergkit:android:v0.11.1
+|    \--- org.wordpress.gutenbergkit:android:283-71df4ab18c674781c512a890afac2cf562ea6e75
-\--- org.wordpress.gutenbergkit:android:v0.11.1 (*)
+\--- org.wordpress.gutenbergkit:android:283-71df4ab18c674781c512a890afac2cf562ea6e75 (*)

@dcalhoun dcalhoun added [Type] Enhancement Posting/Editing Gutenberg Editing and display of Gutenberg blocks. labels Jan 16, 2026
@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
FlavorJalapeno
Build TypeDebug
Versionpr22493-79ce122
Commit79ce122
Direct Downloadjetpack-prototype-build-pr22493-79ce122.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
FlavorJalapeno
Build TypeDebug
Versionpr22493-79ce122
Commit79ce122
Direct Downloadwordpress-prototype-build-pr22493-79ce122.apk
Note: Google Login is not supported on these builds.

@nbradbury nbradbury self-assigned this Jan 19, 2026
@nbradbury
Copy link
Contributor

@dcalhoun I've enabled Chrome Dev Tools, but the three dot menu doesn't show a "Crash the renderer" item. Can you provide steps?

Screenshot_20260119_085200

@dcalhoun
Copy link
Member Author

@nbradbury sorry, this was generated by Claude and the repository's @wordpress-mobile/android-developers auto-assignment resulted in a review request. It should've been a draft. This is not ready for testing. I'll follow up once this is ready.

@dcalhoun dcalhoun marked this pull request as draft January 19, 2026 14:54
@dcalhoun
Copy link
Member Author

To answer your question, the reference to "Crash the renderer" is a hallucination. It does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Editing and display of Gutenberg blocks. Posting/Editing [Type] Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants