diff --git a/apps/frontend/src/renderer/components/TaskCreationWizard.tsx b/apps/frontend/src/renderer/components/TaskCreationWizard.tsx index 0d4fcf68..c25b4f4b 100644 --- a/apps/frontend/src/renderer/components/TaskCreationWizard.tsx +++ b/apps/frontend/src/renderer/components/TaskCreationWizard.tsx @@ -15,13 +15,7 @@ import { useTranslation } from 'react-i18next'; import { Loader2, ChevronDown, ChevronUp, RotateCcw, FolderTree, GitBranch, Info } from 'lucide-react'; import { Button } from './ui/button'; import { Label } from './ui/label'; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue -} from './ui/select'; +import { Combobox, type ComboboxOption } from './ui/combobox'; import { TaskModalLayout } from './task-form/TaskModalLayout'; import { TaskFormFields } from './task-form/TaskFormFields'; import { type FileReferenceData } from './task-form/useImageUpload'; @@ -83,6 +77,22 @@ export function TaskCreationWizard({ return project?.path ?? null; }, [projects, projectId]); + // Convert branches to ComboboxOption[] format for searchable dropdown + const branchOptions: ComboboxOption[] = useMemo(() => { + const options: ComboboxOption[] = [ + { + value: PROJECT_DEFAULT_BRANCH, + label: projectDefaultBranch + ? t('tasks:wizard.gitOptions.useProjectDefaultWithBranch', { branch: projectDefaultBranch }) + : t('tasks:wizard.gitOptions.useProjectDefault') + } + ]; + branches.forEach((branch) => { + options.push({ value: branch, label: branch }); + }); + return options; + }, [branches, projectDefaultBranch, t]); + // Classification fields const [category, setCategory] = useState(''); const [priority, setPriority] = useState(''); @@ -684,31 +694,20 @@ export function TaskCreationWizard({ - + className="h-9" + />

{t('tasks:wizard.gitOptions.helpText')}

diff --git a/apps/frontend/src/shared/i18n/locales/en/tasks.json b/apps/frontend/src/shared/i18n/locales/en/tasks.json index b68cf2d5..6bfa9c1d 100644 --- a/apps/frontend/src/shared/i18n/locales/en/tasks.json +++ b/apps/frontend/src/shared/i18n/locales/en/tasks.json @@ -151,6 +151,8 @@ "baseBranchLabel": "Base Branch (optional)", "useProjectDefault": "Use project default", "useProjectDefaultWithBranch": "Use project default ({{branch}})", + "searchBranches": "Search branches...", + "noBranchesFound": "No branches found", "helpText": "Override the branch this task's worktree will be created from. Leave empty to use the project's configured default branch.", "useWorktreeLabel": "Use isolated workspace (recommended)", "useWorktreeDescription": "Creates changes in a separate git worktree for safe review before merging. Disable to build directly in your project (faster but riskier)." diff --git a/apps/frontend/src/shared/i18n/locales/fr/tasks.json b/apps/frontend/src/shared/i18n/locales/fr/tasks.json index 9609f5fc..302335ff 100644 --- a/apps/frontend/src/shared/i18n/locales/fr/tasks.json +++ b/apps/frontend/src/shared/i18n/locales/fr/tasks.json @@ -151,6 +151,8 @@ "baseBranchLabel": "Branche de base (optionnel)", "useProjectDefault": "Utiliser la branche par défaut du projet", "useProjectDefaultWithBranch": "Utiliser la branche par défaut du projet ({{branch}})", + "searchBranches": "Rechercher des branches...", + "noBranchesFound": "Aucune branche trouvée", "helpText": "Remplacez la branche à partir de laquelle le worktree de cette tâche sera créé. Laissez vide pour utiliser la branche par défaut configurée du projet.", "useWorktreeLabel": "Utiliser un espace de travail isolé (recommandé)", "useWorktreeDescription": "Crée les changements dans un worktree git séparé pour une révision sécurisée avant la fusion. Désactivez pour travailler directement dans votre projet (plus rapide mais risqué)."