perf(marketing): serve images at their display size - #9682
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, isolated marketing performance change that serves existing images at responsive display sizes and avoids an unnecessary mobile request. It adds only build-time image processing and preserves the existing page content, layout, and static deployment model. You can add or adjust custom eligibility rules. Learn more. |
* upstream/main: (30 commits) perf(server): use one query for buffered provider events (pingdotgg#9706) perf(server): stop rebuilding terminal history per chunk (pingdotgg#9703) perf(marketing): serve website fonts locally (pingdotgg#9701) perf(web): defer diff workers until a code view opens (pingdotgg#9692) perf(server): avoid full patches for checkpoint summaries (pingdotgg#9694) perf(marketing): stop continuous homepage motion (pingdotgg#9697) feat(server): measure provider turn token usage (pingdotgg#9132) perf(web): defer composer draft serialization (pingdotgg#9695) perf(mobile): reuse diff rows during comment edits (pingdotgg#9693) perf(clients): avoid waiting to read cached relay tokens (pingdotgg#9691) perf(server): omit repeated OpenCode progress logs (pingdotgg#9689) perf(mobile): reuse chat feed rows during streaming (pingdotgg#9688) perf(server): stop retaining unused OpenCode tool history (pingdotgg#9684) perf(server): batch projector cursor writes (pingdotgg#9671) perf(server): cache and stream static web assets (pingdotgg#9669) perf(marketing): serve images at their display size (pingdotgg#9682) perf(mobile): skip unused legacy list work (pingdotgg#9679) perf(web): keep Markdown mounted during streaming (pingdotgg#9677) perf(mobile): bound diff syntax highlighting work (pingdotgg#9673) fix(web): show machine icons in the environment picker (pingdotgg#9668) ...
## What's Changed * fix(desktop): quit immediately on a second shortcut press by @t3dotgg in pingdotgg/t3code#9657 * fix(server): update Claude Agent SDK to 0.3.260 by @t3dotgg in pingdotgg/t3code#9135 * perf(server): stop loading message bodies for thread summaries by @t3dotgg in pingdotgg/t3code#9662 * perf(web): speed up terminal snapshots by @t3dotgg in pingdotgg/t3code#9663 * fix(web): show machine icons in the environment picker by @t3dotgg in pingdotgg/t3code#9668 * perf(mobile): bound diff syntax highlighting work by @t3dotgg in pingdotgg/t3code#9673 * perf(web): keep Markdown mounted during streaming by @t3dotgg in pingdotgg/t3code#9677 * perf(mobile): skip unused legacy list work by @t3dotgg in pingdotgg/t3code#9679 * perf(marketing): serve images at their display size by @t3dotgg in pingdotgg/t3code#9682 * perf(server): cache and stream static web assets by @t3dotgg in pingdotgg/t3code#9669 * perf(server): batch projector cursor writes by @t3dotgg in pingdotgg/t3code#9671 * perf(server): stop retaining unused OpenCode tool history by @t3dotgg in pingdotgg/t3code#9684 * perf(mobile): reuse chat feed rows during streaming by @t3dotgg in pingdotgg/t3code#9688 * perf(server): omit repeated OpenCode progress logs by @t3dotgg in pingdotgg/t3code#9689 * perf(clients): avoid waiting to read cached relay tokens by @t3dotgg in pingdotgg/t3code#9691 * perf(mobile): reuse diff rows during comment edits by @t3dotgg in pingdotgg/t3code#9693 * perf(web): defer composer draft serialization by @t3dotgg in pingdotgg/t3code#9695 * feat(server): measure provider turn token usage by @t3dotgg in pingdotgg/t3code#9132 * perf(marketing): stop continuous homepage motion by @t3dotgg in pingdotgg/t3code#9697 * perf(server): avoid full patches for checkpoint summaries by @t3dotgg in pingdotgg/t3code#9694 * perf(web): defer diff workers until a code view opens by @t3dotgg in pingdotgg/t3code#9692 * perf(marketing): serve website fonts locally by @t3dotgg in pingdotgg/t3code#9701 * perf(server): stop rebuilding terminal history per chunk by @t3dotgg in pingdotgg/t3code#9703 **Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260904.1278...v0.0.39-nightly.20260904.1279 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260904.1279
The website used a full desktop screenshot even at the breakpoint where CSS hides it. Its 20-pixel footer icon came from a 1,024-pixel image.
The screenshot now has responsive sizes and an inline source at the hidden mobile breakpoint. The original full-size image is preserved. Astro generates 20-, 40-, and 60-pixel footer icons at build time. Layout and page JavaScript are unchanged.
The 1,180-pixel screenshot is 97,500 bytes versus the 268,254-byte original. Footer variants are 364 to 1,096 bytes versus 20,126 bytes. These are build-artifact sizes, not browser network measurements.
Verified with the production Astro build, Astro typecheck, emitted image dimensions, original-image byte equality, and independent source review. No browser or device use, as requested.
Part of the performance audit work, items P1 and P4.
Created with GPT-6 Astra (preview) in Codex.
Note
Low Risk
Marketing-site-only asset pipeline and markup changes; no auth, APIs, or shared app logic affected.
Overview
Adds
sharpas a direct marketing dependency so Astro’s asset pipeline can resize images at build time.Footer icon: static
/icon.webpis replaced withastro:assetsImageon../assets/icon.webp, generating 20/40/60px WebP variants (densities1–3) instead of shipping a large file for a 20px slot.Hero screenshot: the full-width
/app-desktop.webp<img>becomes agetImage-driven responsive setup withsrcset/sizesat 864–2360px widths, plus a<picture>1×1 GIFsourceformax-width: 820pxso mobile layouts that hide the preview do not download the desktop asset. The original full-resolution asset remains in thesrcsetfor large displays.Reviewed by Cursor Bugbot for commit 3e75f3b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Serve marketing images at display size with Astro
Imagepipelinesharp@0.34.5and replaces the footer's static public-path icon with Astro'sImagecomponent, outputting WebP at quality 90 with 1x/2x/3x densities and lazy loading.<img>with a<picture>element that serves generated WebP screenshot variants at widths 864, 1180, 1728, and 2360; viewports ≤820px receive a transparent 1×1 GIF instead of the desktop screenshot.Macroscope summarized 3e75f3b.