PhoenixKit 1.7.103: AI endpoints tied to one connection, and drag-and-drop lists
PhoenixKit 1.7.103 ties each AI endpoint to one specific integration connection and adds Mistral, DeepSeek and Microsoft 365 to the built-in providers.
Migration V107 links existing AI endpoints to a matching connection where one can be found, and makes endpoint names unique regardless of case. Migration V108 adds a saved position to entities, catalogues and catalogue items, so their lists can be reordered by dragging. The connection picker no longer chooses a connection by itself when only one provider fits, and a second click deselects.
A media browser can now open files in a preview with details, Download, arrows to step through the page and, when the Comments module is on, comments. The sitemap gives the home page and publishing group pages the date of their newest post instead of today. Leaf moves to 0.2.11.
Upgrading
Run mix phoenix_kit.update for V107 and V108. If two AI endpoints share a name that differs only in case, rename one first, or the unique index cannot be created.
Full release notes: PhoenixKit 1.7.103
1.7.103 · 2 May 2026
Added
- V107 migration: pin AI endpoints to a specific integration row via
integration_uuid+ add the missing unique index onlower(name)(PR #511)- Nullable
integration_uuid uuidcolumn onphoenix_kit_ai_endpointswith btree index - Backfill maps existing
providerstrings to integration rows: exact"provider:name"matches get the corresponding storage row; bare"provider"gets the most-recently-validatedintegration:provider:*row, tiebreaking onuuid ASC(UUIDv7 time-ordered). Unresolvable endpoints stay NULL - Unique index
phoenix_kit_ai_endpoints_name_index ON (lower(name))— theunique_constraint(:name)declaration in the changeset has been dead code since V34 created this table without the index
- Nullable
- V108 migration:
position integer DEFAULT 0on three admin list surfaces —phoenix_kit_entities,phoenix_kit_cat_catalogues,phoenix_kit_cat_items— so drag-and-drop reordering can persist user-driven order (PR #512) - Strict-UUID Integrations public API (PR #511)
- Write-side APIs now take only the integration row’s uuid — no more deriving storage keys from JSONB fields
Integrations.resolve_to_uuid/1— dual-input lookup primitive that accepts a uuid or aprovider:namestring (formigrate_legacy/0callbacks)migrate_legacy/0optional callback onPhoenixKit.Module— each module owns its legacy data shape; core provides primitives. Orchestrated byPhoenixKit.ModuleRegistry.run_all_legacy_migrations/0- Mistral, DeepSeek, and Microsoft 365 added to the built-in providers registry
integration_pickerupdated: no auto-select on single-provider, toggle-to-deselect support
- Drag-and-drop core infrastructure (PR #512)
<.draggable_list>new:draggableboolean attr (defaulttrue) — when false, renders without SortableJS hook and grab-cursor styling<.table_default>new:on_reorder,:reorder_scope,:reorder_group,:item_idattrs — wire the card-view container as a SortableGrid hook target for cross-container dragSortableGridhook (JS):data-sortable-groupfor cross-container drag,readScope/1helper fordata-sortable-scope-*attrs, cross-containeronEnddetection withfrom*scope prefix,try/catchwrappingTableCardViewhook (JS):updated()callback re-applies saved view mode after LV re-renders so card/table toggle survives SortableJS drops
- Media viewer modal on
MediaBrowser(PR #513)- New
viewer={true}attr — clicking a file opens an in-place modal with image/video/PDF/icon preview, metadata sidebar (filename, type, MIME, size, uploaded date), and Download button. Closes via X / Esc / backdrop - Prev/next chevrons and ArrowLeft/ArrowRight keyboard shortcuts step through the current page’s files; arrows hide at boundaries
PhoenixKitComments.Web.CommentsComponentembedded in the sidebar when the Comments module is installed and enabled (optional-dep wiring:@compile {:no_warn_undefined}+Code.ensure_loaded?+@dialyzer :nowarn_function)
- New
- Arity-2
dynamic_children_fn@typedoc+ test-only delegate for the admin sidebar dispatcher (PR #506 follow-up in #512)
Changed
handle_event("click_file", …)in MediaBrowser refactored from two-modeif/elseto four-clausecond:select_mode→admin→viewer→ picker default (PR #513)connected_atsemantics clarified in AGENTS.md — rewritten on every successful re-test (not one-shot);last_validated_atrewritten unconditionally on every validation attempt, success or failure- Bumped
leafeditor dependency~> 0.2.10 → ~> 0.2.11and the matching CDN URL (PR #513)
Fixed
- AGENTS.md doc drift:
PhoenixKit.Modules.run_all_legacy_migrations/0corrected toPhoenixKit.ModuleRegistry.run_all_legacy_migrations/0; V107 moduledoc tiebreak clarified asuuid ASCnotinserted_at ASC(PR #511 review) - V107 unique-name index verified with three new integration tests: index exists, duplicate names rejected, case-only differences collide (PR #511 review)
- Media viewer modal:
String.starts_with?/2guarded withis_binary(f.mime_type)so nil mime_type falls through to the icon fallback instead of crashing (PR #513 review) - Media viewer modal: PDF iframe hardened with
sandbox="allow-same-origin"to block embedded JavaScript in same-origin deployments (PR #513 review) <.draggable_list>data-idnow always emitted regardless of:draggableattr so click-to-select handlers and test selectors work in both modes (PR #512 review):reorder_scopeattr doc on<.table_default>now documents the camelCase round-trip (:category_uuid→"categoryUuid"in the LV handler payload) (PR #512 review)
PhoenixKit 1.7.103. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.