Why TWA Over a 60 MB Native Wrapper?
For a fast-moving social app, forcing users to re-download a 50 MB APK for every UI fix kills adoption. By packaging our React 19 + Vite PWA with PWABuilder, Bondly's Android APK weighs ~3 MB and loads updates automatically from Vercel.
1. Passing PWABuilder Checks & Removing the Chrome Address Bar
- Configured
public/manifest.jsonwithid: "/",display: "standalone",orientation: "portrait-primary", and separate"any"and"maskable"icon entries. - Excluded
/.well-known/from SPA rewrites invercel.jsonand forcedContent-Type: application/jsonfor/.well-known/assetlinks.jsonso Android verifies the APK's SHA-256 fingerprint and launches in 100% fullscreen native mode.
2. Making Web Chat Feel Like a Native App on Mobile
Web apps often feel clunky on mobile because of keyboard resizing, scroll jumps, and double-taps. Here are the exact fixes that made Bondly feel native:
- Keyboard Resize: Added
viewport-fit=cover, interactive-widget=resizes-contentinindex.htmlpaired with100dvhon.messages-layoutso the virtual keyboard resizes the chat smoothly instead of pushing the whole page. - No Outer Page Jump: Replaced
scrollIntoView()(which scrolls ancestorwindow/documentcontainers) withchatListRef.current.scrollTop = chatListRef.current.scrollHeight. - No Duplicate Sends: Added a
sendingReflock and cleared the input optimistically on submit.
- Fixing the overflow-x: hidden Scroll Trap: Setting overflow-x: hidden on both html and body can lock vertical scrolling on Android WebView. Switching to overflow-x: clip on html, body prevents horizontal wobble while keeping vertical touch scrolling silky smooth.
Free Engineering & AI Search Diagnostics
Originally published at Kinetic Code Labs.
- Test how ChatGPT, Claude & Perplexity read your site: Run Free AI Vision Simulator
- Audit mobile speed, Core Web Vitals & SEO blockers: Run Free Lighthouse SEO Audit
- Need custom MERN, ERP, or AI automation without middlemen? Book a Free Discovery Call