Uh oh!
There was an error while loading. Please reload this page.
fix(explicit-user-abort): separate explicit user abort semantics - #3776
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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
icecrasher321
commented
Mar 26, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
* fix(explicit-user-abort): separate explicit user abort semantics * address comments * more
* fix(explicit-user-abort): separate explicit user abort semantics * address comments * more
Summary
Explicit user abort signal must be distinguished to not kill reconnection chance.
Type of Change
Testing
Tested manually
Checklist