Update apps/ui/src/components/views/board-view.tsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Noam Loewenstern
2026-01-30 02:52:27 +02:00
committed by GitHub
parent b10501ea79
commit 07f777da22

View File

@@ -1275,10 +1275,9 @@ export function BoardView() {
runningAgentsCount={runningAutoTasks.length}
onConcurrencyChange={(newMaxConcurrency) => {
if (currentProject) {
// If selectedWorktree is undefined, fallback to null (main/primary worktree)
// Use null for the main worktree, otherwise use the branch name; also null if no worktree selected
const branchName =
selectedWorktree && !selectedWorktree.isMain ? selectedWorktree.branch : null;
// If selectedWorktree is undefined or it's the main worktree, branchName will be null.
// Otherwise, use the branch name.
const branchName = selectedWorktree?.isMain === false ? selectedWorktree.branch : null;
setMaxConcurrencyForWorktree(currentProject.id, branchName, newMaxConcurrency);
// Also update backend if auto mode is running
if (autoMode.isRunning) {