Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Saved preview screenshots are downscaled to 1280px, blurring text #28251

ClosedTonybynMp4(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On a display at a fractional scale (133% here, Linux), open a page in the desktop preview, filling a preview panel wider than about 960 CSS px.
  2. Have an agent call preview_snapshot with save: true.
  3. Open the saved PNG from the path in the tool result at 100%.

Server-side (headless) preview tabs, which render at 2×, show the same thing: a 1280×800 page is saved at 1280×800.

Expected behavior

The saved file keeps the resolution the page was captured at (1791×1269 for the panel below, 2560×1600 for a 1280×800 headless tab), so screenshots an agent saves to show its work are sharp.

Actual behavior

The saved file is the same image the agent receives, which is capped at 1280px wide (MAX_SCREENSHOT_WIDTH in apps/server/src/preview/ServerBrowserPage.ts). The capture is shrunk with a canvas resample, so text and icons come out soft. The cap makes sense for the agent's image (token cost), not for a file meant for people.

Impact

Minor bug or occasional failure

Version or commit

main @ 80a2351fcb

Environment

Ubuntu Linux, X11, display scale 133%, T3 Code desktop (dev build), Electron 44.

Screenshots, recordings, or supporting files

Page filling the preview panel (no on-screen scaling):

main (saved 1280×935)with fix (saved 1791×1269)
ImageImage

Mini preview, with #9916 applied. #9916 fixes the page being drawn small when the preview is scaled down (#9872). This issue is the extra shrink applied when saving, so the two stack:

#9916 only (saved 1280×800)#9916 + fix (saved 1707×1067)
ImageImage

Sign in to join this conversation.