Files
aeternalis/client
dingoandClaude Sonnet 5 b1a07b7a65 fix: retry gather/attack instead of firing once and giving up
The new server-side "intent rejected" log (from the last commit) caught
it in the act: a single "boss out of reach" / "resource out of reach"
rejection, then nothing -- the client's walk-to-target flow fires the
gather/attack intent exactly once, the instant its (possibly a tick
stale) view of the authoritative server position first reads as
in-range, then immediately clears pendingAction/walkTo regardless of
whether the server actually accepted it. One unlucky frame and the
action is silently dead for good, which is exactly what stalled the
e2e gather and boss-attack polls waiting on an effect that was never
going to happen without another click.

Now it keeps retrying (throttled to ~3/s, well under the websocket's
input-rate limit and matching the server's own action cooldowns) as
long as the character stays in range, instead of clearing on the first
attempt. Confirmed locally: normal runs now show the retry harmlessly
hitting "resource depleted"/"attack cooldown" for the attempts *after*
the one that actually landed, and the full e2e suite (7/7, both spec
files) still passes. Also held up under artificial CPU throttling via
a CDP session (up to 50x) in manual testing, which the old single-shot
code also happened to survive locally -- so this is a fix for a real
fragility this log caught directly, not a blind guess.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 12:10:00 -04:00
..