Factory acceptance phase and issue restart

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Sonnet 5.5 committed 2026-11-16 08:51:48 +01:00
1 parent 3f39f4bd65
commit e09e295f60
8 files changed
+246 -8

No files matched your search

+32 -2
View File
@@ -57,6 +57,7 @@ interface Issue {
state: string;
note: string;
pr_url: string;
branch: string;
rounds: number;
created_at: number;
updated_at: number;
@@ -98,8 +99,8 @@ const COLUMNS: { id: string; states: string[] }[] = [
{ id: "review", states: ["new", "review"] },
{ id: "question", states: ["question"] },
{ id: "approved", states: ["approved"] },
{ id: "build", states: ["building", "built"] },
{ id: "qa", states: ["qa"] },
{ id: "build", states: ["building", "rework"] },
{ id: "qa", states: ["qa", "testing"] },
{ id: "done", states: ["done"] },
{ id: "failed", states: ["failed", "rejected"] },
];
@@ -217,6 +218,21 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
}
};
const restart = async (to: "new" | "approved" | "qa") => {
if (!selected) return;
setBusy(true);
try {
await post("/factory/issues/restart", { repo: selected.repo, number: selected.number, to });
toast(t("factory.restarted"));
await reload();
} catch (e: any) {
toast(e.message);
} finally {
setBusy(false);
}
};
const phaseRunning = !!selected && ["review", "building", "testing"].includes(selected.state);
return (
<>
{!data.area && <div className="notice err">{t("factory.noArea")}</div>}
@@ -316,6 +332,20 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
<div className="row">
<h3 style={{ margin: 0 }}>{selected ? `${repoName(selected.repo)} #${selected.number} – ${selected.title}` : t("factory.latestRuns")}</h3>
<span className="spacer" />
{selected && !phaseRunning && (
<>
<span className="hint">{t("factory.restartAt")}</span>
<button className="small" onClick={() => restart("new")} disabled={busy}>
{t("factory.col.review")}
</button>
<button className="small" onClick={() => restart("approved")} disabled={busy}>
{t("factory.col.build")}
</button>
<button className="small" onClick={() => restart("qa")} disabled={busy || !selected.branch}>
{t("factory.col.qa")}
</button>
</>
)}
{selected && (
<>
<a className="small ghost button-link" href={issueUrl(selected.repo, selected.number)} target="_blank" rel="noreferrer">
+2
View File
@@ -1211,6 +1211,8 @@ export const de: Messages = {
"factory.duration": "Dauer",
"factory.tokens": "Tokens",
"factory.cost": "Kosten",
"factory.restartAt": "Neu starten bei:",
"factory.restarted": "Issue ist wieder im Ablauf",
"factory.pr": "Pull Request",
"factory.round": "Runde {n}",
"factory.openChat": "Chat öffnen",
+2
View File
@@ -1210,6 +1210,8 @@ export const en = {
"factory.duration": "Duration",
"factory.tokens": "Tokens",
"factory.cost": "Cost",
"factory.restartAt": "Restart at:",
"factory.restarted": "Issue is back in the flow",
"factory.pr": "Pull request",
"factory.round": "round {n}",
"factory.openChat": "Open chat",
+4
View File
@@ -3,6 +3,10 @@
* under "unreleased"; scripts/release.sh renames the key to the release version.
*/
export const WHATS_NEW: Record<string, { en: string[]; de: string[] }> = {
unreleased: {
en: ["Factory: approved issues are built automatically on their own branch and end as a pull request", "Factory acceptance: another model starts the app and checks the scenarios, with up to 2 rework rounds", "Factory: restart a failed or rejected issue at review, build or acceptance"],
de: ["Factory: freigegebene Issues werden automatisch auf einem eigenen Branch gebaut und enden als Pull Request", "Factory-Abnahme: ein anderes Modell startet die App und prüft die Szenarien, bis zu 2 Nachbesserungsrunden", "Factory: fehlgeschlagene oder abgelehnte Issues bei Review, Build oder Abnahme neu starten"],
},
"202611-00042": {
en: ["Factory: approved issues are now built automatically on their own branch, with a pull request at the end"],
de: ["Factory: freigegebene Issues werden jetzt automatisch auf einem eigenen Branch gebaut, am Ende steht ein Pull Request"],