Skip to content

Cancel or confirm when a Backup/Restore/Import dialog closes mid-run #803

Closed

Description

@EVWorth

Severity: P1 (work keeps running invisibly)

What happens

On ?mock=connected:

  • Backup: start a backup of shop, then click the header X (or click the backdrop). The dialog closes; the dump keeps running. Reopening Backup shows a fresh, empty form with no sign anything is in progress.
  • Restore: during a restore the footer Close button stays enabled, and X, backdrop and Escape all close the dialog without cancelling.
  • Import: Escape and backdrop route to the raw onClose, skipping handleClose's importing guard and resetState().
  • The header X in Backup and Restore has no accessible name.

Cause

  • src/components/backup/BackupDialog.tsx:222,235 and src/components/backup/RestoreDialog.tsx:181,195 pass onClose straight to Modal and the X; backdrop close is on by default.
  • RestoreDialog.tsx:412-418 renders Close without disabled={restoring}.
  • src/components/import/ImportDialog.tsx:371 passes onClose instead of handleClose.

Fix

While a run is active, pass closeOnBackdrop={false} and an onClose that asks "Cancel the backup/restore?" and, on yes, calls the cancel API before closing. Disable or hide Close during a restore. Pass handleClose to Import's Modal. Add aria-label="Close" to both X buttons.

Part of #783.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 23, 2026
    4cf072f
  3. added a commit that references this issue on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions