[GH-ISSUE #3791] [Issue]: Firefox Roleplay rendering stalls app-wide menu navigation #2045

Closed
opened 2026-10-21 05:44:52 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Xelvanis on GitHub (Jul 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3791

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Firefox's Roleplay paint/compositing path causes app-wide sluggishness while the Roleplay surface remains active behind menus. This is a Firefox rendering compatibility issue triggered by Marinara's translucent message bubbles, shadows, overlay gradient, and vignette, not a pagination or API-loading problem.

The problem reproduces with Pulse, RGB, and the custom cursor disabled. Chromium handles the existing visual workload substantially better.

Expected behavior

Opening the sidebar and top-bar panels should remain responsive while a Roleplay chat is active, without reducing the existing 100-item library pagination contract. Users who need the faster rendering path should be able to choose it explicitly without forcing the flatter appearance on everyone.

Actual behavior

In Firefox, menu navigation slows down while the browser continues painting and compositing the Roleplay surface underneath the panels. Larger chats and libraries can amplify the total workload, but they are not the primary cause.

Confirmed rendering evidence

A Firefox-only CSS experiment produced a dramatic improvement in the reporter's normal, in-use Firefox environment without changing pagination, API payloads, React state, or menu lifecycle. The experiment:

  • made Roleplay bubbles compositor-opaque while retaining their selected character/persona tint;
  • removed the bubble drop shadow;
  • replaced the full-surface overlay gradient with a flat translucent color; and
  • disabled the vignette.

Because only paint-related CSS changed, the result confirms that Firefox rendering is the primary bottleneck. The reporter then tested each reduction independently in the same Firefox profile and populated Roleplay chat:

Isolated reduction Manual result
Compositor-opaque bubbles Improves performance
Remove bubble drop shadows Improves performance
Replace overlay gradient with a flat color Tentative improvement
Disable vignette Tiny improvement

No isolated reduction was reported as having no effect. Opaque bubbles and shadow removal are the strongest confirmed contributors; the overlay result is less certain and vignette removal is low-impact.

Earlier production measurements remain supporting evidence. With the same real data and the existing 100-item contract, Firefox showed roughly double Chromium's frame-gap p95 (about 24 ms versus 12 ms). A smaller-page experiment reduced total work but was rejected as a product fix; Chromium can handle 100 items and the rendering fallback improves Firefox without changing that contract.

Proposed optional visual profile

Add a persistent Reduced paint effects toggle under Appearance > Roleplay Messages. This is an optional visual profile, not automatic browser detection.

When enabled, the profile may:

  • use compositor-opaque Roleplay bubbles while retaining character/persona tint;
  • reduce or remove decorative bubble drop shadows;
  • replace the full-surface overlay gradient with a flat translucent color; and
  • disable the vignette.

Keep the normal visual profile as the default so existing Chromium and Firefox appearance does not change without user choice. Make the toggle available in every browser, while describing it as useful when Roleplay or menu navigation feels sluggish, especially in Firefox. The setting should apply immediately, persist with the other appearance settings, and require no reload.

Steps to reproduce

  1. Open a populated Roleplay chat in Firefox on Windows.
  2. Leave animated accents and the custom cursor disabled.
  3. Repeatedly open the chat sidebar and top-bar panels while the Roleplay surface remains behind them.
  4. Compare with Chromium.
  5. Apply the Firefox reduced-paint experiment and repeat. Menu responsiveness improves dramatically in the reporter's normal Firefox profile.

Environment

  • Marinara Engine version: 2.3.3 source build
  • OS: Windows 11 Pro, build 26200
  • Reporter browser: Firefox 152.0.6
  • Repeatable measurements: Playwright Firefox 151.0 and Chromium 149, 1440×900, DPR 1, hardware acceleration enabled

Candidate review findings

The reduced-paint direction is validated, but the current experiment needs refinement before merge:

  1. box-shadow: none clears Tailwind's complete shadow stack, including the normal bubble ring and the semantic conversation-start/hidden-from-AI ring color. Disable only the expensive drop-shadow component so semantic rings remain visible.
  2. The opaque var(--background) base changes the Roleplay Messages Background Opacity contract. At 0%, --mari-rp-bubble-bg becomes transparent but Firefox still receives an opaque base. Preserve the explicit 0% transparent state while keeping normal bubbles compositor-opaque.
  3. The regression currently proves CSS text structure, not computed style or visual behavior. Firefox coverage should verify the opaque normal state, transparent 0% state, semantic rings, card CSS overrides, scrolling, and menu interaction.

Acceptance criteria

  • Preserve the existing 100-item library pagination contract.
  • Add an optional, persistent Reduced paint effects Roleplay visual profile under Appearance; keep the normal profile as the default.
  • Do not use JavaScript user-agent detection or silently change the profile based on browser.
  • Apply and remove the reduced-paint profile immediately without reloading the app.
  • Benchmark opaque bubbles, shadow reduction, overlay flattening, and vignette removal separately; stop once the target is met.
  • Preserve character/persona bubble tint, custom Card CSS, light/dark themes, and bright/dark scene backgrounds.
  • Preserve the 0% opacity state and conversation-start/hidden-from-AI rings.
  • With the toggle off, Chromium and Firefox screenshots and behavior remain unchanged.
  • With the toggle on, the reduced visual treatment is deterministic and consistent across browsers.
  • Validate menu navigation in the reporter's normal Firefox profile, not only an isolated automation profile.

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 @Xelvanis on GitHub (Jul 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3791 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Firefox's Roleplay paint/compositing path causes app-wide sluggishness while the Roleplay surface remains active behind menus. This is a Firefox rendering compatibility issue triggered by Marinara's translucent message bubbles, shadows, overlay gradient, and vignette, not a pagination or API-loading problem. The problem reproduces with Pulse, RGB, and the custom cursor disabled. Chromium handles the existing visual workload substantially better. ## Expected behavior Opening the sidebar and top-bar panels should remain responsive while a Roleplay chat is active, without reducing the existing 100-item library pagination contract. Users who need the faster rendering path should be able to choose it explicitly without forcing the flatter appearance on everyone. ## Actual behavior In Firefox, menu navigation slows down while the browser continues painting and compositing the Roleplay surface underneath the panels. Larger chats and libraries can amplify the total workload, but they are not the primary cause. ## Confirmed rendering evidence A Firefox-only CSS experiment produced a dramatic improvement in the reporter's normal, in-use Firefox environment without changing pagination, API payloads, React state, or menu lifecycle. The experiment: - made Roleplay bubbles compositor-opaque while retaining their selected character/persona tint; - removed the bubble drop shadow; - replaced the full-surface overlay gradient with a flat translucent color; and - disabled the vignette. Because only paint-related CSS changed, the result confirms that Firefox rendering is the primary bottleneck. The reporter then tested each reduction independently in the same Firefox profile and populated Roleplay chat: | Isolated reduction | Manual result | |---|---| | Compositor-opaque bubbles | Improves performance | | Remove bubble drop shadows | Improves performance | | Replace overlay gradient with a flat color | Tentative improvement | | Disable vignette | Tiny improvement | No isolated reduction was reported as having no effect. Opaque bubbles and shadow removal are the strongest confirmed contributors; the overlay result is less certain and vignette removal is low-impact. Earlier production measurements remain supporting evidence. With the same real data and the existing 100-item contract, Firefox showed roughly double Chromium's frame-gap p95 (about 24 ms versus 12 ms). A smaller-page experiment reduced total work but was rejected as a product fix; Chromium can handle 100 items and the rendering fallback improves Firefox without changing that contract. ## Proposed optional visual profile Add a persistent **Reduced paint effects** toggle under **Appearance > Roleplay Messages**. This is an optional visual profile, not automatic browser detection. When enabled, the profile may: - use compositor-opaque Roleplay bubbles while retaining character/persona tint; - reduce or remove decorative bubble drop shadows; - replace the full-surface overlay gradient with a flat translucent color; and - disable the vignette. Keep the normal visual profile as the default so existing Chromium and Firefox appearance does not change without user choice. Make the toggle available in every browser, while describing it as useful when Roleplay or menu navigation feels sluggish, especially in Firefox. The setting should apply immediately, persist with the other appearance settings, and require no reload. ## Steps to reproduce 1. Open a populated Roleplay chat in Firefox on Windows. 2. Leave animated accents and the custom cursor disabled. 3. Repeatedly open the chat sidebar and top-bar panels while the Roleplay surface remains behind them. 4. Compare with Chromium. 5. Apply the Firefox reduced-paint experiment and repeat. Menu responsiveness improves dramatically in the reporter's normal Firefox profile. ## Environment - Marinara Engine version: 2.3.3 source build - OS: Windows 11 Pro, build 26200 - Reporter browser: Firefox 152.0.6 - Repeatable measurements: Playwright Firefox 151.0 and Chromium 149, 1440×900, DPR 1, hardware acceleration enabled ## Candidate review findings The reduced-paint direction is validated, but the current experiment needs refinement before merge: 1. `box-shadow: none` clears Tailwind's complete shadow stack, including the normal bubble ring and the semantic conversation-start/hidden-from-AI ring color. Disable only the expensive drop-shadow component so semantic rings remain visible. 2. The opaque `var(--background)` base changes the Roleplay Messages Background Opacity contract. At 0%, `--mari-rp-bubble-bg` becomes transparent but Firefox still receives an opaque base. Preserve the explicit 0% transparent state while keeping normal bubbles compositor-opaque. 3. The regression currently proves CSS text structure, not computed style or visual behavior. Firefox coverage should verify the opaque normal state, transparent 0% state, semantic rings, card CSS overrides, scrolling, and menu interaction. ## Acceptance criteria - Preserve the existing 100-item library pagination contract. - Add an optional, persistent **Reduced paint effects** Roleplay visual profile under Appearance; keep the normal profile as the default. - Do not use JavaScript user-agent detection or silently change the profile based on browser. - Apply and remove the reduced-paint profile immediately without reloading the app. - Benchmark opaque bubbles, shadow reduction, overlay flattening, and vignette removal separately; stop once the target is met. - Preserve character/persona bubble tint, custom Card CSS, light/dark themes, and bright/dark scene backgrounds. - Preserve the 0% opacity state and conversation-start/hidden-from-AI rings. - With the toggle off, Chromium and Firefox screenshots and behavior remain unchanged. - With the toggle on, the reduced visual treatment is deterministic and consistent across browsers. - Validate menu navigation in the reporter's normal Firefox profile, not only an isolated automation profile. ## 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:44:52 +07:00
  • closed this issue
  • added the
    in-pr
    label
Author
Owner

@SpicyMarinara commented on GitHub (Jul 18, 2026):

Claimed in draft PR #3800 on branch agent/issue-sweep-2026-07-19.

<!-- gh-comment-id:5013107841 --> @SpicyMarinara commented on GitHub (Jul 18, 2026): Claimed in draft PR #3800 on branch `agent/issue-sweep-2026-07-19`.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 18, 2026):

Addressed in #3800. Roleplay now has a persisted opt-in Reduced paint effects profile that flattens expensive shadows and scene overlays without overriding semantic rings or custom card CSS. The regression passes in Chromium and Firefox; final CI is green.

<!-- gh-comment-id:5013302809 --> @SpicyMarinara commented on GitHub (Jul 18, 2026): Addressed in #3800. Roleplay now has a persisted opt-in Reduced paint effects profile that flattens expensive shadows and scene overlays without overriding semantic rings or custom card CSS. The regression passes in Chromium and Firefox; final CI is green.
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#2045
No description provided.