Extract branch sync logic and limit sync to local mode

- move branch-sync decision into `BranchToolbar.logic.ts`
- avoid auto-sync when env mode is `worktree` or thread has worktree path
- add unit tests for sync and no-sync cases
3756bbf5cdJulius Marminge committed on 2/17/2026, 9:05:30 PMparent73fa2d6
3 files changedLine totals unavailable