From 259d69cd8f3c366609441cf936f711e3fc6d923d Mon Sep 17 00:00:00 2001 From: SSU-WEI HUANG Date: Sat, 1 Aug 2026 01:16:52 +0800 Subject: [PATCH] fix(web): show composer status for Cursor (#1250) --- .../AssistantChat/HappyComposer.tsx | 38 +++++++++---------- .../AssistantChat/StatusBar.test.ts | 14 +------ .../components/AssistantChat/StatusBar.tsx | 5 --- 3 files changed, 19 insertions(+), 38 deletions(-) diff --git a/web/src/components/AssistantChat/HappyComposer.tsx b/web/src/components/AssistantChat/HappyComposer.tsx index 28e8a37b..5e969863 100644 --- a/web/src/components/AssistantChat/HappyComposer.tsx +++ b/web/src/components/AssistantChat/HappyComposer.tsx @@ -33,7 +33,7 @@ import { useComposerDraft } from '@/hooks/useComposerDraft' import { useComposerEnterBehavior } from '@/hooks/useComposerEnterBehavior' import { FloatingOverlay } from '@/components/ChatInput/FloatingOverlay' import { Autocomplete } from '@/components/ChatInput/Autocomplete' -import { shouldShowComposerStatusBar, StatusBar } from '@/components/AssistantChat/StatusBar' +import { StatusBar } from '@/components/AssistantChat/StatusBar' import { ComposerButtons } from '@/components/AssistantChat/ComposerButtons' import type { PendingSchedule } from '@/components/AssistantChat/ScheduleTimePicker' import { AttachmentItem } from '@/components/AssistantChat/AttachmentItem' @@ -1322,25 +1322,23 @@ export function HappyComposer(props: { {overlays} - {shouldShowComposerStatusBar(agentFlavor) ? ( - - ) : null} + {sendError ? (
{ - it('hides the composer status bar for Cursor sessions', () => { - expect(shouldShowComposerStatusBar('cursor')).toBe(false) - }) - - it('shows the composer status bar for other agents', () => { - expect(shouldShowComposerStatusBar('claude')).toBe(true) - expect(shouldShowComposerStatusBar('codex')).toBe(true) - expect(shouldShowComposerStatusBar(null)).toBe(true) - }) -}) +import { shouldShowCodexFastBadge } from './StatusBar' describe('shouldShowCodexFastBadge', () => { it('uses only the effective service tier', () => { diff --git a/web/src/components/AssistantChat/StatusBar.tsx b/web/src/components/AssistantChat/StatusBar.tsx index 8942e0e8..1b636d79 100644 --- a/web/src/components/AssistantChat/StatusBar.tsx +++ b/web/src/components/AssistantChat/StatusBar.tsx @@ -132,11 +132,6 @@ export function shouldShowCodexFastBadge( return agentFlavor === 'codex' && isFastServiceTier(serviceTier) } -/** Cursor native ACP does not emit usage_update; hide the bar to avoid empty/misleading UI. */ -export function shouldShowComposerStatusBar(agentFlavor: string | null | undefined): boolean { - return agentFlavor !== 'cursor' -} - export function StatusBar(props: { active: boolean thinking: boolean