From a79da7480d8589e74c9b2e93cb571e3705cdb9eb Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 22:05:35 +0000 Subject: [PATCH] Add truncation indicator to TodoDrawer When the number of tasks in the TodoDrawer exceeds `maxVisible`, they are silently truncated. This adds an explicit visual indicator showing exactly how many tasks are hidden, improving situational awareness. --- .jules/palette.md | 3 +++ src/cli/ui/components/TodoDrawer.tsx | 33 ++++++++++++++++++---------- 2 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 .jules/palette.md diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..84f9f129 --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2026-08-20 - [Truncated Dynamic Lists UX] +**Learning:** Silently truncating dynamic lists in terminal UIs removes situational awareness. +**Action:** Always include an explicit visual indicator (like '... and X more tasks') when a dynamic list is truncated due to a maxVisible limit. \ No newline at end of file diff --git a/src/cli/ui/components/TodoDrawer.tsx b/src/cli/ui/components/TodoDrawer.tsx index 8304d871..c9e00250 100644 --- a/src/cli/ui/components/TodoDrawer.tsx +++ b/src/cli/ui/components/TodoDrawer.tsx @@ -118,21 +118,30 @@ export function TodoDrawer({ No tasks yet. ) : ( - visibleTodos.map((t) => ( - - - {statusIcon(t.status)} + <> + {visibleTodos.map((t) => ( + + + {statusIcon(t.status)} + + + {priorityIcon(t.priority)} + + + + {t.text} + + - - {priorityIcon(t.priority)} - - - - {t.text} + ))} + {todos.length > maxVisible && ( + + + ... and {todos.length - maxVisible} more tasks - - )) + )} + )} )}