Don't crash on Enter or Down when the list is empty (#1) #30

Merged
eric merged 1 commit from eric/fix-1-empty-list-crash into master 2026-10-12 17:26:57 -05:00
Owner

Browse mode indexed the list without checking it had anything in it. Enter now does nothing on an empty list, and Down/j no longer compute len() - 1 (which underflowed).

Checked in the real app: an empty video folder, and a filter that matches nothing — Down, j and Enter do nothing, no crash.

Closes #1

🤖 Generated with Claude Code

Browse mode indexed the list without checking it had anything in it. Enter now does nothing on an empty list, and Down/j no longer compute `len() - 1` (which underflowed). Checked in the real app: an empty video folder, and a filter that matches nothing — Down, j and Enter do nothing, no crash. Closes #1 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Browse mode indexed filtered_entries without checking it had anything in
it: Enter panicked on an out-of-bounds index, and Down/j computed
len() - 1, which underflows on an empty list. Enter now does nothing on
an empty list, and Down/j compare current_item + 1 against len().

Closes #1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eric merged commit f758838fe5 into master 2026-10-12 17:26:57 -05:00
Sign in to join this conversation.
No reviewers
No labels
bug
chore
feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
spinach-dev/movies!30
No description provided.