Repository navigation
fix(web): file previews stop reloading after every agent command - #508
Merged
Merged
Conversation
added 3 commits
October 29, 2026 13:44
… command The right-panel preview keyed its frame on the thread's workspace mutation id, which changes whenever the agent finishes any command or a checkpoint lands, so a viewed HTML page flashed and jumped back to the top while the agent worked. Workspace-file asset URLs now carry the file's revision (as media files already do) and the preview re-mints on each mutation but reloads only when that revision changes. The PDF viewer keeps its first URL across re-signing too. Loom-Thread: thread:mcp:8d3b033d-e49c-431e-9c2c-155901c3c8ee:workstream-spawn:6e3098ff-f642-432a-9d89-0c08ecec56f2 Pi-Session: /home/Carl/.pi/agent/sessions/--home-Carl-.t3-cockpit-worktrees-loom-t3-59d4ac6f--/2026-10-29T02-26-28-621Z_01a1857a-ee8b-722f-9b57-384ffc508649.jsonl Pi-Session: 01a1857a-ee8b-722f-9b57-384ffc508649
Loom-Thread: thread:mcp:8d3b033d-e49c-431e-9c2c-155901c3c8ee:workstream-spawn:7feceeb5-de7a-4c8b-a660-ce579d054f0e Pi-Session: /home/Carl/.pi/agent/sessions/--home-Carl-.t3-cockpit-worktrees-loom-t3-59d4ac6f--/2026-10-29T02-44-31-913Z_01a1858b-7625-775b-8e30-9011bd56be69.jsonl Pi-Session: 01a1858b-7625-775b-8e30-9011bd56be69
…ent command The right-panel image preview put the thread's workspace mutation id in the image URL, so every finished command fetched the image again. It now re-mints on each mutation but keeps the shown URL until the file's revision changes, which also stops the periodic URL renewal from re-downloading it. Loom-Thread: thread:mcp:8d3b033d-e49c-431e-9c2c-155901c3c8ee:workstream-spawn:6e3098ff-f642-432a-9d89-0c08ecec56f2 Pi-Session: /home/Carl/.pi/agent/sessions/--home-Carl-.t3-cockpit-worktrees-loom-t3-59d4ac6f--/2026-10-29T02-50-36-289Z_01a18591-057f-7556-a7c4-a13420d45f17.jsonl Loom-Thread: thread:mcp:53ba6d00-fbe5-4f17-a70b-fd9fd70a4f63:workstream-scaffold:178b6d6f-dbd6-48c7-8903-bee1a327e13c:0 Pi-Session: 01a18591-057f-7556-a7c4-a13420d45f17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: viewing an HTML, PDF or image file in the workspace preview flickered and reset scroll to the top after every agent command, because the preview URL was revalidated/reloaded each time the workspace changed.
Fix: previews now only reload when the file itself changes (HTML/PDF: cbba86f, c1c6e58; images: cc7e603). Verified live in a running dev instance.
Built with pi (Claude).
Loom-Summary: HTML, PDF and image file previews no longer reload or jump to the top after each agent command
Loom-Kind: noticeable