PhoenixKitInbox.Web.ComposeLive (PhoenixKitInbox v0.2.0)

Copy Markdown View Source

Compose, reply, forward, and save drafts.

A separate LiveView rather than a modal inside InboxLive: composing has its own URL (/admin/inbox/compose?reply_to=…), which means a half-written reply survives a page reload and can be linked to from a notification.

Draft handling

The form autosaves on change (debounced) once there's anything worth saving, so @draft_uuid fills in after the first save and every later save updates the same message. Sending promotes that same row — the draft becomes the sent message rather than being copied and deleted, which keeps the uuid stable for anything already linking to it.

Access

Composing requires "write" on the sending mailbox — "read" grantees on a shared mailbox can follow the conversation but can't send as it.