Skip to content

fix(mobile): raise the phone breakpoint from 430px to 600px - #390

Open
JDProfresh wants to merge 1 commit into
Ark0N:masterfrom
JDProfresh:fix/phone-breakpoint-480
Open

fix(mobile): raise the phone breakpoint from 430px to 600px#390
JDProfresh wants to merge 1 commit into
Ark0N:masterfrom
JDProfresh:fix/phone-breakpoint-480

Conversation

@JDProfresh

@JDProfresh JDProfresh commented Sep 8, 2026

Copy link
Copy Markdown

Fixes #389.

Problem

The phone tier ended at innerWidth < 430 / @media (max-width: 430px), so the 430pt iPhones (14 Pro Max, 15 Plus, 15 Pro Max, 16 Plus), the 440px iPhone 16 Pro Max and 17 Pro Max, Pixel 6/7 Pro and OnePlus 12 Pro, the 448px Pixel 8 Pro / 9 Pro XL and the Z Fold 5 cover screen all rendered the tablet layout: header icon row instead of the session pill, desktop Run Shell toolbar instead of Enter and the mic, and a keyboard accessory bar that could never become visible because its .visible rule lives inside the phone block. All of those devices are already in test/mobile/devices.ts as large phones.

Change

The phone cutoff moves from 430 to 600, the line test/mobile/devices.ts already draws between large phones (430-599) and small tablets (600-767). The phone block is @media (max-width: 599px) and the tablet block starts at min-width: 600px, so a 600px device is a tablet in CSS and in getDeviceType() alike rather than straddling the boundary the way 430pt phones did under the old rule.

Why 600 and not something just above 448: no physical device sits between 480 and 600, but a phone zoomed out in Safari does. A 440pt iPhone at 85% or 75% page zoom reports 518px or 587px and still needs Enter and the accessory bar; the reporter hit exactly that within minutes of testing a 480 cutoff. Safari only prints the zoom percentage at 100%, so a zoomed-out page is indistinguishable from a broken one.

Everywhere the number is encoded:

  • mobile-handlers.js (isSmallScreen, isMediumScreen, getDeviceType), the terminal-ui.js fallback, session-ui.js focus scroll, mobile-overview.js phone query
  • mobile.css phone block and the tablet block's min-width, plus the comments in styles.css, index.html, settings-ui.js and CLAUDE.md that point at the block
  • CI tests that pin the phone block: home-sessions, mobile-overview, mobile-tab-tap-zones, readmymind-phone-key, mobile-header-buttons-policy
  • test/mobile helpers, device classifier, visual-regression expectations and README

Measurement history that names 430px (tab tap-zone measurements at 360/393/430) stays as written. No version or CHANGELOG change, per CONTRIBUTING.

Verification

  • npm run typecheck, npm run lint, npm run format:check, npm run check:frontend-syntax: pass
  • npm test: 351 files passed, 1 skipped; 6755 tests passed, 12 skipped
  • Built and served the branch, then drove it with Playwright WebKit using the iPhone descriptor: 440, 518, 587 and 599px get device-mobile and the phone toolbar with Enter and the mic, 600px gets device-tablet, no console errors at any width
  • Real device: iPhone 17 Pro Max, iOS 18.7 Safari at 100% zoom renders the phone header, Enter and mic, and the accessory bar above the keyboard, where 1.26.1 rendered the tablet layout
  • test:mobile and test:browser were not run here (their pinned Playwright browser builds are not installed on this machine); their helpers were updated so the classifier and expectations match the new cutoff

Two notes for review: the local pre-commit prettier hook flags test/mobile/device-matrix.test.ts and test/mobile/visual-regression.test.ts, which already fail it on master and are outside the CI format:check scope, so they were left unformatted to keep this diff to the breakpoint. The branch name still says 480 from the first revision of this PR; the commit and diff are the 600 version.

@JDProfresh

Copy link
Copy Markdown
Author

Real-device confirmation: on the reporter's iPhone 17 Pro Max (iOS 18.7, Safari, page zoom 100%) this branch renders the phone header with the C logo and session pill and the phone toolbar with Enter and the mic, where 1.26.1 rendered the tablet layout. One note for anyone verifying on a device: a Safari page zoom below 100% widens the reported viewport and lands the page in the tablet tier regardless of this change, so check the aA menu first.

The phone tier stopped at innerWidth < 430 and @media (max-width: 430px), so every current large phone landed in the tablet layout: the 430pt iPhone 14 Pro Max, 15 Plus, 15 Pro Max and 16 Plus, the 440pt iPhone 16 Pro Max and 17 Pro Max, Pixel 6 Pro, 7 Pro and OnePlus 12 Pro, the 448pt Pixel 8 Pro and 9 Pro XL, and the Galaxy Z Fold 5 cover screen at 460. On those devices the header icon row replaced the session pill, the toolbar kept the desktop Run Shell button instead of Enter and the mic, the keyboard accessory bar could never become visible because its .visible rule lives inside the phone block, and the toolbar jumped to the top of the page when the keyboard opened.

The new cutoff is 600, the line test/mobile/devices.ts already draws between large phones (430-599) and small tablets (600-767). No physical device sits between 480 and 600, but a phone zoomed out one or two steps in Safari does: a 440pt iPhone at 85% or 75% page zoom reports 518px or 587px and still needs the phone controls, which a 480 cutoff would have taken away. The phone block is max-width: 599px and the tablet block starts at min-width: 600px, so a 600px device is a tablet in CSS and in getDeviceType() alike instead of straddling the boundary the way 430pt phones did.

The number changes everywhere it is encoded: JS, CSS, comments, CLAUDE.md, the CI tests that pin the phone block, and the test:mobile helpers. Measurement history that names 430px stays as written.
@JDProfresh
JDProfresh force-pushed the fix/phone-breakpoint-480 branch from 25b8de6 to c087d0a Compare September 8, 2026 05:14
@JDProfresh JDProfresh changed the title fix(mobile): raise the phone breakpoint from 430px to 480px fix(mobile): raise the phone breakpoint from 430px to 600px Sep 8, 2026
@JDProfresh

Copy link
Copy Markdown
Author

Amended: the cutoff is now 600 (phone block max-width: 599px, tablet from min-width: 600px) instead of 480. The 480 revision fixed the device at 100% zoom and lost the phone controls again as soon as Safari was zoomed out one step (85% on a 440pt phone reports 518px), which the reporter hit within minutes. Re-verified on the same iPhone 17 Pro Max at 100% after the amendment: phone header, Enter and mic, accessory bar above the keyboard. CI gate re-run on the amended commit: 351 files, 6755 tests passing.

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.

Large phones (430-460px wide) get the tablet layout instead of the phone UI

1 participant