Catalogue 0.1.14: Smart items can only point at standard catalogues
Catalogue 0.1.14 stops a smart item’s pricing rules from pointing at another smart catalogue, or at its own, so a price can no longer depend on a chain of rules.
The Catalogue Rules list on a smart item now offers only standard catalogues. A rule saved another way that points at a smart catalogue is refused with “must reference a standard catalogue, not a smart catalogue”.
Other changes:
- Error messages from the import wizard and other admin actions, such as “Failed to parse CSV file.” or “Unsupported file format.”, now come from one place and can be translated.
- Removing a featured image or a metadata field shows Removing… while it works, and the permanent delete buttons show Deleting….
- For developers,
Catalogue.list_category_ancestors/1returned nothing for any category below the top level; it now returns the full path. - The package documentation gets a Smart Catalogues guide.
Full release notes: Catalogue 0.1.14
0.1.14 · 28 April 2026
Added
- Smart-chain guard (issue #16) —
CatalogueRulenow rejects rules whosereferenced_catalogueis itselfkind: "smart", with the error"must reference a standard catalogue, not a smart catalogue"on:referenced_catalogue_uuid(validation: :smart_chain). Self-references fall under the same guard. Applied tocreate_catalogue_rule/2,update_catalogue_rule/3,put_catalogue_rules/3, andchange_catalogue_rule/2. The item-form rule picker now lists only standard catalogues so the user is never offered an option that would fail on save. :onlyscope onsearch_items/2+count_search_items/2+<.item_picker>(issue #15) —:uncategorized_onlyrestricts to items with nocategory_uuid,:categorized_onlyrestricts to items in some category,nil(default) is unrestricted.PhoenixKitCatalogue.Errors— central atom-to-string dispatcher (13 plain atoms + 9 tagged tuples) for UI flashes. Plus per-atom pinning tests.- Smart Catalogues guide (
guides/smart_catalogues.md) — concepts, schema diagram, worked example, host-side reference implementation, pitfalls. Wired intomix.exspackage.filesanddocs.extras. @specbackfill on the 14 most-called CRUD entry points + 26 specs acrossCatalogue.Test.Endpoint/Test.Router/Test.Layouts/LiveCasetest infra so the suite actually runs (598 → 869 tests).
Changed
search_items/2andcount_search_items/2now raiseArgumentErroron two foot-guns that previously yielded silent empty results:category_uuids: [nil](use:only => :uncategorized_onlyinstead) and:only => :uncategorized_onlycombined with non-empty:category_uuids(logical contradiction).- Activity logging —
enable_system/disable_systemlogcatalogue_module.{enabled,disabled}.enabled?/0addscatch :exit, _for sandbox-owner shutdowns.ActivityLogrescue narrowed toPostgrex.Error :undefined_tablefor the host-without-V90 case before logging a warning. - Failure-side audit rows — LV layer writes
metadata.db_pending: truerows on every LV-visible failure viaHelpers.log_operation_error/3. Context layer stays success-only. Tree.subtree_uuids_for/1andancestor_uuids/1cast^uuid/^rootsviatype(_, UUIDv7)(CTE was losing type info).ancestors_in_order/1rewritten — previously returned[]for every non-root category.Task.start/1→Task.Supervisor.start_child(PhoenixKit.TaskSupervisor, ...)for the supervised import task.phx-disable-with="Deleting..."on the two permanent-delete buttons incomponents.ex.
Removed
- Dead
Catalogue.broadcast_for/2clauses ("manufacturer"/"supplier"/"smart_rule") and the orphanlookup_parent(:smart_rule, _). The submodules (Manufacturers,Suppliers,Rules) callPubSub.broadcast/3directly and never reached the helper.
Fixed
change_catalogue_rule/2smart-chain guard no longer issues a DB lookup on every form keystroke — switched toEcto.Changeset.get_change/2so the lookup only fires when:referenced_catalogue_uuidactually changes.
Catalogue 0.1.14. Install or update: {:phoenix_kit_catalogue, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.