[PR #3358] [MERGED] Fix gallery delete confirmation in chat drawer #5897

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

📋 Pull Request Information

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

Base: staging ← Head: fix/gallery-delete-persists


📝 Commits (1)

  • e46d2fa Fix gallery delete confirmation in chat drawer

📊 Changes

2 files changed (+10 additions, -2 deletions)

View changed files

📝 packages/client/src/components/chat/ChatGallery.tsx (+8 -2)
📝 packages/server/src/routes/characters.routes.ts (+2 -0)

📄 Description

Summary

Fixes chat Gallery image deletion from the floating Gallery drawer. The delete confirmation is rendered in a portal, and the drawer's outside-click handler treated that portal as outside the drawer, closing/unmounting it on pointerdown before the Delete button click could fire.

This PR marks the Gallery's portaled delete confirmation and asset browser overlays with the existing data-chat-floating-panel escape hatch so their controls remain interactive. It also restores the missing lorebooksStorage binding in characters.routes.ts, which was blocking pnpm check on current staging.

No linked issue is attached yet; per contributor guidance, one should be opened for the reported Gallery delete regression.

Verification

  • pnpm check
  • Injected backend delete proof: chat gallery DELETE removes the row and file.
  • Playwright event proof: clicking the portaled Delete button no longer closes the drawer first; the click handler fires.

Manual verification needed

  • Manually verify deleting a Gallery image from Roleplay mode removes it and it stays gone after closing/reopening Gallery.
  • Manually verify the Gallery image browser overlay still opens and closes correctly in Roleplay mode.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the character page’s embedded lorebook flow so linked lorebooks can be embedded more reliably.
    • Fixed floating panel handling for the asset browser and delete confirmation modal, helping overlays behave more consistently.

🔄 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/3358 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/8/2026 **Status:** ✅ Merged **Merged:** 7/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/gallery-delete-persists` --- ### 📝 Commits (1) - [`e46d2fa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e46d2fa7d42aad7ef5b1ce31c02dc2946a6293f3) Fix gallery delete confirmation in chat drawer ### 📊 Changes **2 files changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatGallery.tsx` (+8 -2) 📝 `packages/server/src/routes/characters.routes.ts` (+2 -0) </details> ### 📄 Description ## Summary Fixes chat Gallery image deletion from the floating Gallery drawer. The delete confirmation is rendered in a portal, and the drawer's outside-click handler treated that portal as outside the drawer, closing/unmounting it on pointerdown before the Delete button click could fire. This PR marks the Gallery's portaled delete confirmation and asset browser overlays with the existing `data-chat-floating-panel` escape hatch so their controls remain interactive. It also restores the missing `lorebooksStorage` binding in `characters.routes.ts`, which was blocking `pnpm check` on current `staging`. No linked issue is attached yet; per contributor guidance, one should be opened for the reported Gallery delete regression. ## Verification - `pnpm check` - Injected backend delete proof: chat gallery DELETE removes the row and file. - Playwright event proof: clicking the portaled Delete button no longer closes the drawer first; the click handler fires. ## Manual verification needed - [ ] Manually verify deleting a Gallery image from Roleplay mode removes it and it stays gone after closing/reopening Gallery. - [ ] Manually verify the Gallery image browser overlay still opens and closes correctly in Roleplay mode. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved the character page’s embedded lorebook flow so linked lorebooks can be embedded more reliably. * Fixed floating panel handling for the asset browser and delete confirmation modal, helping overlays behave more consistently. <!-- 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:04:56 +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#5897
No description provided.