[PR #7145] [MERGED] fix: chat action styling and mobile widget layout #7498

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7145
Author: @SpicyMarinara
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/7144-mobile-chat-tools


📝 Commits (6)

  • f090fce docs: record mobile Chat tools repair scope
  • 0d46f49 fix: inherit mobile Chat tools widget shapes
  • 663fc88 fix: place mobile Echo ornament beside its header
  • b4281f3 fix: align mobile tool menus and match snapped button spacing
  • 1f39279 fix: apply chat presets to message action windows
  • 1028bfa test: preserve Echo marker check with mobile ornament attributes

📊 Changes

20 files changed (+1077 additions, -99 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
➕ e2e/message-action-widget-style.e2e.ts (+484 -0)
📝 e2e/mobile-echo-window.e2e.ts (+50 -6)
📝 e2e/phone-bubbles.e2e.ts (+286 -7)
📝 packages/client/src/components/chat/ChatArea.tsx (+2 -0)
📝 packages/client/src/components/chat/ChatCommonOverlays.tsx (+13 -7)
📝 packages/client/src/components/chat/ChatMessage.tsx (+3 -3)
📝 packages/client/src/components/chat/ChatToolsMenu.tsx (+27 -15)
📝 packages/client/src/components/chat/DecisionDebugPanel.tsx (+8 -4)
📝 packages/client/src/components/chat/EchoChamberPanel.tsx (+4 -1)
📝 packages/client/src/components/chat/GenerationReplayDetailsModal.tsx (+9 -3)
📝 packages/client/src/components/chat/MessageMarks.tsx (+4 -4)
📝 packages/client/src/components/chat/MessageThinkingModal.tsx (+2 -2)
📝 packages/client/src/components/chat/PeekPromptModal.tsx (+11 -8)
📝 packages/client/src/components/chat/ReactionAddButton.tsx (+1 -0)
📝 packages/client/src/components/ui/AppDialogRenderer.tsx (+4 -2)
📝 packages/client/src/stores/dialog.store.ts (+1 -0)
📝 packages/client/src/styles/themes/chat-widget-surfaces.css (+159 -18)
📝 packages/client/src/styles/themes/chat-widgets.css (+4 -18)
📝 scripts/regressions/open-issues.regression.ts (+1 -1)

📄 Description

Linked issue

Closes #7144

Why this change

Chat styling stops at the message itself: windows opened by Hide from AI, Model Thoughts, Peek Prompt and other message actions keep the app's general dialog styling even when Apply preset font, shape and colors are enabled. They should follow those switches independently on phones and computers.

On phones, Chat tools also forces circular buttons, shifts the expanded column away from an edge-docked launcher and spaces tools farther apart than other snapped buttons. Echo Chamber keeps its ornament above the mobile header instead of beside the title.

What changed

Opted message-action surfaces into the existing chat styles: character visibility/context pickers, thoughts and stored guidance, prompt preview, notes, voice controls, reactions, deletion and branch/regenerate confirmations. Text content, fields, header dividers and controls follow the selected preset. Each styling switch remains independent; Default and disabled settings keep their existing fallbacks. Shared app confirmations use an explicit opt-in, so unrelated dialogs retain their styling. Portraits and switch controls retain their functional geometry.

Removed the mobile Chat tools forced-circle override, centered the expanded column on its launcher and reused the 8px snap-gap constant. Rows retain at least 44px touch targets and focus-ring clearance; short viewports can still place the menu beside its launcher. Echo Chamber selects the shared mobile inline ornament while keeping its movable, resizable window.

The reported reorder concern was the enabled menu lock, as confirmed by the reporter. Gesture code is unchanged; regression coverage exercises unlocked held drags, saved order, locking and later taps.

Validation

Local validation for product commit 1f392794c076791e71e2b6cf8288e38c70a83428; 1028bfa6a26d95b231a81daece3993f26bc05e7d only updates the existing Echo source guard:

  • pnpm install, pnpm check, pnpm version:check and focused CSS/e2e formatting: passed. Includes localization, lint, TypeScript and the production build.
  • pnpm regression:ui e2e/message-action-widget-style.e2e.ts e2e/phone-bubbles.e2e.ts e2e/message-marks-colors.e2e.ts --grep 'message action panels|edge-docked phone|marks follow Chroma' --project=desktop-chromium --project=mobile-chromium --project=mobile-webkit --workers=1: 14 passed, 1 expected desktop skip. Covers independent switches, Default fallback, custom gradients, text/fields/header/control styling, Voice Controls, shape-only hover paint, all-off note styling, edge alignment and launcher/internal 8px gaps.
  • PLAYWRIGHT_ONLY_PROJECT=desktop pnpm smoke:ui: 7 passed. An earlier WebKit assertion expected an unhovered close-button fill while the pointer was over it; the final test checks the actual hover state and its preset paint.
  • Existing input-popup styling: 6 passed across all three browser projects during integration; the final follow-up only corrects action-panel paint ownership and test expectations.
  • Full phone Chat tools/Echo suite at b4281f3 (unchanged product code in this follow-up): 29 passed, 5 expected skips across mobile Chromium/WebKit. Includes all shapes/presets, touch ordering, scrolling, rotation, keyboard clearance, Echo movement/resize and mobile/desktop ornament placement. The final targeted run repeats edge placement with the added launcher-gap assertion.
  • docker build -t marinara-engine:pr-7145 .: passed (image sha256:acf4d97fc08392bdabe22de759010c400a2d6cc02e40d6bd063905e90c6227f1). The isolated container reported healthy, then PLAYWRIGHT_BASE_URL=http://127.0.0.1:17864 PLAYWRIGHT_SKIP_WEBSERVER=true pnpm smoke:production: 3 passed on desktop Chromium, mobile Chromium and mobile WebKit.
  • Focused Node regressions: 4/4 passed (open-issues, floating-window, generation-replay-copy, roleplay-streaming). The hosted 517-case lane on b4281f3 found one stale exact-object assertion for Echo. The guard now permits extra attributes while still requiring the existing mobile visibility marker; its focused rerun passed.
  • coderabbit review --base origin/staging --agent: complete, 0 findings across all 20 changed files at 1028bfa6a. The temporary quota window cleared on retry. Independent final product review also found no remaining defects.

Red proof reproduced forced-circle shapes, Echo's ornament 23.375px above its mobile header, the edge menu's 20px inward shift, and the Thoughts close button retaining a 12.75px radius instead of Dottore's 0px radius. Screenshots cover synthetic test chats only.

Hosted validation on final head 1028bfa6a: every required check passed, all platform/container jobs passed, and the complete Node lane passed 517/517 including open-issues. GitHub CodeRabbit completed its review through that exact head with no actionable comments. Merged into staging as b5386f7519e461e74346f273e1df85fc1348dbef.

Human checklist:

  • Manually verify Hide from AI, Model Thoughts, Peek Prompt and other message-action windows follow each styling switch on desktop and a physical iPhone.

  • Manually verify notes remain editable and action controls remain readable with Mari/Dottore and custom gradients.

  • Manually verify the launcher, lock and each expanded tool use Dottore's shape on a physical iPhone.

  • Manually verify custom shape overrides, light/dark themes and enlarged buttons.

  • Manually verify left/right edge alignment, above/below expansion and spacing matching the other snapped buttons.

  • Manually verify short-screen scrolling and visible keyboard focus on the first/last tools.

  • Manually verify Echo Chamber has its ornament at the side in Dottore and Mari on a physical iPhone, and still moves, resizes and locks.

  • Manually verify unlocked touch ordering, the lock, a later tap and saved order after reload.

Manual verification notes

Browser screenshots were visually inspected. Automated checks exercise all presets and rounded, square, cut-corner and arched overrides, regular and gradient paint, a short viewport, large buttons, both screen edges and spacing. Controls smaller than 36px retain a minimum 44px row to keep touch targets separate. Chromium drag coverage uses native CDP touch; WebKit uses pointer input in an iPhone viewport. Physical iPhone touch remains a manual verification item.

Review disposition

The initial GitHub CodeRabbit review raised two test-only suggestions. Both were traced against the current test and implementation:

  • Keep preset expectations independent of the app resolver: the hardcoded default/Dottore/Mari mapping is the behavior under test, so importing the production resolver would weaken the regression check. The suggested source comment is optional and adds no behavior coverage.
  • Keep the existing locked-drag proof: the helper completes a 600ms hold and all 16 movement steps (with 16ms between steps) before its first order assertion. It then releases and checks both DOM order and persisted layout. The component disables dragging when locked and prevents dragControls.start; there is no delayed reorder path requiring an additional arbitrary sleep. The same gesture demonstrably reorders the unlocked control.

No product defect was identified by either suggestion; no gesture implementation changes are needed. The subsequent review correctly identified a missing launcher-to-menu gap assertion. Added it for both above/below expansion and scrolled endpoints, alongside the existing internal tool-gap checks.

Independent review of message-action styling caught gradient hover and Voice Controls paint preservation when only Shape is enabled. The final CSS preserves those owner colors; browser coverage includes the reachable Voice Controls path and hovered deletion controls.

The final GitHub review's informational docstring-coverage warning is not a functional finding or a failing required check. Most touched functions are existing React renderers receiving style classes; the CSS comments document palette inheritance, gradient precedence and shape-only paint preservation. Adding boilerplate docstrings would not improve the behavior proof or describe a new public API.

Docs and release impact

Unreleased changelog entry. No user-facing copy, release metadata or translated documentation changes.

UI evidence

Before/after gallery and message-action/mobile browser screenshots (source gist).


🔄 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/7145 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/7144-mobile-chat-tools` --- ### 📝 Commits (6) - [`f090fce`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f090fce2e574f9bdff393405743c9886ea473b0f) docs: record mobile Chat tools repair scope - [`0d46f49`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0d46f49d8063f83c403ba713f1dbed52bb9c6a13) fix: inherit mobile Chat tools widget shapes - [`663fc88`](https://github.com/Pasta-Devs/Marinara-Engine/commit/663fc88e6612890f1fe6cd8207820e3f3e2ac9d8) fix: place mobile Echo ornament beside its header - [`b4281f3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b4281f3ac622a8428192004b09600dddc2ee3f3f) fix: align mobile tool menus and match snapped button spacing - [`1f39279`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1f392794c076791e71e2b6cf8288e38c70a83428) fix: apply chat presets to message action windows - [`1028bfa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1028bfa6a26d95b231a81daece3993f26bc05e7d) test: preserve Echo marker check with mobile ornament attributes ### 📊 Changes **20 files changed** (+1077 additions, -99 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) ➕ `e2e/message-action-widget-style.e2e.ts` (+484 -0) 📝 `e2e/mobile-echo-window.e2e.ts` (+50 -6) 📝 `e2e/phone-bubbles.e2e.ts` (+286 -7) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+2 -0) 📝 `packages/client/src/components/chat/ChatCommonOverlays.tsx` (+13 -7) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+3 -3) 📝 `packages/client/src/components/chat/ChatToolsMenu.tsx` (+27 -15) 📝 `packages/client/src/components/chat/DecisionDebugPanel.tsx` (+8 -4) 📝 `packages/client/src/components/chat/EchoChamberPanel.tsx` (+4 -1) 📝 `packages/client/src/components/chat/GenerationReplayDetailsModal.tsx` (+9 -3) 📝 `packages/client/src/components/chat/MessageMarks.tsx` (+4 -4) 📝 `packages/client/src/components/chat/MessageThinkingModal.tsx` (+2 -2) 📝 `packages/client/src/components/chat/PeekPromptModal.tsx` (+11 -8) 📝 `packages/client/src/components/chat/ReactionAddButton.tsx` (+1 -0) 📝 `packages/client/src/components/ui/AppDialogRenderer.tsx` (+4 -2) 📝 `packages/client/src/stores/dialog.store.ts` (+1 -0) 📝 `packages/client/src/styles/themes/chat-widget-surfaces.css` (+159 -18) 📝 `packages/client/src/styles/themes/chat-widgets.css` (+4 -18) 📝 `scripts/regressions/open-issues.regression.ts` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #7144 ## Why this change Chat styling stops at the message itself: windows opened by **Hide from AI**, **Model Thoughts**, **Peek Prompt** and other message actions keep the app's general dialog styling even when Apply preset font, shape and colors are enabled. They should follow those switches independently on phones and computers. On phones, Chat tools also forces circular buttons, shifts the expanded column away from an edge-docked launcher and spaces tools farther apart than other snapped buttons. Echo Chamber keeps its ornament above the mobile header instead of beside the title. ## What changed Opted message-action surfaces into the existing chat styles: character visibility/context pickers, thoughts and stored guidance, prompt preview, notes, voice controls, reactions, deletion and branch/regenerate confirmations. Text content, fields, header dividers and controls follow the selected preset. Each styling switch remains independent; Default and disabled settings keep their existing fallbacks. Shared app confirmations use an explicit opt-in, so unrelated dialogs retain their styling. Portraits and switch controls retain their functional geometry. Removed the mobile Chat tools forced-circle override, centered the expanded column on its launcher and reused the 8px snap-gap constant. Rows retain at least 44px touch targets and focus-ring clearance; short viewports can still place the menu beside its launcher. Echo Chamber selects the shared mobile inline ornament while keeping its movable, resizable window. The reported reorder concern was the enabled menu lock, as confirmed by the reporter. Gesture code is unchanged; regression coverage exercises unlocked held drags, saved order, locking and later taps. ## Validation Local validation for product commit `1f392794c076791e71e2b6cf8288e38c70a83428`; `1028bfa6a26d95b231a81daece3993f26bc05e7d` only updates the existing Echo source guard: - `pnpm install`, `pnpm check`, `pnpm version:check` and focused CSS/e2e formatting: passed. Includes localization, lint, TypeScript and the production build. - `pnpm regression:ui e2e/message-action-widget-style.e2e.ts e2e/phone-bubbles.e2e.ts e2e/message-marks-colors.e2e.ts --grep 'message action panels|edge-docked phone|marks follow Chroma' --project=desktop-chromium --project=mobile-chromium --project=mobile-webkit --workers=1`: **14 passed, 1 expected desktop skip**. Covers independent switches, Default fallback, custom gradients, text/fields/header/control styling, Voice Controls, shape-only hover paint, all-off note styling, edge alignment and launcher/internal 8px gaps. - `PLAYWRIGHT_ONLY_PROJECT=desktop pnpm smoke:ui`: **7 passed**. An earlier WebKit assertion expected an unhovered close-button fill while the pointer was over it; the final test checks the actual hover state and its preset paint. - Existing input-popup styling: **6 passed** across all three browser projects during integration; the final follow-up only corrects action-panel paint ownership and test expectations. - Full phone Chat tools/Echo suite at `b4281f3` (unchanged product code in this follow-up): **29 passed, 5 expected skips** across mobile Chromium/WebKit. Includes all shapes/presets, touch ordering, scrolling, rotation, keyboard clearance, Echo movement/resize and mobile/desktop ornament placement. The final targeted run repeats edge placement with the added launcher-gap assertion. - `docker build -t marinara-engine:pr-7145 .`: passed (image `sha256:acf4d97fc08392bdabe22de759010c400a2d6cc02e40d6bd063905e90c6227f1`). The isolated container reported healthy, then `PLAYWRIGHT_BASE_URL=http://127.0.0.1:17864 PLAYWRIGHT_SKIP_WEBSERVER=true pnpm smoke:production`: **3 passed** on desktop Chromium, mobile Chromium and mobile WebKit. - Focused Node regressions: **4/4 passed** (`open-issues`, `floating-window`, `generation-replay-copy`, `roleplay-streaming`). The hosted 517-case lane on `b4281f3` found one stale exact-object assertion for Echo. The guard now permits extra attributes while still requiring the existing mobile visibility marker; its focused rerun passed. - `coderabbit review --base origin/staging --agent`: **complete, 0 findings across all 20 changed files** at `1028bfa6a`. The temporary quota window cleared on retry. Independent final product review also found no remaining defects. Red proof reproduced forced-circle shapes, Echo's ornament 23.375px above its mobile header, the edge menu's 20px inward shift, and the Thoughts close button retaining a 12.75px radius instead of Dottore's 0px radius. Screenshots cover synthetic test chats only. Hosted validation on final head `1028bfa6a`: every required check passed, all platform/container jobs passed, and the complete Node lane passed **517/517** including `open-issues`. GitHub CodeRabbit completed its review through that exact head with **no actionable comments**. Merged into `staging` as `b5386f7519e461e74346f273e1df85fc1348dbef`. Human checklist: - [ ] Manually verify Hide from AI, Model Thoughts, Peek Prompt and other message-action windows follow each styling switch on desktop and a physical iPhone. - [ ] Manually verify notes remain editable and action controls remain readable with Mari/Dottore and custom gradients. - [ ] Manually verify the launcher, lock and each expanded tool use Dottore's shape on a physical iPhone. - [ ] Manually verify custom shape overrides, light/dark themes and enlarged buttons. - [ ] Manually verify left/right edge alignment, above/below expansion and spacing matching the other snapped buttons. - [ ] Manually verify short-screen scrolling and visible keyboard focus on the first/last tools. - [ ] Manually verify Echo Chamber has its ornament at the side in Dottore and Mari on a physical iPhone, and still moves, resizes and locks. - [ ] Manually verify unlocked touch ordering, the lock, a later tap and saved order after reload. ### Manual verification notes Browser screenshots were visually inspected. Automated checks exercise all presets and rounded, square, cut-corner and arched overrides, regular and gradient paint, a short viewport, large buttons, both screen edges and spacing. Controls smaller than 36px retain a minimum 44px row to keep touch targets separate. Chromium drag coverage uses native CDP touch; WebKit uses pointer input in an iPhone viewport. Physical iPhone touch remains a manual verification item. ## Review disposition The initial GitHub CodeRabbit review raised two test-only suggestions. Both were traced against the current test and implementation: - Keep preset expectations independent of the app resolver: the hardcoded default/Dottore/Mari mapping is the behavior under test, so importing the production resolver would weaken the regression check. The suggested source comment is optional and adds no behavior coverage. - Keep the existing locked-drag proof: the helper completes a 600ms hold and all 16 movement steps (with 16ms between steps) before its first order assertion. It then releases and checks both DOM order and persisted layout. The component disables dragging when locked and prevents `dragControls.start`; there is no delayed reorder path requiring an additional arbitrary sleep. The same gesture demonstrably reorders the unlocked control. No product defect was identified by either suggestion; no gesture implementation changes are needed. The subsequent review correctly identified a missing launcher-to-menu gap assertion. Added it for both above/below expansion and scrolled endpoints, alongside the existing internal tool-gap checks. Independent review of message-action styling caught gradient hover and Voice Controls paint preservation when only Shape is enabled. The final CSS preserves those owner colors; browser coverage includes the reachable Voice Controls path and hovered deletion controls. The final GitHub review's informational docstring-coverage warning is not a functional finding or a failing required check. Most touched functions are existing React renderers receiving style classes; the CSS comments document palette inheritance, gradient precedence and shape-only paint preservation. Adding boilerplate docstrings would not improve the behavior proof or describe a new public API. ## Docs and release impact Unreleased changelog entry. No user-facing copy, release metadata or translated documentation changes. ## UI evidence [Before/after gallery and message-action/mobile browser screenshots](https://gist.githack.com/SpicyMarinara/6bff6759a483d1f2f4e5bf881864c327/raw/6aa5ce26eb8e9dcd08ec427d880412929710ab69/gallery.html) ([source gist](https://gist.github.com/SpicyMarinara/6bff6759a483d1f2f4e5bf881864c327)). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:20:23 +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#7498
No description provided.