mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(panel): forms catch up with the backend (#614)
New Project claimed GitLab/Gitea were 'planned' while both providers are fully shipped, showed a hardcoded GitHub badge, and never sent git_provider at all — a non-GitHub project could not be created without an immediate edit. It now carries the same forge Select the edit dialog has; the edit dialog's own 'GitLab support is planned' tooltip is corrected too. Also: the git actions panel's hardcoded 'main' (wrong PR-eligibility and target label for master-default and env-ladder projects) is replaced by the project's resolved head branch; acceptance criteria become editable in the edit-task dialog; three feature flags get their missing descriptions; and three forms swap raw-UUID text inputs for the existing Task/Agent selectors. Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
} from "@/components/ui/dialog";
|
||||
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
|
||||
import { HelpTip } from "@/components/ui/help-tip";
|
||||
import { TaskSelector } from "@/components/tasks/task-selector";
|
||||
import { Play } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
|
||||
@@ -31,7 +32,7 @@ export function SpawnAgentDialog({
|
||||
trigger,
|
||||
}: SpawnAgentDialogProps) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [taskId, setTaskId] = useState("");
|
||||
const [taskId, setTaskId] = useState<string | null>(null);
|
||||
const [initialPrompt, setInitialPrompt] = useState("");
|
||||
const spawnAgent = useSpawnAgent();
|
||||
// Synchronous re-entrancy guard: `spawnAgent.isPending` only flips on a
|
||||
@@ -66,7 +67,7 @@ export function SpawnAgentDialog({
|
||||
};
|
||||
|
||||
const resetForm = () => {
|
||||
setTaskId("");
|
||||
setTaskId(null);
|
||||
setInitialPrompt("");
|
||||
};
|
||||
|
||||
@@ -102,18 +103,19 @@ export function SpawnAgentDialog({
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<HelpTip label="Pre-claims this task on spawn instead of pulling from the pool">
|
||||
<Label htmlFor="taskId" className="w-fit">Task ID (optional)</Label>
|
||||
<Label className="w-fit">Task (optional)</Label>
|
||||
</HelpTip>
|
||||
<Input
|
||||
id="taskId"
|
||||
<TaskSelector
|
||||
value={taskId}
|
||||
onChange={(e) => setTaskId(e.target.value)}
|
||||
placeholder="UUID of task to assign"
|
||||
onChange={setTaskId}
|
||||
placeholder="Select task to assign (optional)..."
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<HelpTip label="Extra instructions passed to the agent's first turn">
|
||||
<Label htmlFor="initialPrompt" className="w-fit">Initial Prompt (optional)</Label>
|
||||
<Label htmlFor="initialPrompt" className="w-fit">
|
||||
Initial Prompt (optional)
|
||||
</Label>
|
||||
</HelpTip>
|
||||
<Input
|
||||
id="initialPrompt"
|
||||
|
||||
Reference in New Issue
Block a user