fix(ui): guard one-shot action buttons against double-tap (duplicate signatures/reports/uploads) #304

Closed
opened 2026-07-04 06:50:19 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-04 06:50:19 +00:00 (Migrated from github.com)

Phase-3 review (MEDIUM→LOW/correctness). Several action buttons stay enabled during async work with no re-entry guard, so a double-tap runs twice: SignatureEditViewModel.save(:63, new-signature) → 2 duplicate signatures + double onBack (MEDIUM); ReportReviewViewModel.submit(:113) flips SUBMITTING only AFTER the async save → 2 uploads; AccountSettingsViewModel(:103) remove-account → double onBack over-pops to mailbox; ProblemReportsViewModel.createManualReport(:37) → 2 reports+navigations. Fix pattern: set a busy/saving flag SYNCHRONOUSLY before the first suspension (as account-setup does with SetupStatus.CONNECTING) and gate the button, or guard the VM method against re-entry.

Phase-3 review (MEDIUM→LOW/correctness). Several action buttons stay enabled during async work with no re-entry guard, so a double-tap runs twice: `SignatureEditViewModel.save`(:63, new-signature) → **2 duplicate signatures** + double onBack (MEDIUM); `ReportReviewViewModel.submit`(:113) flips SUBMITTING only AFTER the async save → 2 uploads; `AccountSettingsViewModel`(:103) remove-account → double onBack over-pops to mailbox; `ProblemReportsViewModel.createManualReport`(:37) → 2 reports+navigations. **Fix pattern:** set a `busy`/`saving` flag SYNCHRONOUSLY before the first suspension (as account-setup does with SetupStatus.CONNECTING) and gate the button, or guard the VM method against re-entry.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#304