From 4120678cf7bf5142af08ae81b0b3e9fed4846691 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Sat, 10 Jan 2026 12:01:49 +0000 Subject: [PATCH] Done. The fix adds two lines to the `GitCreatePR` action in `actions/index.ts`: (#1911) 1. Fetches the workspace repos via `attemptsApi.getRepos(workspaceId)` 2. Finds the specific repo and passes its `target_branch` to `CreatePRDialog.show()` This matches the pattern already used by the `GitRebase` action in the same file. Now when you create a PR from the workspaces (ui-new) layout, the base branch will correctly default to the workspace's target branch instead of the main repo's currently checked-out branch. --- frontend/src/components/ui-new/actions/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/ui-new/actions/index.ts b/frontend/src/components/ui-new/actions/index.ts index 5d76efef..ef23a5d4 100644 --- a/frontend/src/components/ui-new/actions/index.ts +++ b/frontend/src/components/ui-new/actions/index.ts @@ -605,6 +605,9 @@ export const Actions = { const workspace = getWorkspaceFromCache(ctx.queryClient, workspaceId); const task = await tasksApi.getById(workspace.task_id); + const repos = await attemptsApi.getRepos(workspaceId); + const repo = repos.find((r) => r.id === repoId); + const result = await CreatePRDialog.show({ attempt: workspace, task: { @@ -614,6 +617,7 @@ export const Actions = { executor: '', }, repoId, + targetBranch: repo?.target_branch, }); if (!result.success && result.error) {