Repository navigation
Conversation
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/825")Built from 0c14b1a |
The preload fetched any non-null postId, so a zero or negative ID requested /posts/0 or /posts/-1 from the server. It now uses serverPostId, matching iOS's postID > 0 check and the ID the web editor receives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dcalhoun
force-pushed
the
fix/android-skip-preloading-unsaved-post
branch
from
October 23, 2026 15:40
a88431e to
0c14b1a
Compare
dcalhoun
marked this pull request as ready for review
October 23, 2026 15:51
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.
What?
Disable Android preloading of non-existent posts.
Why?
This doesn't fix an active bug. However, the request would fail. iOS already guarded against/prevented this exact thing.
How?
Rely upon #823's
serverPostIdto guard the post preloading.Testing Instructions
Opening existing posts should function as they did before.
Accessibility Testing Instructions
N/A, no user-facing changes.
Screenshots or screencast
N/A, no user-facing changes.
AI-generated details
Android's preload fetched the post for any non-null
postId, so a zero or negative ID requested/posts/0or/posts/-1. The 404 failsEditorService.prepare(), so the editor never loads. The preload now usesserverPostIdfrom #823, which aligns Android with iOS's existingpostID > 0check (EditorService.swift) and with the-1the web editor receives for a new post.This is a latent bug, not an active one. No shipping host triggers it: WordPress-Android and the demo app send
nullfor new posts and local drafts, and a real server ID otherwise. #823 does treat(-1L).toUInt()as a new post, though, and without this change that input fails to load.Testing
EditorServiceTestcases for a zero and a negative post ID. The Android library unit tests and Detekt pass.🤖 Generated with Claude Code