Skip to content

Mail: draft state handling #1480

Closed
Closed

Description

@kulmann

Initial Checklist

  • I understand this is a user story and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

User Story

  • As a user, I want the mail app to take care of my current email composing state via drafts so that I don't have to be afraid to loose my email content.

User Value

Safety net

Acceptance Criteria

  • we'll automatically save the open email composer content as draft every 2 minutes
  • the current draft id is part of the component state
  • an autosave might change the draftId, needs to be replaced in that case
  • closing the email composer shows a modal, prompting the user to either cancel, save or discard the draft
  • on before unmounting the compose view (e.g. by clicking on another email or going into another app) the user is asked if they want to cancel navigating away, save as draft or delete the draft.
Image

Activity

  1. added theissue type on Nov 10, 2025
  2. moved this from Qualification to Backlog in OpenCloud Team Boardon Nov 10, 2025
  3. AlexAndBear commented on Nov 13, 2025

    @AlexAndBear
    Member

    blocked by #1609

  4. pbleser-oc commented on Dec 4, 2025

    @pbleser-oc
    Member

    See #1476 (comment) for an initial description on the backend API to use for creating/updating draft emails.

    Further discussions and comments on drafts will happen here instead.

  5. pbleser-oc commented on Dec 4, 2025

    @pbleser-oc
    Member

    The following backend API endpoint should be used when replacing a draft's content:

    PUT /groupware/accounts/{accountId}/emails/{emailId}
    

    with a request body that contains the content of the new draft email, just as with the email draft creation endpoint (see comment above.)

    Note that, just like when a new draft email is created, it will return a new identifier:

    {
        "id": "leaaaagl",
        "blobId": "cav10yznxf7fgmvtnadyje9fpwjqzpeuq0yge0othawc1g97usjmwaiazmaq",
        "threadId": "cz",
        "size": 288
    }

    Effectively, it does the same as the endpoint for creating a new draft, but, upon success, will also delete the previous draft (as referenced by the {emailId} path parameter.)

  6. moved this from Backlog to In Progress in OpenCloud Team Boardon Jan 28, 2026
  7. self-assigned this
    on Jan 28, 2026
  8. moved this from In Progress to Blocked in OpenCloud Team Boardon Mar 16, 2026
  9. moved this from Blocked to Done in OpenCloud Team Boardon Mar 16, 2026
  10. closed this as completedby moving to Done in OpenCloud Team Boardon Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions