mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
fix(mobile): raise the phone breakpoint from 430px to 600px
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.
This commit is contained in:
+12
-12
@@ -46,9 +46,9 @@ html.mobile-init .file-browser-panel {
|
||||
}
|
||||
|
||||
/* ============================================================================
|
||||
Tablet Breakpoint (430px - 768px)
|
||||
Tablet Breakpoint (600px - 768px)
|
||||
============================================================================ */
|
||||
@media (max-width: 768px) and (min-width: 430px) {
|
||||
@media (max-width: 768px) and (min-width: 600px) {
|
||||
/* Compact header for tablet - fixed at top, includes safe area padding */
|
||||
.header {
|
||||
position: fixed;
|
||||
@@ -303,12 +303,12 @@ html.mobile-init .file-browser-panel {
|
||||
}
|
||||
|
||||
/* Show desktop voice button on tablet (hidden by max-width:1023px in styles.css,
|
||||
mobile .btn-voice-mobile only shows at <430px) */
|
||||
mobile .btn-voice-mobile only shows at <600px) */
|
||||
.toolbar-center .btn-toolbar.btn-voice {
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
/* Toolbar — use desktop-style sizing on tablet (plenty of room at 430-768px) */
|
||||
/* Toolbar — use desktop-style sizing on tablet (plenty of room at 600-768px) */
|
||||
.toolbar {
|
||||
padding: 0 0.5rem;
|
||||
gap: 0.5rem;
|
||||
@@ -333,9 +333,9 @@ html.mobile-init .file-browser-panel {
|
||||
}
|
||||
|
||||
/* ============================================================================
|
||||
Phone Breakpoint (<430px)
|
||||
Phone Breakpoint (<600px)
|
||||
============================================================================ */
|
||||
@media (max-width: 430px) {
|
||||
@media (max-width: 599px) {
|
||||
/* Phones get a 44px header, up from 36px. Every header control is a touch
|
||||
target and 44px is the floor for one; the brand "C" that gets you home is
|
||||
the one that matters most. Redefined as the TOKEN rather than a literal so
|
||||
@@ -499,7 +499,7 @@ html.mobile-init .file-browser-panel {
|
||||
|
||||
/* Exception to the 26px shrink above: in sidebar layout this button is the
|
||||
ONLY way to open the session list — the strip it replaced is gone. A 26px
|
||||
target is below --touch-target-min (44px), which the 430-768px block
|
||||
target is below --touch-target-min (44px), which the 600-768px block
|
||||
already enforces for every other header button. */
|
||||
html[data-session-list='sidebar'] #sidebarToggleBtn {
|
||||
width: 44px;
|
||||
@@ -1167,7 +1167,7 @@ html.mobile-init .file-browser-panel {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 430px) {
|
||||
@media (max-width: 599px) {
|
||||
.btn-case-settings-mobile {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -3144,7 +3144,7 @@ html:is([data-skin="paper-gray"], [data-skin="solarized-light"], [data-skin="cat
|
||||
|
||||
/* Keyboard accessory bar + paste overlay base styles moved to styles.css
|
||||
(always loaded — covers iPad landscape where mobile.css doesn't load).
|
||||
Phone-specific overrides remain in @media (max-width: 430px) above. */
|
||||
Phone-specific overrides remain in @media (max-width: 599px) above. */
|
||||
|
||||
/* ============================================================================
|
||||
iOS Safari Specific Fixes
|
||||
@@ -3187,7 +3187,7 @@ html:is([data-skin="paper-gray"], [data-skin="solarized-light"], [data-skin="cat
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 430px) {
|
||||
@media (max-width: 599px) {
|
||||
/* Attachment history (COD-18): full-screen sheet on phones */
|
||||
.attachment-history-drawer {
|
||||
top: 0;
|
||||
@@ -3237,7 +3237,7 @@ html:is([data-skin="paper-gray"], [data-skin="solarized-light"], [data-skin="cat
|
||||
already reserves that space), so it needs the same safe-area padding as the
|
||||
other banners. The overlay is fixed and handles its own insets.
|
||||
============================================================================ */
|
||||
@media (max-width: 430px) {
|
||||
@media (max-width: 599px) {
|
||||
.offline-banner {
|
||||
padding: 0.4rem 0.5rem;
|
||||
padding-left: calc(0.5rem + var(--safe-area-left));
|
||||
@@ -3727,7 +3727,7 @@ html:is([data-skin="paper-gray"], [data-skin="solarized-light"], [data-skin="cat
|
||||
This whole file is served with media="(max-width: 1023px)", so these
|
||||
top-level rules cover the entire handheld range — deliberately NOT wrapped in
|
||||
a nested @media, because the two compact `.session-tabs` blocks above live in
|
||||
`max-width: 768px` and `max-width: 430px` and would leave 769-1023px
|
||||
`max-width: 768px` and `max-width: 599px` and would leave 769-1023px
|
||||
unhandled.
|
||||
|
||||
Placement at the END of the file is load-bearing: the compact strip blocks at
|
||||
|
||||
Reference in New Issue
Block a user