diff --git a/.changeset/fn-7455-mobile-chat-header-layout.md b/.changeset/fn-7455-mobile-chat-header-layout.md new file mode 100644 index 0000000000..a5259eaa0b --- /dev/null +++ b/.changeset/fn-7455-mobile-chat-header-layout.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Fix the mobile Chat header so back navigation and session selection stay on one row. +category: fix +dev: Keeps the direct-chat mobile header collapsed while preserving desktop and room-chat layouts. diff --git a/docs/dashboard-guide.md b/docs/dashboard-guide.md index 606a80a37b..abcba69e77 100644 --- a/docs/dashboard-guide.md +++ b/docs/dashboard-guide.md @@ -411,7 +411,7 @@ Chat view provides project-scoped conversations with agents. - If you queue follow-up user messages while the assistant is still streaming, Chat persists them per session, stacks each queued preview above the input box with one shared divider, and restores/sends them one at a time in FIFO order once each active response finishes if you leave and return. - Chat message lists now track near-bottom scroll state: while you are reading older messages, live streaming/new replies do not force-scroll; a **Latest** jump control appears until you return to the tail. - On mobile direct-chat threads, entering a thread and restoring Chat after tab/page visibility returns re-anchors to the newest message (`scrollTop = scrollHeight`) so the view always opens at the live tail. -- On mobile direct-chat threads, the top Chat header collapses into one compact row: the back button and active conversation dropdown live beside the Chat icon, while the visible “Chat” title is hidden to preserve transcript space. Tapping the active conversation opens a lightweight dropdown so you can switch to another direct session or start a New Chat without backing out to the sidebar list first; long conversation titles stay readable in the dropdown via wrapped option text and taller touch-friendly rows. +- On mobile direct-chat threads, the top Chat header collapses into one compact row: the back button is the far-left visible control and the active conversation dropdown stays beside it, while the visible Chat icon/title shell is hidden to preserve transcript space. Tapping the active conversation opens a lightweight dropdown so you can switch to another direct session or start a New Chat without backing out to the sidebar list first; long conversation titles stay readable in the dropdown via wrapped option text and taller touch-friendly rows. - On mobile direct-chat threads, the single thread-wide Markdown/plain eye toggle floats above the transcript/composer area instead of occupying a second header row; desktop/tablet keeps the toggle in the thread header. - Direct chat sessions can be renamed from the sidebar row edit button, the desktop conversation context menu, and the mobile session switcher; blank rename submissions clear the custom title so the default session label is shown again. diff --git a/packages/dashboard/app/components/ChatView.css b/packages/dashboard/app/components/ChatView.css index 36a01af426..9217463b54 100644 --- a/packages/dashboard/app/components/ChatView.css +++ b/packages/dashboard/app/components/ChatView.css @@ -769,10 +769,14 @@ Mobile chat session switching needs a dedicated rename tap target beside each se } /* -FNXC:ChatHeader 2026-07-02-00:00: -Mobile direct-chat detail uses ViewHeader as the only visible header row. Keep the Chat icon/title relationship available to assistive tech while visually collapsing only the text label, and let the moved session switcher consume the action row width without duplicating the old thread-header controls. +FNXC:ChatHeader 2026-07-02-17:26: +Mobile direct-chat detail uses ViewHeader as the only visible header row. The back arrow must be the far-left visible/focusable control and the session selector must stay on that same non-wrapping row, so hide the entire Chat title/icon shell from layout while retaining the accessible heading and make the actions cluster own the row from the left edge. */ -.chat-view--mobile-direct-thread > .view-header .view-header__title span { +.chat-view--mobile-direct-thread > .view-header { + flex-wrap: nowrap; +} + +.chat-view--mobile-direct-thread > .view-header .view-header__title { position: absolute; inline-size: var(--btn-border-width); block-size: var(--btn-border-width); @@ -784,6 +788,10 @@ Mobile direct-chat detail uses ViewHeader as the only visible header row. Keep t .chat-view--mobile-direct-thread > .view-header .view-header__actions { flex: 1 1 auto; + width: 100%; + min-width: 0; + margin-left: 0; + flex-wrap: nowrap; justify-content: flex-start; } @@ -792,7 +800,8 @@ Mobile direct-chat detail uses ViewHeader as the only visible header row. Keep t } .chat-view--mobile-direct-thread .chat-mobile-session-menu { - flex: 1 1 auto; + flex: 1 1 0; + min-width: 0; } @media (max-width: 768px), (max-height: 480px) { diff --git a/packages/dashboard/app/components/ChatView.tsx b/packages/dashboard/app/components/ChatView.tsx index 530f137545..8ba0e85de9 100644 --- a/packages/dashboard/app/components/ChatView.tsx +++ b/packages/dashboard/app/components/ChatView.tsx @@ -2685,8 +2685,8 @@ export function ChatView({ projectId, addToast, floating = false, compactLayout {showMobileDirectThreadHeaderControls ? ( <> {/* - FNXC:ChatHeader 2026-07-02-00:00: - Mobile direct-thread view has a single top row: move back navigation and the active conversation switcher into ViewHeader so the transcript gains the height formerly consumed by a second thread header. The ViewHeader still owns the accessible Chat title; CSS only hides its visible text in this direct-thread mobile state. + FNXC:ChatHeader 2026-07-02-17:26: + Mobile direct-thread view has a single top row: back navigation must be the first visible/focusable control at the far-left edge and the active conversation switcher must stay beside it. The ViewHeader still owns the accessible Chat title; ChatView-scoped CSS hides the entire title/icon shell only in this direct-thread mobile state so it cannot reserve left-edge layout space. */}