chore: merge main into cw/small-change-flow

Integrates main branch changes (headquarters dashboard, task retry count,
agent prompt persistence, remote sync improvements) with the initiative's
errand agent feature. Both features coexist in the merged result.

Key resolutions:
- Schema: take main's errands table (nullable projectId, no conflictFiles,
  with errandsRelations); migrate to 0035_faulty_human_fly
- Router: keep both errandProcedures and headquartersProcedures
- Errand prompt: take main's simpler version (no question-asking flow)
- Manager: take main's status check (running|idle only, no waiting_for_input)
- Tests: update to match removed conflictFiles field and undefined vs null
This commit is contained in:
Lukas May
2026-03-06 16:48:12 +01:00
parent da3218b530
commit 28521e1c20
100 changed files with 9054 additions and 973 deletions

View File

@@ -10,6 +10,7 @@ import {
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Loader2 } from "lucide-react";
import { toast } from "sonner";
import { trpc } from "@/lib/trpc";
@@ -27,13 +28,20 @@ export function RegisterProjectDialog({
const [defaultBranch, setDefaultBranch] = useState("main");
const [error, setError] = useState<string | null>(null);
const utils = trpc.useUtils();
const registerMutation = trpc.registerProject.useMutation({
onSuccess: () => {
onOpenChange(false);
toast.success("Project registered");
void utils.listProjects.invalidate();
},
onError: (err) => {
setError(err.message);
if (err.data?.code === "INTERNAL_SERVER_ERROR") {
setError("Failed to clone repository. Check the URL and try again.");
} else {
setError(err.message);
}
},
});
@@ -109,7 +117,14 @@ export function RegisterProjectDialog({
Cancel
</Button>
<Button type="submit" disabled={!canSubmit}>
{registerMutation.isPending ? "Registering..." : "Register"}
{registerMutation.isPending ? (
<>
<Loader2 className="animate-spin mr-2 h-4 w-4" />
Cloning repository
</>
) : (
"Register"
)}
</Button>
</DialogFooter>
</form>