[PR #3948] [MERGED] Move Roleplay background generation to Illustrator #6172

Closed
opened 2026-10-23 04:07:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3948
Author: @SpicyMarinara
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/remove-background-agent-image-generation


📝 Commits (1)

  • e8ec157 Remove Background agent image generation

📊 Changes

12 files changed (+69 additions, -313 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/agents/built-in-agents.md (+2 -2)
📝 docs/media/scene-backgrounds.md (+2 -2)
📝 docs/roleplay/backgrounds.md (+2 -2)
📝 packages/client/src/components/agents/AgentEditor.tsx (+6 -74)
📝 packages/client/src/components/chat/ChatArea.tsx (+1 -0)
📝 packages/server/src/routes/backgrounds.routes.ts (+4 -9)
📝 packages/server/src/routes/generate.routes.ts (+0 -184)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+17 -4)
📝 packages/server/src/services/agents/agent-executor.ts (+0 -35)
📝 packages/server/src/services/professor-mari/official-agent-knowledge.ts (+1 -1)
📝 scripts/regressions/prompt.regression.ts (+33 -0)

📄 Description

Why

The Background agent still exposed an older image-generation path that overlaps with Illustrator's newer scene-background generation. The two paths had different prompts, connections, and behavior, making ownership unclear.

Gallery → Background also invoked Illustrator as a normal illustration retry, so the result could be attached to the chat instead of becoming the active Roleplay background.

What changed

  • Remove the Background agent's obsolete generation toggle, image connection, prompt context, and runtime generation branch.
  • Keep Background selection compatible with existing library images while ignoring legacy package generation requests.
  • Route manual scene-background connection resolution through Illustrator, then the default image connection.
  • Make Gallery → Background an explicit background-only Illustrator run.
  • Save the generated image to the background library and immediately apply it to the active Roleplay chat without attaching an ordinary illustration.
  • Update user documentation, Professor Mari's built-in agent knowledge, changelog, and regression coverage.

Impact

Background now has one responsibility: selecting an existing backdrop. Illustrator owns both automatic and manual background creation. Older installed Background packages can still select images safely; their obsolete generation payload is ignored by the Engine.

Companion change

Validation

  • pnpm check
  • pnpm regression:prompt
  • Relevant Playwright Roleplay-background coverage passed on desktop and mobile.
  • Three unrelated failures from the first full smoke run passed on an isolated rerun.

Manual verification

  • Manually verify Gallery → Background creates a reusable background and immediately applies it to the active Roleplay chat.
  • Manually verify the generated background is not attached as a normal chat illustration.
  • Manually verify Background still selects existing library images after updating the downloadable package.

Summary by CodeRabbit

  • New Features

    • Background selection now uses images from your existing background library.
    • Illustrator handles automatic and manual background generation.
    • Generated backgrounds are applied directly to the active Roleplay chat.
  • Bug Fixes

    • Removed obsolete Background agent image-generation controls.
    • Improved image-connection guidance and error messages for background generation.
  • Documentation

    • Updated agent, roleplay background, and troubleshooting documentation to reflect the revised workflow.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3948 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/remove-background-agent-image-generation` --- ### 📝 Commits (1) - [`e8ec157`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e8ec157f9bd4e152a7e38719c87702378ccdb00c) Remove Background agent image generation ### 📊 Changes **12 files changed** (+69 additions, -313 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/agents/built-in-agents.md` (+2 -2) 📝 `docs/media/scene-backgrounds.md` (+2 -2) 📝 `docs/roleplay/backgrounds.md` (+2 -2) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+6 -74) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+1 -0) 📝 `packages/server/src/routes/backgrounds.routes.ts` (+4 -9) 📝 `packages/server/src/routes/generate.routes.ts` (+0 -184) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+17 -4) 📝 `packages/server/src/services/agents/agent-executor.ts` (+0 -35) 📝 `packages/server/src/services/professor-mari/official-agent-knowledge.ts` (+1 -1) 📝 `scripts/regressions/prompt.regression.ts` (+33 -0) </details> ### 📄 Description ## Why The Background agent still exposed an older image-generation path that overlaps with Illustrator's newer scene-background generation. The two paths had different prompts, connections, and behavior, making ownership unclear. Gallery → Background also invoked Illustrator as a normal illustration retry, so the result could be attached to the chat instead of becoming the active Roleplay background. ## What changed - Remove the Background agent's obsolete generation toggle, image connection, prompt context, and runtime generation branch. - Keep Background selection compatible with existing library images while ignoring legacy package generation requests. - Route manual scene-background connection resolution through Illustrator, then the default image connection. - Make Gallery → Background an explicit background-only Illustrator run. - Save the generated image to the background library and immediately apply it to the active Roleplay chat without attaching an ordinary illustration. - Update user documentation, Professor Mari's built-in agent knowledge, changelog, and regression coverage. ## Impact Background now has one responsibility: selecting an existing backdrop. Illustrator owns both automatic and manual background creation. Older installed Background packages can still select images safely; their obsolete generation payload is ignored by the Engine. ## Companion change - Pasta-Devs/Marinara-Agents#96 publishes the selection-only Background `1.0.2` package. ## Validation - `pnpm check` - `pnpm regression:prompt` - Relevant Playwright Roleplay-background coverage passed on desktop and mobile. - Three unrelated failures from the first full smoke run passed on an isolated rerun. ## Manual verification - [ ] Manually verify Gallery → Background creates a reusable background and immediately applies it to the active Roleplay chat. - [ ] Manually verify the generated background is not attached as a normal chat illustration. - [ ] Manually verify Background still selects existing library images after updating the downloadable package. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Background selection now uses images from your existing background library. * Illustrator handles automatic and manual background generation. * Generated backgrounds are applied directly to the active Roleplay chat. * **Bug Fixes** * Removed obsolete Background agent image-generation controls. * Improved image-connection guidance and error messages for background generation. * **Documentation** * Updated agent, roleplay background, and troubleshooting documentation to reflect the revised workflow. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:47 +07:00
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#6172
No description provided.