Skip to content

Image mode: optional stop when the image has not been seen for N seconds #174

Closed

Description

@TMHSDigital

Summary

The image watcher waits forever while the image is absent. A --image --headless run without --minutes never exits once the target is gone for good.

Where

  • autoclicker/core/click_engine.py:610-635
  • autoclicker/core/settings_manager.py:225-234
  • autoclicker/cli.py:316-319

Details

The pixel condition already has on_mismatch "wait" or "stop"; image mode has no equivalent and stops only when the screen cannot be read.

Impact

Scheduled and scripted runs can hang indefinitely and the exit codes cannot report "target gone".

Suggested fix

Add image_missing_stop_seconds (0 = wait forever, the default), a field in the image panel, and --image-timeout. End with STOP_COMPLETED and "Stopped: image not seen for N s", logged in sessions.log, and include it in PROFILE_KEYS.

Acceptance criteria

  • Setting, UI field and CLI flag added
  • Run stops with a clear message after the timeout
  • Default behaviour unchanged

Getting started

  • Relevant files: autoclicker/core/click_engine.py, autoclicker/core/settings_manager.py, autoclicker/cli.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: medium. Effort: M. audit-key: enhancement|autoclicker/core/click_engine.py|image missing timeout

Activity

  1. added
    enhancement
    help wanted
    priority: medium
    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

    enhancementhelp wantedpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions