Skip to content

V11.0: richer action vocabulary, pause/resume, honest timing, real CLI - #5

Merged
kai9987kai merged 4 commits into
masterfrom
v11-innovate
Aug 8, 2026
Merged

V11.0: richer action vocabulary, pause/resume, honest timing, real CLI#5
kai9987kai merged 4 commits into
masterfrom
v11-innovate

Conversation

@kai9987kai

Copy link
Copy Markdown
Owner

Strictly additive on user-facing capability: no existing feature was removed. Dead and
shadowed code was deleted, which has no user-visible effect.

136 tests pass (up from 20). GUI, classic window, lite app and the built .exe all
verified by hand in addition to the suite.

New features

  • Beyond clicking. ACTION_REGISTRY adds Key Press, Key Hold, Type Text,
    Scroll Up/Scroll Down, Click And Hold, Drag To, Move Only and
    Triple Left Click alongside the six original click types. The six originals resolve to
    byte-identical behaviour, so existing profiles, sequences and workspaces keep loading.
    Sequences accept the new actions too.
  • Pause / Resume for click runs, sequences and playback.
  • Hotkey Center — optional system-wide start/pause/capture hotkeys, so the app is
    drivable while minimised over the target. In-window: F5 start, F6 pause, Esc stop.
  • Clicks-per-second targeting plus a live instant/average/peak rate readout.
  • Scheduled start (HH:MM wall clock), round-robin targets over a recording,
    Run History viewer with lifetime totals that survive restarts, Midnight and
    System (follows OS dark mode) themes, and a Feather Touch preset.
  • Profile undo for delete and import-overwrite, with rollback if the disk write fails.
  • Activity feed gained a scrollbar, copy, and export — it retained 80 entries but only ever
    displayed 12.

Correctness fixes

Each of these was reproduced before fixing and is covered by a regression test.

  • Timing was wrong by 2-3x. PyAutoGUI adds a hidden 0.1s pause to every call, so a
    0.10 delay produced ~5 actions/sec while the UI promised 10. Precise pacing (new
    default) zeroes it; Legacy V10.1 pacing reproduces the old behaviour exactly.
  • A finishing worker could restart a stopped run. One stop_event was shared by three
    subsystems and two of them cleared it on exit. Now one token each.
  • A stale finished message could orphan a live run, leaving Stop dead while clicks
    continued. Now generation-guarded.
  • Inert stop hotkeys reported green. keyboard.is_pressed raises for multi-step
    hotkeys and unmapped names, and the engine swallowed it. Now rejected at validation.
  • Countdown was charged against the runtime cap — a 5s countdown with a 3s cap produced
    a zero-click run.
  • Themes corrupted after two switches. Dark to Light left the page dark, and the next
    switch produced white text on a light background. Verified across 9 consecutive switches.
  • _click_worker had no try/finally and could leak FAILSAFE=False process-wide and
    wedge Start permanently; _playback_worker could lock out all three run paths for the
    session; _pump_ui_queue self-terminated on any exception, freezing all UI feedback.
  • The emergency hotkey called os._exit(0), discarding unsaved work. It now persists first.
  • Classic window: global things on a closure local made List Coordinates > Delete
    always raise NameError while Run List kept clicking the deleted point; the same function
    passed listbox text through eval(). Six exit(0) calls on a worker thread killed only
    that thread silently. Invalid X/Y fell through into the click loop with strings.
  • Recording capture ran on the keyboard hook thread and appended to a list the Tk thread
    rebinds wholesale.
  • Profile opacity/scale validation allowed ranges the runtime then silently clamped.
  • Saving a recording, sequence or profile export no longer truncates the previous good file.

