# Open drafts that have no attachments · michael/spark-rs

[View on GitCafe](https://git.cafe/michael/spark-rs/commit/8b12f9f147574ff8e53b0ad9fa5d75f1aedc1971)

Repository: [michael/spark-rs](https://git.cafe/michael/spark-rs)

Visibility: public

Requested revision: 8b12f9f147574ff8e53b0ad9fa5d75f1aedc1971

Requested commit: 8b12f9f147574ff8e53b0ad9fa5d75f1aedc1971

Commit: 8b12f9f147574ff8e53b0ad9fa5d75f1aedc1971

Tree: 341e7e7eb0a71165920f160ec02c8dd9df704ff6

Author: Michael Rodriguez

Committer: Michael Rodriguez

## Message

```
Open drafts that have no attachments

Opening a draft from Drafts blanked the window. Draft serialized its
attachments with skip_serializing_if = Vec::is_empty, so a draft without
any reached the frontend with no attachments field. savedDraft copied that
undefined over the composer's empty list, the Composer's
attachments.reduce threw while rendering, and with no error boundary React
unmounted the whole app.

Draft now always writes attachments. Saved drafts and queued mail written
without it still read, through #[serde(default)].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [175f8960de0690b2f16cb904a39cb78d2ff40b60](https://git.cafe/michael/spark-rs/commit/175f8960de0690b2f16cb904a39cb78d2ff40b60?format=markdown)

[Source at this commit](https://git.cafe/michael/spark-rs/tree/8b12f9f147574ff8e53b0ad9fa5d75f1aedc1971?format=markdown)
