From aa9ef66d8124df73a440f00b592ef586f8db2702 Mon Sep 17 00:00:00 2001 From: Ethan <39577870+ethanndickson@users.noreply.github.com> Date: Tue, 2 Jun 2026 00:16:17 +1000 Subject: [PATCH] fix(site/src/pages/AgentsPage): drop misleading response-startup warning (#25905) The agents UI showed "Response startup is taking longer than expected" after a 15s grace period while waiting on the LLM provider. The message implied a problem was about to occur, but it does not actually lead to a timeout. The typical underlying cause is provider slowness rather than a client-side issue, so the warning is alarmist and unhelpful. Drop the delayed message and its timer entirely. The `starting` phase now keeps showing the shimmering "Thinking..." indicator until the first stream chunk arrives. Also remove the now-dead `startingResetKey` / `chatID` plumbing that only existed to remount the placeholder and reset the delayed-message timer when switching chats. Closes CODAGT-536 --- .../pages/AgentsPage/AgentChatPageView.tsx | 1 - .../ChatConversation/ChatStatusCallout.tsx | 28 +++------------- .../ChatConversation/LiveStreamTail.tsx | 6 ---- .../ChatConversation/StreamingOutput.tsx | 7 +--- .../components/ChatPageContent.stories.tsx | 32 +++---------------- .../AgentsPage/components/ChatPageContent.tsx | 3 -- 6 files changed, 9 insertions(+), 68 deletions(-) diff --git a/site/src/pages/AgentsPage/AgentChatPageView.tsx b/site/src/pages/AgentsPage/AgentChatPageView.tsx index b71f4bf0c4..596c499162 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.tsx @@ -531,7 +531,6 @@ export const AgentChatPageView: FC = ({ >
{ - const [isDelayed, setIsDelayed] = useState(false); - - useEffect(() => { - const timeout = window.setTimeout(() => { - setIsDelayed(true); - }, RESPONSE_STARTUP_GRACE_MS); - return () => window.clearTimeout(timeout); - }, []); - - return ( - - ); -}; - /** * Syncs with the system clock to produce a live countdown from an * ISO-8601 deadline. Polls at 100ms so the displayed second flips @@ -195,14 +174,15 @@ const ReconnectingAlert: FC<{ status: ReconnectingStatus }> = ({ status }) => { export const ChatStatusCallout: FC<{ status: LiveStatusModel; - startingResetKey?: string; -}> = ({ status, startingResetKey }) => { +}> = ({ status }) => { switch (status.phase) { case "idle": case "streaming": return null; case "starting": - return ; + return ( + + ); case "retrying": return ( <> diff --git a/site/src/pages/AgentsPage/components/ChatConversation/LiveStreamTail.tsx b/site/src/pages/AgentsPage/components/ChatConversation/LiveStreamTail.tsx index 9d3d5da412..e5eb558774 100644 --- a/site/src/pages/AgentsPage/components/ChatConversation/LiveStreamTail.tsx +++ b/site/src/pages/AgentsPage/components/ChatConversation/LiveStreamTail.tsx @@ -35,7 +35,6 @@ interface LiveStreamTailContentProps { streamState: StreamState | null; streamTools: readonly MergedTool[]; liveStatus: LiveStatusModel; - startingResetKey?: string; subagentTitles: Map; subagentVariants?: Map; subagentStatusOverrides: Map; @@ -48,7 +47,6 @@ export const LiveStreamTailContent = ({ streamState, streamTools, liveStatus, - startingResetKey, subagentTitles, subagentVariants, subagentStatusOverrides, @@ -88,7 +86,6 @@ export const LiveStreamTailContent = ({ streamState={streamState} streamTools={streamTools} liveStatus={liveStatus} - startingResetKey={startingResetKey} subagentTitles={subagentTitles} subagentVariants={subagentVariants} subagentStatusOverrides={subagentStatusOverrides} @@ -118,7 +115,6 @@ interface LiveStreamTailProps { store: ChatStoreHandle; persistedError: ChatDetailError | undefined; isTranscriptEmpty: boolean; - startingResetKey?: string; subagentTitles: Map; subagentVariants?: Map; urlTransform?: UrlTransform; @@ -129,7 +125,6 @@ export const LiveStreamTail = ({ store, persistedError, isTranscriptEmpty, - startingResetKey, subagentTitles, subagentVariants, urlTransform, @@ -166,7 +161,6 @@ export const LiveStreamTail = ({ streamState={streamState} streamTools={streamTools} liveStatus={liveStatus} - startingResetKey={startingResetKey} subagentTitles={subagentTitles} subagentVariants={subagentVariants} subagentStatusOverrides={subagentStatusOverrides} diff --git a/site/src/pages/AgentsPage/components/ChatConversation/StreamingOutput.tsx b/site/src/pages/AgentsPage/components/ChatConversation/StreamingOutput.tsx index af8534d960..4284394f6d 100644 --- a/site/src/pages/AgentsPage/components/ChatConversation/StreamingOutput.tsx +++ b/site/src/pages/AgentsPage/components/ChatConversation/StreamingOutput.tsx @@ -52,7 +52,6 @@ export const StreamingOutput: FC<{ subagentVariants?: Map; subagentStatusOverrides?: Map; liveStatus: LiveStatusModel; - startingResetKey?: string; urlTransform?: UrlTransform; mcpServers?: readonly TypesGen.MCPServerConfig[]; }> = ({ @@ -62,7 +61,6 @@ export const StreamingOutput: FC<{ subagentVariants, subagentStatusOverrides, liveStatus, - startingResetKey, urlTransform, mcpServers, }) => { @@ -113,10 +111,7 @@ export const StreamingOutput: FC<{ )} {needsStreamingThinking && } {!needsStreamingThinking && hasTransientLiveStatus(liveStatus) && ( - + )}
diff --git a/site/src/pages/AgentsPage/components/ChatPageContent.stories.tsx b/site/src/pages/AgentsPage/components/ChatPageContent.stories.tsx index ab327d1c83..43d8182066 100644 --- a/site/src/pages/AgentsPage/components/ChatPageContent.stories.tsx +++ b/site/src/pages/AgentsPage/components/ChatPageContent.stories.tsx @@ -101,13 +101,7 @@ export const StreamingToolCallGapRegression: Story = { store.setStreamState(streamState); store.setChatStatus("pending"); - return ( - - ); + return ; }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); @@ -120,13 +114,7 @@ export const StartingPhaseToolCallGapRegression: Story = { const store = buildRegressionStore(); store.setChatStatus("running"); - return ( - - ); + return ; }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); @@ -139,13 +127,7 @@ export const SpacerVisibleWhenNotStreaming: Story = { render: () => { const store = buildThinkingSpacerStore(); - return ( - - ); + return ; }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); @@ -165,13 +147,7 @@ export const HiddenAssistantPlaceholderDoesNotRender: Story = { buildMessage(4, "user", [{ type: "text", text: "Thanks!" }]), ]); - return ( - - ); + return ; }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); diff --git a/site/src/pages/AgentsPage/components/ChatPageContent.tsx b/site/src/pages/AgentsPage/components/ChatPageContent.tsx index 68d2644603..88e958b725 100644 --- a/site/src/pages/AgentsPage/components/ChatPageContent.tsx +++ b/site/src/pages/AgentsPage/components/ChatPageContent.tsx @@ -46,7 +46,6 @@ const isChatMessage = ( ): message is TypesGen.ChatMessage => Boolean(message); interface ChatPageTimelineProps { - chatID?: string; store: ChatStoreHandle; persistedError: ChatDetailError | undefined; onEditUserMessage?: ( @@ -62,7 +61,6 @@ interface ChatPageTimelineProps { } export const ChatPageTimeline: FC = ({ - chatID, store, persistedError, onEditUserMessage, @@ -133,7 +131,6 @@ export const ChatPageTimeline: FC = ({