[GH-ISSUE #5267] [Issue]: Macro modals open behind floating panels at narrow viewports #2916

Closed
opened 2026-10-21 05:57:58 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Aug 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5267

Originally assigned to: @SpicyMarinara on GitHub.

Summary

At viewports 767px wide or narrower, the expanded macro editor and macro reference modal render behind high-z-index floating panels, making the modals unusable. This is confirmed with the author's notes panel and may also affect the summary popover.

Expected behavior

Expanded macro editors and macro reference modals should render above the author's notes panel and other floating panels at all viewport widths.

Actual behavior

At narrow viewports, the macro modals open underneath the author's notes panel because the panel uses z-index 9999 while the macro modals use z-index 140 or 145. Wide viewports are unaffected because the desktop author's notes panel uses z-index 70.

Steps to reproduce

  1. Open a roleplay chat and set the viewport width to 767px or narrower.
  2. Open the author's notes panel from the chat toolbar.
  3. Click the expand button on a macro textarea or click the macro reference button.
  4. Observe that the expanded editor or macro reference modal opens behind the author's notes panel and cannot be used.

Environment

  • Marinara Engine version: 2.4.3 (build 2.4.3+34442e26da57, commit 34442e26da)
  • Install type: Windows local install and self-hosted Docker
  • OS + version: Server: Windows 10.0.19045 x64 and Linux 6.8.0-137-generic x64; client: Windows 10.0. Also reproduced on Android.
  • Browser or app shell: Whale 4.39.410.14 using Chrome 150.0.0.0 engine on Windows; also reproduced on Samsung Internet 30.0.0.67 on Android

Logs, screenshots, or video

Screenshot: https://cdn.discordapp.com/attachments/1539645650478571590/1539645650868772864/image.png?ex=6a871240&is=6a85c0c0&hm=1cd6ec7745d45f24f3790d1f73b7d0663df72d8eed8153eb2ce09ed79497eb0e&

Additional context

The narrow layout is selected by matchMedia("(max-width: 767px)") in ChatRoleplaySurface.tsx:184. The mobile author's notes panel uses z-[9999] at ChatRoleplaySurface.tsx:1051, while the desktop panel uses z-[70] at line 1085. ExpandedMacroEditor and MacrosReferenceModal use z-[140] and z-[145] at MacroTextarea.tsx:133 and :207. SummaryPopover.tsx:1316 also uses z-[9999] and hosts a MacroTextarea, so the conflict may affect that panel as well. Both macro modals portal to document.body. The issue was reproduced with the reporter's personal extension disabled. Current workaround: [data-macro-modal="true"] { z-index: 10050 !important; }.

Discord thread: Macro editor opens behind the author's notes panel at narrow viewports
Discord thread link: https://discord.com/channels/1417099416812392641/1539645650478571590
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-08-19T14:42:08.307Z] Lattete: Marinara Engine diagnostics
Version: 2.4.3
Build: 2.4.3+34442e26da57
Commit: 34442e26da57
Server OS: Windows 10.0.19045 (x64) + Linux 6.8.0-137-generic (x64)
  └ Windows local install + self-hosted Docker
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Whale/4.39.410.14 Safari/537.36
GPU: ANGLE (NVIDIA, NVIDIA GeForce GTX 1050 (0x00001C81) Direct3D11 vs_5_0 ps_5_0, D3D11)

**Macro modals render behind the author's notes panel at narrow viewports**

Repro (Roleplay chat, viewport ≤767px)
1. Open the author's notes panel from the chat toolbar
2. Click the expand button on a macro textarea, or the macro reference button
3. The expanded editor / macro reference opens *underneath* the panel, unusable

Not device/browser-specific: the mobile branch is chosen by `matchMedia("(max-width: 767px)")` alone — ChatRoleplaySurface.tsx:184. Hit on Samsung Internet 30.0.0.67 (Android), and confirmed on desktop Whale just by narrowing the window.

Cause — plain z-index ordering (both modals `createPortal` to `document.body`):
• mobile author's notes panel `z-[9999]` — ChatRoleplaySurface.tsx:1051
• desktop author's notes panel `z-[70]` — same file, :1085
• ExpandedMacroEditor `z-[140]` / MacrosReferenceModal `z-[145]` — MacroTextarea.tsx:133 / :207

Wide is fine (70 < 140); narrow inverts it (9999 > 145).

**Not limited to the author's notes** — SummaryPopover.tsx:1316 is also `z-[9999]` and hosts a MacroTextarea, so it should behave the same. The real conflict is `z-[9999]` floating panels vs `z-[140/145]` macro modals; worth fixing as a class.

Core, not an extension — reproduced with my personal extension disabled. Values above are from 2.4.3 source; masked on my install by the workaround below.

Workaround I'm using: `[data-macro-modal="true"] { z-index: 10050 !important; }` in an extension's CSS field.

