Factory: blinking blue lamp while a phase is being prepared
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
585fdd58de
commit
724405b245
6 files changed
+33
-2
No files matched your search
@@ -577,9 +577,11 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
|
||||
const rs = runsOf(i);
|
||||
const active = rs.find((r) => !r.ended_at);
|
||||
const latest = active ?? rs[0];
|
||||
// Claimed by a phase but no chat yet: checkout, and – for acceptance – installing and starting the app in its throw-away container.
|
||||
const preparing = !active && ["review", "building", "testing"].includes(i.state);
|
||||
const tokens = rs.reduce((a, r) => a + r.input_tokens + r.output_tokens, 0);
|
||||
return (
|
||||
<button key={`${i.repo}#${i.number}`} data-state={i.state} className={`factory-card ${sel === `${i.repo}#${i.number}` ? "active" : ""} ${active ? "running" : ""}`} onClick={() => setSel(sel === `${i.repo}#${i.number}` ? "" : `${i.repo}#${i.number}`)}>
|
||||
<button key={`${i.repo}#${i.number}`} data-state={i.state} className={`factory-card ${sel === `${i.repo}#${i.number}` ? "active" : ""} ${active ? "running" : ""} ${preparing ? "preparing" : ""}`} onClick={() => setSel(sel === `${i.repo}#${i.number}` ? "" : `${i.repo}#${i.number}`)}>
|
||||
<span className="factory-card-head">
|
||||
<span className="hint">
|
||||
{repoName(i.repo)} #{i.number}
|
||||
@@ -608,7 +610,13 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
|
||||
)}
|
||||
</span>
|
||||
<b>{i.title || `#${i.number}`}</b>
|
||||
{latest && (
|
||||
{preparing && (
|
||||
<span className="hint" title={t("factory.preparing.hint")}>
|
||||
<span className="factory-pulse prep" />
|
||||
{i.state === "testing" ? t("factory.preparing.env") : t("factory.preparing.start")} · {fmtDuration(now - i.updated_at)}
|
||||
</span>
|
||||
)}
|
||||
{latest && !preparing && (
|
||||
<span className="hint">
|
||||
{active && <span className="factory-pulse" />}
|
||||
{t(`factory.phase.${latest.phase}` as any)} · {(latest.model || "").split("/").pop()} · {fmtDuration(runMs(latest, now))}
|
||||
|
||||
Reference in new issue
Block a user