fix(milestone-interview): reconnect SSE stream after submitting response
Same bug as MissionInterviewModal: handleSubmitResponse was calling the API without first reconnecting to the SSE stream. The stream's complete event closes the connection after each question delivery, so after the user submits an answer, a fresh connection is needed to receive the next question or summary. Also cleans up the stream on API error, matching MissionInterviewModal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -330,13 +330,16 @@ export function MilestoneSliceInterviewModal({
|
||||
setStreamingOutput("");
|
||||
|
||||
try {
|
||||
connectToInterviewStream(sessionId);
|
||||
await respondToInterview(sessionId, responses, projectId, sessionTabId);
|
||||
} catch (err: any) {
|
||||
streamConnectionRef.current?.close();
|
||||
streamConnectionRef.current = null;
|
||||
setError(err.message || "Failed to submit response");
|
||||
setView({ type: "question", sessionId, question: view.question });
|
||||
}
|
||||
},
|
||||
[projectId, respondToInterview, sessionTabId, view],
|
||||
[connectToInterviewStream, projectId, respondToInterview, sessionTabId, view],
|
||||
);
|
||||
|
||||
const handleApply = useCallback(async () => {
|
||||
|
||||
Reference in New Issue
Block a user