# refactor\(web\): ChatView's send preparation is pure functions in ChatView.logic · pingdotgg/t3code

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

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

Visibility: public

Requested revision: 35322b39e2d49dc0b2a503db3f38899f003b6707

Requested commit: 35322b39e2d49dc0b2a503db3f38899f003b6707

Commit: 35322b39e2d49dc0b2a503db3f38899f003b6707

Tree: 0239320fe92b8751f8495cb92f078a3119cf0a31

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
refactor(web): ChatView's send preparation is pure functions in ChatView.logic

onSend computed its snapshot, dispatch plan, attachment id binding and
inline-context fallback inline, twice in places. They are now pure
functions with tests, and a failed send restores its draft through one
restoreComposerDraft helper.

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

```

## Parents

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

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