feat(host): a chat write is confirmed once its transaction reaches the followed chat
Merged
CH
7d ago+77+77+01234567890123456789-48-48-01234567890123456789
The host half of the chat area of the txid rollout, on top of the shared wait (#4423) and the chat service half (#4426, which answers each chat write's txid).
followWorkspaceChattakes an optionalonTxWaitand hands it toliveRows.compose-coding-agents.tskeeps each followed chat'sTxWaitby workspace (a follow lets go only its own, never a newer one's), andCODING_AGENTS_CHAT_POSTwaits withconfirmWriteon the answer's txid before answering the window.- No txid (a no-op write), or no wait (chat not followed, or polled), confirms at once; past 10 s it confirms anyway, as
confirmWritedoes.
Test: compose-coding-agents.test.ts now drives the shared testing/fake-realtime.ts (its local fake, whose awaitTxId resolved at once, is dropped). A write to a followed chat waits until arrive("78"); a no-op write and a write to an unfollowed workspace answer at once with nothing awaited. The new test fails without the wait.
Ported from #4253 (luke/chat-write-txid-wait, 4f24be744), rewritten onto confirmWrite instead of its hand-rolled wait.
Made with Luke