fix(explicit-user-abort): separate explicit user abort semantics#3776
fix(explicit-user-abort): separate explicit user abort semantics#3776icecrasher321 merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Improves client resiliency for interrupted streams. Written by Cursor Bugbot for commit bc00454. Configure here. |
Greptile SummaryThis PR separates "explicit user stop" semantics from passive transport-disconnect semantics by introducing a dedicated Confidence Score: 4/5Safe to merge after fixing the The core server-side change (separating apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts — reconnect loop error path needs Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as Client (use-chat)
participant Server as SSE Server
participant Redis as Redis
Note over UI,Server: Happy path — explicit user stop
UI->>Server: POST /abort (streamId)
Server->>Server: userStopController.abort()
Server->>Server: abortController.abort()
Server->>Server: assertServerToolNotAborted → throws (userStopSignal fired)
Server-->>UI: stream closed
Note over UI,Server: Transport disconnect → reconnect
UI->>Server: fetch SSE stream
Server-->>UI: connection drops (network error)
Note over UI: catch block — NOT an AbortError
UI->>UI: reconnect loop (attempt 1..10, exponential backoff)
UI->>Server: fetchStreamBatch (replay buffered events)
Server-->>UI: buffered events + status
UI->>Server: attachToExistingStream (live tail)
Server-->>UI: stream resumes
Note over Server: abortController NOT fired → tools kept running
Note over Server: userStopSignal NOT fired → assertServerToolNotAborted passes
Note over UI,Redis: Redis-triggered abort (e.g. from another tab)
Redis->>Server: set streamAbortKey
Server->>Server: poll detects key
Server->>Server: userStopController.abort()
Server->>Server: abortController.abort()
Server->>Redis: del streamAbortKey
Reviews (1): Last reviewed commit: "fix(explicit-user-abort): separate expli..." | Re-trigger Greptile |
|
bugbot run |
Summary
Explicit user abort signal must be distinguished to not kill reconnection chance.
Type of Change
Testing
Tested manually
Checklist