Add active slice first-screen receipt

This commit is contained in:
OpenClaw Bot
2026-05-27 19:14:04 +02:00
parent bff9b1e7c3
commit 4e1b36d7b4
4 changed files with 52 additions and 1 deletions
+28
View File
@@ -196,6 +196,33 @@ function renderHandoffStatus(handoff = {}) {
`;
}
function renderFirstScreen(firstScreen = {}) {
if (!firstScreen.headline) return '';
const held = firstScreen.holdBack || [];
const guardrails = firstScreen.guardrails || [];
return `
<section class="active-slice-strip" aria-label="Active build slice">
<div class="active-slice-main">
<span>One thing to do now</span>
<h3>${escapeHtml(firstScreen.headline)}</h3>
<p>${escapeHtml(firstScreen.primaryAction || 'Run the smallest manual proof before product machinery.')}</p>
</div>
<div>
<span>Proof question</span>
<p>${escapeHtml(firstScreen.proofQuestion || 'What evidence would change this order?')}</p>
</div>
<div>
<span>Why this wins</span>
<p>${escapeHtml(firstScreen.why || 'It is the best first proof slice.')}</p>
</div>
${held.length ? `<div><span>Hold back</span><ul>${held.map((item) => `<li><b>${escapeHtml(item.title)}</b>${item.lane ? `${escapeHtml(item.lane)}` : ''}</li>`).join('')}</ul></div>` : ''}
${guardrails.length ? `<small>Guardrails: ${guardrails.map(escapeHtml).join(' · ')}</small>` : ''}
${firstScreen.sourceAnchor ? `<small>Source anchor: ${escapeHtml(firstScreen.sourceAnchor)}</small>` : ''}
<small>${escapeHtml(firstScreen.rule || 'One active move. Everything else waits.')}</small>
</section>
`;
}
function renderDecisionReceipt(receipt = {}) {
if (!receipt.activeMove) return '';
const held = receipt.doNotStartYet || [];
@@ -348,6 +375,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>
${renderFirstScreen(brief.firstScreen || {})}
${renderDecisionReceipt(brief.decisionReceipt || {})}
${renderSourceTrace(glance.sourceTrace || {})}