Repository navigation
perf(demos): paint the Skill page demo from its first screen - #504
Merged
Merged
Conversation
The Skill page's largest paint was a lazy full-page screenshot, up to 6000 pixels tall. The recorder now keeps a first-screen poster for a taller page. The page loads it eagerly at high priority and fetches the whole page only when the window scrolls.
Retaken with pnpm demo:record --reshoot from each kept output. Demos one screen tall need no poster and stay as they were.
Contributor
🤖 MERGED
GitHub merged this pull request.
f3ee7b6c-3df6-4785-9eef-0ee183210bdb Selected findings run after merge and open separate pull requests. |
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
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.
❓ Type of change
📚 Description
On a Skill page with a page demo, the largest paint was the demo's full-page screenshot. It loaded lazily, and it ran up to 6000 pixels tall, though the window shows one screen of it.
scripts/record-skill-demo.tsalso saves the first screen at viewport height, per viewport. The manifest stores it asshots[].poster._SkillDemoShot.vueloads it eagerly withfetchpriority="high". The box keeps the whole page's height, so the window scrolls at once, and the first scroll fetches the full shot on top. The twin window for the other screen size resolves to an empty pixel through<picture>, so it downloads nothing.pnpm demo:record <ref> --reshoot. The six that fit one screen need no poster and stay as they were./gh/anthropics/skills/frontend-design, localpnpm buildserved bywrangler dev, Lighthouse 13.5, cold cache, median of 3 runs:Mobile LCP is still mostly render delay behind the stylesheets and scripts that #500 trims.