feat(host): a chat write is confirmed once its transaction reaches the followed chat

Merged
CH
7d ago
+77-48

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).

  • followWorkspaceChat takes an optional onTxWait and hands it to liveRows.
  • compose-coding-agents.ts keeps each followed chat's TxWait by workspace (a follow lets go only its own, never a newer one's), and CODING_AGENTS_CHAT_POST waits with confirmWrite on 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 confirmWrite does.

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


Devin Review