mirror of
https://github.com/overcuriousity/trace.git
synced 2025-12-20 13:02:21 +00:00
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:
13
trace/tui.py
13
trace/tui.py
@@ -1300,13 +1300,12 @@ class TUI:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user