PhoenixKit 1.7.118: AI translation works again
PhoenixKit 1.7.118 fixes AI translation, which failed on every real request.
Core expected plain text back from the AI module, but got the full completion answer and treated it as an error. It now reads the text out of that answer. A request with no fields to translate is refused before any AI call is made.
Submit buttons on the sign-in, password reset, confirmation and magic link forms no longer stretch past the card. Requesting a magic link for registration now shows a spinner while the email is sent. The media gallery hides its add tile once the most files allowed are chosen, instead of showing it greyed out. Module authors can set the card grid of <.table_default> and responsive columns on draggable lists.
Full release notes: PhoenixKit 1.7.118
1.7.118 · 21 May 2026
Added
card_grid_classattr onPhoenixKitWeb.Components.Core.TableDefault— overrides the card-view grid layout (column density, gaps) without touching the component. Default unchanged. Must be layout-only (nodisplayutility — the component setsgrid/hiddenper view-mode branch) and a literal in a Tailwind-scanned source so the classes compile (PR #561).- Responsive
colsonPhoenixKitWeb.Components.Core.DraggableList(and theMediaGallerypassthrough) —:colsnow accepts a string of Tailwind grid-column classes (e.g."grid-cols-4 lg:grid-cols-6 2xl:grid-cols-8") for a responsive thumbnail grid, in addition to an integer 1..6. Any other value (out-of-range integer, atom, …) falls back togrid-cols-4(PR #561).
Changed
MediaGallerynow hides the Add tile entirely once the selection reachesmax_count(or 1 in:singlemode), instead of rendering it disabled and greyed. Supersedes the disable-at-limit behavior shipped in 1.7.117 (PR #561).- Magic-link registration request sends the email via
start_async, so the submit is non-blocking and the in-flight spinner renders, matching the password-less magic-link login flow. Replaces the priorphx-disable-with(follow-up to PR #559). - Dependency bumps:
etcher0.4.6 → 0.4.8,fresco0.5.4 → 0.5.5,ex_doc0.40.2 → 0.40.3.
Fixed
- AI translation no longer fails on every real request.
Translation.translate_fields/6was treatingPhoenixKitAI.ask_with_prompt/4‘s OpenAI-shaped response map (%{"choices" => [...]}) as:unexpected_responseand erroring out. The success branch now routes map responses throughPhoenixKitAI.Completion.extract_content/1(the helper publishing’sTranslatePostWorkeralready uses), with a raw-binary fallback so test stubs and older plugin versions keep working (PR #560). Translation.translate_fields/6rejects an emptyfieldsmap up front with{:error, {:parse_error, :no_markers}}instead of rendering a field-less prompt and spending an AI request that only fails downstream in the parser (PR #558).- Auth-form submit buttons no longer overflow their card.
<fieldset>‘s browser-defaultmin-width: min-contentlet the fieldset — and itsw-fullsubmit button — grow past the form width;min-w-0is now applied to the six remaining auth-form fieldsets. Also droppedphx-disable-withon the magic-link login form, where it collided with the@loadingbranch and made LiveView’s diff merger inject a stray SVG into the button (PR #559).
PhoenixKit 1.7.118. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.