Skip to content

Projects 0.9.0: AI translation moves to PhoenixKit's shared pipeline

Projects 0.9.0 drops the module’s own AI translation machinery and uses the translation pipeline built into PhoenixKit core, the same one the catalogue uses. Editors get the shared translate modal, and the module loses about 3,300 lines of duplicated code.

What stays the same

The fields that can be translated do not change: name and description for projects and templates, title and description for library tasks, and the description of a project task. Translations are stored where they were, so nothing has to be converted.

What changes for editors

The project, library task and template forms now open the shared AI translate modal instead of the module’s own translate bar. The form for a task inside a project has no translate button. A long bulk translation now shows a hint that it is taking a while. Each translation is written so that several languages finishing at the same moment cannot overwrite each other, and a project job can never translate a template or the other way round.

What changes in the activity log

Each finished translation is now logged as core’s generic ai.translation_added entry, under the AI module, instead of projects.translation_added. If you filter or report on the old action, switch to the new one.

Removed

The module’s own translation context, its background worker and its translate bar are gone. Their work is done by core now.

Upgrading

Projects 0.9 needs PhoenixKit 1.7.130 or later, the release that carries the shared translation pipeline. Update core first, then the module. No migration of the module’s own data.

Full release notes: Projects 0.9.0

0.9.0 · 4 June 2026

AI translation now runs on the shared PhoenixKitAI pipeline. The module’s bespoke AI-translation stack (its own Translations context, TranslateResourceWorker, and AITranslateBar) is replaced by PhoenixKitAI’s generic pipeline plus the shared translate modal/glue — the same one catalogue uses. Net deletion of ~3300 lines of duplicated machinery. Translatable fields are unchanged (project/template: name + description; task: title + description; assignment: description), stored as before in each schema’s translations JSONB.

Added

  • PhoenixKitProjects.AITranslatable — the PhoenixKitAI.Translatable adapter for the four resource types (project, template, task, assignment), registered via ai_translatables/0. source_fields/2 reads each schema’s translatable_fields/0 from translations[lang] or the primary column; put_translation/4 merges results into the translations JSONB under a FOR UPDATE row lock so concurrent per-language jobs can’t drop sibling languages; fetch/2 validates the is_template flag so a project job can’t cross-translate a template (or vice versa).
  • PhoenixKitProjects.AITranslateBinding — the PhoenixKitAI.Components.AITranslate.FormBinding for the project/task/template form LVs (existing-translation langs, changeset merge, actor uuid).
  • “Taking a while” stall hint on bulk translations — comes for free from the shared FormGlue.
  • Adapter unit tests (fetch with is_template validation, source_fields column/override/blank handling, put_translation merge + :resource_not_found rollback).

Changed

  • Added phoenix_kit_ai ~> 0.3 — the AI plugin now owns the generic translation pipeline (PhoenixKitAI.{Translatable,Translations,TranslateWorker} + the shared AITranslate.{FormGlue,FormBinding} UI) this module depends on.
  • The project/task/template form LVs delegate their AI-translate wiring to the shared FormGlue instead of carrying an inline copy of the dispatch/config/handle_info state machine.
  • The per-translation audit entry is now core’s generic ai.translation_added (module "ai") rather than projects.translation_added.
  • update_task/3 and update_assignment_form/3 gain a broadcast: false option (mirroring update_project/3); the translation adapter passes it so a write inside its FOR UPDATE transaction doesn’t fire a pre-commit :*_updated broadcast. Existing 2-arity callers are unaffected.

Removed

  • The bespoke PhoenixKitProjects.Translations context, Workers.TranslateResourceWorker, and Web.Components.AITranslateBar (plus the Web.AITranslateFormHelpers module) — behaviour is now covered by PhoenixKitAI.

Fixed

  • Post-merge review follow-ups (PR #18): flattened AITranslatable.source_value/2, aligned the blank-binary predicate across the adapter and binding, and fixed credo --strict alias ordering of the shared FormGlue alias in the three form LVs.

Projects 0.9.0. Install or update: {:phoenix_kit_projects, "~> 0.9"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.