Skip to content

web-chat: phone warning, build against onde 1.5.0 - #67

Merged
setoelkahfi merged 2 commits into
developmentfrom
feature/web-chat-example
Nov 20, 2026
Merged

setoelkahfi merged 2 commits into
developmentfrom
feature/web-chat-example

Conversation

@setoelkahfi

@setoelkahfi setoelkahfi commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

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.sh ships the badge files and the README gains a "Phones and tablets" section.

The second commit builds against onde 1.5.0 from crates.io. The browser engine and web_store shipped in that release, so build.sh, the README build step and the deploy steps no longer pass the --config patch for a local onde. The README keeps the patch as an option for trying a local checkout.

I built it with ./build.sh and no patch, which resolved onde 1.5.0 from crates.io and produced www/pkg. The same tree is deployed to https://ondewebdemo.5mb.app.

setoelkahfi and others added 2 commits November 20, 2026 07:56
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>

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@setoelkahfi setoelkahfi self-assigned this Nov 20, 2026
@setoelkahfi
setoelkahfi merged commit 6a13b11 into development Nov 20, 2026
5 checks passed
@setoelkahfi
setoelkahfi deleted the feature/web-chat-example branch November 20, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants