[GH-ISSUE #5401] [Issue]: Chat Summaries Popover always closes when tapping anywhere on the Summary Deletion Confirmation Prompt #2993

Closed
opened 2026-10-21 05:58:39 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ylli-selmani on GitHub (Aug 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5401

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Whenever you currently tap anywhere on the the confirmation popup that appears when wanting to delete a summary, the Chat Summaries window/popover closes. This suggests the popup isn't 'protected' from the 'close on outside' interaction, despite being ChatSummaries/SummaryPopover being its 'parent'.

Expected behavior

Whether you delete a summary, cancel the Deletion, or just tap the popup anywhere else, the Chat Summaries window behind it should stay open for further editing.

And tapping outside of the Confirmation Pop-Up should only close the popup itself, still leaving the Chat Summaries window open.

Actual behavior

Clicking on the summary deletion pop-up closes the chat summaries window behind it, forcing the user to repeatedly open the chat summaries window, if they want to further edit their summaries. This happens whether you press Cancel, Delete or anywhere on the popup.

Steps to reproduce

  1. Click on 'Chat Summaries' inside a Chat.
  2. Press the 'Trash' icon - Delete a summary button.
  3. Hit Cancel, Delete, or tap anywhere else inside the confirmation pop-up.
  4. Observe that the Chat Summaries window behind it closes.

Environment

Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4+a21321a94143
Commit: a21321a941
Server OS: Windows 10.0.26200 (x64)
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0

Logs, screenshots, or video

Current behaviour:

https://github.com/user-attachments/assets/1514d00e-26e6-4a4f-8f43-401a23eafc17

My personal fix makes it behave like this:

https://github.com/user-attachments/assets/eb9b6477-088f-41cd-aa6c-26c8872bcefb

Additional context

I've fixed it for myself with three extra lines, all inside SummaryPopver.tsx

import { useUIStore } from "../../stores/ui.store";
+ import { useDialogStore } from "../../stores/dialog.store";**
import { useConnections } from "../../hooks/use-connections";
  const eventTargetsPanel = useCallback((event: Event) => {
    const panel = panelRef.current;
    if (!panel) return false;
    const path = typeof event.composedPath === "function" ? event.composedPath() : [];
    if (path.includes(panel)) return true;
    if (event.target instanceof Element && event.target.closest("[data-macro-modal]")) return true;
+    if (event.target instanceof Element && event.target.closest("[data-chat-floating-panel]")) return true;**
    return event.target instanceof Node && panel.contains(event.target);
  }, []);
  const handleClose = useCallback(async () => {
    if (document.querySelector("[data-macro-modal]")) return;
+    if (useDialogStore.getState().dialog) return; // a confirm/alert/prompt/choice dialog is open**
    if (await commitCombinePromptDraft()) onClose();
  }, [commitCombinePromptDraft, onClose]);

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • [] I DID NOT read this template and provide the requested details.
Originally created by @ylli-selmani on GitHub (Aug 22, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5401 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Whenever you currently tap anywhere on the the confirmation popup that appears when wanting to delete a summary, the Chat Summaries window/popover closes. This suggests the popup isn't 'protected' from the 'close on outside' interaction, despite being ChatSummaries/SummaryPopover being its 'parent'. ## Expected behavior Whether you delete a summary, cancel the Deletion, or just tap the popup anywhere else, the Chat Summaries window behind it should stay open for further editing. And tapping outside of the Confirmation Pop-Up should only close the popup itself, still leaving the Chat Summaries window open. ## Actual behavior Clicking on the summary deletion pop-up closes the chat summaries window behind it, forcing the user to repeatedly open the chat summaries window, if they want to further edit their summaries. This happens whether you press Cancel, Delete or anywhere on the popup. ## Steps to reproduce 1. Click on 'Chat Summaries' inside a Chat. 2. Press the 'Trash' icon - Delete a summary button. 3. Hit Cancel, Delete, or tap anywhere else inside the confirmation pop-up. 4. Observe that the Chat Summaries window behind it closes. ## Environment Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4+a21321a94143 Commit: a21321a94143 Server OS: Windows 10.0.26200 (x64) Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0 ## Logs, screenshots, or video Current behaviour: https://github.com/user-attachments/assets/1514d00e-26e6-4a4f-8f43-401a23eafc17 My personal fix makes it behave like this: https://github.com/user-attachments/assets/eb9b6477-088f-41cd-aa6c-26c8872bcefb ## Additional context I've fixed it for myself with three extra lines, all inside SummaryPopver.tsx ``` import { useUIStore } from "../../stores/ui.store"; + import { useDialogStore } from "../../stores/dialog.store";** import { useConnections } from "../../hooks/use-connections"; ``` ``` const eventTargetsPanel = useCallback((event: Event) => { const panel = panelRef.current; if (!panel) return false; const path = typeof event.composedPath === "function" ? event.composedPath() : []; if (path.includes(panel)) return true; if (event.target instanceof Element && event.target.closest("[data-macro-modal]")) return true; + if (event.target instanceof Element && event.target.closest("[data-chat-floating-panel]")) return true;** return event.target instanceof Node && panel.contains(event.target); }, []); ``` ``` const handleClose = useCallback(async () => { if (document.querySelector("[data-macro-modal]")) return; + if (useDialogStore.getState().dialog) return; // a confirm/alert/prompt/choice dialog is open** if (await commitCombinePromptDraft()) onClose(); }, [commitCombinePromptDraft, onClose]); ``` ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:58:39 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 22, 2026):

Thanks, pookie!

<!-- gh-comment-id:5381945517 --> @SpicyMarinara commented on GitHub (Aug 22, 2026): Thanks, pookie!
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#2993
No description provided.