[PR #3925] [MERGED] Add automatic Illustrator scene backgrounds in Roleplay #6159

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

📋 Pull Request Information

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

Base: staging ← Head: agent/illustrator-scene-backgrounds


📝 Commits (4)

  • 37f48fb feat: add automatic Illustrator scene backgrounds
  • 8cfd98e fix: resolve Illustrator background agents precisely
  • 2e53f3a refactor: share image style selector
  • 76d0400 Merge branch 'staging' into agent/illustrator-scene-backgrounds

📊 Changes

9 files changed (+742 additions, -48 deletions)

View changed files

📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+49 -34)
📝 packages/client/src/hooks/use-generate.ts (+8 -2)
📝 packages/server/src/routes/generate.routes.ts (+144 -11)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+142 -0)
📝 packages/server/src/services/agents/agent-executor.ts (+17 -0)
📝 packages/server/src/services/game/game-asset-generation.ts (+3 -1)
➕ packages/server/src/services/generation/illustrator-background-generation.ts (+309 -0)
📝 packages/shared/src/types/chat.ts (+2 -0)
📝 scripts/regressions/prompt.regression.ts (+68 -0)

📄 Description

Closes #3924.

Related package PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/95

Why

Roleplay Illustrator could create scene illustrations, but it could not independently create and activate a reusable background when the story entered a new location.

What changed

  • Adds a per-chat Generate Scene Backgrounds toggle and shared Image Style selector to Illustrator settings.
  • Extends Illustrator results with an independent generateBackground decision.
  • Uses committed tracker location changes as a deterministic trigger, with scene-context inference when trackers are unavailable.
  • Writes a separate background-only prompt and reuses the existing background generation, resize, style, fallback, metadata, and library pipeline.
  • Saves descriptive filenames and tags, activates the result, refreshes Appearance, and avoids clobbering concurrent background changes.

Validation

  • pnpm check
  • pnpm regression:prompt
  • git diff --check
  • Relevant Playwright Roleplay, background selection, and background library coverage passed.
  • Full Playwright smoke run: 64 passed, 42 viewport-skipped, and 4 unrelated failures (stale What's New heading expectations, a mobile Noodle overlay timeout, and a side-panel timing assertion that passed in isolation).

Summary by CodeRabbit

  • New Features

    • Added an option for Illustrator to automatically generate reusable scene backgrounds when locations meaningfully change.
    • Added shared Image Style selection for generated artwork.
    • Added controls to enable scene-background generation in chat settings.
    • Generated backgrounds are refreshed and activated safely without overwriting newer background changes.
    • Background assets now support additional searchable tags.
  • Bug Fixes

    • Improved background updates and retry handling so newly generated assets appear promptly.

🔄 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/3925 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/21/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/illustrator-scene-backgrounds` --- ### 📝 Commits (4) - [`37f48fb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/37f48fbd5c7effc8425e5f461b29793a89d533f2) feat: add automatic Illustrator scene backgrounds - [`8cfd98e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8cfd98ec5f017f263d13cdbdfb870b47af9b6f06) fix: resolve Illustrator background agents precisely - [`2e53f3a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2e53f3abbdd67d6d04b4525831f8b103cde68718) refactor: share image style selector - [`76d0400`](https://github.com/Pasta-Devs/Marinara-Engine/commit/76d04006dd9a9ec67b43b605114d82adf1dbacf8) Merge branch 'staging' into agent/illustrator-scene-backgrounds ### 📊 Changes **9 files changed** (+742 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+49 -34) 📝 `packages/client/src/hooks/use-generate.ts` (+8 -2) 📝 `packages/server/src/routes/generate.routes.ts` (+144 -11) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+142 -0) 📝 `packages/server/src/services/agents/agent-executor.ts` (+17 -0) 📝 `packages/server/src/services/game/game-asset-generation.ts` (+3 -1) ➕ `packages/server/src/services/generation/illustrator-background-generation.ts` (+309 -0) 📝 `packages/shared/src/types/chat.ts` (+2 -0) 📝 `scripts/regressions/prompt.regression.ts` (+68 -0) </details> ### 📄 Description Closes #3924. Related package PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/95 ## Why Roleplay Illustrator could create scene illustrations, but it could not independently create and activate a reusable background when the story entered a new location. ## What changed - Adds a per-chat Generate Scene Backgrounds toggle and shared Image Style selector to Illustrator settings. - Extends Illustrator results with an independent `generateBackground` decision. - Uses committed tracker location changes as a deterministic trigger, with scene-context inference when trackers are unavailable. - Writes a separate background-only prompt and reuses the existing background generation, resize, style, fallback, metadata, and library pipeline. - Saves descriptive filenames and tags, activates the result, refreshes Appearance, and avoids clobbering concurrent background changes. ## Validation - `pnpm check` - `pnpm regression:prompt` - `git diff --check` - Relevant Playwright Roleplay, background selection, and background library coverage passed. - Full Playwright smoke run: 64 passed, 42 viewport-skipped, and 4 unrelated failures (stale What's New heading expectations, a mobile Noodle overlay timeout, and a side-panel timing assertion that passed in isolation). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an option for Illustrator to automatically generate reusable scene backgrounds when locations meaningfully change. * Added shared Image Style selection for generated artwork. * Added controls to enable scene-background generation in chat settings. * Generated backgrounds are refreshed and activated safely without overwriting newer background changes. * Background assets now support additional searchable tags. * **Bug Fixes** * Improved background updates and retry handling so newly generated assets appear promptly. <!-- 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:39 +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#6159
No description provided.