Fix run_rule(): clicking the menu item only opens a confirmation modal, never runs anything
All checks were successful
Deploy / deploy (push) Successful in 25s

The user reported runs logged as "success" locally weren't showing up
in MassPrice's own Activity Log. Live-debugged directly against
production: clicking the dropdown's "Run Rule" item opens a
confirmation modal ("Are you sure you want to continue?") rather than
running the rule immediately. Confirmed by network capture — without
clicking the modal's #Confirmation_Run button, zero requests fire, no
error is thrown, and the rule silently never runs. Every prior
"success" in run_history.json for real production traffic was
therefore a false positive.

Verified the fix live: clicking through #ConfirmationModal's
#Confirmation_Run now fires a real POST /Rule/Run request.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6TgffxTvYhqxykAbVQg2v
This commit is contained in:
Barely Removable 2026-08-31 20:44:05 -07:00
parent 63e2296d1c
commit 988db5d5c4
4 changed files with 41 additions and 7 deletions

View file

@ -76,6 +76,13 @@ deploy rsync (which runs `--delete`) and from git.
## If scheduled runs stop working
Check, in order:
0. **Local Activity says success but nothing shows up in MassPrice's own
Activity Log** — this exact symptom happened in production once
already: `run_rule()` was only opening MassPrice's "Are you sure?"
confirmation modal, never clicking its `#Confirmation_Run` button, so
zero requests ever fired despite no error being thrown. Fixed, but if
it recurs (e.g. a MassPrice redesign changes the modal/selectors),
this is the first thing to suspect — see `CLAUDE.md`.
1. **Dashboard banner / Activity page** — a "session expired or missing"
message means go log in again via the Session page. "rule id not
found" means a rule was renamed/deleted on MassPrice — click "Refresh