diff --git a/app/static/index.html b/app/static/index.html index 731cffd..c4ad187 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -543,7 +543,9 @@ async function loadSection(){ const body=await res.json(); section=body; const live=new Set([...pile.map(c=>c.d.id),...hist.map(h=>h.id),...buffer.map(b=>b.id)]); - const fresh=(body.items||[]).filter(it=>it.decision===null&&!live.has(it.id)); + /* P3: second-look returns carry prior decisions — they must still enter + the swipe buffer; only ids already handled in this session are skipped. */ + const fresh=(body.items||[]).filter(it=>(it.decision===null||it.slot==='return')&&!live.has(it.id)); buffer.push(...fresh); fillPile(); updateSectionUI(body); @@ -969,7 +971,8 @@ $('btnForge').onclick=async()=>{ ?'Agent offline — forging on the last read.':''; section=body; buffer.length=0; - const fresh=(body.items||[]).filter(it=>it.decision===null); + const live=new Set([...pile.map(c=>c.d.id),...hist.map(h=>h.id)]); + const fresh=(body.items||[]).filter(it=>(it.decision===null||it.slot==='return')&&!live.has(it.id)); buffer.push(...fresh); fillPile(); updateSectionUI(body);