authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-26 18:43:57-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-26 20:51:29-08:00
logf6e7166e7955af6c06881cfecf6d869854cf191e
treeafb87b333f93ca3ef8f242fc8f84bf9072757aa9
parent2da82900409fe231fb913df2c61b580f1a453924

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

1 files changed, 1 insertions(+), 1 deletions(-)

apps/web/src/components/ChatView.tsx+1-1
...@@ -1466,7 +1466,7 @@ export default function ChatView({ threadId }: ChatViewProps) {...@@ -1466,7 +1466,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
1466 // with the worktree cwd/env instead of briefly using the project root.1466 // with the worktree cwd/env instead of briefly using the project root.
1467 dispatch({1467 dispatch({
1468 type: "SET_THREAD_BRANCH",1468 type: "SET_THREAD_BRANCH",
1469 threadId: activeThread.id,1469 threadId: threadIdForSend,
1470 branch: result.worktree.branch,1470 branch: result.worktree.branch,
1471 worktreePath: result.worktree.path,1471 worktreePath: result.worktree.path,
1472 });1472 });