fix(awooop): classify source contract not-ready state
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 55s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
Your Name
2026-07-02 19:38:40 +08:00
parent 08ccceacb6
commit 47c9dea037

View File

@@ -8719,12 +8719,16 @@ function AiLoopLogSourceTagsPanel({
}
function stockplatformCompactTone(value: string | boolean | null | undefined) {
if (value === true || value === "ready" || String(value).includes("_ready")) {
return "border-[#b9d9c2] bg-[#f2fbf3] text-[#236332]";
}
if (String(value).includes("blocked") || value === false) {
if (
String(value).includes("blocked") ||
String(value).includes("not_ready") ||
value === false
) {
return "border-[#f0c6a8] bg-[#fff8f1] text-[#9a4d16]";
}
if (value === true || value === "ready" || String(value).endsWith("_ready")) {
return "border-[#b9d9c2] bg-[#f2fbf3] text-[#236332]";
}
return "border-[#c9d8ea] bg-[#eef5ff] text-[#1f5b9b]";
}
@@ -8781,7 +8785,10 @@ function StockPlatformP0ReceiptPanel({
evidence?.stockplatform_source_contract_non_ok_source_count ??
0;
const nextOrder = priority?.next_execution_order?.[0] ?? "";
const runtimeLabel = runtimeStatus.includes("_ready")
const runtimeReady = runtimeStatus === "stockplatform_public_api_runtime_ready";
const sourceContractReady =
sourceContractStatus === "stockplatform_source_contract_ready";
const runtimeLabel = runtimeReady
? t("values.ready")
: t("values.blocked");
const receiptLabel = receiptProvided ? t("values.received") : t("values.missing");
@@ -8793,12 +8800,12 @@ function StockPlatformP0ReceiptPanel({
: dataDependency === "none"
? t("values.ready")
: t("values.review");
const sourceContractLabel = sourceContractStatus.includes("_ready")
const sourceContractLabel = sourceContractReady
? t("values.ready")
: sourceContractReceiptProvided
? t("values.sourcesNeedWork", { count: sourceContractNonOkCount })
: t("values.missing");
const verifierLabel = runtimeStatus.includes("_ready")
const verifierLabel = runtimeReady
? t("values.ready")
: t("values.pending");
const nextActionLabel =
@@ -8851,7 +8858,7 @@ function StockPlatformP0ReceiptPanel({
value: verifierLabel,
detail: t("metricDetails.verifier"),
icon: CheckCircle2,
tone: stockplatformCompactTone(runtimeStatus.includes("_ready")),
tone: stockplatformCompactTone(runtimeReady),
},
];