Skip to content

App Intents: post and reader post entities and open intents#25755

Draft
crazytonyli wants to merge 5 commits into
task/new-siri-integration-M2from
task/new-siri-integration-M3
Draft

App Intents: post and reader post entities and open intents#25755
crazytonyli wants to merge 5 commits into
task/new-siri-integration-M2from
task/new-siri-integration-M3

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Note

This PR will be merged after #25754

@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jul 7, 2026

Copy link
Copy Markdown
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
ConfigurationRelease-Alpha
Build Number33035
VersionPR #25755
Bundle IDorg.wordpress.alpha
Commit6008842
Installation URL60qb7ndnigb3g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jul 7, 2026

Copy link
Copy Markdown
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
ConfigurationRelease-Alpha
Build Number33035
VersionPR #25755
Bundle IDcom.jetpack.alpha
Commit6008842
Installation URL3iag86f4f9qdg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

…reader posts

Entity identifiers reuse the Spotlight composite identifier format so a Spotlight item and its associated app entity always name the same post, including the xmlrpc branch for self-hosted sites; parsing lives in shared AppIntentIdentifier types so callers can validate identifiers without a Core Data lookup. Unresolvable or trashed posts resolve to nothing instead of falling back to another post, and reader post IDs survive values beyond Int32. The title search helpers back the entity queries: an empty query returns the most recent items, deduplicated for reader posts, and only posts that round-trip through the identifier resolvers are returned.
Extract the Spotlight item routing into an internal async openItem method that App Intents can call with an entity identifier, using the failable decompose so a malformed identifier no longer crashes. openItem awaits the fetch (local cache first, network fallback) and reports the real outcome instead of returning true once the identifier parsed, and it refuses to open trashed posts; the Spotlight activity path keeps its synchronous contract by validating the identifier up front and dispatching the open. The open source is threaded through the path so Spotlight analytics fire only for genuine Spotlight opens, with intent opens untracked for now. Indexing gains an entity association hook via a protocol the Jetpack app conforms to in a Jetpack-only file; the WordPress app has no conformance and indexes unchanged.
PostEntity covers posts and pages; both entities use the Spotlight composite identifier as their entity ID, the string queries search the local Core Data store, and OpenPostIntent/OpenReaderPostIntent require a signed-in account and navigate through the same routing as a Spotlight tap, reporting its real outcome. A well-formed identifier missing from the local store (Reader purges, reinstalls) resolves to a placeholder entity instead of dropping the saved shortcut, since the open path can still handle it remotely. On iOS 18 and later, newly indexed Spotlight items get the matching entity associated. Strings use the ios-appintents. GlotPress keys.
@crazytonyli crazytonyli force-pushed the task/new-siri-integration-M3 branch from 447a9ee to 6008842 Compare July 7, 2026 03:59
@crazytonyli crazytonyli force-pushed the task/new-siri-integration-M2 branch from 12eafed to 3677cbe Compare July 7, 2026 03:59
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