diff --git a/tests/webview/live-stream-response-rendering.test.mjs b/tests/webview/live-stream-response-rendering.test.mjs index 09f652a..2ca5169 100644 --- a/tests/webview/live-stream-response-rendering.test.mjs +++ b/tests/webview/live-stream-response-rendering.test.mjs @@ -321,6 +321,17 @@ test("the live response card owns the AI loading text until its response finishe ); }); +test("the live loading text follows the response card", () => { + const responseSectionIndex = messageSource.lastIndexOf( + 'data-assistant-section="response"', + ); + const loadingTextIndex = messageSource.indexOf( + 'data-assistant-section="live-loading-text"', + ); + assert.ok(responseSectionIndex >= 0, "the assistant response section must render"); + assert.ok(loadingTextIndex > responseSectionIndex, "the loading text must render below the latest response card"); +}); + test("active assistant cards do not use intrinsic virtualization height", () => { assert.match( messageSource, diff --git a/webview/shared/src/chat/MessageComponents.tsx b/webview/shared/src/chat/MessageComponents.tsx index 0dc3c87..911c720 100644 --- a/webview/shared/src/chat/MessageComponents.tsx +++ b/webview/shared/src/chat/MessageComponents.tsx @@ -12664,26 +12664,6 @@ const hasVisibleResponseSectionContent = ); })} - {/* - * Keep the live status text attached to the assistant card. - * The ticker used to be mounted only by the session-switch - * spinner, so normal SSE responses could lose the loading - * text while their activity rows were still streaming. It - * must not be rendered in the composer: mounting it here - * preserves the card's ownership and prevents a response - * rerender from moving the scroll target to the user prompt. - */} - {shouldShowLiveLoadingText ? ( -