[PR #4212] [MERGED] Fix Firefox Roleplay composer responsiveness #6285

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

📋 Pull Request Information

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

Base: staging ← Head: fix/firefox-roleplay-composer-responsiveness


📝 Commits (1)

  • c331b01 Fix Firefox Roleplay composer responsiveness

📊 Changes

5 files changed (+186 additions, -8 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+113 -0)
📝 packages/client/src/App.tsx (+32 -2)
📝 packages/client/src/components/chat/ChatInput.tsx (+34 -4)
📝 packages/client/src/components/chat/EchoChamberPanel.tsx (+4 -1)
📝 packages/client/src/components/layout/AppShell.tsx (+3 -1)

📄 Description

Linked issue

Related to #4188

Why this change

  • Roleplay mode on desktop Firefox still performed expensive ambient and viewport work while the composer was focused, causing typing and held deletion to update in visible chunks.
  • The first latency fix exposed a second Firefox-specific resize race: the textarea could alternate between two wrapped heights and make the bottom-anchored composer jitter on every letter.

What changed

  • Pause animated accent ticks while any text-entry control is focused.
  • Avoid treating desktop Firefox viewport changes as a virtual keyboard unless the device is touch/coarse-pointer capable.
  • Keep LanguageTool out of the heavy Roleplay composer path while preserving native spellcheck.
  • Resize insertions once before paint, defer held-deletion shrink work, and measure without scrollbar-induced rewrapping.
  • Correct the Echo Chamber animation-duration utility so it does not introduce an unintended transition duration.
  • Add browser regressions for desktop Roleplay focus, wrapping stability, ambient work, and held deletion.

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

Manual verification notes

  • Maintainer tested typing, held Backspace deletion, and line wrapping in Roleplay mode on desktop Firefox/macOS after each iteration.
  • Final maintainer result: typing and deletion are smooth, wrapped text no longer disappears, and the composer no longer jitters.
  • Focused Playwright proof passed in desktop Firefox (2/2) and desktop Chromium (2/2), including ≤1 px measured composer movement and zero delayed resize mutations.
  • pnpm check passed. It reported only the pre-existing NoodleHome.tsx missing-dependency warning.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Maintainer supplied a Firefox screen recording of the pre-fix composer jitter and verified the corrected behavior in the same environment.

Summary by CodeRabbit

  • Bug Fixes

    • Improved chat composer resizing to reduce layout glitches while typing, wrapping text, and deleting.
    • Prevented ambient accent animations from interrupting active text entry.
    • Improved keyboard detection on touch-enabled devices.
    • Preserved hidden overflow behavior when the composer reaches its maximum height.
    • Refined message entrance animation timing for smoother display.
  • Tests

    • Added end-to-end coverage for roleplay composer performance, resizing stability, keyboard behavior, and animation state.

🔄 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/4212 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/firefox-roleplay-composer-responsiveness` --- ### 📝 Commits (1) - [`c331b01`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c331b011ffd67a0cba5f3c38741ec5394ead3a28) Fix Firefox Roleplay composer responsiveness ### 📊 Changes **5 files changed** (+186 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+113 -0) 📝 `packages/client/src/App.tsx` (+32 -2) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+34 -4) 📝 `packages/client/src/components/chat/EchoChamberPanel.tsx` (+4 -1) 📝 `packages/client/src/components/layout/AppShell.tsx` (+3 -1) </details> ### 📄 Description ## Linked issue Related to #4188 ## Why this change - Roleplay mode on desktop Firefox still performed expensive ambient and viewport work while the composer was focused, causing typing and held deletion to update in visible chunks. - The first latency fix exposed a second Firefox-specific resize race: the textarea could alternate between two wrapped heights and make the bottom-anchored composer jitter on every letter. ## What changed - Pause animated accent ticks while any text-entry control is focused. - Avoid treating desktop Firefox viewport changes as a virtual keyboard unless the device is touch/coarse-pointer capable. - Keep LanguageTool out of the heavy Roleplay composer path while preserving native spellcheck. - Resize insertions once before paint, defer held-deletion shrink work, and measure without scrollbar-induced rewrapping. - Correct the Echo Chamber animation-duration utility so it does not introduce an unintended transition duration. - Add browser regressions for desktop Roleplay focus, wrapping stability, ambient work, and held deletion. ## 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` ### Manual verification notes - Maintainer tested typing, held Backspace deletion, and line wrapping in Roleplay mode on desktop Firefox/macOS after each iteration. - Final maintainer result: typing and deletion are smooth, wrapped text no longer disappears, and the composer no longer jitters. - Focused Playwright proof passed in desktop Firefox (2/2) and desktop Chromium (2/2), including ≤1 px measured composer movement and zero delayed resize mutations. - `pnpm check` passed. It reported only the pre-existing `NoodleHome.tsx` missing-dependency warning. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Maintainer supplied a Firefox screen recording of the pre-fix composer jitter and verified the corrected behavior in the same environment. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved chat composer resizing to reduce layout glitches while typing, wrapping text, and deleting. * Prevented ambient accent animations from interrupting active text entry. * Improved keyboard detection on touch-enabled devices. * Preserved hidden overflow behavior when the composer reaches its maximum height. * Refined message entrance animation timing for smoother display. * **Tests** * Added end-to-end coverage for roleplay composer performance, resizing stability, keyboard behavior, and animation state. <!-- 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:08:56 +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#6285
No description provided.