[attached image 1: https://cdn.discordapp.com/attachments/1539645650478571590/1539645650868772864/image.png?ex=6a871240&is=6a85c0c0&hm=1cd6ec7745d45f24f3790d1f73b7d0663df72d8eed8153eb2ce09ed79497eb0e&]
[Discord message: https://discord.com/channels/1417099416812392641/1539645650478571590/1539645650478571590]

[2026-08-19T14:42:09.291Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1539645650478571590/1539645654606028992]

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 @SpicyMarinara on GitHub (Aug 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5267 Originally assigned to: @SpicyMarinara on GitHub. ## Summary At viewports 767px wide or narrower, the expanded macro editor and macro reference modal render behind high-z-index floating panels, making the modals unusable. This is confirmed with the author's notes panel and may also affect the summary popover. ## Expected behavior Expanded macro editors and macro reference modals should render above the author's notes panel and other floating panels at all viewport widths. ## Actual behavior At narrow viewports, the macro modals open underneath the author's notes panel because the panel uses z-index 9999 while the macro modals use z-index 140 or 145. Wide viewports are unaffected because the desktop author's notes panel uses z-index 70. ## Steps to reproduce 1. Open a roleplay chat and set the viewport width to 767px or narrower. 2. Open the author's notes panel from the chat toolbar. 3. Click the expand button on a macro textarea or click the macro reference button. 4. Observe that the expanded editor or macro reference modal opens behind the author's notes panel and cannot be used. ## Environment - Marinara Engine version: 2.4.3 (build 2.4.3+34442e26da57, commit 34442e26da57) - Install type: Windows local install and self-hosted Docker - OS + version: Server: Windows 10.0.19045 x64 and Linux 6.8.0-137-generic x64; client: Windows 10.0. Also reproduced on Android. - Browser or app shell: Whale 4.39.410.14 using Chrome 150.0.0.0 engine on Windows; also reproduced on Samsung Internet 30.0.0.67 on Android ## Logs, screenshots, or video Screenshot: https://cdn.discordapp.com/attachments/1539645650478571590/1539645650868772864/image.png?ex=6a871240&is=6a85c0c0&hm=1cd6ec7745d45f24f3790d1f73b7d0663df72d8eed8153eb2ce09ed79497eb0e& ## Additional context The narrow layout is selected by matchMedia("(max-width: 767px)") in ChatRoleplaySurface.tsx:184. The mobile author's notes panel uses z-[9999] at ChatRoleplaySurface.tsx:1051, while the desktop panel uses z-[70] at line 1085. ExpandedMacroEditor and MacrosReferenceModal use z-[140] and z-[145] at MacroTextarea.tsx:133 and :207. SummaryPopover.tsx:1316 also uses z-[9999] and hosts a MacroTextarea, so the conflict may affect that panel as well. Both macro modals portal to document.body. The issue was reproduced with the reporter's personal extension disabled. Current workaround: [data-macro-modal="true"] { z-index: 10050 !important; }. Discord thread: Macro editor opens behind the author's notes panel at narrow viewports Discord thread link: https://discord.com/channels/1417099416812392641/1539645650478571590 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-08-19T14:42:08.307Z] Lattete: Marinara Engine diagnostics Version: 2.4.3 Build: 2.4.3+34442e26da57 Commit: 34442e26da57 Server OS: Windows 10.0.19045 (x64) + Linux 6.8.0-137-generic (x64) └ Windows local install + self-hosted Docker Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Whale/4.39.410.14 Safari/537.36 GPU: ANGLE (NVIDIA, NVIDIA GeForce GTX 1050 (0x00001C81) Direct3D11 vs_5_0 ps_5_0, D3D11) **Macro modals render behind the author's notes panel at narrow viewports** Repro (Roleplay chat, viewport ≤767px) 1. Open the author's notes panel from the chat toolbar 2. Click the expand button on a macro textarea, or the macro reference button 3. The expanded editor / macro reference opens *underneath* the panel, unusable Not device/browser-specific: the mobile branch is chosen by `matchMedia("(max-width: 767px)")` alone — ChatRoleplaySurface.tsx:184. Hit on Samsung Internet 30.0.0.67 (Android), and confirmed on desktop Whale just by narrowing the window. Cause — plain z-index ordering (both modals `createPortal` to `document.body`): • mobile author's notes panel `z-[9999]` — ChatRoleplaySurface.tsx:1051 • desktop author's notes panel `z-[70]` — same file, :1085 • ExpandedMacroEditor `z-[140]` / MacrosReferenceModal `z-[145]` — MacroTextarea.tsx:133 / :207 Wide is fine (70 < 140); narrow inverts it (9999 > 145). **Not limited to the author's notes** — SummaryPopover.tsx:1316 is also `z-[9999]` and hosts a MacroTextarea, so it should behave the same. The real conflict is `z-[9999]` floating panels vs `z-[140/145]` macro modals; worth fixing as a class. Core, not an extension — reproduced with my personal extension disabled. Values above are from 2.4.3 source; masked on my install by the workaround below. Workaround I'm using: `[data-macro-modal="true"] { z-index: 10050 !important; }` in an extension's CSS field. [attached image 1: https://cdn.discordapp.com/attachments/1539645650478571590/1539645650868772864/image.png?ex=6a871240&is=6a85c0c0&hm=1cd6ec7745d45f24f3790d1f73b7d0663df72d8eed8153eb2ce09ed79497eb0e&] [Discord message: https://discord.com/channels/1417099416812392641/1539645650478571590/1539645650478571590] [2026-08-19T14:42:09.291Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1539645650478571590/1539645654606028992] ``` </details> ## 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:57:58 +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#2916
No description provided.