Architecture, CLI and tests

  • ~1,760 lines of dead code removed (22%)MAINWINDOW_NEWSTYLE (596 lines, never
    called), two shadowed top-level functions, two shadowed methods, class Coordinates.
  • import AutoClicker went from ~15s to ~0.7s by dropping four packages that were
    imported but never used (gspread, oauth2client, colormap, pywin32) and making
    win10toast lazy.
  • Real CLI: argparse with --help, --version, 14 subcommands, a stable JSON envelope
    and a documented exit-code contract (0/1/2/3). All nine V10.1 flags still work. Two
    deliberate differences: an unknown flag is now a usage error instead of silently opening
    the GUI, and stacking two legacy commands reports the extra one instead of dropping it
    behind a success exit.
  • New headless commands: doctor, readiness, profiles, schema, history,
    support-bundle.
  • python -m unittest discover previously ran zero tests and exited 0. Fixed with
    tests/__init__.py and pyproject.toml.
  • Added CI (Windows + Linux, Python 3.10 and 3.12, no dependency install needed) with a
    secret-scan job.
  • packaging/ now derives its version from APP_VERSION (it had drifted across three
    files), checks its inputs before deleting tracked artifacts, bundles favicon.ico, and
    refuses to rmtree a home directory or drive root via --install-dir.

Security

creds.json held a live Google service-account private key, committed since 2020 in seven
tracked copies. All seven are removed and .gitignore now blocks them. The key is still
in git history and must be revoked in the Google Cloud console
— removing the files does
not undo the exposure. No code needed it: the Google Sheets feedback path was already dead.

Release build

Builds/V11.0/ contains executables built from 7fe288d.

Artifact V10.1 V11.0
AutoClicker.exe 45.6 MB 32.4 MB
AutoClickerLite.exe 29.3 MB 31.9 MB
AutoClickerInstaller.exe 87.6 MB 76.9 MB

Note: GitHub warns that the installer exceeds its 50 MB recommendation. Committing release
binaries follows this repo's existing convention, but Git LFS or GitHub Releases would be
worth considering before the history grows further.

🤖 Generated with Claude Code

kai9987kai and others added 4 commits August 3, 2026 15:11
d
e
Built from 7fe288d with packaging/build_release.py, which now reads its version
from APP_VERSION rather than a hard-coded string.

- AutoClicker.exe        32.4 MB (was 45.6 MB in V10.1)
- AutoClickerLite.exe    31.9 MB
- AutoClickerInstaller.exe 76.9 MB

The main executable shrank ~26% because gspread, oauth2client, colormap and
pywin32 were imported but never used, and are no longer collected into the bundle.

Both executables now bundle favicon.ico via --add-data. Previously the onefile
build had no such file at runtime, so iconbitmap() failed silently.

Verified on the built AutoClicker.exe: --version, health, health --json,
schema action, state-summary and the legacy --health-check flag all return the
correct output and exit codes, and an unknown flag exits 2 instead of opening a
window.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CI installs no third-party packages by design, so pyautogui and keyboard are
absent there. MAINWINDOW_REDESIGNED() therefore reached _ensure_dependencies,
which called messagebox.showerror -- a modal dialog with nobody to dismiss it.
The Windows jobs blocked until GitHub's 6-hour limit; the two earlier runs on
this branch were cancelled at 6h00m each.

Linux was unaffected only by accident: with no display, showerror raises, the
error is swallowed, and the tests skip.

- get_shared_gui now injects a fake `keyboard` alongside the fake pyautogui and
  clears the matching IMPORT_ERRORS entries, because it is supplying working
  stand-ins. The dependency gate no longer fires.
- silence_dialogs() replaces every messagebox entry point with a non-blocking
  stub for the duration. No test can open a dialog that waits for a human.
- Both CI jobs gained timeout-minutes as a backstop, so any future hang costs
  minutes rather than hours.

Verified by simulating CI locally with pyautogui and keyboard absent and a
watchdog armed: all 17 GUI tests now run and pass in 31s instead of blocking.
They previously did not execute on either platform.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kai9987kai
kai9987kai merged commit 8d5bb4c into master Aug 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant