feat(ai-create): let users choose brand colors or free AI colors for images#128
Open
dantaspaulo wants to merge 1 commit into
Open
feat(ai-create): let users choose brand colors or free AI colors for images#128dantaspaulo wants to merge 1 commit into
dantaspaulo wants to merge 1 commit into
Conversation
…images The image pipeline already threads `applyBrandVisuals` through `TemplateContext` -> `PostImagePipeline` -> `TemplateImageGenerator`, but it was hardcoded to `true` at the dispatch site, so generated images always used the workspace brand palette with no way to opt out. Expose the choice in the create wizard: a "Brand colors" / "Let AI decide" toggle (shown only when images are generated). The flag flows front -> `StartPostCreationRequest` (`apply_brand_visuals`) -> `PostAiCreateController@start` -> `StreamPostCreation` -> `TemplateContext`, defaulting to `true` so existing behavior is unchanged when the field is absent.
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 free
to 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.
Problem
The AI image pipeline already threads an
applyBrandVisualsflag all the waythrough
TemplateContext→PostImagePipeline→TemplateImageGenerator(whenoff, the AI background is generated without the workspace brand color,
background, text color or brand description). But the flag was hardcoded to
trueat the dispatch site, so users had no way to opt out — every generatedimage was forced onto the workspace brand palette.
Change
Expose the choice in the create wizard as a "Brand colors" / "Let AI decide"
toggle, shown only when images are actually generated. The flag flows:
It defaults to
true, so behavior is unchanged when the field is absent (APIclients, existing callers). Only the AI-image templates (
image_card/carousel) honor the flag — tweet cards are brand-colored by design and their
pipeline path doesn't take
applyBrandVisuals.StreamPostCreation: newapplyBrandVisualsconstructor arg, passed intoTemplateContext.PostAiCreateController@start: readsapply_brand_visualsand forwards it.StartPostCreationRequest:apply_brand_visuals→['sometimes', 'boolean'].AiPostWizard.vue: the toggle + sends the flag.lang/{en,es,pt-BR}/posts.php:brand_colors_*strings.Tests
PostAiCreateTest: the job carriesapplyBrandVisuals === falsewhen the useropts out, and defaults to
truewhen the field is omitted.