# Refactor draft thread lookups and cache persisted draft state · pingdotgg/t3code

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

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

Visibility: public

Requested revision: a74511e765d1c2201f353c2fbc0bda85fd34b4fc

Requested commit: a74511e765d1c2201f353c2fbc0bda85fd34b4fc

Commit: a74511e765d1c2201f353c2fbc0bda85fd34b4fc

Tree: 0de6e1f26c822bb5c784b633ca05e11cee427590

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Refactor draft thread lookups and cache persisted draft state

- replace `read*` draft selectors with `getDraftThread`/`getDraftThreadByProjectId`
- centralize persisted localStorage parsing/caching in `composerDraftStore`
- make ChatView fallback read persisted attachments from in-memory store state

```

## Parents

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

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