mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Two root causes behind "responsive views broken" / "icons too small to tap", found via a Playwright iPhone-profile screenshot loop: 1. No viewport meta. The server-rendered <head> (customHeadRender.js) had no <meta name="viewport">, so mobile browsers used a default ~980px virtual width and scaled down: tiny UI, window.innerWidth=980 on a 390px phone, and @media (max-width:800px) never matched. Add width=device-width (user zoom left enabled for accessibility). 2. profile.mobileMode defaulted to false. The schema set mobileMode=false on every user, so getMobileMode() always returned it and the auto-detection was dead — every user stuck in desktop-mode even on phones. Make it optional (no default). Rewrite auto-detection to use matchMedia width/pointer queries instead of fragile UA sniffing (same class of bug as Meteor #12421), and add a matchMedia listener that re-applies mobile-mode on resize/orientation when the user has no explicit preference. Verified on an iPhone 13 profile: innerWidth 390, body gets mobile-mode automatically, header renders as large tappable icons. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>