Uh oh!
There was an error while loading. Please reload this page.
Remove AI translation pipeline from core (move to phoenix_kit_ai) - #586
Merged
Conversation
Versioned/partitioned resources couldn't tell the generic pipeline WHICH slice to translate — fetch/2 only receives (type, uuid), so an adapter re-resolved a default (e.g. publishing always translated a post's active version, even when the editor was on a draft). - Translatable: add optional `fetch/3 (type, uuid, scope)`; `fetch/2` stays required. Adapters that don't export fetch/3 are unaffected. - Translations.enqueue/enqueue_all_missing: accept an optional, JSON-safe `resource_scope`; normalize it (string | nil) and include it in the in-flight dedup key so (uuid, scope=1, lang) and (uuid, scope=2, lang) are distinct jobs. A nil/absent scope dedups with legacy unscoped jobs. - TranslateWorker: thread resource_scope from args; dispatch fetch/3 when the adapter exports it (guarded with Code.ensure_loaded?/1), else fetch/2; add resource_scope to lifecycle broadcast payloads so subscribers can filter by slice. Backward-compatible: catalogue/projects keep only fetch/2 and are unaffected; jobs enqueued before scoping still parse and run.
Include resource_scope in the ai.translation_added activity metadata when present, so audit entries for versioned/partitioned resources distinguish e.g. v1 vs v2 translation work. Unversioned resources (nil scope) are unchanged. Follow-up to the fetch/3 scope change.
This was referenced Jun 7, 2026
All AI logic now lives in the phoenix_kit_ai plugin; core keeps only the AI
tables' migrations (the single versioned chain). This supersedes the in-core
fetch/3 scope work earlier on this branch — that lands in the plugin instead.
Removed:
- PhoenixKit.Modules.AI{,.Translatable,.Translations,.TranslateWorker,.Translation}
- PhoenixKit.Module ai_translatables/0 callback + ModuleRegistry
all_ai_translatables/0 + find_ai_translatable/1 (discovery re-homes to
PhoenixKitAI.Translatables, a duck-typed scan over ModuleRegistry.all_modules)
- PhoenixKitWeb.Components.AITranslate{,.Embed,.FormBinding,.FormGlue}
Kept: the phoenix_kit_ai_endpoints / _prompts table migrations; the generic
language_switcher's parameterized `ai_translate` attr (no AI dependency).
No @Version bump — release is the maintainer's call.It was the only module-specific helper in core's generic Routes util — a layering inversion. The AI plugin now owns it as PhoenixKitAI.Routes.ai_path/0, wrapping the generic Routes.path/1. Completes the AI move: core's Routes is module-agnostic again.
Explain how feature modules build/test against a local core checkout via the <APP>_PATH env override (pk_dep/3 in each module), and how phoenix_kit_parent exercises the whole tree against local core.
mdon
commented
Jun 8, 2026
ContributorAuthor
Latest push: docs-only cleanup for the AI move. Updated README/dialyzer notes so live docs no longer point at the removed core AI translation namespace. |
ddon pushed a commit
that referenced
this pull request
Jun 8, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ddon pushed a commit
that referenced
this pull request
Jun 8, 2026
Documents the breaking removal of the in-core AI translation pipeline (moved to phoenix_kit_ai in PR #586) under a CHANGELOG ### Removed entry. The published 1.7.132 still ships the old in-core pipeline, so this is a new release rather than a republish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves all AI-translation logic out of core and into the
phoenix_kit_aiplugin. Core keeps only the migration (thephoenix_kit_ai_endpoints/_promptstables live in core's single versioned chain). This supersedes the earlier in-corefetch/3scope commits on this branch — that work now lands in the plugin.Removed from core
PhoenixKit.Modules.AI+.Translatable/.Translations/.TranslateWorker/.Translation(the pipeline)PhoenixKit.Module.ai_translatables/0callback +ModuleRegistry.all_ai_translatables/0/find_ai_translatable/1(discovery re-homes toPhoenixKitAI.Translatables, a duck-typed scan overModuleRegistry.all_modules/0)PhoenixKitWeb.Components.AITranslate{,.Embed,.FormBinding,.FormGlue}(the AI-translate modal UI)test/phoenix_kit/modules/ai/*tests (relocated to the plugin)Kept in core
language_switcher's genericai_translateattr — a parameterized affordance with no AI dependencyWhy
AI is a self-contained, optional capability; its code belongs in the AI plugin, not scattered through core. Feature modules (publishing/catalogue/projects) now depend on
phoenix_kit_aiand implementPhoenixKitAI.Translatable.Coordinated release
Part of a set (one PR per repo): core (this) →
phoenix_kit_ai(adds the pipeline + UI) → publishing / catalogue / projects (rewire toPhoenixKitAI.*). No@versionbump here — release is the maintainer's call. Consumers float to this release via~>minimums (no precise pins).Also in this PR (latest push): a docs-only "Local cross-repo development" section in
AGENTS.mddocumenting the<APP>_PATHoverride workflow that feature modules use to build/test against a local core checkout.Also in this branch:
dev_docs/pull_requests/2026/585-host-wiring-embed-v131/FOLLOW_UP.md— the Phase-1 after-action for the (already-merged) PR #585, documenting that all review follow-ups were resolved (media_detail aligned → extracted toCommentsForwarding; double-fire note corrected to shadowing; CHANGELOG in 1.7.132). Docs-only.