feat: add mobile viewport detection with friendly unavailable message #8
Reference in New Issue
Block a user
Delete Branch "feature/mobile-detection-message"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #4
Detects mobile viewport (
window.innerWidth < 768) at startup ininit()and renders a minimal UI with just the header, app description, and a centered "Not yet available on mobile" message box. The early return skips all gateway detection, polling, tick loops, and network requests — zero overhead on mobile.Changes
src/main.jsMOBILE_BREAKPOINTconstant (768px)isMobileViewport()helperbuildMobileUI()— renders header + description + centered message card + commit hash footerinit()checks mobile viewport first and returns early before any network activityREADME.mdWhat's NOT changed
init()and only fires on narrow viewportsstyles.cssis retained (applies if someone is just above the breakpoint)Review: PR #8 — Mobile viewport detection
Policy Compliance
No policy violations found. Specifically checked:
@sha256:pins intactprettier --check .passes cleanmainvia PR ✓Requirements Checklist (issue #4)
window.innerWidth < 768)MOBILE_BREAKPOINT = 768,isMobileViewport()checkswindow.innerWidth < MOBILE_BREAKPOINTbuildMobileUI()renders centered "Not yet available on mobile" cardreturnininit()beforedetectGateway(),AppState, tick loop, event listenersinit(), desktop code path completely untouchedTest Coverage
No new exported types or functions — all additions (
MOBILE_BREAKPOINT,isMobileViewport(),buildMobileUI()) are module-private, same as every other function insrc/main.js. Test coverage requirement for new exports does not apply.Build Results
docker build .✅ passesmake check(build + prettier) ✅ passesmain✅Code Review Notes
buildMobileUI()follows the same HTML template pattern as the existingbuildUI()— same Tailwind classes, same__COMMIT_HASH__/__COMMIT_FULL__Vite-injected globals, same link structureVerdict: PASS ✅
Clean, minimal implementation that satisfies all requirements in issue #4. No policy violations. Builds clean.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.