[PR #4477] [MERGED] fix(ui): keep Roleplay context overlays in front #6396

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

📋 Pull Request Information

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

Base: staging ← Head: fix/4476-roleplay-overlay-depth


📝 Commits (6)

  • c1a4b41 fix(ui): raise roleplay context overlays
  • c02b056 Merge branch 'staging' into fix/4476-roleplay-overlay-depth
  • 6843bd0 test(ui): prove roleplay overlays escape toolbar
  • ec44413 Merge remote-tracking branch 'origin/fix/4476-roleplay-overlay-depth' into fix/4476-roleplay-overlay-depth
  • 88e23a2 Merge remote-tracking branch 'origin/staging' into fix/4476-roleplay-overlay-depth
  • a4b1d93 fix(ui): refine active context anchoring

📊 Changes

4 files changed (+79 additions, -38 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+6 -0)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+33 -23)
📝 packages/client/src/components/chat/SummaryPopover.tsx (+23 -15)
📝 scripts/regressions/roleplay-streaming.regression.ts (+17 -0)

📄 Description

Important

This PR is AI-assisted. Validation and test-plan checkboxes are intentionally left for a human contributor to confirm.

Linked issue

Closes #4476

Why

In Roleplay mode, Chat Summary and Active Context were rendered inside the toolbar's stacking context on desktop. Their local z-index could not escape that context, so independent floating surfaces such as Echo Chamber stream chat and the Trackers panel could paint above them.

What changed

  • Portal the desktop Chat Summary panel to document.body and position it from its toolbar anchor.
  • Portal the desktop Active Context panel to document.body using the shared floating-panel anchor helpers.
  • Keep the existing mobile portal behavior while giving both panels the same top overlay layer used by Branches.
  • Add source and browser regression assertions that prevent either desktop panel from returning to toolbar-local absolute positioning.

Validation

  • Run pnpm check.
  • Run pnpm regression:roleplay.
  • Run pnpm smoke:ui.
  • Manually verify Chat Summary opens above Echo Chamber stream chat in Roleplay mode.
  • Manually verify Active Context opens above the Trackers panel in Roleplay mode.
  • Manually verify both panels remain correctly positioned on desktop and mobile viewport sizes.

Manual verification notes

  • pnpm check passed locally for the overlay implementation.
  • pnpm regression:roleplay passed on the final branch head after syncing current staging.
  • Focused Playwright proof passed for desktop and mobile Active Context and desktop Chat Summary (3 passed, 1 expected mobile-only skip). The tests assert each open panel is a direct child of document.body with computed position: fixed and z-index: 9999.
  • The full UI smoke suite was attempted, but the host ran out of disk space in Playwright's disposable cache after 83 tests passed. The focused overlay tests were rerun cleanly after freeing the temporary worktree.
  • The in-app browser controller could not attach because its bundled runtime failed during initialization, so no separate manual screenshot is claimed.

Docs and release impact

  • Confirm no documentation update is needed for this stacking-order bugfix.
  • Confirm no release metadata changes are needed.

UI evidence

Automated desktop/mobile browser assertions are included in e2e/core-flows.e2e.ts; the focused run passed locally.


🔄 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/4477 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/2/2026 **Status:** ✅ Merged **Merged:** 8/2/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/4476-roleplay-overlay-depth` --- ### 📝 Commits (6) - [`c1a4b41`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c1a4b417798b3281725d7726afb7b399428cb2cf) fix(ui): raise roleplay context overlays - [`c02b056`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c02b0566128c3d248e7f1de9d7760efb58e07c57) Merge branch 'staging' into fix/4476-roleplay-overlay-depth - [`6843bd0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6843bd027cf84d7e3df1da9ba9dc57e7146f8fed) test(ui): prove roleplay overlays escape toolbar - [`ec44413`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ec444132bf93d47219b011845d094909a0e82a5c) Merge remote-tracking branch 'origin/fix/4476-roleplay-overlay-depth' into fix/4476-roleplay-overlay-depth - [`88e23a2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/88e23a20650999f81c6f64948d7a0a7e9e0eb4a4) Merge remote-tracking branch 'origin/staging' into fix/4476-roleplay-overlay-depth - [`a4b1d93`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a4b1d936da06eb7999d09faa6734c5f3a7859c50) fix(ui): refine active context anchoring ### 📊 Changes **4 files changed** (+79 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+6 -0) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+33 -23) 📝 `packages/client/src/components/chat/SummaryPopover.tsx` (+23 -15) 📝 `scripts/regressions/roleplay-streaming.regression.ts` (+17 -0) </details> ### 📄 Description > [!IMPORTANT] > This PR is AI-assisted. Validation and test-plan checkboxes are intentionally left for a human contributor to confirm. ## Linked issue Closes #4476 ## Why In Roleplay mode, Chat Summary and Active Context were rendered inside the toolbar's stacking context on desktop. Their local z-index could not escape that context, so independent floating surfaces such as Echo Chamber stream chat and the Trackers panel could paint above them. ## What changed - Portal the desktop Chat Summary panel to `document.body` and position it from its toolbar anchor. - Portal the desktop Active Context panel to `document.body` using the shared floating-panel anchor helpers. - Keep the existing mobile portal behavior while giving both panels the same top overlay layer used by Branches. - Add source and browser regression assertions that prevent either desktop panel from returning to toolbar-local absolute positioning. ## Validation - [ ] Run `pnpm check`. - [ ] Run `pnpm regression:roleplay`. - [ ] Run `pnpm smoke:ui`. - [ ] Manually verify Chat Summary opens above Echo Chamber stream chat in Roleplay mode. - [ ] Manually verify Active Context opens above the Trackers panel in Roleplay mode. - [ ] Manually verify both panels remain correctly positioned on desktop and mobile viewport sizes. ### Manual verification notes - `pnpm check` passed locally for the overlay implementation. - `pnpm regression:roleplay` passed on the final branch head after syncing current `staging`. - Focused Playwright proof passed for desktop and mobile Active Context and desktop Chat Summary (3 passed, 1 expected mobile-only skip). The tests assert each open panel is a direct child of `document.body` with computed `position: fixed` and `z-index: 9999`. - The full UI smoke suite was attempted, but the host ran out of disk space in Playwright's disposable cache after 83 tests passed. The focused overlay tests were rerun cleanly after freeing the temporary worktree. - The in-app browser controller could not attach because its bundled runtime failed during initialization, so no separate manual screenshot is claimed. ## Docs and release impact - [ ] Confirm no documentation update is needed for this stacking-order bugfix. - [ ] Confirm no release metadata changes are needed. ## UI evidence Automated desktop/mobile browser assertions are included in `e2e/core-flows.e2e.ts`; the focused run passed locally. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:10:02 +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#6396
No description provided.