Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(conversations): add mid-turn follow-up state to send-failure test

Steven Enamakel4366f41bd18d
diff --git a/app/src/pages/__tests__/Conversations.render.test.tsx b/app/src/pages/__tests__/Conversations.render.test.tsx
index 91502c53b7..8521da2151 100644
--- a/app/src/pages/__tests__/Conversations.render.test.tsx
+++ b/app/src/pages/__tests__/Conversations.render.test.tsx
@@ -2235,6 +2235,12 @@ describe('Conversations — queued follow-ups while a turn streams', () => {
it('keeps the draft intact when the follow-up send fails', async () => {
vi.mocked(chatSend).mockRejectedValueOnce(new Error('send boom'));
const { store, textarea } = await renderStreamingConversation();
+ // A real mid-turn follow-up: the runtime is running too, so the send takes
+ // the queue's `steer` lane, which hands off after the composer clear.
+ act(() => {
+ store?.dispatch(beginInferenceTurn({ threadId: 'fup-thread' }));
+ store?.dispatch(markInferenceTurnStreaming({ threadId: 'fup-thread' }));
+ });
await act(async () => {
setComposerText(textarea, 'keep me on failure');