Files
fusion/packages/dashboard/app/components/ChatThinkingLevelControl.tsx
gsxdsm 313956df5a FN-7916: fix chat model selector dismissing before selection on mobile/tablet
Fix the in-chat Brain popup's model picker on touch viewports: pointerdown outside-close was treating the portaled CustomModelDropdown menu as outside the popup, dismissing it before the tap could register a model selection, and the mobile popover was mis-anchored off-screen.

- ChatThinkingLevelControl: treat pointerdown targets inside the portaled `.model-combobox-dropdown--portal` menu as inside the popup so touch taps select the model instead of closing the popup first
- ChatView.css: clamp the popover to the viewport width via max-width/max-inline-size, and on mobile anchor it to the chat input area with tokenized left/right gutters instead of a collapsing left:0 width
- Add a portal-aware regression test covering pointerdown-inside-portal selection, genuine outside-pointerdown close, and the mobile CSS anchoring contract
- Add changeset (patch) and update dashboard guide docs to describe mobile/tablet behavior

Files changed:
 .changeset/fn-7916-chat-mobile-model-selector.md   |  7 ++
 docs/dashboard-guide.md                            |  3 +-
 .../app/components/ChatThinkingLevelControl.tsx    | 10 ++-
 packages/dashboard/app/components/ChatView.css     | 17 +++-
 .../ChatThinkingLevelControl.portal.test.tsx       | 97 ++++++++++++++++++++++
 5 files changed, 130 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7916

Fusion-Task-Lineage: bcc2d9ad-0be6-4e23-b643-eebf93aae3c6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 22:49:51 -07:00

13 KiB