Fixes the in-chat model/thinking (Brain) popup being cut off inside a narrow floating Chat window or compact dock on a wide desktop viewport.
- Key the popover's viewport-fitting inset layout on ChatView's .chat-view--narrow class (chat surface width) instead of only the @media (max-width: 768px) browser-viewport query, so narrow floating/docked chat surfaces get the fitted layout too.
- Add narrow-surface CSS rules for .chat-thinking-level-root, .chat-thinking-popover, .chat-thinking-agent-list, and .chat-thinking-popover-list to constrain position/width/max-height to the chat surface.
- Add a CSS-contract regression test asserting both the desktop popover sizing and the new narrow-surface rules stay in sync.
- Update docs/dashboard-guide.md to describe the popup staying fitted to the chat surface for narrow floating Chat windows/compact docks, not just mobile/tablet viewports.
- Add a patch changeset for @runfusion/fusion documenting the fix.
Files changed:
.changeset/fn-7934-chat-narrow-model-popup.md | 7 +++++
docs/dashboard-guide.md | 3 +-
packages/dashboard/app/components/ChatView.css | 22 +++++++++++++++
.../__tests__/ChatThinkingLevelControl.test.tsx | 32 ++++++++++++++++++++++
4 files changed, 63 insertions(+), 1 deletion(-)
Fusion-Task-Id: FN-7934
Fusion-Task-Lineage: 30c461c5-a153-4005-8a8c-24f02916a934
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Extend the chat brain-icon popup and its backing session PATCH route so an
active Direct chat's model or agent can be switched mid-conversation instead
of only being set at creation time.
- Add a Model/Agent section to ChatThinkingLevelControl (the brain-icon
popup) for picking a model provider/model or retargeting to a real agent
without leaving the chat.
- Extend PATCH /api/chat/sessions/:id to accept modelProvider/modelId (as a
validated pair via the existing validateModelPair helper) and agentId,
forwarding only the keys present in the body so omitted fields leave the
session's stored target untouched.
- Add chat-store updateSession support for the agentId clause alongside the
existing model/thinkingLevel fields, and a useChat.setSessionModel hook
for the dashboard to call the new PATCH capability.
- Update i18n locale strings (en/es/fr/ko/zh-CN/zh-TW) and dashboard-guide.md
docs for the new switcher UI.
- Add unit/integration test coverage across chat-store, chat-manager,
chat-routes, useChat, ChatThinkingLevelControl, and ChatView for the new
model/agent switch behavior.
- Add changeset fn-7908-chat-model-agent-switcher.md (minor,
@runfusion/fusion).
Files changed:
.changeset/fn-7908-chat-model-agent-switcher.md | 7 +
docs/dashboard-guide.md | 3 +-
packages/core/src/__tests__/chat-store.test.ts | 21 ++
packages/core/src/chat-store.ts | 8 +
packages/core/src/chat-types.ts | 2 +
packages/dashboard/app/api/legacy.ts | 11 +-
.../app/components/ChatThinkingLevelControl.tsx | 219 ++++++++++++++++++---
packages/dashboard/app/components/ChatView.css | 135 ++++++++++++-
packages/dashboard/app/components/ChatView.tsx | 23 ++-
.../__tests__/ChatThinkingLevelControl.test.tsx | 109 +++++++++-
.../__tests__/ChatView.thinking-level.test.tsx | 67 ++++++-
.../dashboard/app/hooks/__tests__/useChat.test.ts | 166 +++++++++++++++-
packages/dashboard/app/hooks/useChat.ts | 56 ++++++
.../dashboard/src/__tests__/chat-manager.test.ts | 38 ++++
.../dashboard/src/__tests__/chat-routes.test.ts | 117 ++++++++++-
.../dashboard/src/routes/register-chat-routes.ts | 48 ++++-
packages/i18n/locales/en/app.json | 8 +-
packages/i18n/locales/es/app.json | 8 +-
packages/i18n/locales/fr/app.json | 8 +-
packages/i18n/locales/ko/app.json | 8 +-
packages/i18n/locales/zh-CN/app.json | 8 +-
packages/i18n/locales/zh-TW/app.json | 8 +-
22 files changed, 1007 insertions(+), 71 deletions(-)
Fusion-Task-Id: FN-7908
Fusion-Task-Lineage: b1104865-9b0c-4d77-973e-89152fe245e0
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Chat thinking-level Default entries hardcoded "off" instead of showing the project/global resolved default, misleading operators about which level would actually apply.
- ChatView now fetches Settings via fetchSettings on mount and derives resolvedDefaultThinkingLevel from settings.defaultThinkingLevel (falling back to "off")
- Threads resolvedDefaultThinkingLevel into NewChatDialog and the in-chat ChatThinkingLevelControl (Brain popup) so both surfaces show e.g. "Default (medium)" instead of always "Default (off)"
- ChatThinkingLevelControl accepts a new optional defaultThinkingLevel prop (defaults to "off" for backward compatibility) used only for the Default/clear option label
- Updates dashboard-guide.md to document the resolved-default label behavior in both the New Chat dialog and the in-chat Brain popup
- Adds/updates tests: new ChatThinkingLevelControl coverage for the label prop, new ChatView.thinking-level test coverage for the resolved default, and mocks fetchSettings in the other ChatView test suites that render ChatView
- Adds a patch changeset for @runfusion/fusion
Files changed:
.changeset/fn-7905-chat-thinking-default.md | 7 ++++
docs/dashboard-guide.md | 5 +--
.../app/components/ChatThinkingLevelControl.tsx | 9 +++--
packages/dashboard/app/components/ChatView.tsx | 36 ++++++++++++++++---
.../__tests__/ChatThinkingLevelControl.test.tsx | 16 +++++++++
.../__tests__/ChatView.chat-commands.test.tsx | 1 +
.../__tests__/ChatView.content-search.test.tsx | 1 +
.../__tests__/ChatView.context-window.test.tsx | 1 +
.../__tests__/ChatView.copy-response.test.tsx | 1 +
.../__tests__/ChatView.core-contracts.test.tsx | 1 +
.../__tests__/ChatView.core-interactions.test.tsx | 1 +
.../components/__tests__/ChatView.core.test.tsx | 1 +
.../__tests__/ChatView.default-model-icon.test.tsx | 1 +
.../__tests__/ChatView.hash-mention.test.tsx | 1 +
.../components/__tests__/ChatView.mobile.test.tsx | 1 +
.../__tests__/ChatView.sessions-rooms.test.tsx | 1 +
.../__tests__/ChatView.streaming-thread.test.tsx | 1 +
.../__tests__/ChatView.thinking-level.test.tsx | 42 ++++++++++++++++++++++
18 files changed, 119 insertions(+), 8 deletions(-)
Fusion-Task-Id: FN-7905
Fusion-Task-Lineage: 7290aa8a-f812-43c3-8ba5-fc31a3f4579e
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>