- {dropdownLabel}
+
+ {dropdownLabel || headerAction ? (
+
+ {dropdownLabel}
+ {headerAction}
) : null}
{showSearch && }
diff --git a/apps/web/components/task-create-dialog-form-body.tsx b/apps/web/components/task-create-dialog-form-body.tsx
index 92b80b883a..6b4aee819e 100644
--- a/apps/web/components/task-create-dialog-form-body.tsx
+++ b/apps/web/components/task-create-dialog-form-body.tsx
@@ -29,6 +29,9 @@ type CreateEditSelectorsProps = {
branch: string;
onBranchChange: (value: string) => void;
branchesLoading: boolean;
+ onRefreshBranches?: () => void;
+ branchesFetchedAt?: string;
+ branchesFetchError?: string;
localBranchesLoading: boolean;
agentProfiles: AgentProfileOption[];
agentProfilesLoading: boolean;
@@ -52,6 +55,11 @@ type CreateEditSelectorsProps = {
placeholder: string;
searchPlaceholder: string;
emptyMessage: string;
+ onRefresh?: () => void;
+ refreshing?: boolean;
+ fetchedAt?: string;
+ fetchError?: string;
+ loading?: boolean;
}>;
AgentSelectorComponent: React.ComponentType<{
options: SelectorOption[];
@@ -137,6 +145,9 @@ export const CreateEditSelectors = memo(function CreateEditSelectors(
branch,
onBranchChange,
branchesLoading,
+ onRefreshBranches,
+ branchesFetchedAt,
+ branchesFetchError,
localBranchesLoading,
executorProfileOptions,
executorProfileId,
@@ -182,6 +193,11 @@ export const CreateEditSelectors = memo(function CreateEditSelectors(
searchPlaceholder="Search branches..."
emptyMessage="No branch found."
disabled={branchDisabled}
+ onRefresh={!isLocalWithoutGitHubUrl ? onRefreshBranches : undefined}
+ refreshing={branchesLoading}
+ fetchedAt={branchesFetchedAt}
+ fetchError={branchesFetchError}
+ loading={branchesLoading || localBranchesLoading}
/>
{isLocalWithoutGitHubUrl && (
diff --git a/apps/web/components/task-create-dialog-options.tsx b/apps/web/components/task-create-dialog-options.tsx
index da5b4376e0..40713c1e45 100644
--- a/apps/web/components/task-create-dialog-options.tsx
+++ b/apps/web/components/task-create-dialog-options.tsx
@@ -87,9 +87,13 @@ export function useBranchOptions(branchOptionsRaw: Branch[]) {
branchObj.type === "remote" && branchObj.remote
? `${branchObj.remote}/${branchObj.name}`
: branchObj.name;
+ // Keywords give the scorer extra surfaces to match against: the leaf
+ // branch name, every path segment, and (for remotes) the remote name.
+ const keywords = buildBranchKeywords(branchObj.name, branchObj.remote);
return {
value: displayName,
label: displayName,
+ keywords,
renderLabel: () => (