Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/src/hooks/useJsonPatchWsStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const useJsonPatchWsStream = <T extends object>(

// Handle JsonPatch messages (same as SSE json_patch event)
if ('JsonPatch' in msg) {
setIsInitialized(true);
const patches: Operation[] = msg.JsonPatch;
const filtered = deduplicatePatches
? deduplicatePatches(patches)
Expand All @@ -143,6 +144,7 @@ export const useJsonPatchWsStream = <T extends object>(
// Treat finished as terminal - do NOT reconnect
if ('finished' in msg) {
finishedRef.current = true;
setIsInitialized(true);
ws.close(1000, 'finished');
wsRef.current = null;
setIsConnected(false);
Expand Down