Repository navigation
feat(platform): undo, retry and discard outbound conversation messages - #2839
Merged
Israeltheminer merged 3 commits intoJul 22, 2026
Merged
Conversation
Adds an email-client-style outbound lifecycle to conversation replies and compose: - Undo send: outbound sends are scheduled 10s in the future instead of immediately; the bubble shows a live "Sending in Ns · Undo" countdown. Undo cancels the scheduled job, deletes the row, walks lastMessageAt back, and returns the source markdown so the composer re-seeds the draft. - Failed-send recovery: a failed send shows "Not delivered" with the provider error, plus Retry (reschedules, bumps retryCount) and Delete. - Outbound-HTML fidelity: the composer serializes via Milkdown getHTML() (@milkdown/kit) + a new toOutboundHtml() sanitizer, replacing the old ReactMarkdown/renderToStaticMarkup path (fixes literal <br /> in sent mail) and capturing the source markdown that Undo restores. Note: every outbound path through sendMessageViaIntegration (reply, compose, bulk) now carries a 10s delivery delay — a deliberate, product-visible latency traded for the undo window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An email-client-style outbound lifecycle for conversation replies and compose:
lastMessageAtback, and returns the source markdown so the composer re-seeds the draft.failedsend shows "Not delivered" with the provider error, plus Retry (reschedules, bumpsretryCount) and Delete.getHTML()(@milkdown/kit) + a newtoOutboundHtml()sanitizer, replacing the old ReactMarkdown/renderToStaticMarkuppath (fixes literal<br />in sent mail) and capturing the source markdown that Undo restores.Every outbound path through
sendMessageViaIntegration(reply, compose, bulk) now carries a 10 s delivery delay — a deliberate, product-visible latency traded for the undo window. Flagging for product sign-off. (Known v1 edge, noted inundo_send_message.ts: an approval completed by the send stays completed after an undo.)Scope
undo_send_message/retry_send_message/discard_outbound_message/recompute_conversation_last_message_at+ edits tomutations,send_message_via_integration,transform_conversation,validators,compose_email_conversation,reply_to_conversation; regenerated_generated/api.d.ts.message(countdown/undo/retry/delete),message-editor+ newoutbound-html,types,compose-email-pane,conversation-panel, hooks.@milkdown/kit. i18n:conversations.message.*+conversations.panel.*Failed(en/de/fr).Test
undo/retry/discard.test.ts(13 tests, incl. cross-org RLS, reject-after-fired, non-failed guards). UI:message.test,message-editor.test,outbound-html.test(16 tests). All green. typecheck · oxlint (type-aware) · oxfmt clean.