[PR #4205] [MERGED] Smooth Roleplay deletion and preserve Illustrator prompt modes #6280

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

📋 Pull Request Information

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

Base: staging ← Head: fix/firefox-roleplay-held-delete


📝 Commits (2)

  • 14e2d58 Smooth held deletion and preserve Illustrator prompt modes
  • 26176ae Address CodeRabbit review feedback

📊 Changes

13 files changed (+665 additions, -58 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+93 -0)
📝 packages/client/src/components/chat/ChatInput.tsx (+102 -22)
📝 packages/server/src/routes/gallery.routes.ts (+1 -0)
📝 packages/server/src/routes/generate.routes.ts (+21 -0)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+43 -25)
📝 packages/server/src/services/agents/agent-executor.ts (+27 -4)
📝 packages/server/src/services/game/game-asset-generation.ts (+5 -0)
📝 packages/server/src/services/generation/conversation-selfie-command-runtime.ts (+1 -0)
📝 packages/server/src/services/generation/illustrator-background-generation.ts (+28 -0)
📝 packages/server/src/services/generation/illustrator-manual-prompt-generation.ts (+101 -3)
📝 packages/server/src/services/image/illustrator-references.ts (+47 -3)
📝 packages/shared/src/utils/image-prompt-compiler.ts (+8 -1)
📝 scripts/regressions/prompt.regression.ts (+188 -0)

📄 Description

Why

This is a follow-up to #4188. Roleplay typing became substantially smoother, but holding Backspace in Firefox on macOS could still hitch in a repeating delete–pause cadence. Illustrator could also lose a selected Comic Page or manga format when Image Style guidance and generic illustration composition tags were applied independently.

Root cause

  • Held deletion still allowed debounced draft persistence and forced textarea autosizing to wake while the physical delete key remained down.
  • Illustrator prompt-mode instructions and Image Style instructions were assembled at different stages. Generic profile subject tags such as “single scene” or “visual novel CG,” plus blanket text negative tags, could contradict a selected multi-panel prompt.
  • Manual Gallery illustration prompt writing did not include the selected Illustrator prompt template, so a Comic Page selection could fall back to one coherent scene.

What changed

  • Defer Roleplay draft persistence and textarea autosizing until Backspace/Delete is released, while retaining the latest draft and resizing once afterward.
  • Avoid ordinary-input slash-completion state work and full-string whitespace allocation on the hot path.
  • Send the selected Illustrator prompt template and resolved Image Style instruction in the same prompt-writer request.
  • Make prompt mode authoritative for format, layout, framing, subjects, and text behavior; Image Style controls visual treatment only.
  • Withhold generic per-kind composition tags when a dedicated Illustrator prompt owns composition.
  • Remove generated blanket text bans when the selected prompt explicitly requests comic/manga lettering, while preserving authored negatives such as “unreadable text.”
  • Apply the same compatibility contract to automatic runs, manual Gallery illustration/background generation, retry flows, and selfie prompt-writer paths.

Validation

  • pnpm check
  • pnpm regression:prompt
  • pnpm exec playwright test e2e/core-flows.e2e.ts --project=desktop-chromium --grep "held Roleplay deletion"

The full lint gate retains one pre-existing react-hooks/exhaustive-deps warning in NoodleHome.tsx; there are no lint errors.

Manual verification

  • On Firefox desktop/macOS, hold Backspace in a long Roleplay draft and verify deletion remains continuous without periodic stalls.
  • Release Backspace, reload or switch chats, and verify the final shortened draft persisted.
  • Select Illustrator → Comic Page with Image Style → Auto, run Illustrator automatically in chat, and verify the provider prompt remains explicitly multi-panel.
  • Use Gallery → Illustrate with Comic Page selected and verify it generates a comic page without asking whether to generate.
  • Spot-check another explicit style profile (for example Anime or Photorealistic) and verify it changes rendering without collapsing the selected prompt format.

Summary by CodeRabbit

  • Improvements
    • Roleplay draft deletion now feels smoother while holding Backspace or Delete, with autosizing and draft saving updating after the key is released.
    • Illustrator image generation better preserves selected layouts and prompt styles, including comic and multi-panel formats.
    • Image prompts now handle profile subjects and style instructions more accurately across illustrations, selfies, and backgrounds.
    • Negative prompts are better combined and filtered, improving results when images request lettering or other rendered text.

