feat: refresh + smarter filter for new-task branch selector (#750)
This commit is contained in:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user