indent wrapped todo items properly

This commit is contained in:
Sebastian Herrlinger
2025-12-23 15:44:45 +01:00
parent c81721e9fc
commit 1d9e181da0
3 changed files with 36 additions and 12 deletions
@@ -10,6 +10,7 @@ import { Installation } from "@/installation"
import { useKeybind } from "../../context/keybind"
import { useDirectory } from "../../context/directory"
import { useKV } from "../../context/kv"
import { TodoItem } from "../../component/todo-item"
export function Sidebar(props: { sessionID: string }) {
const sync = useSync()
@@ -215,13 +216,7 @@ export function Sidebar(props: { sessionID: string }) {
</text>
</box>
<Show when={todo().length <= 2 || expanded.todo}>
<For each={todo()}>
{(todo) => (
<text style={{ fg: todo.status === "in_progress" ? theme.success : theme.textMuted }}>
[{todo.status === "completed" ? "✓" : " "}] {todo.content}
</text>
)}
</For>
<For each={todo()}>{(todo) => <TodoItem status={todo.status} content={todo.content} />}</For>
</Show>
</box>
</Show>