Add compact decision receipt for Ranker handoff
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user