docs: clarify viewport sets window size, not page viewport - #482
Open
Jayko001 wants to merge 1 commit into
Open
Conversation
Customer feedback: a 1280x800 viewport appeared "cut off" because on headful browsers the Chromium UI (tab strip, toolbar) consumes part of the window height, so the visible page area is shorter than the configured height. Add a section explaining window size vs. page viewport with workarounds (set the page viewport via the automation framework, or pad the height), and correct the screenshots bullet in Considerations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Risk assessment: Very Low
Verdict: Approve
Evidence (from diff)
- 1 file changed:
browsers/viewport.mdx(+27 / −1) - Documentation-only: new section clarifying that
viewportsets browser window size (not page viewport), plus Playwright TS/Python examples and a corrected Considerations bullet about screenshots - No application/runtime code, config, infra, auth, API specs, or shared libraries modified
- No CODEOWNERS file present; no prior approvals on this PR
Why Very Low
Small, scoped docs clarification with no production logic or operational blast radius. Safe to approve.
Sent by Cursor Automation: Assign PR reviewers
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.


Why
Customer feedback (Slack): they set a 1280x800 viewport and the bottom of the screen was cut off in their tests. Root cause: the
viewportparameter sets the browser window dimensions, and on headful browsers Chromium's UI (tab strip, toolbar) consumes part of that height — so the visible page area is shorter than the configured height. The docs never mentioned this, so it read as a regression on the customer's side.What
browsers/viewport.mdxexplaining the behavior, with two workarounds:setViewportSizeexample)🤖 Generated with Claude Code
Note
Low Risk
Documentation-only clarification in
browsers/viewport.mdxwith no runtime or API behavior changes.Overview
Documents that Kernel
viewportsets browser window size, not the rendered page area, so headful sessions can show clipped content (e.g. 1280×800 withinnerHeight< 800) in live view, screenshots, and tests.Adds a Window size vs. page viewport section with Playwright
setViewportSizeexamples and guidance to pad configured height for browser chrome, plus a note that headless matches dimensions exactly.Updates Considerations so framework screenshots are described as capturing the page viewport (shorter than configured height on headful), replacing the claim that screenshots always match configured dimensions.
Reviewed by Cursor Bugbot for commit 34a3785. Bugbot is set up for automated code reviews on this repo. Configure here.