🔄 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/4205 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/firefox-roleplay-held-delete` --- ### 📝 Commits (2) - [`14e2d58`](https://github.com/Pasta-Devs/Marinara-Engine/commit/14e2d584d54b32b7570d3442b5cb6de75833c369) Smooth held deletion and preserve Illustrator prompt modes - [`26176ae`](https://github.com/Pasta-Devs/Marinara-Engine/commit/26176ae580b3f84c48c0464711c0ee930674250b) Address CodeRabbit review feedback ### 📊 Changes **13 files changed** (+665 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+93 -0) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+102 -22) 📝 `packages/server/src/routes/gallery.routes.ts` (+1 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+21 -0) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+43 -25) 📝 `packages/server/src/services/agents/agent-executor.ts` (+27 -4) 📝 `packages/server/src/services/game/game-asset-generation.ts` (+5 -0) 📝 `packages/server/src/services/generation/conversation-selfie-command-runtime.ts` (+1 -0) 📝 `packages/server/src/services/generation/illustrator-background-generation.ts` (+28 -0) 📝 `packages/server/src/services/generation/illustrator-manual-prompt-generation.ts` (+101 -3) 📝 `packages/server/src/services/image/illustrator-references.ts` (+47 -3) 📝 `packages/shared/src/utils/image-prompt-compiler.ts` (+8 -1) 📝 `scripts/regressions/prompt.regression.ts` (+188 -0) </details> ### 📄 Description ## Why This is a follow-up to #4188. Roleplay typing became substantially smoother, but holding Backspace in Firefox on macOS could still hitch in a repeating delete–pause cadence. Illustrator could also lose a selected Comic Page or manga format when Image Style guidance and generic illustration composition tags were applied independently. ## Root cause - Held deletion still allowed debounced draft persistence and forced textarea autosizing to wake while the physical delete key remained down. - Illustrator prompt-mode instructions and Image Style instructions were assembled at different stages. Generic profile subject tags such as “single scene” or “visual novel CG,” plus blanket `text` negative tags, could contradict a selected multi-panel prompt. - Manual Gallery illustration prompt writing did not include the selected Illustrator prompt template, so a Comic Page selection could fall back to one coherent scene. ## What changed - Defer Roleplay draft persistence and textarea autosizing until Backspace/Delete is released, while retaining the latest draft and resizing once afterward. - Avoid ordinary-input slash-completion state work and full-string whitespace allocation on the hot path. - Send the selected Illustrator prompt template and resolved Image Style instruction in the same prompt-writer request. - Make prompt mode authoritative for format, layout, framing, subjects, and text behavior; Image Style controls visual treatment only. - Withhold generic per-kind composition tags when a dedicated Illustrator prompt owns composition. - Remove generated blanket text bans when the selected prompt explicitly requests comic/manga lettering, while preserving authored negatives such as “unreadable text.” - Apply the same compatibility contract to automatic runs, manual Gallery illustration/background generation, retry flows, and selfie prompt-writer paths. ## Validation - `pnpm check` - `pnpm regression:prompt` - `pnpm exec playwright test e2e/core-flows.e2e.ts --project=desktop-chromium --grep "held Roleplay deletion"` The full lint gate retains one pre-existing `react-hooks/exhaustive-deps` warning in `NoodleHome.tsx`; there are no lint errors. ## Manual verification - [ ] On Firefox desktop/macOS, hold Backspace in a long Roleplay draft and verify deletion remains continuous without periodic stalls. - [ ] Release Backspace, reload or switch chats, and verify the final shortened draft persisted. - [ ] Select Illustrator → Comic Page with Image Style → Auto, run Illustrator automatically in chat, and verify the provider prompt remains explicitly multi-panel. - [ ] Use Gallery → Illustrate with Comic Page selected and verify it generates a comic page without asking whether to generate. - [ ] Spot-check another explicit style profile (for example Anime or Photorealistic) and verify it changes rendering without collapsing the selected prompt format. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Improvements** - Roleplay draft deletion now feels smoother while holding Backspace or Delete, with autosizing and draft saving updating after the key is released. - Illustrator image generation better preserves selected layouts and prompt styles, including comic and multi-panel formats. - Image prompts now handle profile subjects and style instructions more accurately across illustrations, selfies, and backgrounds. - Negative prompts are better combined and filtered, improving results when images request lettering or other rendered text. <!-- 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:08:54 +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#6280
No description provided.