Skip to content

fix(web): file previews stop reloading after every agent command - #508

Merged
QuinRiva merged 3 commits into
mainfrom
t3/fix-html-renderer-flicker-scroll-reset
Oct 29, 2026
Merged

QuinRiva merged 3 commits into
mainfrom
t3/fix-html-renderer-flicker-scroll-reset

Conversation

@QuinRiva

Copy link
Copy Markdown
Owner

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

Loom agent 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
@QuinRiva
QuinRiva merged commit fe75bb6 into main Oct 29, 2026
@QuinRiva
QuinRiva deleted the t3/fix-html-renderer-flicker-scroll-reset branch October 29, 2026 02:54
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant