App Intents: migrate the stats widget site picker off SiriKit#25753
Open
crazytonyli wants to merge 5 commits into
Open
App Intents: migrate the stats widget site picker off SiriKit#25753crazytonyli wants to merge 5 commits into
crazytonyli wants to merge 5 commits into
Conversation
Introduces SiteEntity, SiteEntityQuery, and an App Intents SelectSiteIntent in JetpackStatsWidgetsCore, backed by the same widget plist cache and shared defaults the SiriKit intents extension reads today. The entity identifier matches the legacy Site identifier so existing widget configurations survive the upcoming migration. No AppIntentsPackage registration is included because linkd rejects package references from statically linked modules, and static linking already merges the intent metadata into the consuming targets. CFBundleName in the test bundle plist keeps xcodebuild test working once the project contains App Intents.
…t intents extension Switches all nine Jetpack stats widgets to AppIntentConfiguration with async AppIntentTimelineProviders using the SelectSiteIntent from JetpackStatsWidgetsCore. The site option list now comes from an in-process entity query, so the JetpackIntents extension, Sites.intentdefinition, and their localizations are removed along with the target's build tooling references, and the GlotPress upload source for the ios-widget. keys moves to an unshipped en.lproj under WordPress/JetpackStatsWidgets. The system migrates existing widget configurations by matching the legacy intent class name and site identifier. fetchStats now reports a failure instead of silently dropping the completion when a refresh is already in progress.
The system resolves the widget configuration UI's strings against the app bundle on iOS 26 but against the widget extension bundle on iOS 17, and a package resource bundle is never consulted (verified on simulators). The extension therefore ships static copies of the GlotPress-maintained ios-widget. keys for the older resolution path.
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33032 | |
| Version | PR #25753 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | fa8a9ed | |
| Installation URL | 1reneqjlb686g |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33032 | |
| Version | PR #25753 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | fa8a9ed | |
| Installation URL | 1df429jc6d600 |
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.


Note
This is the first PR of the App Intents adoption series. #25754 is stacked on top of it.
Description
The stats widgets' site picker was the app's only remaining SiriKit surface: a
Sites.intentdefinitionwith code-generated classes, plus theJetpackIntentsextension whose only job was serving the site list to the widget configuration UI over XPC. App Intents is the framework the new Siri integration builds on, so this PR migrates the picker off SiriKit and removes that extension entirely.SiteEntity,SiteEntityQuery, and a new App IntentsSelectSiteIntentinJetpackStatsWidgetsCoreresolve the site list in-process from the same widget cache; theJetpackIntentsextension and the.intentdefinition(with its 36 localization folders) are deleted.IntentConfigurationtoAppIntentConfiguration, with async timeline providers.CustomIntentMigratedAppIntent.intentClassName, thesiteparameter name, and the entity identifier (the legacy dotComID string). These must not change, or existing configurations silently reset to the default site.ios-widget.GlotPress keys, so all existing translations carry over. One unusual bit: the widget configuration UI never reads SPM resource bundles, and it resolves the keys against the app bundle on iOS 26 but the widget extension bundle on iOS 17 (verified on simulators), so the extension ships static copies of the two strings for all locales. Documented inSelectSiteIntent.Testing instructions