| … | … | @@ -649,7 +651,15 @@ export function NewTaskFlowProvider( | |
| 654 | + | branch: | |
| 655 | + | mode === "local" | |
| 656 | + | ? localSelection.branch | |
| 657 | + | : workspaceMode === "local" | |
🟠 High threads/new-task-flow-provider.tsx:657
Switching a restored local draft to worktree mode before server config loads permanently pins the checkout branch (for example, feature) instead of applying the configured base (for example, dev). With config unresolved, newWorktreesBaseBranch is "", so resolveWorktreeSwitchBranch returns selectedBranchName; persisting it prevents fillNewTaskWorkspaceBranch from filling the configured base later. Keep the branch unset until selectedEnvironmentServerConfig is available.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/mobile/src/features/threads/new-task-flow-provider.tsx around line 657: |
| 2 | |
| 3 | Switching a restored local draft to worktree mode before server config loads permanently pins the checkout branch (for example, `feature`) instead of applying the configured base (for example, `dev`). With config unresolved, `newWorktreesBaseBranch` is `""`, so `resolveWorktreeSwitchBranch` returns `selectedBranchName`; persisting it prevents `fillNewTaskWorkspaceBranch` from filling the configured base later. Keep the branch unset until `selectedEnvironmentServerConfig` is available. |
Fixed in 86c8f01a03. Until the environment's server config loads, the switch now passes an unknown base, so resolveWorktreeSwitchBranch leaves the branch unset and fillNewTaskWorkspaceBranch fills the configured base once settings arrive. One trade-off: with no base configured, a switch made in that window shows the repository default rather than the checked-out branch.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.