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.json with id: "/", display: "standalone", orientation: "portrait-primary", and separate "any" and "maskable" icon entries.
  • Excluded /.well-known/ from SPA rewrites in vercel.json and forced Content-Type: application/json for /.well-known/assetlinks.json so 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-content in index.html paired with 100dvh on .messages-layout so the virtual keyboard resizes the chat smoothly instead of pushing the whole page.
  • No Outer Page Jump: Replaced scrollIntoView() (which scrolls ancestor window/document containers) with chatListRef.current.scrollTop = chatListRef.current.scrollHeight.
  • No Duplicate Sends: Added a sendingRef lock 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.