feat: refresh + smarter filter for new-task branch selector (#750)

This commit is contained in:
Carlos Florêncio
2026-05-01 13:24:12 +01:00
committed by GitHub
parent d912c7230c
commit 9f1e372967
22 changed files with 1095 additions and 51 deletions
@@ -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}
/>
</div>
{isLocalWithoutGitHubUrl && (