Capture threadId before async send flow

- Store `activeThread.id` once at send start and reuse it
- Prevents updates/errors from targeting the wrong thread during async worktree/send steps
This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-02-26 20:51:29 -08:00
1 parent 2da8290040
commit f6e7166e79
1 file changed
+1 -1
+1 -1
View File
@@ -1466,7 +1466,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
// with the worktree cwd/env instead of briefly using the project root.
dispatch({
type: "SET_THREAD_BRANCH",
threadId: activeThread.id,
threadId: threadIdForSend,
branch: result.worktree.branch,
worktreePath: result.worktree.path,
});