[PR #483] [MERGED] Show image generation prompt in lightbox #4636

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/483
Author: @Xelvanis
Created: 5/6/2026
Status: ✅ Merged
Merged: 5/6/2026
Merged by: @Xelvanis

Base: main ← Head: fix/gallery-prompt-lightbox


📝 Commits (1)

  • 2d6fcfc Show image generation prompt in lightbox

📊 Changes

7 files changed (+186 additions, -71 deletions)

View changed files

📝 packages/client/src/components/chat/ChatGallery.tsx (+58 -37)
📝 packages/client/src/components/chat/ChatMessage.tsx (+54 -24)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+23 -9)
➕ packages/client/src/components/chat/ImagePromptPanel.tsx (+37 -0)
📝 packages/server/src/routes/generate.routes.ts (+4 -0)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+3 -0)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+7 -1)

📄 Description

Add prompt and metadata display to image lightboxes across ChatGallery, ChatMessage, and ConversationMessage. Persist prompt and galleryId on image attachments from server routes so the prompt is available at view time.

Linked issue

Closes #475

Why this change

  • Generated images already store their prompts in the gallery, but opening an image from a chat message/lightbox did not show the prompt that produced it. This makes it harder to inspect, reuse, or debug image generations after the fact.

What changed

  • Store generated illustration/selfie prompt metadata on chat image attachments.
  • Include gallery IDs on generated image attachments so the attachment can stay linked to its gallery entry.
  • Add a reusable ImagePromptPanel component for lightbox prompt display.
  • Show prompt metadata in gallery, roleplay message, and conversation message image lightboxes.
  • Preserve existing behavior for images that do not have prompt metadata.

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

  • nah, it'll be fine

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

marinara-issue-475-gallery-prompt

Summary by CodeRabbit

Release Notes

New Features

  • Enhanced image lightbox with fullscreen modal overlay and new controls (pin, download, close)
  • Added image metadata and generation prompt display alongside expanded images
  • Improved context visibility when viewing generated images with associated prompt information

🔄 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/483 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/6/2026 **Status:** ✅ Merged **Merged:** 5/6/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `main` ← **Head:** `fix/gallery-prompt-lightbox` --- ### 📝 Commits (1) - [`2d6fcfc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2d6fcfc0487a7342341a8e5b1eab561f0c52daa2) Show image generation prompt in lightbox ### 📊 Changes **7 files changed** (+186 additions, -71 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatGallery.tsx` (+58 -37) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+54 -24) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+23 -9) ➕ `packages/client/src/components/chat/ImagePromptPanel.tsx` (+37 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+4 -0) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+3 -0) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+7 -1) </details> ### 📄 Description Add prompt and metadata display to image lightboxes across ChatGallery, ChatMessage, and ConversationMessage. Persist prompt and galleryId on image attachments from server routes so the prompt is available at view time. ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #475 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Generated images already store their prompts in the gallery, but opening an image from a chat message/lightbox did not show the prompt that produced it. This makes it harder to inspect, reuse, or debug image generations after the fact. ## What changed <!-- List the key changes in this PR --> - Store generated illustration/selfie prompt metadata on chat image attachments. - Include gallery IDs on generated image attachments so the attachment can stay linked to its gallery entry. - Add a reusable `ImagePromptPanel` component for lightbox prompt display. - Show prompt metadata in gallery, roleplay message, and conversation message image lightboxes. - Preserve existing behavior for images that do not have prompt metadata. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [X] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [X] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [X] Above manual verification completed (describe below) - [X] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - nah, it'll be fine ## Docs and release impact - [X] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <img width="1264" height="805" alt="marinara-issue-475-gallery-prompt" src="https://github.com/user-attachments/assets/ad3f0afc-4fb3-486d-8b16-36f71f828e0c" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes **New Features** * Enhanced image lightbox with fullscreen modal overlay and new controls (pin, download, close) * Added image metadata and generation prompt display alongside expanded images * Improved context visibility when viewing generated images with associated prompt information <!-- 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-22 04:09:22 +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#4636
No description provided.