Add compact decision receipt for Ranker handoff

This commit is contained in:
OpenClaw Bot
2026-05-27 15:56:19 +02:00
parent 10084afb96
commit 55e75bc793
5 changed files with 44 additions and 2 deletions
+25
View File
@@ -186,6 +186,30 @@ function renderHandoffStatus(handoff = {}) {
`;
}
function renderDecisionReceipt(receipt = {}) {
if (!receipt.activeMove) return '';
const held = receipt.doNotStartYet || [];
return `
<section class="decision-receipt" aria-label="Decision receipt">
<div>
<span>Active move</span>
<strong>${escapeHtml(receipt.activeMove)}</strong>
</div>
<div>
<span>First proof step</span>
<p>${escapeHtml(receipt.firstProofStep || 'Run the smallest manual proof before product machinery.')}</p>
</div>
<div>
<span>Evidence question</span>
<p>${escapeHtml(receipt.evidenceQuestion || 'What would make this ranking obviously right or wrong?')}</p>
</div>
${held.length ? `<div><span>Do not start yet</span><ul>${held.map((item) => `<li>${escapeHtml(item)}</li>`).join('')}</ul></div>` : ''}
${receipt.sourceAnchor ? `<small>Source anchor: ${escapeHtml(receipt.sourceAnchor)}</small>` : ''}
<small>${escapeHtml(receipt.handoffRule || 'Only the Do first item is active.')}</small>
</section>
`;
}
function renderRankCard(item) {
return `
<article class="rank-card ${laneClass(item.lane)}">
@@ -314,6 +338,7 @@ function renderResults(data) {
<div><span>Proof to collect</span><p>${escapeHtml(glance.evidenceQuestion || 'Name the evidence that would change the ranking.')}</p></div>
<div><span>Trap to avoid</span><p>${escapeHtml(glance.biggestTrap || brief.caution || 'Do not treat first-pass judgement as final truth.')}</p></div>
</section>
${renderDecisionReceipt(brief.decisionReceipt || {})}
${renderSourceTrace(glance.sourceTrace || {})}
<div class="result-actions" aria-label="Copy result actions">