6 Commits

Author SHA1 Message Date
overcuriousity
48525fe505 Merge pull request #13 from overcuriousity/claude/fix-setup-wizard-display-IroVi
Always prompt for GPG key selection for transparency
2025-12-14 13:50:20 +01:00
Claude
085c9e9aa8 Always prompt for GPG key selection for transparency
Remove auto-selection when only one key exists. Users should always
be explicitly aware of which key is being used and have the option
to choose the default key (option 0) instead.

trace/gpg_wizard.py:79-95
2025-12-14 12:36:12 +00:00
overcuriousity
06548df373 Merge pull request #12 from overcuriousity/claude/fix-setup-wizard-display-IroVi
Fix setup wizard not showing on first run
2025-12-14 13:22:11 +01:00
Claude
dff27ac7e4 Fix setup wizard not showing on first run
The wizard was checking if 'pgp_enabled' key existed in settings dict,
but StateManager.get_settings() always returns this key (as a default
value when settings.json doesn't exist). This caused the wizard to
think it had already run, even on first launch.

Fix: Check if settings file exists instead of checking for key presence.

trace/gpg_wizard.py:120
2025-12-14 12:21:00 +00:00
overcuriousity
a1f95548fd Merge pull request #11 from overcuriousity/claude/oWjkR
Fix visual overlap in case detail view when no evidence items exist
2025-12-14 13:14:20 +01:00
Claude
425a169217 Fix visual overlap in case detail view when no evidence items exist
Fixed rendering issue where the Case Notes section would overlap with the
"No evidence items" message. The problem occurred because the y_pos variable
was not updated after drawing the 2-line message, causing subsequent content
to render at the wrong vertical position.

Changes:
- Adjusted "No evidence items" message to start at y_pos (not y_pos + 1)
  for consistency with evidence item rendering
- Added y_pos += 2 after the message to account for the 2 lines used
- Fixed boundary check from y_pos + 2 to y_pos + 1

Also verified all other views (case list, tags, IOCs) handle empty states
correctly and don't have similar overlap issues.

Resolves visual bug reported in case detail view.
2025-12-14 12:00:08 +00:00
2 changed files with 22 additions and 26 deletions

View File

@@ -76,27 +76,23 @@ def run_gpg_wizard():
# Let user select a key
selected_key = None
if len(keys) == 1:
print(f"Only one key found. Using: {keys[0][1]}")
selected_key = keys[0][0]
else:
while True:
try:
choice = input(f"Select a key (1-{len(keys)}, or 0 to use default key): ").strip()
choice_num = int(choice)
while True:
try:
choice = input(f"Select a key (1-{len(keys)}, or 0 to use default key): ").strip()
choice_num = int(choice)
if choice_num == 0:
print("Using GPG default key (no specific key ID)")
selected_key = None
break
elif 1 <= choice_num <= len(keys):
selected_key = keys[choice_num - 1][0]
print(f"Selected: {keys[choice_num - 1][1]}")
break
else:
print(f"Please enter a number between 0 and {len(keys)}")
except ValueError:
print("Please enter a valid number")
if choice_num == 0:
print("Using GPG default key (no specific key ID)")
selected_key = None
break
elif 1 <= choice_num <= len(keys):
selected_key = keys[choice_num - 1][0]
print(f"Selected: {keys[choice_num - 1][1]}")
break
else:
print(f"Please enter a number between 0 and {len(keys)}")
except ValueError:
print("Please enter a valid number")
print("\n✓ GPG signing enabled!")
if selected_key:
@@ -115,10 +111,9 @@ def check_and_run_wizard():
Returns True if wizard was run, False otherwise.
"""
state_manager = StateManager()
settings = state_manager.get_settings()
# Check if wizard has already been run (presence of any GPG setting indicates setup was done)
if "pgp_enabled" in settings:
# Check if settings file exists - if it does, wizard has already been run
if state_manager.settings_file.exists():
return False
# First run - run wizard

View File

@@ -753,11 +753,12 @@ class TUI:
if not evidence_list:
# Check if we have space to display the message
if y_pos + 2 < self.height - 2:
if y_pos + 1 < self.height - 2:
self.stdscr.attron(curses.color_pair(3))
self.stdscr.addstr(y_pos + 1, 4, "┌─ No evidence items")
self.stdscr.addstr(y_pos + 2, 4, "└─ Press 'N' to add evidence")
self.stdscr.addstr(y_pos, 4, "┌─ No evidence items")
self.stdscr.addstr(y_pos + 1, 4, "└─ Press 'N' to add evidence")
self.stdscr.attroff(curses.color_pair(3))
y_pos += 2 # Account for the 2 lines used by the message
else:
# Scrolling for evidence list
# Calculate remaining space