feat(agent-chat): live reload completed artifact rewrites
An open written-file artifact follows later successful rewrites of the same canonical file, including a tool completion that React coalesces out of its rendered snapshots. Choosing a historical version keeps it selected; failed or stale writes do not replace it.
Leo: "the /side thing i heard somebody really liked in codex... and i think html/html artifacts and that kinda good viewing and good support for it would be cool" / "like the claude.ai artifacts but imagien you didnt need to only have it on claude.ai...".
B2 extends B1's single RowUpdates producer with a per-open subscription and a changed-tool pending map. Publication flushes that map even without listeners, carries event order across producer replacement, and never retains a prior-snapshot chain. Closing the panel, switching chats or unmounting disposes the subscription. No timer, file read, project artifact storage, new scroll correction or scan of loaded rows per token is added.
This is the written-file part recovered from this PR's original combined implementation. The stack is A (sandboxed HTML), D (complete-write detection), B1 (streamed fences), then this B2. It preserves A's explicit Run/no-network/file boundary and D's canonical path identity. The #25208 activity/command/transcript metadata stamps remain independent of the artifact producer.
Observed / Not run
- The recovered combined source45aa passed23/23 focused tests in hosted40497592765, including the intentionally-red semantic write-order discriminator. These are prior-source evidence, not a new-head SHIP.
- Hosted40493008642 captured the real shared renderer in light/dark: before remains at Preparing release; after reaches Release ready. Existing media remains below.
- Integrated head
51ef5efb8cf0fecc23d7f10d2f5961876c5b0e45(tree99ca2e51f449d09a4925d7300860e3417be3f5de) is stacked on B1 #26230 headbd110c44d31b9a3a20c0b86b95611b1a555ae72d; own delta +420/-71 across nine files. Final-head focused behavioral red→green, current web checks and independent Astra xhigh review are pending.
Agent session: agent session