Skip to content

fix(platform): preserve Inbox drafts after upload failures - #3566

Merged
yannickmonney merged 10 commits into
mainfrom
fix/preserve-reply-after-upload-failure
Sep 28, 2026
Merged

yannickmonney merged 10 commits into
mainfrom
fix/preserve-reply-after-upload-failure

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Reply and New email now retain the draft, instructions and selected attachments when an upload or send fails. Previously the upload catch returned a fulfilled save promise, causing the editor to clear the draft despite the failure. Failures now reject the existing editor contract, and the editor owns one toast with the backend refusal detail; bulk upload callers retain their default feedback.

This integrates the already merged undo-attachment work: stored references pass through without another upload, current per-conversation edits and removals survive navigation, and mixed stored/new files remain available for retry. The current main's mobile navigation clearance is preserved. Removed the unused compose error key from EN/DE/FR and updated the automation register.

Fresh validation at cdb56c228d67d3e11a6902576b736759d1ca0f98:

  • 20 real-Chromium editor/upload regressions, including stored + new files across upload/send refusal and retry.
  • 30 focused conversation UI tests and 21 backend-action/mutation hook tests.
  • Manual-test gate, diff check, formatting and scoped commit-hook SAST pass.
  • Independent source review of the upload/undo integration was clear. The only production merge conflict retained that reviewed logic and the newer mobile clearance.

Current-head CI and the final combined repository gate remain pending. These tests use synthetic transport; no production mailbox or provider was contacted. Live-editor immediate-send serialization is handled separately in #3568, and the existing editor teardown issue remains #3567.

Undoing a queued reply handed back its markdown only, and the panel seeded
the composer only when there was some, so undoing an attachment-only reply
restored nothing. The undo door now hands back the files the recalled send
named (email and API lanes), the panel seeds the reply box with both, and a
re-send names the same stored blobs instead of uploading them again. The
restored draft seeds only the conversation it was undone in.

The remove button on a file chip in the reply box had no accessible name
(WCAG 4.1.2). It is named after the whole file name through the existing
common.aria.removeNamed key (en, de, fr), with a visible focus ring.

Manual boxes CONV-F33 and CONV-A8 with their automation row.

@yannickmonney yannickmonney left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed e37986bb05696a5f4e106c3f094c9785a0e45ac2. Both reply and compose now let upload failures reject the editor's existing send contract, so the editor retains its draft/files and owns one error toast. The specific mutation callers disable their duplicate generic toast; other callers retain their defaults. Backend refusal detail is preserved.

The regression exercises real Milkdown, the actual panes, persistence and mutation hooks with synthetic transport. I inspected the before/after evidence and the pinned-runtime run: 15 Chromium tests pass, covering upload mint/refusal/network/malformed responses, attachment-only drafts, send rejection, retained instructions/undo text and successful retry clearing once. 28 focused UI tests also pass. The orphaned compose error key caught by the first full check was removed from all three catalogs; the 24 translation guards pass.

No remaining defect found in this focused upload-failure review. Final full-check acceptance is pending the queued rerun. Keep #3565's immediate-send issue and #3552's stored-file undo work visible as separate integration concerns; this PR does not claim to cover those paths. No production or actual mail-provider testing, and no merge.

@yannickmonney yannickmonney left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integration follow-up at c8ed429.

The assigned reviewer inspected the two new Inbox integration commits in a separate, clean checkout. Fresh direct runs under pinned Bun 1.4.2 passed 20 Chromium, 42 UI and 103 backend/adapter tests. In particular, the real editor failure/retry cases now retain both stored undo attachments and new files, do not upload stored references again, and preserve edited/removed files across navigation. The rejection contract and single editor-owned error toast remain intact. No new blocking finding in this focused integration review.

The earlier 55/55 full repository check and full SAST result belong only to e37986b. They are not evidence for this integrated tree. I read the updated PR body reporting the current broader check's remaining shutdown-timing failure; its diagnosis/rerun and current-head CI still need completion before merge. The shared newer-main delta is outside this focused review. No production or provider calls, source/history changes, or merge were performed.

@yannickmonney
yannickmonney merged commit 80759c7 into main Sep 28, 2026
57 of 58 checks passed
@yannickmonney
yannickmonney deleted the fix/preserve-reply-after-upload-failure branch September 28, 2026 07:50
yannickmonney added a commit that referenced this pull request Sep 28, 2026
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.

1 participant