fix(mothership): minor followups#3709
Conversation
PR SummaryMedium Risk Overview Improves chat UI stability during active streaming by preserving the local in-progress assistant message when refreshed Adjusts workflow diff autolayout to respect server-provided positions for new blocks: newly introduced blocks are only included in client-side layout when their position is missing/invalid or still at the origin Written by Cursor Bugbot for commit a3537e9. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR ships three focused bug fixes for the copilot/mothership feature: (1) abort-scope narrowing so only explicit user-triggered stops cancel the server-side stream (enabling reconnect), (2) a flash-prevention guard that preserves the in-progress streaming assistant message when a server-pushed
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User (Browser)
participant UC as useChat Hook
participant SSE as createSSEStream (Server)
participant Go as Sim→Go Stream
Note over U,Go: Before this PR — any disconnect aborted the server stream
U->>UC: Navigate away / unmount
UC->>SSE: streamReader.cancel()
SSE->>Go: abortController.abort() ❌ (removed)
Go-->>SSE: Processing stopped early
Note over U,Go: After this PR — client disconnect lets stream finish for reconnect
U->>UC: Navigate away / unmount
UC->>SSE: streamReader.cancel()
SSE->>SSE: clientDisconnected = true
Go-->>SSE: Stream completes, events buffered
SSE-->>SSE: setStreamMeta(status: cancelled*)
U->>UC: Return to chat (reconnect)
UC->>SSE: Reconnect with same streamId
SSE-->>UC: Replay buffered snapshot events
Note over UC: shouldPreserveActiveStreamingMessage
UC->>UC: Check activeStreamId === streamIdRef
UC->>UC: Preserve local streaming bubble,\navoid flash on chatHistory update
Note over Go: *status 'cancelled' even on full completion when clientDisconnected
|
Summary
Type of Change
Testing
Tested manually
Checklist