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} - - - - )) + )} + )} )}