[PR #7660] [MERGED] fix(chat): tap a connection row to switch, arrow for models (mobile + Prof Mari) #7862

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7660
Author: @ylli-selmani
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ylli-selmani

Base: staging ← Head: fix/mobile-quick-switcher-model-tap


📝 Commits (6)

  • 8c1c0b4 fix(chat): tap a mobile connection row to switch, arrow for models
  • f8afa52 fix(chat): put the model-arrow divider before the checkmark
  • 374749e Merge remote-tracking branch 'origin/staging' into fix/mobile-quick-switcher-model-tap
  • 67e3bdb fix(mari): tap a connection row to switch, arrow for models when narrow
  • d4be8e1 fix(chat): return focus to the switcher after a connection switch
  • be50b7b fix(chat): checkmark beside the name, 48px model arrow in both pickers

📊 Changes

5 files changed (+135 additions, -30 deletions)

View changed files

📝 packages/client/src/components/chat/QuickSwitcherMobile.tsx (+45 -23)
📝 packages/client/src/components/chat/mari-primitives.tsx (+11 -1)
📝 packages/client/src/components/chat/mari/MariComposer.tsx (+39 -5)
📝 packages/client/src/localization/locales/en.json (+1 -0)
📝 packages/client/src/styles/mari.css (+39 -1)

📄 Description

Requested by Ylli

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7659

Why this change

  • On phones, tapping a connection in the quick switcher always opened its model list, so a plain connection switch took a second tap to get out of the picker. Desktop switches in one click because its model list sits beside the connections.
  • Professor Mari's new connection picker (#7656) does the same on narrow composers, where it shows one step at a time.

What changed

  • QuickSwitcherMobile: each connection row is now two buttons. Tapping the row switches to that connection and closes the menu. The arrow on the right, set off by a soft inset divider (the same hairline as the persona group rail in this menu), opens the connection's model list. The active checkmark stays on the row's selecting side, left of the divider. The arrow area is 48px wide (w-12), meeting Material's 48dp and Apple's 44pt touch-target sizes.
  • Professor Mari's composer (MariComposer, mari.css): on narrow composers the row switches and closes the menu, and a new arrow at the row's end (behind a --mari-hairline divider) opens the models step. The arrow area is 3rem wide, matching the chat switcher. Wide composers are unchanged: tapping a row still shows its models beside the list, and the arrow is hidden.
  • MariRow gains an optional action slot, built on the existing mari-row__toggle pattern (a row whose text is one button with another button beside it).
  • The arrow opens the models without switching the chat. ConnectionModelPicker already switches the chat when a model is picked, so browsing another connection's models is side-effect free until you choose one.
  • The built-in Local Model has no model list, so its row has no arrow (unchanged).
  • New English key connections.modelPicker.showModels for the arrow's accessible label.

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

Agent-run checks (still to be verified by a human): pnpm check exited 0; local CodeRabbit reported no findings on the whole branch. In a 375×812 viewport, in both the chat quick switcher and Professor Mari's composer, tapping a connection row switched the connection and closed the menu; tapping another row's arrow opened that connection's models and left the connection unchanged. At 1280×800, Professor Mari's picker kept its side-by-side layout with the arrows hidden.

  • Manually verify on a phone that tapping a connection row switches and closes the menu.
  • Manually verify that the arrow opens the model list, and picking a model there switches the chat to that connection.
  • Manually verify the divider and arrow hit area in light and dark themes.
  • Manually verify Professor Mari's connection menu on a phone: tapping a row switches and closes; the arrow opens that connection's models; picking a model switches to it.
  • Manually verify Professor Mari's connection menu on a wide window still shows models beside the list, with no arrows.
  • Manually verify "Retry with another model" in Professor Mari still retries after a connection is picked from a row on a phone.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

Screenshots are attached in the review thread; to be added here.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The mobile connection menu now separates connection switching from model selection. Tap a connection to switch to it, or use its arrow to open the model picker.
    • The model picker includes a back control for returning to the connection list.
  • Improvements
    • The menu closes after switching connections when no model selection step is needed, and restores focus to the composer.

🔄 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/7660 **Author:** [@ylli-selmani](https://github.com/ylli-selmani) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ylli-selmani](https://github.com/ylli-selmani) **Base:** `staging` ← **Head:** `fix/mobile-quick-switcher-model-tap` --- ### 📝 Commits (6) - [`8c1c0b4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8c1c0b4a9ed9835a2ea7d6d83a1f60f4a8055ee0) fix(chat): tap a mobile connection row to switch, arrow for models - [`f8afa52`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8afa52584f3b8bf23332e3dd8bfafa63c7263e2) fix(chat): put the model-arrow divider before the checkmark - [`374749e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/374749e79b74d07ae3e8d974d2b21d88012887bf) Merge remote-tracking branch 'origin/staging' into fix/mobile-quick-switcher-model-tap - [`67e3bdb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/67e3bdb56cce4b83ee247ac7fa72ce877a4f61da) fix(mari): tap a connection row to switch, arrow for models when narrow - [`d4be8e1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d4be8e184f530dce1745bc8149f3a133a7e384be) fix(chat): return focus to the switcher after a connection switch - [`be50b7b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/be50b7b3911b8abbe15f052b808f88e9aef386c2) fix(chat): checkmark beside the name, 48px model arrow in both pickers ### 📊 Changes **5 files changed** (+135 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/QuickSwitcherMobile.tsx` (+45 -23) 📝 `packages/client/src/components/chat/mari-primitives.tsx` (+11 -1) 📝 `packages/client/src/components/chat/mari/MariComposer.tsx` (+39 -5) 📝 `packages/client/src/localization/locales/en.json` (+1 -0) 📝 `packages/client/src/styles/mari.css` (+39 -1) </details> ### 📄 Description <!-- claude-projects-attribution: {"github_login":"bobneumann77-hub"} --> _Requested by **Ylli**_ > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #7659 ## Why this change - On phones, tapping a connection in the quick switcher always opened its model list, so a plain connection switch took a second tap to get out of the picker. Desktop switches in one click because its model list sits beside the connections. - Professor Mari's new connection picker (#7656) does the same on narrow composers, where it shows one step at a time. ## What changed - `QuickSwitcherMobile`: each connection row is now two buttons. Tapping the row switches to that connection and closes the menu. The arrow on the right, set off by a soft inset divider (the same hairline as the persona group rail in this menu), opens the connection's model list. The active checkmark stays on the row's selecting side, left of the divider. The arrow area is 48px wide (`w-12`), meeting Material's 48dp and Apple's 44pt touch-target sizes. - Professor Mari's composer (`MariComposer`, `mari.css`): on narrow composers the row switches and closes the menu, and a new arrow at the row's end (behind a `--mari-hairline` divider) opens the models step. The arrow area is 3rem wide, matching the chat switcher. Wide composers are unchanged: tapping a row still shows its models beside the list, and the arrow is hidden. - `MariRow` gains an optional `action` slot, built on the existing `mari-row__toggle` pattern (a row whose text is one button with another button beside it). - The arrow opens the models **without** switching the chat. `ConnectionModelPicker` already switches the chat when a model is picked, so browsing another connection's models is side-effect free until you choose one. - The built-in Local Model has no model list, so its row has no arrow (unchanged). - New English key `connections.modelPicker.showModels` for the arrow's accessible label. ## 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 Agent-run checks (still to be verified by a human): `pnpm check` exited 0; local CodeRabbit reported no findings on the whole branch. In a 375×812 viewport, in both the chat quick switcher and Professor Mari's composer, tapping a connection row switched the connection and closed the menu; tapping another row's arrow opened that connection's models and left the connection unchanged. At 1280×800, Professor Mari's picker kept its side-by-side layout with the arrows hidden. - Manually verify on a phone that tapping a connection row switches and closes the menu. - Manually verify that the arrow opens the model list, and picking a model there switches the chat to that connection. - Manually verify the divider and arrow hit area in light and dark themes. - Manually verify Professor Mari's connection menu on a phone: tapping a row switches and closes; the arrow opens that connection's models; picking a model switches to it. - Manually verify Professor Mari's connection menu on a wide window still shows models beside the list, with no arrows. - Manually verify "Retry with another model" in Professor Mari still retries after a connection is picked from a row on a phone. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) 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) Screenshots are attached in the review thread; to be added here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * The mobile connection menu now separates connection switching from model selection. Tap a connection to switch to it, or use its arrow to open the model picker. * The model picker includes a back control for returning to the connection list. * **Improvements** * The menu closes after switching connections when no model selection step is needed, and restores focus to the composer. <!-- 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-24 04:08:14 +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#7862
No description provided.