summaryrefslogtreecommitdiff
path: root/web/templates/agent-status.html
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-12 06:09:29 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-12 06:09:29 +0000
commita43cc7b8f007a86742756bd4b67f9ba1c204bbd0 (patch)
tree0d9bbbe0c4856c2992bed41ad1d1c9964fbc9f91 /web/templates/agent-status.html
parent9a87f9db5af943ea253b814d4196020341e3c2ba (diff)
fix(widget): dedup rapid completeTask taps on the same task
CompleteWorker.enqueue used a plain WorkManager.enqueue(), which allows unlimited concurrent OneTimeWorkRequests. A rapid double-tap on the same row (plausible since the checkbox doesn't visually update until the full async round-trip -- complete() -> fetchAndPersist() -> updateAll() -- finishes) could spawn two independent, unordered CompleteWorker runs for the same task, each doing its own fetchAndPersist(); a second worker's fetch started before the first worker's complete() call had actually landed server-side could persist a stale snapshot after the first worker's correct one. Now uses enqueueUniqueWork("complete_$id", KEEP, ...) so a tap on a task that already has a completion in flight is dropped rather than racing a second worker. Different task ids remain independent.
Diffstat (limited to 'web/templates/agent-status.html')
0 files changed, 0 insertions, 0 deletions