Skip to content

iPad asks sites for their desktop pages, as Safari does - #1130

Open
advenimus wants to merge 5 commits into
yetanotherbrowser:mainfrom
advenimus:advenimus/ipad-desktop-pages
Open

advenimus wants to merge 5 commits into
yetanotherbrowser:mainfrom
advenimus:advenimus/ipad-desktop-pages

Conversation

@advenimus

@advenimus advenimus commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What changes

On iPad, sites send their desktop pages, as they do in Safari. Site Controls can still ask a site for its mobile version. The iPhone keeps mobile pages unless a site is asked for desktop.

Why it happened

  • Every navigation asked for the mobile page. It set preferredContentMode = .mobile, so Google and other sites sent their phone pages to an iPad. The iPad now leaves WebKit its recommended mode: the desktop site at full width, and the mobile one in a narrow window.
  • The site setting was two flags (desktop and mobile), and every reader had to know which one counted on which device. It is now one choice (default, desktop or mobile), read in one place. The device default lives in SiteSettings. Older settings load as the new choice.
  • Asking for desktop on iPad was forgotten and fell back to the default, which loads the mobile site in a narrow pane. An explicit desktop choice is now kept.
  • The switch misread the default (Greptile on iPad: downloads ask, desktop sites, ⌘, Settings, All Tabs without phone chrome #1107). Over a narrow pane's mobile page it said "desktop on", so the first tap asked for mobile. With the default, the switch now reads the mode the page actually loaded in.

Proof

  • Logic: PageMenuTests cover the iPad and iPhone defaults, the three-way choice, migration from the old fields, desktop kept in a narrow pane, and the switch over a recommended page. They fail on main and pass here.
  • Visible change: iPad Pro 13" simulator, light mode. New named states: tablet.site.desktop and tablet.site.mobile. main has no Site Controls state, so the before picture is its plain launch.
Before (main) After (this branch)
Site Controls, desktop site (before: plain launch) Site Controls, desktop site (before: plain launch)
(no such screen on main)
Site Controls, mobile site Site Controls, mobile site

Checked on

  • iPad Pro 13" and iPhone 18 Pro simulators, iOS 27.2. Yab Dev on an iPad Air.
  • Engine(s) tried: WebKit (the iOS app).

Checklist

  • PageMenuTests and TabletWorkspaceUITests pass on iPad. The touched suites pass on iPhone.
  • ./design-check --base origin/main and scripts/swift-parse-check --base origin/main are clean.
  • This matches Safari on iPad. The Site Controls switch already exists.

Every navigation was asked for with preferredContentMode .mobile, so an
iPad got Google's and other sites' phone pages. An iPad now leaves WebKit
its recommended mode (desktop at full width, mobile in a narrow window),
and a site's switch in Site Controls asks for its mobile site instead,
kept as Site.mobile. The iPhone keeps mobile unless a site asks desktop.
SiteSettings kept two flags, desktop and mobile, and every reader had to
know which one counted on which device. Two booleans also allow a state
nobody can pick (both set). The site now keeps one Version (automatic,
desktop, mobile), read in contentMode alone: automatic is WebKit's
recommended mode on an iPad and mobile on an iPhone. The device default
lives in SiteSettings, so WebPool no longer repeats it.

Settings saved with the old fields load as the new choice and are saved
again in the new shape.
On iPad, turning desktop on for a site forgot the choice, back to the
default, WebKit's recommended mode. That mode loads the mobile site in
a narrow pane, while the switch said Desktop.

An explicit desktop choice is now kept as desktop on every device. A
site never touched stays recommended, mobile stays mobile, and an
iPhone turned back to mobile still forgets the choice.
tablet.site.desktop and tablet.site.mobile open Site Controls with the
iPad's default and with the site asked for as a mobile one, for the
before and after pictures.
An iPad left to its own choice asks WebKit for .recommended: the desktop
site at full width, the mobile one in a narrow pane. The switch read that
choice as desktop On whatever the page was, so over a narrow pane's
mobile page its first tap asked for the mobile site, and it took a second
and a third to get the desktop one.

The pool keeps whether each page committed as the desktop site (WebKit's
effective mode) in its PageState, and with .recommended the switch reads
that. tablet.site.mobile loads the page again after its choice, so the
picture's page is the phone layout its switch says.
@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable regressions were found.

Summary

iPad pages now use WebKit's recommended mode by default. iPhone pages stay mobile unless the user requests desktop.

  • iPads let WebKit choose a site's page unless asked otherwise.
  • The iPad switch reflects the page WebKit actually chose.

No actionable issues were found. Tests and visual checks were not run in this Linux environment.

Reviews (1) · Last reviewed commit: "fix: the Desktop switch reads the page a..." · Reviewed by Greptile

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