diff --git a/home/server.ts b/home/server.ts index 044ef3513..456db509d 100644 --- a/home/server.ts +++ b/home/server.ts @@ -172,6 +172,19 @@ function renderProposal(p) { } const a = prop.decision.action; const reason = a.reason ?? ''; + // Cancel and error chips carry their full message in the reason field — + // don't tack on the meaningless 0% confidence pill or the "proposed" + // prefix (Cancel isn't a proposal, Error wasn't a brain decision). Only + // real decide()-produced proposals (wait/dispatch/recovery) get the + // confidence footer. + if (a.kind === 'cancelled') { + return '
cancelled' + + (reason ? escapeHtml(reason) : 'Ctrl+C sent') + '
'; + } + if (a.kind === 'error') { + return '
error' + + escapeHtml(reason || 'unknown') + '
'; + } return '
proposed' + escapeHtml(a.kind) + (a.intent ? ' · ' + escapeHtml(a.intent) : '') + (reason ? ' — ' + escapeHtml(reason) : '') +