Skip to content

App Intents: migrate the stats widget site picker off SiriKit#25753

Open
crazytonyli wants to merge 5 commits into
trunkfrom
task/new-siri-integration
Open

App Intents: migrate the stats widget site picker off SiriKit#25753
crazytonyli wants to merge 5 commits into
trunkfrom
task/new-siri-integration

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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.intentdefinition with code-generated classes, plus the JetpackIntents extension 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.

  1. SiteEntity, SiteEntityQuery, and a new App Intents SelectSiteIntent in JetpackStatsWidgetsCore resolve the site list in-process from the same widget cache; the JetpackIntents extension and the .intentdefinition (with its 36 localization folders) are deleted.
  2. All nine stats widgets move from IntentConfiguration to AppIntentConfiguration, with async timeline providers.
  3. Users' configured widgets survive through the system's automatic migration, which matches CustomIntentMigratedAppIntent.intentClassName, the site parameter name, and the entity identifier (the legacy dotComID string). These must not change, or existing configurations silently reset to the default site.
  4. The picker strings keep the legacy 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 in SelectSiteIntent.

Testing instructions

  • Configure a stats widget to a non-default site on a trunk build, then install this build on top: the widget must keep showing the same site, and editing the widget should list your sites in the picker.
  • I verified the migration and the configuration UI on iOS 26.5 and iOS 17.5 simulators.

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.
@dangermattic

Copy link
Copy Markdown
Collaborator
3 Warnings
⚠️ Modules/Package.swift was changed without updating its corresponding Package.resolved.

If the change includes adding, removing, or editing a dependency please resolve the Swift packages as appropriate to your project setup (e.g. in Xcode or by running swift package resolve).

If the change to the Package.swift did not modify dependencies, ignoring this warning should be safe, but we recommend double checking and running the package resolution just in case.
.

⚠️ Translation files *.lproj/Localizable.strings should only be updated on a release branch.
⚠️ 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 Number33032
VersionPR #25753
Bundle IDorg.wordpress.alpha
Commitfa8a9ed
Installation URL1reneqjlb686g
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 Number33032
VersionPR #25753
Bundle IDcom.jetpack.alpha
Commitfa8a9ed
Installation URL1df429jc6d600
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@crazytonyli crazytonyli requested a review from jkmassel July 7, 2026 03:56
@crazytonyli crazytonyli added Widgets Anything related to Home Screen widgets Siri labels Jul 7, 2026
@crazytonyli crazytonyli added this to the 27.1 milestone Jul 7, 2026
@crazytonyli crazytonyli marked this pull request as ready for review July 7, 2026 04:00
@crazytonyli crazytonyli requested a review from a team as a code owner July 7, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Siri Widgets Anything related to Home Screen widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants