feat(host): a sidebar pin or section write answers once the followed sidebar has its transaction
Merged
CH
10d ago+91+91+01234567890123456789-6-6-0123456789
This is the host half of the txid wait for repository pins and sidebar sections. It follows #4434, where those writes return their txid, and builds on #4423, which added the shared confirmWrite / onTxWait.
What changed:
workspaces-follow.ts:LiveReadDependenciestakes an optionalonTxWaitand passes it through toliveRows.compose-tasks.ts: the sidebar follow keeps the wait it is handed. That wait is cleared once the follow is let go or falls back to polling.TASKS_PIN_REPOSITORYandTASKS_WRITE_SECTIONnow callconfirmWrite(wait, txid)before they update the view and reply to the window. Without this, a Realtime delivery from before the write could put the old sidebar back on screen.- Waiting is skipped when the write changed no row (no txid), or when the sidebar is polled or not followed yet. Per #4423, the wait still confirms after 10 s.
Out of scope: task pins. They belong to the tasks-and-agents area.
Test (compose-tasks.test.ts): before the first refresh, a write waits on nothing. Once the sidebar is followed, a section write and a repository pin each wait until their txid arrives. A pin that changed nothing replies at once. With the confirmWrite call removed, the test fails.
Made with Luke