Skip to content

v0.9.0 — AI translation on the shared core pipeline

Choose a tag to compare

@ddon ddon released this 04 Jun 13:01
· 15 commits to main since this release

AI translation now runs on core's shared pipeline. The module's bespoke AI-translation stack (its own Translations context, TranslateResourceWorker, and AITranslateBar) is replaced by core'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).

Added

  • PhoenixKitProjects.AITranslatable — the PhoenixKit.Modules.AI.Translatable adapter for the four resource types (project, template, task, assignment), registered via the new ai_translatables/0 callback. put_translation/4 merges results 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.
  • PhoenixKitProjects.AITranslateBinding — the shared AITranslate.FormBinding for the project/task/template form LVs.
  • "Taking a while" stall hint on bulk translations (from the shared FormGlue).
  • Adapter unit tests.

Changed

  • Minimum phoenix_kit is now ~> 1.7.130 — the release shipping the generic AI-translation pipeline this module depends on.
  • Form LVs delegate AI-translate wiring to the shared FormGlue.
  • Per-translation audit entry is now core's generic ai.translation_added.
  • update_task/3 and update_assignment_form/3 gain a broadcast: false option (existing 2-arity callers unaffected).

Removed

  • The bespoke Translations context, TranslateResourceWorker, AITranslateBar, and AITranslateFormHelpers — now covered by core.

Fixed

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

📦 Hex: https://hex.pm/packages/phoenix_kit_projects/0.9.0
📖 Docs: https://hexdocs.pm/phoenix_kit_projects/0.9.0