Fix visual overlap in case detail view when no evidence items exist

Fixed rendering issue where the Case Notes section would overlap with the
"No evidence items" message. The problem occurred because the y_pos variable
was not updated after drawing the 2-line message, causing subsequent content
to render at the wrong vertical position.

Changes:
- Adjusted "No evidence items" message to start at y_pos (not y_pos + 1)
  for consistency with evidence item rendering
- Added y_pos += 2 after the message to account for the 2 lines used
- Fixed boundary check from y_pos + 2 to y_pos + 1

Also verified all other views (case list, tags, IOCs) handle empty states
correctly and don't have similar overlap issues.

Resolves visual bug reported in case detail view.
This commit is contained in:
Claude
2025-12-14 12:00:08 +00:00
parent 1598b16b85
commit 425a169217

View File

@@ -753,11 +753,12 @@ class TUI:
if not evidence_list:
# Check if we have space to display the message
if y_pos + 2 < self.height - 2:
if y_pos + 1 < self.height - 2:
self.stdscr.attron(curses.color_pair(3))
self.stdscr.addstr(y_pos + 1, 4, "┌─ No evidence items")
self.stdscr.addstr(y_pos + 2, 4, "└─ Press 'N' to add evidence")
self.stdscr.addstr(y_pos, 4, "┌─ No evidence items")
self.stdscr.addstr(y_pos + 1, 4, "└─ Press 'N' to add evidence")
self.stdscr.attroff(curses.color_pair(3))
y_pos += 2 # Account for the 2 lines used by the message
else:
# Scrolling for evidence list
# Calculate remaining space