Files
wangchenglong f7c39b9d2a feat(web): show the page taking shape while a run builds it
The Design Files pane used to sit on an empty state until a run finished
and the first artifact dropped in. Everything the run was doing happened
somewhere the user could not see, and the wait carried no signal that
anything was happening at all.

It now watches the shallowest index.html the run has produced (or the
most recently written HTML file) and renders it live beside a feed of the
steps behind it, with a toggle between the step feed and the full
preview. A new cross-runtime contract, preview-build-focus, lets the
sandboxed preview frame answer "where in this page are you writing right
now" — either by a literal string the agent just wrote or by naming one
of the page's own top-level sections — so the host can walk a cursor down
the page as it is written instead of jumping to wherever the last run of
text happens to land. The frame has no allow-same-origin, so it posts to
'*' and the host identifies it by event.source.

latest-user-prompt goes away with the empty state that echoed it: the
pane now names what the run is doing, which is the more useful of the
two, and keeping both meant recomputing a prompt string on every streamed
token for a line nobody read.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-04 15:43:24 +08:00
..