Skip to content

fix(web): preserve snapshot preview size in sent messages - #545

Merged
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-13-snapshot-preview-sizing
Sep 14, 2026
Merged

rynfar merged 1 commit into
pylonfrom
upstream/2026-09-13-snapshot-preview-sizing

Conversation

@rynfar

@rynfar rynfar commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ports upstream commit `a43f9b45ae85caf37e0be8270ad3d27365ece2bd` (upstream PR #11429), part of upstream integration cycle #536.

In `MessagesTimeline.tsx`, user message image attachments render in a 2-column grid (`grid grid-cols-2 max-w-[210px] gap-2`). Snapshot attachment frames (`SNAP_SHOT_ATTACHMENT_FRAME_CLASS`) have a fixed width of `w-52` (208px), which caused them to be squished horizontally into a single column. Applying `col-span-2` when the snapshot preview resolves allows the snapshot frame to span both columns of the grid container as intended.

Also advances the review cursor in `.agents/upstream-review.md` to `a43f9b45ae85caf37e0be8270ad3d27365ece2bd` (`2026-09-13`), accounting for all 3 sources in the range `d1d15c67f4..a43f9b45ae`:

  • `18d8cbfd920d0a53e5b5206456585aea767e852c`: already merged in PR fix(release): pin expo-audio to its patched version #523
  • `5349522108bec896bb6a69ae76c6e1b8d419ae16`: covered (unused `.pnpm-store` cleanup, absent in Pylon)
  • `a43f9b45ae85caf37e0be8270ad3d27365ece2bd`: adopted in this PR

Fixes #536

Adversarial review

  • Mixed attachments: If a snapshot attachment is accompanied by regular image attachments, the snapshot attachment correctly spans the full row (`col-span-2`), while subsequent image attachments tile 2-per-row below it.
  • Unresolved preview URL: If `previewUrl` is not yet available, `col-span-2` is not applied and the fallback thumbnail box maintains standard `aspect-[4/3]` aspect ratio.
  • Unit test coverage: `MessagesTimeline.test.tsx` verifies that `col-span-2` is present when a snapshot preview URL is resolved, and absent when unresolved. All 58 unit tests in `MessagesTimeline.test.tsx` pass.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Port upstream commit a43f9b45ae85caf37e0be8270ad3d27365ece2bd (#11429).

Spans snapshot image preview frame across both columns in MessagesTimeline
to prevent horizontal compression within the 2-column image grid.
Advances upstream review cursor to a43f9b45ae85caf37e0be8270ad3d27365ece2bd.
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pylon-marketing Ready Ready Preview Sep 14, 2026 1:45am UTC

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 14, 2026
@rynfar
rynfar merged commit ce7a421 into pylon Sep 14, 2026
19 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 14.1 KiB 13.9 KiB −180 B (−1.2%) 15.1 KiB
Codex Thread snapshot wire 7.2 KiB 7.2 KiB −8 B (−0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.9 KiB 6.7 KiB −172 B (−2.4%) 7.8 KiB
Codex Live turn WebSocket decoded 58.8 KiB 58.0 KiB −910 B (−1.5%) 66.4 KiB
Codex Live turn messages 10 8 −2 (−20.0%) 21
Claude Total thread wire 14.1 KiB 14.1 KiB +36 B (+0.3%) 15.1 KiB
Claude Thread snapshot wire 7.2 KiB 7.2 KiB −5 B (−0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.8 KiB 6.9 KiB +41 B (+0.6%) 7.8 KiB
Claude Live turn WebSocket decoded 59.7 KiB 59.7 KiB +44 B (+0.1%) 66.4 KiB
Claude Live turn messages 9 10 +1 (+11.1%) 21

Baseline: 42c65f9 · PR result: 34fdbcc · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar
rynfar deleted the upstream/2026-09-13-snapshot-preview-sizing branch September 14, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 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.

Upstream integration cycle: snapshot preview sizing through a43f9b45

1 participant