Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 0 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 25 additions & 13 deletions src/cli/ui/components/TodoDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,33 @@ export function TodoDrawer({
No tasks yet.
</Text>
) : (
visibleTodos.map((t) => (
<Box key={t.id} flexDirection="row">
<Box width={4}>
<Text color={statusColor(t.status)}>{statusIcon(t.status)}</Text>
<>
{visibleTodos.map((t) => (
<Box key={t.id} flexDirection="row">
<Box width={4}>
<Text color={statusColor(t.status)}>{statusIcon(t.status)}</Text>
</Box>
<Box width={2}>
<Text color={priorityColor(t.priority)}>{priorityIcon(t.priority)}</Text>
</Box>
<Box flexGrow={1}>
<Text wrap="truncate" color={COLORS.text.primary}>
{t.text}
</Text>
</Box>
</Box>
<Box width={2}>
<Text color={priorityColor(t.priority)}>{priorityIcon(t.priority)}</Text>
))}
{todos.length > maxVisible && (
<Box flexDirection="row">
<Box width={6}></Box>
<Box flexGrow={1}>
<Text color={COLORS.text.muted} dimColor>
... and {todos.length - maxVisible} more tasks
</Text>
</Box>
</Box>
<Box flexGrow={1}>
<Text wrap="truncate" color={COLORS.text.primary}>
{t.text}
</Text>
</Box>
</Box>
))
)}
</>
)}
</Box>
)}
Expand Down
Loading