PhoenixKit 1.7.119: AI translations keep each field to itself
PhoenixKit 1.7.119 fixes how AI translation answers are split into fields.
When the model returned a section that was not asked for, such as an extra title block, its text was added to the end of the field before it. A field now ends at any section marker at the start of a line. The same words inside a paragraph stay part of the text. An empty last field is now stored as empty instead of failing the whole translation; a missing section is still reported.
On multilingual forms, the note next to Content Language becomes a tooltip on an info icon, and the loading placeholder is visible on light cards. Etcher moves to 0.4.9 and Fresco to 0.5.8.
Full release notes: PhoenixKit 1.7.119
1.7.119 · 22 May 2026
Changed
PhoenixKitWeb.Components.Core.TableDefault—:classattr widened from:stringto:anyon all 7table_default*components, so the Phoenix-idiomaticclass={[if(...), ...]}list form compiles without an attr warning. The components already wrap@classin a flattened list, so there is no rendered-output change for existing string callers (PR #565).PhoenixKitWeb.Components.MultilangForm— the standalone info alert is now a hover/focus tooltip on an info icon beside the “Content Language” header, and the default loading skeleton usesbg-base-content/15 animate-pulseinstead of daisyUI’s near-invisible.skeleton, so the loading state is visible onbg-base-100cards (PR #565).Translation.handle_ai_response/2extracts the OpenAI-shaped completion content inline rather than viaPhoenixKitAI.Completion.extract_content/1, dropping the cross-module dependency on the optional AI plugin — works whether the plugin is present, absent, or stubbed (PR #565).- Dependency bumps:
etcher0.4.8 → 0.4.9,fresco0.5.5 → 0.5.8,floki0.38.2 → 0.38.3.
Fixed
- AI translation parser no longer leaks an unrequested marker’s content into the
preceding field. A field capture now terminates at any line-anchored
\n---<NAME>---marker, not just the requested-field markers — so a model emitting an extra---TITLE---(e.g. from an unbound{{title}}template variable) no longer rolls that block into the prior---NAME---field. The newline anchor keeps literal mid-paragraph---WORD---tokens (technical docs, API examples) inside the capture (PR #565). - AI translation empty sections resolve consistently to
"". A present-but-empty trailing marker now records""instead of failing the whole response with{:parse_error, {:missing_fields, ...}}, matching how an empty middle section already resolved. A genuinely absent marker still reportsmissing_fields, so the “model forgot a marker” signal is preserved (follow-up to PR #565).
PhoenixKit 1.7.119. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.