From 533215a61ee75ae3f6b02d4bd39b40b5752c9d2f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 22:14:02 +0000 Subject: [PATCH] feat(ui): add visual indicator for truncated todo lists When a user has more todos than what fits into `maxVisible`, the list truncates without warning in the TodoDrawer UI, causing them to lose situational awareness. This adds an explicit `... and X more tasks` visual indicator to clearly signal truncation and improve usability. --- .jules/palette.md | 3 +++ src/cli/ui/components/TodoDrawer.tsx | 38 ++++++++++++++++++---------- 2 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 .jules/palette.md diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..4ae9a4b3 --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2026-08-26 - Explicit Visual Indicators for Truncated Arrays +**Learning:** When truncating lists in constrained terminal UIs (like maxVisible tasks), users lose situational awareness if there is no explicit visual indicator of hidden items. +**Action:** Always include a visual counter (e.g. '... and X more') when array counts exceed visibility limits in ink components to preserve context and accessibility. diff --git a/src/cli/ui/components/TodoDrawer.tsx b/src/cli/ui/components/TodoDrawer.tsx index 8304d871..73083a75 100644 --- a/src/cli/ui/components/TodoDrawer.tsx +++ b/src/cli/ui/components/TodoDrawer.tsx @@ -118,21 +118,33 @@ 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)} + ))} + {todos.length > visibleTodos.length && ( + + + + + ... and {todos.length - visibleTodos.length} more tasks + + - - - {t.text} - - - - )) + )} + )} )}