From d8591006cac371d2ebbab6c86bf6be0f09915198 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2026 22:10:06 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20visual=20indica?= =?UTF-8?q?tor=20for=20truncated=20todo=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .jules/palette.md | 3 +++ bun.lock | 1 - src/cli/ui/components/TodoDrawer.tsx | 38 ++++++++++++++++++---------- 3 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 .jules/palette.md diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..df699d9d --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2026-08-23 - Truncation Awareness in Terminal UIs +**Learning:** In space-constrained terminal UIs built with Ink, dynamically truncating long lists (like Todo items) without an explicit visual indicator leads to a loss of user situational awareness, causing them to miss off-screen data. +**Action:** When implementing bounded or scrollable lists in terminal components (e.g., using a `maxVisible` prop), always include a trailing element (e.g., `... and X more tasks`) to communicate hidden content. diff --git a/bun.lock b/bun.lock index f1109aa4..d19f7943 100644 --- a/bun.lock +++ b/bun.lock @@ -1,6 +1,5 @@ { "lockfileVersion": 1, - "configVersion": 1, "workspaces": { "": { "name": "salmon-loop", diff --git a/src/cli/ui/components/TodoDrawer.tsx b/src/cli/ui/components/TodoDrawer.tsx index 8304d871..fcaa0b39 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 > maxVisible && ( + + + + + ... and {todos.length - maxVisible} more tasks + + - - - {t.text} - - - - )) + )} + )} )}