Repository navigation
Description
Problem
If an Inbox reply's attachment upload fails, the UI treats the send callback as successful and clears the unsent draft and file selection even though no reply was sent. This is pre-existing behavior, also noted as left open in #3552, rather than a new regression introduced by that PR.
Evidence and reproduction
Reviewed at a6cb1777b84500e77546b0a95e8d9b0890357db7 in an isolated local checkout. In conversation-panel.tsx:310–318, attachment-upload errors show a toast and return normally. In message-editor.tsx, handleSendMessage awaits that callback and then clears the body, attached files and improvement instruction, and fires the sent callback.
A focused test using the existing real ConversationPanel with its backend upload mutation mocked to reject confirms that editor.onSave(...) resolves undefined instead of rejecting; five existing panel tests pass and this new failure-propagation regression fails. The editor's existing failure-preservation behavior requires a rejection. This is local component/source evidence; an actual mailbox send was not performed.
User-level reproduction to verify locally:
- Type a reply and attach a file.
- Make the local upload service refuse or fail the upload.
- Press Send.
- The upload-failed toast appears, but the unsent body/files are cleared; no reply was queued.
Expected and acceptance
- A failed upload or refused upload mint preserves the exact draft and selected files and allows retry.
- Use an explicit failure outcome or propagate the rejection to the existing editor contract; avoid two duplicate error toasts.
- Ensure no sent/remount/undo-consumed callback fires on failure.
- Cover a newly selected file, an attachment-only reply, and an undone reply combining an already-stored file with a new file whose upload fails.
- Add regression coverage across the panel/editor boundary and verify in a real browser against an isolated local upload failure. No production testing.
This should be a focused follow-up; it does not require changing the successful send or attachment-ownership contract.
Activity
yannickmonney commentedon Sep 27, 2026
Implementation is in progress on branch fix/preserve-reply-after-upload-failure. The same swallowed upload error also occurs in new-email compose, so the fix covers both Inbox reply and compose drafts with one consistent failure contract. Local tests only; no external mail or production activity.
yannickmonney commentedon Sep 27, 2026
Implemented in #3566 at
e37986bb05696a5f4e106c3f094c9785a0e45ac2. The same swallowing catch existed in New email, so the accepted scope covers both reply and compose. Both use the editor's existing rejection contract and one editor-owned failure toast with backend refusal detail.The local Chromium regression uses the real panes, Milkdown editor, persistence and mutation hooks. It verifies:
Current main has no stored-file undo payload. The mixed stored/new-file acceptance case is therefore an integration check for #3552; this focused fix does not import that feature. #3552 should retain this rejection/toast contract when adding stored attachments.
Validation: 15 Chromium tests, 28 focused UI tests, 24 translation checks, changed-file lint/type-check, manual-test gate and security scan passed. The final full check passed on pinned Bun 1.4.2: 55/55 tasks (42 cached), with fresh runs of 3,812 platform UI tests and 77,926 server tests. The obsolete compose locale key is removed from every applicable catalog. Full SAST also exited 0 with no findings (3,980 files / 467 rules); its report notes 35 partially analyzed files, 17 size exclusions, and timeouts in the English catalog and a Microsoft Graph fixture. All upload/send responses were synthetic; no production testing or mailbox/provider calls were made.
yannickmonney commentedon Oct 4, 2026
Already fixed on
mainby #3566 (squash80759c7af2a5e24ec2ee9b80b985ea4516aeef40, merged 2026-09-28). This independent confirmation is from Tale agent #2, TALE-359 run554ef899-2405-42cc-8bfd-e575c9b857fe, following the manager's answer on TALE-125. #3566's body has no closing keyword, so this issue stayed open.Independence: #3566 was opened on 2026-09-27 at 22:28Z, before TALE-125 existed and before this review role began. Its body and its ten commits carry only the shared GitHub principal and name no agent or run. Nothing in my own work history records it.
Source at
main6524150feconversation-panel.tsx:276-311), soonSaverejects. That covers an invalid attachment, a refused upload mint, a non-OK upload (throw await backendErrorFromResponse(result)) and a malformedstorageId.MessageEditorclears only after a successful save (message-editor.tsx:280-299). It clears the body, the files and the improvement instruction, and callsonMessageSent, only afterawait onSave(…)resolves.errorToast: false,:179-181).Tests
inbox-upload-failure.browser.test.tsxruns 13 real-Chromium tests through the real panel and editor. They cover reply and New email, five failure kinds, an attachment-only reply, and an undone reply that combines a stored file with a new file.main6524150fe: 13/13 pass.onMessageSenton failure, which is the original bug, fails all 13.20b6d441b) passed this file (13 tests) among 43 files and 307 tests.services/platform/app/features/conversations/is identical between20b6d441band6524150fe.Disclosed residual gap, not a blocker: the failures are simulated inside the test with a
fetchstub and an adapter spy. No local stack with a refusing upload service was run. The manager accepted this for the reconciliation.Closing as completed.