From b61b81895282bd064b135230a7c996def8e75df1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Dec 2025 15:06:16 +0000 Subject: [PATCH] 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. --- trace/tui.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/trace/tui.py b/trace/tui.py index b892ae9..6064082 100644 --- a/trace/tui.py +++ b/trace/tui.py @@ -1298,15 +1298,14 @@ class TUI: notes = self.active_evidence.notes list_h = self.content_h - 5 display_notes = notes[-list_h:] if len(notes) > list_h else notes - + if display_notes and self.selected_index < len(display_notes): - # Calculate the actual note index in the full list - note_offset = len(notes) - len(display_notes) - actual_note_index = note_offset + self.selected_index - # Open notes view and jump to selected note - self._highlight_note_idx = actual_note_index - self.view_evidence_notes(highlight_note_index=actual_note_index) - delattr(self, '_highlight_note_idx') # Reset filter on view change + # Show note detail view (consistent with other views) + self.current_note = display_notes[self.selected_index] + self.previous_view = "evidence_detail" + self.current_view = "note_detail" + self.selected_index = 0 + self.scroll_offset = 0 elif self.current_view == "case_detail": if self.active_case: case_notes = self.active_case.notes