[PR #7943] [MERGED] fix(client): keep chat controls and quick switching responsive #8017

Closed
opened 2026-10-24 04:09:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/issue-7928-responsive-chat-controls


📝 Commits (7)

  • d918832 feat(client): add connection-only quick switching (#7928)
  • 8273156 fix(client): align chat buttons and coalesce drag work (#7928)
  • 4dc8d2b fix(client): explain automatic button positioning (#7928)
  • bfe481c style(client): keep button layout hints concise (#7928)
  • 3854fa0 fix(ui): verify switcher preference persistence and touch targets
  • 1a82c5c fix(client): honor late model-switcher preference sync
  • 39ce085 fix(client): preserve focus when switcher models close

📊 Changes

14 files changed (+410 additions, -27 deletions)

View changed files

📝 e2e/chat-control-windows.e2e.ts (+47 -1)
📝 e2e/connection-model-switcher.e2e.ts (+164 -9)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+3 -0)
📝 packages/client/src/components/chat/QuickConnectionSwitcher.tsx (+11 -2)
📝 packages/client/src/components/chat/QuickSwitcherMobile.tsx (+17 -5)
➕ packages/client/src/components/connections/QuickSwitcherModelsToggle.tsx (+23 -0)
📝 packages/client/src/components/ui/WindowBubble.tsx (+17 -7)
➕ packages/client/src/features/chat-settings/ChatButtonLayoutSettings.tsx (+30 -0)
📝 packages/client/src/hooks/use-chat-window-layout.ts (+2 -1)
📝 packages/client/src/lib/floating-window-layout.ts (+42 -1)
📝 packages/client/src/localization/locales/en.json (+8 -0)
📝 packages/client/src/stores/floating-window.store.ts (+9 -1)
📝 packages/client/src/stores/ui.store.ts (+6 -0)
📝 scripts/regressions/floating-window.regression.ts (+31 -0)

📄 Description

Linked issue

Closes #7928

Why this change

Users need to arrange chat tools and switch connections without disruptive drag work or waiting on model catalogs. The issue reports a severe stall and asks for predictable row/column layouts and an option to skip model listing.

What changed

  • Add Horizontal rows and Vertical columns in Chat Settings. Automatic desktop layouts stay aligned through resizing and save with the chat. Free positioning restores the existing saved positions; phone Chat Tools keeps its current layout.
  • Add a persistent Models toggle in the desktop and mobile quick switchers. Turning it off skips the model picker and catalog requests, and choosing a connection closes the menu. A late startup settings response that disables Models also closes an already-open mobile model step. Both switchers restore focus when disabling Models removes the focused picker and leaves no control focused; mobile Back returns to its trigger too.
  • Coalesce bubble snap/placement calculations into the animation-frame callback, rather than calculating every incoming pointer event.

Validation

  • Final follow-up 39ce085192d2f824d9eb279a8d725ed66067a693: pnpm check passed (one pre-existing HomeProfessorMariChat hook warning; no errors). All 18 connection-model switcher cases passed across desktop Chromium, mobile Chromium and mobile WebKit. All 15 prior cases remain unchanged, covering dark/light catalog-free switching, withheld catalog responses, a changed preference surviving reload and a 44 CSS pixel touch target. The three new cases hold the startup settings response until a real model picker is open, then verify disabled models unmount, connection choices remain, focus returns and Escape dismisses the menu; mobile Back focus is checked too. Negative controls reproduced the original mobile lifecycle defect and the focus defect in all three projects before their respective fixes.
  • Floating-window and layout-persistence Node regressions passed on the core layout implementation, including round-trip, invalid preference, resize bounds, non-overlap and free-position preservation.
  • Desktop chat-control suite: 7 passed, 1 phone-only case skipped. pnpm smoke:ui: 7/7 passed. Those layout/shell results precede the isolated Models toggle height and test follow-up.
  • Local CodeRabbit reviewed the branch; its initial minor copy finding was fixed. The two hosted CodeRabbit findings on preference proof and touch size were corrected and their threads resolved. Dottore's mobile settings-sync hypothesis and later low-severity focus finding were independently reproduced and repaired. Independent peer review and fresh local CodeRabbit review of the final three-file focus follow-up completed with no new findings. The synchronous picker gate is preserved; the effect clears stale navigation so re-enabling Models cannot revive an old step. Final-head Dottore review of 39ce085192d2f824d9eb279a8d725ed66067a693 completed in run 39598562210. It raised one LOW on the pre-existing Personas-tab/unavailable-connection path and one Safari-comment nit. The LOW was traced to the unchanged mount gates and Personas handler in pre-PR base 87a9e7b7b33467158d23caa469e1fe42699d109f, and declined as a non-regression outside this Models-preference repair, per the maintainer scope decision. The comment nit was declined because the component already documents Safari button-focus behavior. These are explicit dispositions, not a zero-findings claim; existing tab/removal paths are not claimed fixed.

Manual verification and limits

  • Manually verify button arrangement and resize behavior on the reporter's Docker/browser setup.
  • Manually verify connection-only switching with the reporter's connection catalog.
  • Manually verify on physical touch devices.

The reported 30-second stall was not independently reproduced. The tested improvements provide automatic arrangement, a catalog-free switching path, and bounded per-frame drag calculations; they are not proof of that exact reported stall's original cause.

UI evidence

Synthetic local Game chat: Free positioning before selection, Horizontal rows after selection, Vertical columns after selection, and Chat Settings selector. These four captures use core layout head bfe481cb425f8f31d7d8ab4aa95df4804fdda2b7; “before” means before choosing an automatic layout, and Free positioning preserves the existing behavior. An extra focused capture run passed.

Quick-switcher light-theme proof uses 4dc8d2bd67c8fa23f21d36ae0f1f2252f32529e3; only the two layout hint strings changed afterward. Screenshots were visually inspected and published on a separate evidence branch, outside the application diff.

Models toggle light-theme proof at 3854fa08 was captured and visually inspected at 3854fa0813d5f30fda9bc99050df5e6c6645350e; the browser checks also measured the 44px target in all three projects.


🔄 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/7943 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/issue-7928-responsive-chat-controls` --- ### 📝 Commits (7) - [`d918832`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d9188326a0e0618a3ca87b1263da8c387127ed3e) feat(client): add connection-only quick switching (#7928) - [`8273156`](https://github.com/Pasta-Devs/Marinara-Engine/commit/82731569fe5f073531798a00965fde135051059a) fix(client): align chat buttons and coalesce drag work (#7928) - [`4dc8d2b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4dc8d2bd67c8fa23f21d36ae0f1f2252f32529e3) fix(client): explain automatic button positioning (#7928) - [`bfe481c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bfe481cb425f8f31d7d8ab4aa95df4804fdda2b7) style(client): keep button layout hints concise (#7928) - [`3854fa0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3854fa0813d5f30fda9bc99050df5e6c6645350e) fix(ui): verify switcher preference persistence and touch targets - [`1a82c5c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1a82c5c362ab5004dcadf3cf9c9bdd7b239b7009) fix(client): honor late model-switcher preference sync - [`39ce085`](https://github.com/Pasta-Devs/Marinara-Engine/commit/39ce085192d2f824d9eb279a8d725ed66067a693) fix(client): preserve focus when switcher models close ### 📊 Changes **14 files changed** (+410 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `e2e/chat-control-windows.e2e.ts` (+47 -1) 📝 `e2e/connection-model-switcher.e2e.ts` (+164 -9) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+3 -0) 📝 `packages/client/src/components/chat/QuickConnectionSwitcher.tsx` (+11 -2) 📝 `packages/client/src/components/chat/QuickSwitcherMobile.tsx` (+17 -5) ➕ `packages/client/src/components/connections/QuickSwitcherModelsToggle.tsx` (+23 -0) 📝 `packages/client/src/components/ui/WindowBubble.tsx` (+17 -7) ➕ `packages/client/src/features/chat-settings/ChatButtonLayoutSettings.tsx` (+30 -0) 📝 `packages/client/src/hooks/use-chat-window-layout.ts` (+2 -1) 📝 `packages/client/src/lib/floating-window-layout.ts` (+42 -1) 📝 `packages/client/src/localization/locales/en.json` (+8 -0) 📝 `packages/client/src/stores/floating-window.store.ts` (+9 -1) 📝 `packages/client/src/stores/ui.store.ts` (+6 -0) 📝 `scripts/regressions/floating-window.regression.ts` (+31 -0) </details> ### 📄 Description ## Linked issue Closes #7928 ## Why this change Users need to arrange chat tools and switch connections without disruptive drag work or waiting on model catalogs. The issue reports a severe stall and asks for predictable row/column layouts and an option to skip model listing. ## What changed - Add Horizontal rows and Vertical columns in Chat Settings. Automatic desktop layouts stay aligned through resizing and save with the chat. Free positioning restores the existing saved positions; phone Chat Tools keeps its current layout. - Add a persistent Models toggle in the desktop and mobile quick switchers. Turning it off skips the model picker and catalog requests, and choosing a connection closes the menu. A late startup settings response that disables Models also closes an already-open mobile model step. Both switchers restore focus when disabling Models removes the focused picker and leaves no control focused; mobile Back returns to its trigger too. - Coalesce bubble snap/placement calculations into the animation-frame callback, rather than calculating every incoming pointer event. ## Validation - Final follow-up `39ce085192d2f824d9eb279a8d725ed66067a693`: `pnpm check` passed (one pre-existing HomeProfessorMariChat hook warning; no errors). All 18 connection-model switcher cases passed across desktop Chromium, mobile Chromium and mobile WebKit. All 15 prior cases remain unchanged, covering dark/light catalog-free switching, withheld catalog responses, a changed preference surviving reload and a 44 CSS pixel touch target. The three new cases hold the startup settings response until a real model picker is open, then verify disabled models unmount, connection choices remain, focus returns and Escape dismisses the menu; mobile Back focus is checked too. Negative controls reproduced the original mobile lifecycle defect and the focus defect in all three projects before their respective fixes. - Floating-window and layout-persistence Node regressions passed on the core layout implementation, including round-trip, invalid preference, resize bounds, non-overlap and free-position preservation. - Desktop chat-control suite: 7 passed, 1 phone-only case skipped. `pnpm smoke:ui`: 7/7 passed. Those layout/shell results precede the isolated Models toggle height and test follow-up. - Local CodeRabbit reviewed the branch; its initial minor copy finding was fixed. The two hosted CodeRabbit findings on preference proof and touch size were corrected and their threads resolved. Dottore's mobile settings-sync hypothesis and later low-severity focus finding were independently reproduced and repaired. Independent peer review and fresh local CodeRabbit review of the final three-file focus follow-up completed with no new findings. The synchronous picker gate is preserved; the effect clears stale navigation so re-enabling Models cannot revive an old step. Final-head Dottore review of `39ce085192d2f824d9eb279a8d725ed66067a693` completed in [run 39598562210](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/39598562210). It raised one LOW on the pre-existing Personas-tab/unavailable-connection path and one Safari-comment nit. The LOW was traced to the unchanged mount gates and Personas handler in pre-PR base `87a9e7b7b33467158d23caa469e1fe42699d109f`, and declined as a non-regression outside this Models-preference repair, per the maintainer scope decision. The comment nit was declined because the component already documents Safari button-focus behavior. These are explicit dispositions, not a zero-findings claim; existing tab/removal paths are not claimed fixed. ## Manual verification and limits - [ ] Manually verify button arrangement and resize behavior on the reporter's Docker/browser setup. - [ ] Manually verify connection-only switching with the reporter's connection catalog. - [ ] Manually verify on physical touch devices. The reported 30-second stall was not independently reproduced. The tested improvements provide automatic arrangement, a catalog-free switching path, and bounded per-frame drag calculations; they are not proof of that exact reported stall's original cause. ## UI evidence Synthetic local Game chat: [Free positioning before selection](https://raw.githubusercontent.com/Pasta-Devs/Marinara-Engine/e883ad868e0d6061a5ecc15f231bcc0aac1209f3/before-free-layout.png), [Horizontal rows after selection](https://raw.githubusercontent.com/Pasta-Devs/Marinara-Engine/e883ad868e0d6061a5ecc15f231bcc0aac1209f3/after-horizontal-layout.png), [Vertical columns after selection](https://raw.githubusercontent.com/Pasta-Devs/Marinara-Engine/e883ad868e0d6061a5ecc15f231bcc0aac1209f3/after-vertical-layout.png), and [Chat Settings selector](https://raw.githubusercontent.com/Pasta-Devs/Marinara-Engine/e883ad868e0d6061a5ecc15f231bcc0aac1209f3/after-layout-settings.png). These four captures use core layout head `bfe481cb425f8f31d7d8ab4aa95df4804fdda2b7`; “before” means before choosing an automatic layout, and Free positioning preserves the existing behavior. An extra focused capture run passed. [Quick-switcher light-theme proof](https://raw.githubusercontent.com/Pasta-Devs/Marinara-Engine/e883ad868e0d6061a5ecc15f231bcc0aac1209f3/quick-switcher-models-light.png) uses `4dc8d2bd67c8fa23f21d36ae0f1f2252f32529e3`; only the two layout hint strings changed afterward. Screenshots were visually inspected and published on a separate evidence branch, outside the application diff. [Models toggle light-theme proof at 3854fa08](https://raw.githubusercontent.com/Pasta-Devs/Marinara-Engine/843ae3ff138a1b8f44a62098f84fd90b4ed1a2a0/quick-switcher-models-light-final.png) was captured and visually inspected at `3854fa0813d5f30fda9bc99050df5e6c6645350e`; the browser checks also measured the 44px target in all three projects. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:09:41 +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#8017
No description provided.