[GH-ISSUE #676] [Bug]: Slurp image prompt review bypasses appearance and style composition #351

Closed
opened 2026-10-20 17:26:45 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Gunterlie on GitHub (Sep 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/676

Summary

When Review image prompts before sending is enabled, character appearance and art style can never reach the image provider. This is independent of the leak-guard problem in #675: even if that guard is fixed, this path still loses both.

Root cause

The review flow generates the image twice, and the enrichment step is skipped on both passes for different reasons.

Pass 1 — building the preview shown in the modal. slurp-generation.service.ts:647-653:

if (input.request.reviewImagePromptsBeforeSend === true) {
  preview = await generateNoodlerPostImage({ ...imageInput, previewOnly: true });

imageInput carries no promptOverride, so the rewrite does run — and is then subject to the guard in #675. When the guard fires, the prompt displayed in the review modal is the bare draft, with no appearance and no style. This is what users are looking at when they report the modal contents are wrong.

Pass 2 — generating after the user approves. The approved text comes back as promptOverride, and the rewrite is then skipped outright. slurp-images.service.ts:206-218:

const rewrittenPrompt =
  (imagePromptInstructions || characterContext || styleGuidance) &&
  input.settings.enableImageInterpretation !== false &&
  !input.promptOverride              // <-- here
    ? await rewriteNoodleImagePrompt({ ... })
    : null;

With rewrittenPrompt null, selectNoodleImageProviderPrompt returns rawProviderPrompt, which is the override — the same styleless text the user was shown. characterContext and styleGuidance were both computed and are then discarded unused.

Same shape in slurp-public-images.service.ts:227, which is the guided-generation-from-a-creator-profile path.

Net effect

Appearance and art style are stripped when building the preview, and there is no second chance to reapply them after approval. Turning Review image prompts before sending on silently disables Include descriptions and all style profiles.

Note on intent

Skipping the rewrite when the user has hand-edited a prompt is defensible — a rewrite would undo their edits. The defect is that the style profile and appearance are treated as part of the rewrite rather than as prompt composition. In the non-review path they arrive via compiledPrompt.prompt; in the review path rawFinalPrompt replaces the compiled prompt wholesale:

slurp-images.service.ts:187

const rawFinalPrompt = redactIdentity(input.promptOverride?.prompt.trim() || compiledPrompt.prompt);

Suggested fix

Compose the style profile onto the approved override instead of discarding it — run the override back through compileImagePrompt so the profile prefix and negative prompt are reapplied, while leaving the user's own wording untouched. Appearance should be resolved into the preview prompt before it is shown, so the user reviews what will actually be sent.

Repro

  1. Set an art style profile and enable Include descriptions.
  2. Enable Review image prompts before sending.
  3. Generate a post with an image on a creator linked to a character with an appearance.
  4. The prompt in the review modal contains neither the appearance nor the style; the generated image reflects neither.
Originally created by @Gunterlie on GitHub (Sep 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/676 ## Summary When **Review image prompts before sending** is enabled, character appearance and art style can never reach the image provider. This is independent of the leak-guard problem in #675: even if that guard is fixed, this path still loses both. ## Root cause The review flow generates the image twice, and the enrichment step is skipped on both passes for different reasons. **Pass 1 — building the preview shown in the modal.** `slurp-generation.service.ts:647-653`: ```ts if (input.request.reviewImagePromptsBeforeSend === true) { preview = await generateNoodlerPostImage({ ...imageInput, previewOnly: true }); ``` `imageInput` carries no `promptOverride`, so the rewrite does run — and is then subject to the guard in #675. When the guard fires, the prompt displayed in the review modal is the bare draft, with no appearance and no style. This is what users are looking at when they report the modal contents are wrong. **Pass 2 — generating after the user approves.** The approved text comes back as `promptOverride`, and the rewrite is then skipped outright. `slurp-images.service.ts:206-218`: ```ts const rewrittenPrompt = (imagePromptInstructions || characterContext || styleGuidance) && input.settings.enableImageInterpretation !== false && !input.promptOverride // <-- here ? await rewriteNoodleImagePrompt({ ... }) : null; ``` With `rewrittenPrompt` null, `selectNoodleImageProviderPrompt` returns `rawProviderPrompt`, which is the override — the same styleless text the user was shown. `characterContext` and `styleGuidance` were both computed and are then discarded unused. Same shape in `slurp-public-images.service.ts:227`, which is the guided-generation-from-a-creator-profile path. ## Net effect Appearance and art style are stripped when building the preview, and there is no second chance to reapply them after approval. Turning **Review image prompts before sending** on silently disables **Include descriptions** and all style profiles. ## Note on intent Skipping the rewrite when the user has hand-edited a prompt is defensible — a rewrite would undo their edits. The defect is that the *style profile* and *appearance* are treated as part of the rewrite rather than as prompt composition. In the non-review path they arrive via `compiledPrompt.prompt`; in the review path `rawFinalPrompt` replaces the compiled prompt wholesale: `slurp-images.service.ts:187` ```ts const rawFinalPrompt = redactIdentity(input.promptOverride?.prompt.trim() || compiledPrompt.prompt); ``` ## Suggested fix Compose the style profile onto the approved override instead of discarding it — run the override back through `compileImagePrompt` so the profile prefix and negative prompt are reapplied, while leaving the user's own wording untouched. Appearance should be resolved into the preview prompt before it is shown, so the user reviews what will actually be sent. ## Repro 1. Set an art style profile and enable **Include descriptions**. 2. Enable **Review image prompts before sending**. 3. Generate a post with an image on a creator linked to a character with an appearance. 4. The prompt in the review modal contains neither the appearance nor the style; the generated image reflects neither.
bsakaguchi 2026-10-20 17:26:45 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Gunterlie commented on GitHub (Sep 1, 2026):

Related.

The modal described here also renders its own text as raw localization keys — see #677. ImagePromptReviewModal lives in components/ui/ in the Engine and is bundled by both Noodle and Slurp, so that half of the problem is shared with Noodle, while the prompt-composition defect described in this issue is in the Slurp services.

Worth fixing #677 first: it is a catalog fix, and it makes this issue's symptom directly observable in the modal instead of being inferred from the generated image.

<!-- gh-comment-id:5489529171 --> @Gunterlie commented on GitHub (Sep 1, 2026): **Related.** The modal described here also renders its own text as raw localization keys — see #677. `ImagePromptReviewModal` lives in `components/ui/` in the Engine and is bundled by both Noodle and Slurp, so that half of the problem is shared with Noodle, while the prompt-composition defect described in this issue is in the Slurp services. Worth fixing #677 first: it is a catalog fix, and it makes this issue's symptom directly observable in the modal instead of being inferred from the generated image.
Author
Owner

@Gunterlie commented on GitHub (Sep 1, 2026):

Fix opened as draft #683.

<!-- gh-comment-id:5492761169 --> @Gunterlie commented on GitHub (Sep 1, 2026): Fix opened as draft #683.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#351
No description provided.