[PR #3895] [MERGED] fix: hide empty Roleplay background layers #6145

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

📋 Pull Request Information

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

Base: staging ← Head: fix/3894-empty-roleplay-background


📝 Commits (2)

  • 84bda76 fix: hide empty roleplay background layers
  • 024ae22 test: cover empty roleplay backgrounds

📊 Changes

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

View changed files

📝 e2e/core-flows.e2e.ts (+11 -0)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+2 -2)

📄 Description

Linked issue

Closes #3894

Why this change

Roleplay chats without a selected background still mount both image layers used for crossfading. When the active layer has no source, Chromium can paint its native broken-image placeholder beneath the Roleplay HUD.

What changed

  • Keep each crossfade layer transparent unless it has a background URL.
  • Preserve the mounted dual-layer crossfade behavior for real background changes.
  • Extend the existing Roleplay background smoke test to remove the background first and assert that every source-less layer remains transparent.

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

Automated verification performed by Codex:

  • pnpm check completed successfully.
  • Focused Roleplay background smoke test passed in desktop and mobile Chromium: 2 passed.
  • The full pnpm smoke:ui run passed both existing selected-background cases and 71 other cases. The command finished with 73 passed, 47 skipped, and 2 failures unrelated to this patch: the Roleplay setup empty-agent-library flow and the Noodle mobile account-menu locator.

Manual verification notes

  • Open a Roleplay chat with no background in Chromium and verify no broken-image marker appears.
  • Select or switch a background and verify the 700 ms crossfade still works.
  • Clear the background and verify the image fades away without a placeholder.

The automated in-app browser connection failed before Marinara could be opened, so those manual checks remain explicitly pending.

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)

The linked issue contains the before screenshot. A browser-verified after screenshot remains pending.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed roleplay background removal so cleared background layers become fully transparent.
    • Improved background crossfades to prevent empty image layers from appearing.
    • Preserved smooth background switching and fitting behavior after selecting a new image.

🔄 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/3895 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/21/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3894-empty-roleplay-background` --- ### 📝 Commits (2) - [`84bda76`](https://github.com/Pasta-Devs/Marinara-Engine/commit/84bda76f79d0f7a2ff87628df2a4116c3d1112c4) fix: hide empty roleplay background layers - [`024ae22`](https://github.com/Pasta-Devs/Marinara-Engine/commit/024ae228a94a59822d792d7959f55b14297a49ad) test: cover empty roleplay backgrounds ### 📊 Changes **2 files changed** (+13 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+11 -0) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+2 -2) </details> ### 📄 Description ## Linked issue Closes #3894 ## Why this change Roleplay chats without a selected background still mount both image layers used for crossfading. When the active layer has no source, Chromium can paint its native broken-image placeholder beneath the Roleplay HUD. ## What changed - Keep each crossfade layer transparent unless it has a background URL. - Preserve the mounted dual-layer crossfade behavior for real background changes. - Extend the existing Roleplay background smoke test to remove the background first and assert that every source-less layer remains transparent. ## 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 Automated verification performed by Codex: - pnpm check completed successfully. - Focused Roleplay background smoke test passed in desktop and mobile Chromium: 2 passed. - The full pnpm smoke:ui run passed both existing selected-background cases and 71 other cases. The command finished with 73 passed, 47 skipped, and 2 failures unrelated to this patch: the Roleplay setup empty-agent-library flow and the Noodle mobile account-menu locator. ### Manual verification notes - [ ] Open a Roleplay chat with no background in Chromium and verify no broken-image marker appears. - [ ] Select or switch a background and verify the 700 ms crossfade still works. - [ ] Clear the background and verify the image fades away without a placeholder. The automated in-app browser connection failed before Marinara could be opened, so those manual checks remain explicitly pending. ## 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) The linked issue contains the before screenshot. A browser-verified after screenshot remains pending. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Fixed roleplay background removal so cleared background layers become fully transparent. - Improved background crossfades to prevent empty image layers from appearing. - Preserved smooth background switching and fitting behavior after selecting a new image. <!-- 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:07:30 +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#6145
No description provided.