Skip to content

Commit cc8c889

Browse files
committed
Add empty state to task list sidebar
1 parent f37fad8 commit cc8c889

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

apps/code/src/renderer/features/sidebar/components/TaskListView.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,22 @@ export function TaskListView({
360360

361361
<SectionLabel label="Tasks" endContent={<TaskFilterMenu />} />
362362

363-
{organizeMode === "by-project" ? (
363+
{pinnedTasks.length === 0 &&
364+
flatTasks.length === 0 &&
365+
groupedTasks.length === 0 ? (
366+
<div className="flex flex-col items-center gap-3 px-4 py-8 text-center">
367+
<Text size="2" className="text-gray-11">
368+
No tasks yet
369+
</Text>
370+
<button
371+
type="button"
372+
className="rounded-md bg-gray-3 px-3 py-1.5 text-[13px] text-gray-12 transition-colors hover:bg-gray-4"
373+
onClick={() => navigateToTaskInput()}
374+
>
375+
New task
376+
</button>
377+
</div>
378+
) : organizeMode === "by-project" ? (
364379
<DragDropProvider
365380
onDragOver={handleDragOver}
366381
sensors={[

0 commit comments

Comments
 (0)