?
TRCKR-83
settings enhancement
Created: 2025-12-08 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (1)
agent · 2025-12-08
Implemented persistent TUI settings that store to JSON files. **Changes Made:** 1. **Settings Storage** (tui.py:158-205): - Added get_settings_path(use_global) - determines settings file path based on context - Added load_settings(use_global) - loads settings from disk or returns defaults - Added save_settings(settings, use_global) - persists settings to disk 2. **Settings Location Logic**: - Local (repo): <git-root>/docs/trckr/settings.json - Global: ~/.trckr/settings.json - Falls back to global if not in a git repo 3. **App Integration** (tui.py:4794): - Modified TrckrApp.__init__() to call load_settings(use_global) on startup - Settings now persist across TUI sessions 4. **Auto-Save on Change** (tui.py:4653-4658, 4549-4640): - Added SettingsScreen._save_settings() method - Updated all 6 setting edit handlers to call _save_settings() after changes - Settings persist immediately when modified in the TUI 5. **Test Coverage** (tests/test_tui.py:4824-5033): - Added TestSettingsPersistence class with 4 comprehensive tests - Verifies local/global settings persistence, app loading, and defaults **Verification:** - All 795 tests pass (make test) - Manually tested TUI settings persistence in both global and local modes - Settings survive TUI restarts and correctly load based on context