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
9e99b8efdcJulius Marminge committed on 3/2/2026, 6:26:54 AMparent4b4e3b1
5 files changedLine totals unavailable