[GH-ISSUE #1514] [Issue]: Gallery Illustrate runs Illustrator without generating the image #762

Closed
opened 2026-10-20 17:33:04 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1514

Originally assigned to: @Romuromylus on GitHub.

Summary

Roleplay Gallery Illustrate can run the Illustrator agent successfully but never attempt image generation. The retry path persists an image_prompt agent run with shouldGenerate: true, then returns the button to idle with no gallery image, no assistant attachment, and no visible "no image connection" error.

Expected behavior

Manual Gallery Illustrate should share the normal generation behavior for Illustrator results:

  • If an image generation connection is configured, generate the illustration, create a gallery record, and attach the image to the assistant output.
  • If no image generation connection is configured, surface the same actionable error used by normal generation: No image generation connection configured for this chat.

Actual behavior

The Illustrator retry path only runs and persists the agent result. It does not call the illustration generation step, so a successful shouldGenerate: true result is effectively a silent no-op.

Native QA on current origin/refactor showed:

  • Before pressing Illustrate: agent-runs = 6, gallery = 1, messages = 16
  • After pressing Illustrate: agent-runs = 7, gallery = 1, messages = 16
  • New run:
    • agentType: "illustrator"
    • resultType: "image_prompt"
    • success: true
    • resultData.shouldGenerate: true
    • resultData.prompt: "A11_MANUAL_ILLUSTRATE_PROMPT_MARKER"
  • Visible UI: Gallery drawer returned to idle with Illustrate / Upload Images; no no-image-connection error appeared.

Steps to reproduce

  1. On origin/refactor, open a Roleplay chat in the Tauri desktop app.
  2. Enable agents for the chat and make illustrator the active agent.
  3. Configure the Illustrator agent to return a successful image prompt, for example:
    {"shouldGenerate":true,"reason":"A11_MANUAL_ILLUSTRATE_REASON_MARKER","prompt":"A11_MANUAL_ILLUSTRATE_PROMPT_MARKER"}
  4. Leave the chat without metadata.imageGenConnectionId.
  5. Open the Roleplay Gallery drawer.
  6. Press Illustrate.
  7. Inspect storage and the Gallery drawer.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: origin/refactor at 229e7d89 (Fix PR 1499 review follow-ups)
  • Run mode: Tauri desktop QA
  • OS + version: Windows 11 Home 10.0.26200
  • Node + pnpm versions: Node v24.16.0, pnpm 10.33.2
  • Rust version, if relevant: rustc 1.95.0, cargo 1.95.0
  • Remote Runtime URL configured? no
  • Provider, model, or integration, if relevant: deterministic local OpenAI-compatible LLM stub for the Illustrator agent; no image generation connection configured by design

Logs, screenshots, or video

Current code path matches the repro:

  • src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts:452 maps Gallery Illustrate to retryAgents(activeChatId, ["illustrator"]).
  • src/features/runtime/generation/hooks/use-generate.ts:1366 calls retryGenerationAgents(...) and then only applies agent result effects.
  • src/engine/generation/start-generation.ts:1378 / 1498 rerun agents through runGenerationAgentsForTarget(...).
  • Normal generation calls generateIllustrationAttachments(...) at src/engine/generation/start-generation.ts:1701, but the retry path does not.
  • applyAgentResultEffects(...) only adds the Illustrator thought bubble for shouldGenerate: true; it does not generate images or emit illustration_error.

Related closed issues checked:

  • #877 tracked a legacy/default-image-connection flavor of manual Illustrator silently skipping output.
  • #1293 tracked long-chat NovelAI/gallery Illustrate failures.
  • Searches for the current retryGenerationAgents / generateIllustrationAttachments gap found no open matching issue.

Regression notes

Unknown. This was found during the Roleplay mode audit on the refactor branch.

Additional context

The normal generation path already has the correct behavior in generateIllustrationAttachments(...): it converts successful Illustrator image_prompt results into image generation attempts and emits illustration_error when no image connection is configured. The manual retry path should reuse that contract or a shared lower-layer helper instead of only applying generic agent result effects.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (May 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1514 Originally assigned to: @Romuromylus on GitHub. ## Summary Roleplay Gallery `Illustrate` can run the Illustrator agent successfully but never attempt image generation. The retry path persists an `image_prompt` agent run with `shouldGenerate: true`, then returns the button to idle with no gallery image, no assistant attachment, and no visible "no image connection" error. ## Expected behavior Manual Gallery `Illustrate` should share the normal generation behavior for Illustrator results: - If an image generation connection is configured, generate the illustration, create a gallery record, and attach the image to the assistant output. - If no image generation connection is configured, surface the same actionable error used by normal generation: `No image generation connection configured for this chat.` ## Actual behavior The Illustrator retry path only runs and persists the agent result. It does not call the illustration generation step, so a successful `shouldGenerate: true` result is effectively a silent no-op. Native QA on current `origin/refactor` showed: - Before pressing `Illustrate`: `agent-runs = 6`, `gallery = 1`, `messages = 16` - After pressing `Illustrate`: `agent-runs = 7`, `gallery = 1`, `messages = 16` - New run: - `agentType: "illustrator"` - `resultType: "image_prompt"` - `success: true` - `resultData.shouldGenerate: true` - `resultData.prompt: "A11_MANUAL_ILLUSTRATE_PROMPT_MARKER"` - Visible UI: Gallery drawer returned to idle with `Illustrate` / `Upload Images`; no no-image-connection error appeared. ## Steps to reproduce 1. On `origin/refactor`, open a Roleplay chat in the Tauri desktop app. 2. Enable agents for the chat and make `illustrator` the active agent. 3. Configure the Illustrator agent to return a successful image prompt, for example: `{"shouldGenerate":true,"reason":"A11_MANUAL_ILLUSTRATE_REASON_MARKER","prompt":"A11_MANUAL_ILLUSTRATE_PROMPT_MARKER"}` 4. Leave the chat without `metadata.imageGenConnectionId`. 5. Open the Roleplay Gallery drawer. 6. Press `Illustrate`. 7. Inspect storage and the Gallery drawer. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [x] Roleplay mode - [ ] Game mode - [x] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `origin/refactor` at `229e7d89` (`Fix PR 1499 review follow-ups`) - Run mode: Tauri desktop QA - OS + version: Windows 11 Home 10.0.26200 - Node + pnpm versions: Node `v24.16.0`, pnpm `10.33.2` - Rust version, if relevant: `rustc 1.95.0`, `cargo 1.95.0` - Remote Runtime URL configured? no - Provider, model, or integration, if relevant: deterministic local OpenAI-compatible LLM stub for the Illustrator agent; no image generation connection configured by design ## Logs, screenshots, or video Current code path matches the repro: - `src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts:452` maps Gallery `Illustrate` to `retryAgents(activeChatId, ["illustrator"])`. - `src/features/runtime/generation/hooks/use-generate.ts:1366` calls `retryGenerationAgents(...)` and then only applies agent result effects. - `src/engine/generation/start-generation.ts:1378` / `1498` rerun agents through `runGenerationAgentsForTarget(...)`. - Normal generation calls `generateIllustrationAttachments(...)` at `src/engine/generation/start-generation.ts:1701`, but the retry path does not. - `applyAgentResultEffects(...)` only adds the Illustrator thought bubble for `shouldGenerate: true`; it does not generate images or emit `illustration_error`. Related closed issues checked: - #877 tracked a legacy/default-image-connection flavor of manual Illustrator silently skipping output. - #1293 tracked long-chat NovelAI/gallery Illustrate failures. - Searches for the current `retryGenerationAgents` / `generateIllustrationAttachments` gap found no open matching issue. ## Regression notes Unknown. This was found during the Roleplay mode audit on the refactor branch. ## Additional context The normal generation path already has the correct behavior in `generateIllustrationAttachments(...)`: it converts successful Illustrator `image_prompt` results into image generation attempts and emits `illustration_error` when no image connection is configured. The manual retry path should reuse that contract or a shared lower-layer helper instead of only applying generic agent result effects. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:33:04 +07:00
Author
Owner

@Romuromylus commented on GitHub (May 30, 2026):

Fixed by #1646, merged into refactor.

<!-- gh-comment-id:4582247494 --> @Romuromylus commented on GitHub (May 30, 2026): Fixed by #1646, merged into `refactor`.
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-Engine#762
No description provided.