Skip to content

docs: clarify viewport sets window size, not page viewport - #482

Open
Jayko001 wants to merge 1 commit into
mainfrom
jay/viewport-window-vs-page-clarification
Open

docs: clarify viewport sets window size, not page viewport#482
Jayko001 wants to merge 1 commit into
mainfrom
jay/viewport-window-vs-page-clarification

Conversation

@Jayko001

@Jayko001 Jayko001 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

Customer feedback (Slack): they set a 1280x800 viewport and the bottom of the screen was cut off in their tests. Root cause: the viewport parameter 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

  • New Window size vs. page viewport section on browsers/viewport.mdx explaining the behavior, with two workarounds:
    • set the page viewport directly via the automation framework (Playwright setViewportSize example)
    • pad the configured height to account for the browser UI
  • Notes that headless browsers have no browser UI, so the page viewport matches exactly
  • Corrects the Considerations bullet that claimed screenshots always match the configured dimensions

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only clarification in browsers/viewport.mdx with no runtime or API behavior changes.

Overview
Documents that Kernel viewport sets browser window size, not the rendered page area, so headful sessions can show clipped content (e.g. 1280×800 with innerHeight < 800) in live view, screenshots, and tests.

Adds a Window size vs. page viewport section with Playwright setViewportSize examples 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.

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>
@mintlify

mintlify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Kernel 🟢 Ready View Preview Aug 5, 2026, 6:46 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Error Error Aug 5, 2026 6:45pm

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Very Low

Verdict: Approve

Evidence (from diff)

  • 1 file changed: browsers/viewport.mdx (+27 / −1)
  • Documentation-only: new section clarifying that viewport sets 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.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant