[Bug]: Paused sidebar video reloads twice and loses playback position after read-only commands #23089
Note
🤖 GPT 6.1 Sol writing on behalf of NikitaMGrimm
A local MP4 left paused in the sidebar repeatedly returns to loading as unrelated read-only commands finish. If the clip was paused after playback, it also loses the user's position: a video paused at 5 seconds resets to the 0.1-second first-frame preview even though its bytes have not changed.
Before submitting#
- I searched existing issues and found no matching paused-video report; related HTML preview reports are linked below.
- I included reproduction steps, environment and before/after evidence.
Area#
apps/web (shared by desktop)
Steps to reproduce#
- Have an agent link a local MP4 in a thread, then open it in the sidebar preview.
- Leave it paused at 0:00. For the playback-position case, play it, seek to about 5 seconds and pause.
- In the same thread, have the agent run read-only commands against another file, such as
Get-Content .\README.md -TotalCount 5on Windows. - Watch the preview as commands finish. Repeat with another read-only command. Keep the MP4 unchanged.
Expected behavior#
The preview checks for workspace changes while preserving an unchanged video's loaded state and paused playback position. Actual changes to the video still update the preview.
Actual behavior#
At zero, the video repeatedly shows loading while left paused. At a nonzero paused position, it reloads and resets to 0.1 seconds.
Instrumenting the actual FilePreviewPanel with the real asset RPC and streamed MP4 showed two source changes and two emptied/loadstart cycles per controlled completed-command update. Re-rendering with the same mutation id caused no reload. The original MP4's SHA256 stayed unchanged.
Impact#
Minor bug or occasional failure: repeated loading and loss of the user's place while reviewing a generated video alongside agent work.
Version or commit#
- Originally observed: T3 Code Nightly desktop
0.1.1-nightly.20261020.1792535967237. - Instrumented baseline reproduced at
d27c6067a9162150f654e38f455a7a936ef79178.
Environment#
Windows 11 Pro, build 26200; a locally generated MP4 that decodes without errors.
Before/after evidence#
Both sides start paused at 5 seconds. The same command-completion update is applied at 1.5 seconds into the recording. Before: two reloads and a reset to 0.1 seconds. After: zero reloads and the position stays at 5 seconds.
https://github.com/user-attachments/assets/f38df741-de92-4228-b47c-8c7581406921
The recording uses controlled command-completion fixtures in the real preview component, with real media RPC and file streaming. It is not a full provider turn. The installed Nightly was not rebuilt, and mobile was not exercised.
Investigation and proposed repair#
Completed commands change workspaceMutationId, including read-only commands. The video source changes immediately with the workspace-revision suffix, then changes again when the refreshed signed URL arrives. For paused video, both changes reload the element.
Related: #20913 and Ideas #20927. The maintainer-account response on #20913 describes HTML refresh as intentional and routes a change to Ideas. This video failure shares that refresh mechanism; this report asks for triage of its effect on paused playback and loss of position. No media-specific approval is assumed.
A proposed repair is available on NikitaMGrimm:fix/paused-media-refresh, commit 7221dba531f0690b43bdb0560c8f02a15d1c71c4. It adds optional per-file revision metadata and preserves loaded sidebar video/audio when the file is unchanged. It keeps actual file updates, URL renewal, retry and older-server compatibility; HTML/PDF behavior is unchanged.
The fixed reproduction also stays loaded at zero. Actual in-place edits and atomic replacements reload paused video once, and a change during playback waits until pause. The focused regressions cover file revisions, source pinning, failure recovery and compatibility; check:changed passed on that head, including 46 tests, using a Windows command-launch workaround. No PR is open.
Workaround#
To keep a clip paused at a chosen frame while agent commands continue, open it in an external player and pause there. The demonstrated reset affects paused video; we have not reproduced it during active playback.
#23106 from shivamhwp already exists if you missed it
shivamhwp(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Reproduced in the Linux web client at 968dd51 using a fake provider that executes
wc -l README.mdandhead -n 5 README.md. With the MP4 unchanged, the paused position reset from 5s to 0.1s. At d8d6747, it stays at 5s with zero reload events; actual edits and atomic replacements still refresh. Verified at 1440/390 widths in light/dark.Fix: #23127. Before/after recordings and limitations. Desktop/Electron was not run.