On chat submit (Main.tsx:47-51) the handler clears the coagent logs
(setState({ ...state, logs: [] }), Main.tsx:49) then awaits a hardcoded
setTimeout(resolve, 30) (Main.tsx:50) to give the state update time to propagate before the
run kicks off (research-chat-flow step 1). The magic
30ms is a guess at React's commit latency — on a slow render it can fire before the clear lands,
briefly showing the previous run's Progress steps; on a fast one it is wasted latency. It is
silent (works most of the time), so nothing flags it. Prefer sequencing off the committed state
(effect/callback) over a fixed sleep, or at minimum comment why the delay exists so it is not
"cleaned up" into a regression.
rafinery
Read-only demoLive view of gallirohik/research-canvas at 1ebb712, scanned 20 September 2026 — nothing here can be edited.
Join the waitlist