Fix inconsistent note detail access in evidence_detail view

Previously, pressing Enter on a note in evidence_detail view would
open the notes modal (same as 'v' key), while in other views
(case_detail, tag_notes_list, ioc_notes_list) it would open the
note_detail view. This created confusing and inconsistent behavior.

Now Enter consistently opens note_detail view across all contexts:
- Enter: Opens note detail view (full note content)
- 'v': Opens notes modal (scrollable list of all notes)

This aligns the implementation with the help text which already
documented the correct behavior.
This commit is contained in:
Claude
2025-12-13 15:06:16 +00:00
parent fa90aeb063
commit b61b818952

View File

@@ -1298,15 +1298,14 @@ class TUI:
notes = self.active_evidence.notes notes = self.active_evidence.notes
list_h = self.content_h - 5 list_h = self.content_h - 5
display_notes = notes[-list_h:] if len(notes) > list_h else notes display_notes = notes[-list_h:] if len(notes) > list_h else notes
if display_notes and self.selected_index < len(display_notes): if display_notes and self.selected_index < len(display_notes):
# Calculate the actual note index in the full list # Show note detail view (consistent with other views)
note_offset = len(notes) - len(display_notes) self.current_note = display_notes[self.selected_index]
actual_note_index = note_offset + self.selected_index self.previous_view = "evidence_detail"
# Open notes view and jump to selected note self.current_view = "note_detail"
self._highlight_note_idx = actual_note_index self.selected_index = 0
self.view_evidence_notes(highlight_note_index=actual_note_index) self.scroll_offset = 0
delattr(self, '_highlight_note_idx') # Reset filter on view change
elif self.current_view == "case_detail": elif self.current_view == "case_detail":
if self.active_case: if self.active_case:
case_notes = self.active_case.notes case_notes = self.active_case.notes