Skip to content

Let the system refresh the Spotlight index - #5658

Draft
bgoncal wants to merge 1 commit into
mainfrom
spotlight-system-reindex
Draft

Let the system refresh the Spotlight index#5658
bgoncal wants to merge 1 commit into
mainfrom
spotlight-system-reindex

Conversation

@bgoncal

@bgoncal bgoncal commented Sep 6, 2026

Copy link
Copy Markdown
Member

AI Policy

Select exactly one option that describes AI usage in this contribution:

  • I have not used AI for this contribution.
  • AI assistance was used for this contribution.
  • AI fully generated the code for this contribution, but I've reviewed and understood it before submitting and will respond without AI during review.

Summary

Adopts IndexedEntityQuery, new in iOS 27, so the system can ask for a Spotlight refresh instead of waiting for the app.

Today the index is only rebuilt when the local database changes or the app returns to the foreground, so an entry can stay stale until something else happens to trigger a pass. With this, the system asks when it notices the index may be out of date, either for named entities or for everything.

Draft: this needs Xcode 27, and CI is still on 26.4, so its checks will fail until the runner is bumped. Built and verified locally against Xcode 27 beta.

Screenshots

No UI. The only visible effect is Spotlight results being fresher.

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

This started out larger. Adopting the calendar App Schema turned out not to be the annotation change the comment in HACalendarAppEntity predicted: the schema domain is iOS 27, so annotating the entity makes the type iOS 27, which cascades to its query, all three calendar intents and the Spotlight extension, and would put the existing calendar feature out of reach below iOS 27.

Apple's guidance for that case is to add a parallel schema-conforming type rather than restrict the shipped one, which for calendars means a second entity, its query and create/update/delete intents living alongside today's. That is a design decision worth taking on its own, so it is left out here.

Today the index only updates when the database changes or the app returns to
the foreground, so entries can sit stale until something else triggers a pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant