mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7768] [MERGED] feat(chat): regenerate chat images with an editable final prompt #7920
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7920
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7768
Author: @ylli-selmani
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ylli-selmani
Base:
staging← Head:feat/image-regenerate📝 Commits (10+)
6d39134feat(gallery): save the request each chat image was rendered from82a613achore(generate): import the gallery record builder outside line 1d30447ffeat(gallery): regenerate a chat image from its saved request00bbecatest(regressions): widen the selfie gallery proximity windowf923b78feat(chat): regenerate an image from the lightbox with an editable prompt42362fdfix(chat): keep use-chats out of the e2e type graph; space connection labelsf648cd9fix(gallery): atomic attachment swap, chat-scoped keyframes, sibling refresh0d389abfix(gallery): record game references, conversation selfie connection fallback93fe4e4fix(gallery): find images on inactive swipes; record the sent reference's ownerb0e756afix(gallery): update every message showing the image; replay the persona's sprite📊 Changes
24 files changed (+1537 additions, -24 deletions)
View changed files
📝
packages/client/src/components/chat/ChatGallery.tsx(+3 -1)📝
packages/client/src/components/chat/ChatImageLightbox.tsx(+58 -12)📝
packages/client/src/components/chat/ChatMessage.tsx(+8 -0)📝
packages/client/src/components/chat/ConversationMessage.tsx(+28 -2)📝
packages/client/src/components/chat/ConversationMessageShared.tsx(+6 -3)➕
packages/client/src/components/chat/ImageRegeneratePanel.tsx(+241 -0)📝
packages/client/src/hooks/use-gallery.ts(+14 -2)➕
packages/client/src/hooks/use-regenerate-chat-image.ts(+29 -0)📝
packages/client/src/localization/locales/en.json(+10 -0)📝
packages/server/src/db/schema/gallery.ts(+2 -0)📝
packages/server/src/routes/gallery.routes.ts(+288 -0)📝
packages/server/src/routes/game.routes.ts(+86 -2)📝
packages/server/src/routes/generate.routes.ts(+12 -0)📝
packages/server/src/routes/generate/retry-agents-route.ts(+10 -0)📝
packages/server/src/services/generation/conversation-selfie-command-runtime.ts(+9 -1)📝
packages/server/src/services/image/illustrator-references.ts(+65 -0)📝
packages/server/src/services/image/spatial-location-reference.ts(+11 -0)📝
packages/server/src/services/storage/chats.storage.ts(+48 -0)📝
packages/server/src/services/storage/gallery.storage.ts(+3 -0)📝
packages/server/src/services/storage/game-storyboards.storage.ts(+15 -0)...and 4 more files
📄 Description
Linked issue
Closes #7767
Why this change
|, other providers appendName: promptlines), so editing it would send the character prompts twice.#1573 asked for this before and was closed by #1743, which targeted the old
refactorbranch and never reached the app.What changed
Not in this PR: character prompts in the "review image prompts before sending" modal stay read-only. Making them editable there changes the review round trip for every image kind.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
chat-image-generation-record: record builder and parser edge cases, a round trip through the real gallery table (including an old row with no record), references re-read from current avatars, and the regenerate route end to end against a fake provider. The route checks cover an edited prompt, character prompts sent exactly once, the kept negative prompt, the message and swipe row swap, an old image, a missing connection, an unknown image and an empty prompt.open-issues: one proximity window in a source-text check widened from 4500 to 5000 characters. It checks that two anchors in the selfie runtime stay close together. Staging was already at 4442, and the new generation-record block between them makes the gap 4769. The wiring it checks is unchanged.nai-diffusion-5-full): native character captions appear as their own boxes and re-roll correctly.bg-neutral-950/95, but that is the exact background of the Prompt panel the editor replaces.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)chat_imagesgets a nullablegenerationcolumn. Likesource_chat_image_id, a nullable field needs no storage-format bump, and older rows read it as null.UI evidence (if applicable)
🤖 Generated with Claude Code
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.