pub fn catalog_with_status(
store: &Store,
templates_dir: &Path,
) -> Result<Vec<TemplateHubEntryWithStatus>, TemplateError>Expand description
Annotate the catalog with per-entry install status. A template counts as installed when either:
- a
template_membershiprow exists whosehub_source_slugmatches the catalog slug, OR - the canonical file
<templates_dir>/<slug>.flow.jsonis on disk.
The on-disk check covers orphan files (DB reset, schema migration,
row hand-deleted) so the Hub row’s button flips to Update / Installed
without the user having to click Add first and rely on the heal
path in add_to_collection.