Repository navigation
web-chat: phone warning, build against onde 1.5.0 - #67
Conversation
Loading the model peaks at about three times the 380 MB file in memory, and mobile Chrome and Safari kill the tab before it finishes. On a phone or tablet the page now shows a warning instead of starting the worker, so the wasm is only fetched if the user picks Try anyway. The card has a Copy link button and points to Siti AI on the App Store or Google Play, whichever fits the device, plus a link to 5mb.app. A localStorage flag is set while the model loads and cleared once it is ready or fails. If it is still set on a visit within ten minutes, the last tab was killed mid-load, and the same card says so on any device. deploy.sh now ships the two store badges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
onde 1.5.0 has the browser engine and web_store, so the demo no longer needs a local checkout patched in. build.sh, the README build step and the deploy steps drop the --config patch. The patch stays documented as an option for trying a local onde. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
There was a problem hiding this comment.
Two changes to the web-chat demo. First, a phone/tablet warning: main.js detects constrained devices via navigator.userAgentData.mobile, Apple/Android UA strings, or navigator.deviceMemory < 4, and also detects a previous mid-load crash via a localStorage timestamp. On those visits it shows a #mobile card (added in index.html, styled in style.css) with App Store and Google Play badges for Siti AI and a "Try anyway" button that defers startWorker() until clicked. postLoad() wraps post() to set the loading flag before sending load messages; storage.clear() fires on loaded/error. Second, build.sh, deploy.sh, and README.md drop the mandatory --config patch for a local onde checkout now that onde 1.5.0 is on crates.io; the patch remains documented as optional. deploy.sh also stages the two badge files. The App Store URL (id6780047972) and Google Play package (ai.siti.Siti) check out against the live store listings.
Automated review by siGit Code Review · commit 8107d15 · see the review dashboard
Two changes to the web-chat demo, on top of the 1.5.0 release.
The first commit warns phone and tablet visitors before the model loads. Loading peaks at about three times the model file in memory, a bit over 1 GB, and mobile browsers kill the tab before that. On those devices (and on any device whose last visit died mid-load) the page shows a warning with App Store and Google Play badges for Siti AI, which runs Onde natively, and a "Try anyway" button.
deploy.shships the badge files and the README gains a "Phones and tablets" section.The second commit builds against
onde1.5.0 from crates.io. The browser engine andweb_storeshipped in that release, sobuild.sh, the README build step and the deploy steps no longer pass the--configpatch for a localonde. The README keeps the patch as an option for trying a local checkout.I built it with
./build.shand no patch, which resolvedonde1.5.0 from crates.io and producedwww/pkg. The same tree is deployed to https://ondewebdemo.5mb.app.