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]: File preview (HTML/PDF/image) reloads and jumps to top after every agent command, even when the file is unchanged #27681
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 long local HTML report and link it in a reply.
Open the link in the side preview panel and scroll halfway down.
Send a follow-up so the agent works in that thread, running commands such as ls or git status.
Expected behavior
The preview keeps its page and scroll position. It reloads only when the file it shows changes, or when I ask.
Actual behavior
The panel flashes white and the page reloads at the top every time the agent finishes a command or a file edit, or a checkpoint lands. This happens even when nothing touched the open file. While an agent works, this happens every few seconds, so a report can't be read in the thread that produced it.
Cause: FilePreviewPanel appends workspace-revision=<workspaceMutationId> to the frame URL, and the frame is keyed by its URL, so each new id remounts it. The id is thread-wide. It moves on any completed command_execution or file_change item and on every checkpoint. It applies to every file opened from the thread, inside or outside the workspace root, because they all load as media-file. So moving the file elsewhere doesn't help.
#20913 reported the same problem and was closed as by design. #23106 later fixed it for video and audio: the server returns a fileRevision (device, inode, size, mtime, ctime) with the asset URL, and the player reloads only when that changes. HTML, PDF and image previews were left out on purpose, so they still reload on every agent command.
Suggested fix: use the same fileRevision for HTML, PDF and image previews. Reload only when the open file's revision changes, and fall back to workspaceMutationId only for older servers that don't send it. For HTML, also keep the scroll position across a real refresh. If HTML must still be refreshed when the files it links (CSS, JS) change, that could be opt-in or limited to the file's directory. Read-only commands anywhere in the workspace shouldn't reload it.
Impact
Major degradation or frequent failure
Version or commit
T3 Code (Beta) 0.1.5
Environment
macOS 27.0.1, desktop app, Claude provider
Workaround
The only workarounds I know of are opening the file in a thread where no agent is running, or serving it over a localhost HTTP server and opening that URL in a browser tab. Neither is reasonable for reading a report while an agent works on it.
I’m seeing this in the desktop app’s file preview panel.
Reproduction
Open an existing image/PDF in the file preview panel.
Have the thread generate a new file.
The existing file’s preview flickers badly while the thread is active. The flickering stops when the thread is inactive.
Environment: Local machine runs macOS on Apple silicon; local server reports 0.1.7. Desktop app version hasn’t been confirmed.
Source inspection: In v0.1.7, image previews use a thread-wide workspace revision in their URL and React key. Completed commands and other agent activity change that revision, remounting the image even when the displayed file is unchanged. PDFs use a separate file-revision path, so the PDF-specific cause remains unconfirmed.
Activity
JackFrancis2357 commentedon Nov 10, 2026
I’m seeing this in the desktop app’s file preview panel.
Reproduction
Environment: Local machine runs macOS on Apple silicon; local server reports 0.1.7. Desktop app version hasn’t been confirmed.
Source inspection: In v0.1.7, image previews use a thread-wide workspace revision in their URL and React key. Completed commands and other agent activity change that revision, remounting the image even when the displayed file is unchanged. PDFs use a separate file-revision path, so the PDF-specific cause remains unconfirmed.
Prepared by Codex (GPT-6).
baohappy02 commentedon Nov 11, 2026
Me too, its so annoying