Repository navigation
Conversation
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.
[Medium impact] The PR appears safe to merge; no actionable regressions were found. SummaryiPad pages now use WebKit's recommended mode by default. iPhone pages stay mobile unless the user requests desktop.
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 |
This was referenced Nov 25, 2026
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.
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
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.SiteSettings. Older settings load as the new choice.Proof
PageMenuTestscover 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 onmainand pass here.tablet.site.desktopandtablet.site.mobile.mainhas no Site Controls state, so the before picture is its plain launch.main)main)Checked on
Checklist
PageMenuTestsandTabletWorkspaceUITestspass on iPad. The touched suites pass on iPhone../design-check --base origin/mainandscripts/swift-parse-check --base origin/mainare clean.