fix(iwooos): surface controlled cd lane blocker in work items
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 49s
CD Pipeline / build-and-deploy (push) Successful in 4m46s
CD Pipeline / post-deploy-checks (push) Has been cancelled

This commit is contained in:
Your Name
2026-07-02 00:59:28 +08:00
parent f4ca49c516
commit 1d3a2aa7dd
3 changed files with 87 additions and 6 deletions

View File

@@ -7851,6 +7851,9 @@ function AiLoopLogSourceTagsPanel({
summary?.ai_loop_current_blocker_deployment_closure_state ??
evidence?.ai_loop_current_blocker_deployment_closure_state ??
"";
const currentBlockerId = summary?.ai_loop_current_blocker_id ?? "";
const controlledCdLaneGuardrailsBlocked =
currentBlockerId === "controlled_cd_lane_guardrails_blocked";
const labelMap: Record<string, string> = {
project_id: t("tagLabels.projectId"),
product: t("tagLabels.product"),
@@ -7916,19 +7919,44 @@ function AiLoopLogSourceTagsPanel({
: queueNormalizerFieldIds.some((id) => id.includes("publickey_offer_timeout"))
? t("rootCause.offerTimeout")
: t("rootCause.unknown");
const blockerDiagnosis = controlledCdLaneGuardrailsBlocked
? t("rootCause.controlledCdLaneGuardrails")
: rootCause;
const controlledCdLanePhases = controlledCdLaneGuardrailsBlocked
? [
{
key: "ssh-control-path",
label: t("phases.ssh.label"),
value: t("phases.ssh.value"),
tone: "border-[#b9d9c2] bg-[#f2fbf3] text-[#236332]",
},
{
key: "harbor-v2",
label: t("phases.harbor.label"),
value: t("phases.harbor.value"),
tone: "border-[#b9d9c2] bg-[#f2fbf3] text-[#236332]",
},
{
key: "controlled-cd-lane",
label: t("phases.cdLane.label"),
value: t("phases.cdLane.value"),
tone: "border-[#f0c6a8] bg-[#fff8f1] text-[#9a4d16]",
},
]
: [];
const visualCards = [
{
key: "blocker",
icon: TriangleAlert,
label: t("visual.blocker"),
value: summary?.ai_loop_current_blocker_id ?? "--",
value: currentBlockerId || "--",
tone: "border-[#f0c6a8] bg-[#fff8f1] text-[#9a4d16]",
},
{
key: "diagnosis",
icon: SearchCheck,
label: t("visual.diagnosis"),
value: rootCause,
value: blockerDiagnosis,
tone: "border-[#c9d8ea] bg-[#eef5ff] text-[#1f5b9b]",
},
{
@@ -8025,6 +8053,29 @@ function AiLoopLogSourceTagsPanel({
);
})}
</div>
{controlledCdLanePhases.length > 0 ? (
<div
className="mt-3 grid gap-2 border border-[#e0ddd4] bg-[#faf9f3] p-2 sm:grid-cols-3"
data-testid="ai-loop-controlled-cd-lane-phases"
>
{controlledCdLanePhases.map((phase) => (
<div
key={phase.key}
className={cn(
"min-w-0 border px-3 py-2",
phase.tone
)}
>
<div className="text-[11px] font-semibold text-[#5f5b52]">
{phase.label}
</div>
<div className="mt-1 break-words font-mono text-xs font-semibold text-[#141413]">
{loading ? "--" : phase.value}
</div>
</div>
))}
</div>
) : null}
<div className="mt-4 grid gap-px border border-[#e0ddd4] bg-[#e0ddd4] sm:grid-cols-2 xl:grid-cols-4">
{metrics.map((metric) => {
const Icon = metric.icon;