Skip to content

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 SortableGrid target; reorder_endpoints/2 rewrites sort_order via the shared PhoenixKit.Utils.Reorder.reorder/4 two-phase primitive
  • Reorder mutations log a single endpoint.reordered / prompt.reordered activity row with count metadata
  • Optional Provider Settings (HTTP-Referer / X-Title) default from PhoenixKit.Settings (site_url / project_title) via get_setting_cached/1; per-endpoint fields act as pure overrides

Changed

  • Minimum phoenix_kit is now 1.7.112 — this release uses PhoenixKit.Utils.{Reorder,Values,Format} and the <.form_section> / :sort_bar core components
  • Endpoints + Prompts admin tables adopt <.table_default toggleable> (card + table views); sort UI moved to the core :sort_bar slot
  • 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 to PhoenixKitAI.Web.{SortHelpers,AuthHelpers} (~75 lines of duplication removed)
  • reorder_prompts/2 migrated to the shared Reorder.reorder/4 primitive (was an inline single-phase transaction); takes [uuid] instead of [{uuid, sort_order}]
  • i18n: 14+ raw English strings wrapped in gettext/1; @sort_options moved to a request-time function so gettext.extract sees the labels

Fixed

  • Stable :uuid tiebreaker on every endpoint/prompt sort branch — tied sort-field values no longer reshuffle between pages/refreshes
  • Replaced the bogus {:id, "ID"} endpoint sort option (no id column — it silently fell through to default sort) with {:inserted_at, "Created"}
  • Endpoint “Enabled” toggle now submits a hidden false companion so unchecking actually persists
  • PromptForm gained a handle_info/2 catch-all so an unexpected message can’t crash the form
  • Quality sweep: all credo --strict findings closed (5 complexity refactors via behavior-preserving extraction); mix precommit green 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.