Skip to content

Commit 88bafdb

Browse files
committed
Remove stale 'preparing-worktree' send phase
Worktree preparation now happens server-side as part of the bootstrap payload, so the client-side 'preparing-worktree' phase no longer corresponds to any actual work. Between setting it and transitioning to 'sending-turn', async operations (auto-title, persistThreadSettings) could run, leaving a misleading 'Preparing worktree...' indicator in the UI. Remove the phase entirely: always begin with 'sending-turn', drop the isPreparingWorktree derived flag and its UI references.
1 parent 2535cf1 commit 88bafdb

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

apps/web/src/components/ChatView.logic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function collectUserMessageBlobPreviewUrls(message: ChatMessage): string[
7575
return previewUrls;
7676
}
7777

78-
export type SendPhase = "idle" | "preparing-worktree" | "sending-turn";
78+
export type SendPhase = "idle" | "sending-turn";
7979

8080
export interface PullRequestDialogState {
8181
initialReference: string | null;

apps/web/src/components/ChatView.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,6 @@ export default function ChatView({ threadId }: ChatViewProps) {
658658
const selectedModelForPicker = selectedModel;
659659
const phase = derivePhase(activeThread?.session ?? null);
660660
const isSendBusy = sendPhase !== "idle";
661-
const isPreparingWorktree = sendPhase === "preparing-worktree";
662661
const isWorking = phase === "running" || isSendBusy || isConnecting || isRevertingCheckpoint;
663662
const nowIso = new Date(nowTick).toISOString();
664663
const activeWorkStartedAt = deriveActiveWorkStartedAt(
@@ -2573,7 +2572,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
25732572
}
25742573

25752574
sendInFlightRef.current = true;
2576-
beginSendPhase(baseBranchForWorktree ? "preparing-worktree" : "sending-turn");
2575+
beginSendPhase("sending-turn");
25772576

25782577
const composerImagesSnapshot = [...composerImages];
25792578
const composerTerminalContextsSnapshot = [...sendableComposerTerminalContexts];
@@ -4006,11 +4005,6 @@ export default function ChatView({ threadId }: ChatViewProps) {
40064005
{activeContextWindow ? (
40074006
<ContextWindowMeter usage={activeContextWindow} />
40084007
) : null}
4009-
{isPreparingWorktree ? (
4010-
<span className="text-muted-foreground/70 text-xs">
4011-
Preparing worktree...
4012-
</span>
4013-
) : null}
40144008
{activePendingProgress ? (
40154009
<div className="flex items-center gap-2">
40164010
{activePendingProgress.questionIndex > 0 ? (
@@ -4115,11 +4109,9 @@ export default function ChatView({ threadId }: ChatViewProps) {
41154109
aria-label={
41164110
isConnecting
41174111
? "Connecting"
4118-
: isPreparingWorktree
4119-
? "Preparing worktree"
4120-
: isSendBusy
4121-
? "Sending"
4122-
: "Send message"
4112+
: isSendBusy
4113+
? "Sending"
4114+
: "Send message"
41234115
}
41244116
>
41254117
{isConnecting || isSendBusy ? (

0 commit comments

Comments
 (0)