[PR #962] [MERGED] Fix GM scene image instructions #4856

Closed
opened 2026-10-22 04:11:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/962
Author: @cha1latte
Created: 5/17/2026
Status: ✅ Merged
Merged: 5/17/2026
Merged by: @cha1latte

Base: staging ← Head: fix/gm-scene-image-instructions


📝 Commits (2)

  • 1f7fac0 Fix GM scene image instructions
  • a48e206 Sanitize GM scene image style prompts

📊 Changes

2 files changed (+25 additions, -0 deletions)

View changed files

📝 packages/server/src/routes/generate.routes.ts (+4 -0)
📝 packages/server/src/services/game/gm-prompts.ts (+21 -0)

📄 Description

Linked issue

No linked issue yet; one should be opened before submission.

Why this change

  • In GM mode without a separate scene model, scene tags are emitted by the GM format reminder, but that reminder did not receive the generated-background capability or the setup art style prompt. As a result, scene image instructions from game setup were not respected for inline GM scene image tags.

What changed

  • Threaded game image generation capability and the setup artStylePrompt into the GM prompt context.
  • Added inline GM format reminder guidance for generated background tags and the visual instruction when generated backgrounds are enabled.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex scratch repro: packages\server\node_modules\.bin\tsx.cmd scratch\gm-scene-image-instructions-repro.ts
    • Before fix: GM format reminder includes scene image instructions: false
    • After fix: GM format reminder includes scene image instructions: true
    • Follow-up hardening: GM format reminder strips injected art-style syntax: true
  • Codex baseline: pnpm check passed locally.
  • Codex review gates: git diff --check passed; touched server files have no console.* matches; Bunny review pass completed before PR open and after the CodeRabbit follow-up.
  • CodeRabbit follow-up: sanitized generated artStylePrompt text to a single plain-text line before inserting it into the GM format reminder.
  • No true human-only blocker identified for the core prompt assembly claim.

Docs and release impact

  • No docs or release metadata changes needed; this is a scoped server prompt bugfix.

UI evidence (if applicable)

N/A. This is a backend prompt assembly bug verified with a focused scratch harness; no visible UI state changes.


🔄 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/962 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/17/2026 **Status:** ✅ Merged **Merged:** 5/17/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/gm-scene-image-instructions` --- ### 📝 Commits (2) - [`1f7fac0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1f7fac098656c6332401e2019c5c7f454ee1b362) Fix GM scene image instructions - [`a48e206`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a48e206000d908ff4322de2c097a7f2bc6fa28fb) Sanitize GM scene image style prompts ### 📊 Changes **2 files changed** (+25 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/generate.routes.ts` (+4 -0) 📝 `packages/server/src/services/game/gm-prompts.ts` (+21 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md Section Branches. --> ## Linked issue No linked issue yet; one should be opened before submission. ## Why this change - In GM mode without a separate scene model, scene tags are emitted by the GM format reminder, but that reminder did not receive the generated-background capability or the setup art style prompt. As a result, scene image instructions from game setup were not respected for inline GM scene image tags. ## What changed - Threaded game image generation capability and the setup `artStylePrompt` into the GM prompt context. - Added inline GM format reminder guidance for generated background tags and the visual instruction when generated backgrounds are enabled. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Codex scratch repro: `packages\server\node_modules\.bin\tsx.cmd scratch\gm-scene-image-instructions-repro.ts` - Before fix: `GM format reminder includes scene image instructions: false` - After fix: `GM format reminder includes scene image instructions: true` - Follow-up hardening: `GM format reminder strips injected art-style syntax: true` - Codex baseline: `pnpm check` passed locally. - Codex review gates: `git diff --check` passed; touched server files have no `console.*` matches; Bunny review pass completed before PR open and after the CodeRabbit follow-up. - CodeRabbit follow-up: sanitized generated `artStylePrompt` text to a single plain-text line before inserting it into the GM format reminder. - No true human-only blocker identified for the core prompt assembly claim. ## Docs and release impact - No docs or release metadata changes needed; this is a scoped server prompt bugfix. ## UI evidence (if applicable) N/A. This is a backend prompt assembly bug verified with a focused scratch harness; no visible UI state changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:13 +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#4856
No description provided.