AI 0.3.0: Drag to reorder endpoints, and the AI admin on core components
AI 0.3.0 lets you put AI endpoints in your own order by dragging them, and rebuilds the AI admin pages on PhoenixKit’s standard tables and forms. It also fixes an Enabled switch that could not be turned off.
Manual order for endpoints
The endpoints list has a new sort option, Manual. With it picked, rows and cards can be dragged into place, and the new order is saved. A reorder of endpoints or prompts is written to the activity log as one entry. The ID sort option, which did nothing, is replaced by Created. Endpoints and prompts with the same value in the sorted column now always come in the same order, so they no longer swap places between pages or reloads.
Refreshed pages
The endpoints and prompts lists can switch between cards and a table. The endpoint form, the prompt form and the playground use PhoenixKit’s standard form sections and inputs, and the recent requests table hides less important columns on narrow screens. The AI pages use the full width on large screens, and more of their text can be translated.
The optional OpenRouter fields HTTP Referer and X-Title now fall back to the site’s site_url and project_title settings. A value filled in on an endpoint overrides them.
Fixes
- Unticking Enabled on an endpoint now really disables it when saved.
- The prompt form no longer crashes on an unexpected message.
Upgrading
AI 0.3.0 needs PhoenixKit 1.7.112 or later. No migration.
Full release notes: AI 0.3.0
0.3.0 · 18 May 2026
Added
- Manual sort mode on the endpoints list — picking “Manual” turns rows + cards into a drag-to-reorder
SortableGridtarget;reorder_endpoints/2rewritessort_ordervia the sharedPhoenixKit.Utils.Reorder.reorder/4two-phase primitive - Reorder mutations log a single
endpoint.reordered/prompt.reorderedactivity row with count metadata - Optional Provider Settings (HTTP-Referer / X-Title) default from
PhoenixKit.Settings(site_url/project_title) viaget_setting_cached/1; per-endpoint fields act as pure overrides
Changed
- Minimum
phoenix_kitis now 1.7.112 — this release usesPhoenixKit.Utils.{Reorder,Values,Format}and the<.form_section>/:sort_barcore components - Endpoints + Prompts admin tables adopt
<.table_default toggleable>(card + table views); sort UI moved to the core:sort_barslot - Endpoint form, Prompt form, Playground migrated to
<.form_section>/<.form_actions>/ core inputs — drops ~500 lines of hand-rolled form boilerplate - Recent Requests table migrated to
<.table_default>; columns tiered by importance against the admin sidebar breakpoint - AI pages expand to full width on large screens
parse_sort_*and actor-resolution helpers extracted toPhoenixKitAI.Web.{SortHelpers,AuthHelpers}(~75 lines of duplication removed)reorder_prompts/2migrated to the sharedReorder.reorder/4primitive (was an inline single-phase transaction); takes[uuid]instead of[{uuid, sort_order}]- i18n: 14+ raw English strings wrapped in
gettext/1;@sort_optionsmoved to a request-time function sogettext.extractsees the labels
Fixed
- Stable
:uuidtiebreaker on every endpoint/prompt sort branch — tied sort-field values no longer reshuffle between pages/refreshes - Replaced the bogus
{:id, "ID"}endpoint sort option (noidcolumn — it silently fell through to default sort) with{:inserted_at, "Created"} - Endpoint “Enabled” toggle now submits a hidden
falsecompanion so unchecking actually persists PromptFormgained ahandle_info/2catch-all so an unexpected message can’t crash the form- Quality sweep: all credo
--strictfindings closed (5 complexity refactors via behavior-preserving extraction);mix precommitgreen end to end
AI 0.3.0. Install or update: {:phoenix_kit_ai, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.