fix(ui): separate runtime closure from receipt progress
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m14s
CD Pipeline / build-and-deploy (push) Successful in 5m4s
CD Pipeline / post-deploy-checks (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m14s
CD Pipeline / build-and-deploy (push) Successful in 5m4s
CD Pipeline / post-deploy-checks (push) Has been cancelled
This commit is contained in:
@@ -173,6 +173,7 @@ type RuntimeControlPayload = {
|
||||
program_status?: {
|
||||
implementation_completion_percent?: number | null;
|
||||
deploy_readback_marker?: string | null;
|
||||
can_claim_autonomous_loop_complete?: boolean | null;
|
||||
} | null;
|
||||
current_policy?: {
|
||||
low_risk_controlled_apply_allowed?: boolean | null;
|
||||
@@ -925,7 +926,12 @@ export function AutonomousRuntimeReceiptPanel({
|
||||
const workCompleted = toNumber(rollups.live_work_item_completed_count ?? workItemRollups.completed_count);
|
||||
const orderedWorkTotal = toNumber(workItemRollups.ordered_work_item_count ?? orderedWorkItems.length);
|
||||
const sourceFamilyTotal = toNumber(workItemRollups.source_family_work_item_count ?? sourceFamilyItems.length);
|
||||
const workCompletionPercent = workTotal > 0
|
||||
const runtimeClosurePercent = toNumber(
|
||||
payload?.program_status?.implementation_completion_percent
|
||||
);
|
||||
const runtimeClosureClosed =
|
||||
payload?.program_status?.can_claim_autonomous_loop_complete === true;
|
||||
const workItemReceiptPercent = workTotal > 0
|
||||
? Math.min(100, Math.round((workCompleted / workTotal) * 100))
|
||||
: 0;
|
||||
const prioritySummary = priorityPayload?.summary;
|
||||
@@ -938,7 +944,11 @@ export function AutonomousRuntimeReceiptPanel({
|
||||
const deployReadbackResolved = prioritySummary?.ai_loop_current_blocker_deploy_marker_resolved_by_production_readback === true;
|
||||
const deployCardTone: Tone = !hasPriorityReadback ? "neutral" : deployReadbackResolved ? "ok" : "warn";
|
||||
const runtimeCardTone: Tone = !hasRuntimeReadback ? "neutral" : dbOk ? "ok" : "warn";
|
||||
const workCardTone: Tone = !hasRuntimeReadback ? "neutral" : workTotal > 0 && workCompleted === workTotal ? "ok" : "warn";
|
||||
const workCardTone: Tone = !hasRuntimeReadback
|
||||
? "neutral"
|
||||
: runtimeClosureClosed
|
||||
? "ok"
|
||||
: "warn";
|
||||
const sourceCardTone: Tone = !hasRuntimeReadback
|
||||
? "neutral"
|
||||
: toNumber(rollups.live_log_active_source_family_count ?? logRollups.active_source_family_count) > 0
|
||||
@@ -978,7 +988,7 @@ export function AutonomousRuntimeReceiptPanel({
|
||||
label: t("proof.workItems"),
|
||||
value: readbackRatio(workCompleted, workTotal, hasRuntimeReadback),
|
||||
detail: t("proof.workItemsDetail", {
|
||||
percent: readbackNumber(workCompletionPercent, hasRuntimeReadback),
|
||||
percent: readbackNumber(runtimeClosurePercent, hasRuntimeReadback),
|
||||
}),
|
||||
icon: ListChecks,
|
||||
tone: workCardTone,
|
||||
@@ -2096,13 +2106,13 @@ export function AutonomousRuntimeReceiptPanel({
|
||||
total: readbackNumber(workTotal, hasRuntimeReadback),
|
||||
})}</span>
|
||||
<span className="font-mono text-[#141413]">
|
||||
{hasRuntimeReadback ? `${workCompletionPercent}%` : "--"}
|
||||
{hasRuntimeReadback ? `${workItemReceiptPercent}%` : "--"}
|
||||
</span>
|
||||
</div>
|
||||
<div className="mt-2 h-2 border border-[#d8d3c7] bg-[#faf9f3]">
|
||||
<div
|
||||
className="h-full bg-[#17602a]"
|
||||
style={{ width: hasRuntimeReadback ? `${workCompletionPercent}%` : "0%" }}
|
||||
style={{ width: hasRuntimeReadback ? `${workItemReceiptPercent}%` : "0%" }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user