Commit Graph

3 Commits

Author SHA1 Message Date
Claude bb33bcbb61 fix(main): broaden anchor selector and show inline "can't anchor" note
findAnchorElement used a narrow selector ('button[name="train"],
a[href*="train"]') that often missed Torn's actual gym page DOM.
When it missed, applyMode fell through to dialog.setMode('free'),
snapping the dialog to the default bottom-right position — which the
user perceived as a 'bounce' when clicking 'Above training UI'.

Widen the selector to a priority-ordered candidate list and prefer the
form ancestor of any matched element. As a last-ditch, look for a form
inside the gym panel. This covers more of Torn's gym-page variations.

When the anchor selector still misses, do NOT snap to the default free
position. Instead, keep the dialog where it is, set anchorError on the
state, and let the dialog render an inline note so the user gets
visible feedback explaining what happened.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 18:45:40 -05:00
dev 36a6b4c52d fix(main): keep prefs.mode in sync and rAF-coalesce mutation observer 2026-06-01 17:09:38 -05:00
dev 12fc79022f feat(main): wire Store + Dialog + DataLayer on /gym.php 2026-06-01 17:03:03 -05:00