From 5f0f8e64ed55622fefa8f737711f5471a973636c Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Wed, 26 Aug 2026 00:35:25 +0300 Subject: [PATCH] refactor(chat): split the composer status bar from the assistant status chip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The composer rendered a second StatusRow instance carrying the pending-changes bar and the todos dropdown, so every restyle of the floating assistant-status chip (glass, placement, sizing) silently restyled the composer bar and its dropdown too — for the fourth time. StatusRow is now only the floating chip above the composer; the composer's own bar is a new ComposerStatusBar with the pre-glass layout, its own container name, and its own container-query classes (the anti-overlap rules that hide the long active todo under 38rem and the changed-files label under 30rem moved with it — losing them during the split let the two dropdown triggers overlap on mobile). The two components share no markup and no CSS hooks anymore. --- packages/ui/src/components/chat/ChatInput.tsx | 7 +- .../src/components/chat/ComposerStatusBar.tsx | 305 ++++++++++++++++ .../src/components/chat/PendingChangesBar.tsx | 2 +- packages/ui/src/components/chat/StatusRow.tsx | 326 +----------------- .../components/chat/StatusRowContainer.tsx | 2 - packages/ui/src/index.css | 8 +- 6 files changed, 325 insertions(+), 325 deletions(-) create mode 100644 packages/ui/src/components/chat/ComposerStatusBar.tsx diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index 57387da7..f088d16d 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -48,7 +48,7 @@ import type { SnippetAutocompleteHandle } from './SnippetAutocomplete'; import { cn } from "@/lib/utils"; import { ModelControls } from './ModelControls'; import { parseAgentMentions } from '@/lib/messages/agentMentions'; -import { StatusRow } from './StatusRow'; +import { ComposerStatusBar } from './ComposerStatusBar'; import { PendingChangesBar } from './PendingChangesBar'; import { useChatSurfaceMode } from './useChatSurfaceMode'; import { MobileAgentButton } from './MobileAgentButton'; @@ -220,7 +220,7 @@ const MemoModelControls = React.memo(ModelControls); const MemoComposerDictation = React.memo(ComposerDictation); const MemoMobileAgentButton = React.memo(MobileAgentButton); const MemoMobileModelButton = React.memo(MobileModelButton); -const MemoStatusRow = React.memo(StatusRow); +const MemoComposerStatusBar = React.memo(ComposerStatusBar); interface ChatInputProps { onOpenSettings?: () => void; @@ -2656,9 +2656,8 @@ const ChatInputComponent: React.FC = ({ sessionId={currentSessionId} directory={currentSessionDirectoryForSync ?? currentDirectory} /> -