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
This commit is contained in:
Claude
2025-12-14 12:21:00 +00:00
parent a1f95548fd
commit dff27ac7e4

View File

@@ -115,10 +115,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