fix(consent): a retry that fails again reopens the terms prompt (#311) #406

Merged
jared merged 1 commits from fix/consent-retry-snooze into lotus 2026-10-18 06:51:24 -04:00
Owner

Fixes #311.

Closing the terms-consent dialog with "I've accepted — retry sending" also deactivates its FocusTrap, and the trap's onDeactivate is later, which sets the 10 s snooze. If the user pressed Retry before really accepting (easy when the terms page needs a login), the retry hit M_CONSENT_NOT_GIVEN again and no dialog appeared: the message just went back to "Failed to send".

Change: Retry flags its own close, so the trap's deactivate doesn't snooze, and clears any earlier snooze. "Later", Escape and an outside click still snooze as before.

Verified (Chromium, sends routed to 403 M_CONSENT_NOT_GIVEN): the dialog shows on the first failure. Then press Retry while terms are still not accepted:

  • Before: no dialog.
  • After: the dialog reopens within a few seconds.

tsc clean · ESLint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #311. Closing the terms-consent dialog with **"I've accepted — retry sending"** also deactivates its FocusTrap, and the trap's `onDeactivate` is `later`, which sets the 10 s snooze. If the user pressed Retry before really accepting (easy when the terms page needs a login), the retry hit `M_CONSENT_NOT_GIVEN` again and **no dialog appeared**: the message just went back to "Failed to send". **Change:** Retry flags its own close, so the trap's deactivate doesn't snooze, and clears any earlier snooze. "Later", Escape and an outside click still snooze as before. **Verified** (Chromium, sends routed to `403 M_CONSENT_NOT_GIVEN`): the dialog shows on the first failure. Then press Retry while terms are still not accepted: - **Before:** no dialog. - **After:** the dialog **reopens** within a few seconds. `tsc` clean · ESLint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-18 00:11:38 -04:00
fix(consent): a retry that fails again reopens the terms prompt (#311)
CI / Build & Quality Checks (pull_request) Successful in 3m16s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Playwright smoke (e2e) (pull_request) Successful in 19m50s
CI / Secret scan (gitleaks) (pull_request) Successful in 16s
5ce4692a7b
Closing the dialog via "I've accepted — retry" also deactivated its focus
trap, whose onDeactivate is "Later": every close set the 10 s snooze, so
a retry made before the terms were really accepted failed silently.
Retry now closes without snoozing (and clears any earlier snooze).

Fixes #311

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 1b887de81d into lotus 2026-10-18 06:51:24 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#406