mirror of
https://github.com/overcuriousity/trace.git
synced 2025-12-20 13:02:21 +00:00
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:
15
trace/tui.py
15
trace/tui.py
@@ -1452,7 +1452,20 @@ class TUI:
|
|||||||
self.handle_open_iocs()
|
self.handle_open_iocs()
|
||||||
elif key == ord('v'):
|
elif key == ord('v'):
|
||||||
if self.current_view == "case_detail":
|
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":
|
elif self.current_view == "evidence_detail":
|
||||||
# Open notes modal with selected note highlighted
|
# Open notes modal with selected note highlighted
|
||||||
if self.active_evidence:
|
if self.active_evidence:
|
||||||
|
|||||||
Reference in New Issue
Block a user