# Clean up orphaned composer drafts and harden draft checks · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/bd433720531dd8f2ec1619927657be431c254cb7)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: bd433720531dd8f2ec1619927657be431c254cb7

Requested commit: bd433720531dd8f2ec1619927657be431c254cb7

Commit: bd433720531dd8f2ec1619927657be431c254cb7

Tree: 5638ba1d90edcaca556687bc67484e0a53c9ebb4

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Clean up orphaned composer drafts and harden draft checks

- Remove stale `draftsByThreadId` entries when project-thread mappings are replaced or cleared
- Preserve drafts when a thread is still mapped to another project
- Parse persisted image `dataUrl` payloads more defensively and use `Object.hasOwn` for draft-thread existence checks

```

## Parents

- [123eb96c52082db860024b629441fe13ad4e754a](https://git.cafe/pingdotgg/t3code/commit/123eb96c52082db860024b629441fe13ad4e754a?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/bd433720531dd8f2ec1619927657be431c254cb7?format=markdown)
