# Preserve draft env mode across thread and branch context updates · pingdotgg/t3code

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

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

Visibility: public

Requested revision: 9e99b8efdc43870933fe114a94a82c2663471f2e

Requested commit: 9e99b8efdc43870933fe114a94a82c2663471f2e

Commit: 9e99b8efdc43870933fe114a94a82c2663471f2e

Tree: 286292ebf620e667c508dc32d6fbfce00eb6d3da

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Preserve draft env mode across thread and branch context updates

- Track and persist `envMode` in composer draft thread state
- Keep worktree mode for local drafts even when `worktreePath` is null
- Update branch toolbar/chat/sidebar to use effective draft env mode
- Add tests for env mode persistence and undefined option merges

```

## Parents

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

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