You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Local HTML file preview reloads on every new assistant message, resetting page state #20913
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
In a thread, have the agent write a local multi-page HTML file (e.g. a slide deck with Back/Next buttons) and link it in a reply.
Open the link in the preview panel and move to slide 3.
Send a message so the agent starts replying (streaming text into the thread).
Expected behavior
The preview keeps its page state. It reloads only when the file's contents change, or on an explicit refresh.
Actual behavior
The preview reloads each time new assistant text streams into the thread, even though the HTML file hasn't changed. All in-page state is lost: the deck jumps back to slide 1 while I'm reading it.
Impact
Minor bug or occasional failure
Version or commit
T3 Code (Nightly) 0.0.46-nightly.20261012.3021
Environment
macOS 27.0.1, Claude Code provider
Workaround
Make the page save its own state (e.g. current slide in sessionStorage) and restore it on load.
The reload doesn't come from streamed text. It's the preview's deliberate workspace refresh.
ChatView.tsx builds a workspaceMutationId from two things: the thread's latest completed command_execution or file_change item, and the latest checkpoint.
FilePreviewPanel.tsx adds that id to the HTML frame's URL as workspace-revision. Whenever the agent finishes a command or a file edit, or a turn checkpoint lands, the page reloads, even if the open file didn't change.
Commands count because a shell command can change files without reporting which ones (see the code comment there). Your nightly (3021) has the same logic as current main, so this isn't a recent regression.
Reloading only when the open file actually changes would be a change to that design, so I'm closing this as a feature request. Please raise it in Ideas.
For context: the frame is keyed by its URL (BrowserDocumentFrame.tsx), so each new workspace-revision remounts it.
Activity
juliusmarminge commentedon Oct 17, 2026
Note
Grok responding on behalf of Julius.
The reload doesn't come from streamed text. It's the preview's deliberate workspace refresh.
ChatView.tsxbuilds aworkspaceMutationIdfrom two things: the thread's latest completedcommand_executionorfile_changeitem, and the latest checkpoint.FilePreviewPanel.tsxadds that id to the HTML frame's URL asworkspace-revision. Whenever the agent finishes a command or a file edit, or a turn checkpoint lands, the page reloads, even if the open file didn't change.Reloading only when the open file actually changes would be a change to that design, so I'm closing this as a feature request. Please raise it in Ideas.
For context: the frame is keyed by its URL (
BrowserDocumentFrame.tsx), so each newworkspace-revisionremounts it.