From 51cb09c52027bf83ec7bff0df77121542bd5cd95 Mon Sep 17 00:00:00 2001 From: Felix Martin Date: Sun, 31 May 2026 21:13:04 -0400 Subject: [PATCH] M4: presentational review recap Co-Authored-By: Claude Opus 4.8 --- internal/web/static/app.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/internal/web/static/app.js b/internal/web/static/app.js index 6b37ece..b766f3e 100644 --- a/internal/web/static/app.js +++ b/internal/web/static/app.js @@ -50,6 +50,16 @@ function evidenceBlock(ev) { `; } +// reviewSummary renders a presentational recap from already-available state: +// the commitment plus the per-window evidence buckets. No new backend data. +function reviewSummary(ev) { + if (!ev) return ''; + const rows = (ev.buckets || []).map(b => + `
${(b.class || '?')} ยท ${b.title || ''}${fmt(b.seconds)}
`).join(''); + const switches = `
context switches${ev.switch_count || 0}
`; + return `
${switches}${rows}
`; +} + // updateActiveDrift owns the active status band: it renders on-task, nudge, // drift, or pending content into #statusband and rebinds the buttons. function updateActiveDrift(state) { @@ -204,8 +214,9 @@ function render(state) {
Session ended

${c.next_action || ''}

+

done when: ${c.success_condition || ''}

- ${evidenceBlock(state.evidence)} + ${reviewSummary(state.evidence)}
`; document.getElementById('end').onclick = () => post('/end');