From 9cd7fc55266c410f4179c03a3fe3e212d22d7034 Mon Sep 17 00:00:00 2001 From: Ruud Andriessen Date: Tue, 10 Mar 2026 22:25:51 +0100 Subject: [PATCH] fix(tasks): show worktree setup state on empty task page --- src/components/task-page-message-list.tsx | 25 ++++++++++++++++++++--- src/pages/task-page.tsx | 4 +++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/components/task-page-message-list.tsx b/src/components/task-page-message-list.tsx index b7ab2d5..455bf5a 100644 --- a/src/components/task-page-message-list.tsx +++ b/src/components/task-page-message-list.tsx @@ -1,4 +1,5 @@ import type { RefObject } from "react"; +import { Loader2 } from "lucide-react"; import { TaskStreamActivity } from "@/components/task-stream-activity"; import { MarkdownContent } from "@/components/markdown-content"; import { AnimatedStreamItem } from "@/components/animated-stream-item"; @@ -11,6 +12,7 @@ interface TaskPageMessageListProps { messagesEndRef: RefObject; onScroll: () => void; showEmptyState: boolean; + preparingWorkspace: boolean; timelineEntries: TimelineEntry[]; isRunning: boolean; runningDurationMs: number | null; @@ -21,6 +23,7 @@ export function TaskPageMessageList({ messagesEndRef, onScroll, showEmptyState, + preparingWorkspace, timelineEntries, isRunning, runningDurationMs, @@ -32,9 +35,25 @@ export function TaskPageMessageList({ className="neo-scroll flex-1 overflow-y-auto bg-background" > {showEmptyState ? ( -
-

No messages yet

-

Send a message to start a task discussion.

+
+ {preparingWorkspace ? ( + <> +
+
+
+

Setting up worktree

+

+ You can draft your message while the runner prepares the workspace. +

+
+ + ) : ( + <> +

No messages yet

+

Send a message to start a task discussion.

+ + )}
) : (
diff --git a/src/pages/task-page.tsx b/src/pages/task-page.tsx index d3a2809..5bcfe9b 100644 --- a/src/pages/task-page.tsx +++ b/src/pages/task-page.tsx @@ -113,6 +113,7 @@ export function TaskPage({ const isRunnerBackedTask = runnerType === "local-worktree" && !!runnerSessionId && !!workspacePath; const willBeRunnerBacked = desktopApp && (!runnerType || isRunnerBackedTask); + const preparingWorkspace = willBeRunnerBacked && !isRunnerBackedTask; const isReadOnlyRemoteTask = isRunnerBackedTask && !desktopApp; const { data: runnerModels, @@ -288,6 +289,7 @@ export function TaskPage({ messagesEndRef={messagesEndRef} onScroll={handleMessageListScroll} showEmptyState={showEmptyState} + preparingWorkspace={preparingWorkspace} timelineEntries={timelineEntries} isRunning={isRunning} runningDurationMs={runningDurationMs} @@ -301,7 +303,7 @@ export function TaskPage({ isRunning={isRunning} isReadOnlyRemoteTask={isReadOnlyRemoteTask} sending={sending} - preparingWorkspace={willBeRunnerBacked && !isRunnerBackedTask} + preparingWorkspace={preparingWorkspace} isRunnerBackedTask={isRunnerBackedTask} willBeRunnerBacked={willBeRunnerBacked} activeModelSelection={activeModelSelection}