fix: stop discarding loaded settings in SettingsApp.__init__#65
Conversation
SettingsApp.__init__ seeded `self.dirty_settings` from the loaded settings and then immediately re-bound it to an empty dict, which silently discarded any persisted values before the UI rendered. Drop the second assignment so dirty state starts equal to the loaded settings, as the surrounding comment intended. Closes TruFoundation#64
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSettingsApp.init now initializes ChangesDirty Settings Initialization Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
SettingsApp.__init__seededself.dirty_settingsfrom the persisted settings and then immediately re-bound the attribute to a fresh empty dict two lines later. As a result every setting the user had on disk was silently dropped before the UI rendered, and the dirty-state buffer always started blank.The surrounding comment ("Track changes to settings without losing data when switching categories") was clearly describing the seeded copy, not the empty one. This change drops the second assignment so the dirty buffer starts equal to the loaded settings, and adds a regression test that fails on the old code path.
Closes #64
Summary by CodeRabbit
Release Notes