Add active slice first-screen receipt
This commit is contained in:
@@ -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 || {})}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user