Skip to content

Commit ec35ffa

Browse files
Angfr95Angfr95
authored andcommitted
fix(ui): disable chat refresh button during active agent turn
The refresh button was only guarded by chatLoading and connected state, allowing clicks during active agent turns. This could stall the run, reset chat state, and wedge the gateway. Add chatSending, chatRunId, and chatStream guards to match the existing busy-state pattern used by the model and thinking selects. Fixes #65522
1 parent 95a1356 commit ec35ffa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ui/src/ui/app-render.helpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ export function renderChatControls(state: AppViewState) {
275275
<div class="chat-controls">
276276
<button
277277
class="btn btn--sm btn--icon"
278-
?disabled=${state.chatLoading || !state.connected}
278+
?disabled=${state.chatLoading ||
279+
!state.connected ||
280+
state.chatSending ||
281+
Boolean(state.chatRunId) ||
282+
state.chatStream !== null}
279283
@click=${async () => {
280284
const app = state as unknown as ChatRefreshHost;
281285
app.chatManualRefreshInFlight = true;

0 commit comments

Comments
 (0)