Skip to content

Failed settings writes are only logged; the UI reports success #151

Closed

Description

@TMHSDigital

Summary

_save_settings catches OSError and logs a warning, and every caller reports success, so a failed write is invisible until the next launch.

Where

  • autoclicker/core/settings_manager.py:313-318 (_save_settings)
  • autoclicker/gui/main_window.py:440-444 ("Hotkeys saved")

Details

set, update, profile save/import and hotkey saves all go through _save_settings, which never signals failure to the caller.

Impact

With a full disk, a read-only AppData folder or an antivirus lock, changes vanish at the next launch while the UI said they were saved.

Suggested fix

Return a bool from _save_settings or set a save_warning the UI surfaces once, the same way load_warning is shown.

Acceptance criteria

  • A failed write shows a one-time warning in the status line
  • Test: os.replace raising PermissionError sets the warning

Getting started

  • Relevant files: autoclicker/core/settings_manager.py, tests/test_settings_manager.py
  • How to run tests: make check (Git Bash) or tasks.bat lint, tasks.bat typecheck, tasks.bat test (cmd). Single test: python -m pytest tests/test_x.py::TestClass::test_name --no-cov
  • Related docs: CONTRIBUTING.md, docs/ARCHITECTURE.md

Filed by repo-audit/full-audit at 9968dc8. Severity: low. Effort: S. audit-key: quality|autoclicker/core/settings_manager.py|SettingsManager._save_settings

Activity

  1. added
    bug
    priority: low
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions