Skip to content

Frictionless: do nothing after the widget is destroyed - #3362

Merged
HughParry merged 3 commits into
mainfrom
fix/frictionless-stop-after-destroy
Oct 26, 2026
Merged

HughParry merged 3 commits into
mainfrom
fix/frictionless-stop-after-destroy

Conversation

@goastler

@goastler goastler commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What changed

  • A frictionless widget that has been destroyed (reset, remove, SPA unmount) now ignores late responses at every step, not just in the solver.

Why

  • A slow /frictionless response arriving after destroy could still fire onHuman for a dead widget, fire onError, retry other providers up to 5 times, or leave a timer that later fired onReset.

Effect

  • A destroyed widget stays quiet.

Tests

  • 3 new tests with a delayed detection step fail on main and pass now. All 170 frictionless tests pass.

goastler and others added 2 commits October 26, 2026 13:37
destroy() only guarded the solver mounts. A /frictionless response that
landed after destroy could still mount the authenticated badge (firing
onHuman), report onError, keep retrying through providerRetry, or add a
restart timer to an already-run Teardown so it could never be cleared
and later fired onReset and restart.

start(), the post-detection path, renderForCaptchaType, the retry
finaliser and restartComponentTimeout now all bail once destroyed.
@HughParry
HughParry force-pushed the fix/frictionless-stop-after-destroy branch from 2e3f60d to fde2fdc Compare October 26, 2026 13:39
@HughParry
HughParry marked this pull request as ready for review October 26, 2026 13:41
@HughParry
HughParry enabled auto-merge (squash) October 26, 2026 13:45
…ictionless-stop-after-destroy

# Conflicts:
#	packages/procaptcha-frictionless/src/tests/procaptchaFrictionless.test.ts
@HughParry
HughParry merged commit b2ee10d into main Oct 26, 2026
20 checks passed
@HughParry
HughParry deleted the fix/frictionless-stop-after-destroy branch October 26, 2026 14:39
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.

2 participants