Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(desktop): render the first-message user bubble instantly on new-chat send

3 months ago

0ee701c
Authored
mweinbach7/2/2026, 1:59:57 PM
Queue the first message of a new chat with a pre-generated clientMessageId
and push its optimistic user bubble plus a pending turn-start state before
the workspace socket or thread session exists, so the transcript responds
at send click instead of after multiple round trips. The id travels through
the pending-message queue into turn/start so the server echo dedups against
the optimistic bubble, and thread-start failures or workspace disconnects
now clear the pending turn-start so the composer never sticks in Sending.

Co-authored-by: Cursor <cursoragent@cursor.com>

Parent4cf820f

8 files changed
  • apps/desktop/src/app/store.actions/thread.ts+64−1
  • apps/desktop/src/app/store.actions/workspaceDefaults.ts+4−2
  • apps/desktop/src/app/store.helpers/runtimeState.ts+16−4
  • apps/desktop/src/app/store.helpers/threadEventReducer/jsonRpcWorkspace.ts+1−0
  • apps/desktop/src/app/store.helpers/threadEventReducer/messaging.ts+36−11
  • apps/desktop/test/jsonrpc-single-connection.test.ts+52−0
  • apps/desktop/test/runtimeState.test.ts+24−5
apps/desktop/test/workspace-settings-sync.threadApply.test.ts
+7
−4