Make note navigation consistent across case_detail and evidence_detail

Both views now support dual navigation options:
- Enter: Opens note_detail view (single note focus)
- 'v': Opens notes modal with selected note highlighted

Previously, case_detail would open the notes modal from the beginning
even when a case note was selected. Now it intelligently jumps to the
selected case note, matching the behavior in evidence_detail view.

This provides a consistent, predictable user experience across both
views where notes can be selected and viewed.
This commit is contained in:
Claude
2025-12-13 15:22:59 +00:00
parent 461da25c93
commit b973aa1009

View File

@@ -1452,7 +1452,20 @@ class TUI:
self.handle_open_iocs()
elif key == ord('v'):
if self.current_view == "case_detail":
self.view_case_notes()
# Open notes modal with selected case note highlighted (if applicable)
if self.active_case:
case_notes = self.active_case.notes
filtered = self._get_filtered_list(self.active_case.evidence, "name", "description")
# Check if a case note is selected (not an evidence item)
if case_notes and self.selected_index >= len(filtered):
note_idx = self.selected_index - len(filtered)
if note_idx < len(case_notes):
self.view_case_notes(highlight_note_index=note_idx)
else:
self.view_case_notes()
else:
self.view_case_notes()
elif self.current_view == "evidence_detail":
# Open notes modal with selected note highlighted
if self.active_evidence: