
Yesterday afternoon, at around half past five, my laptop assistant got something I had asked for that morning: a link where it can call me. Not a chat window, not a dashboard I have to keep open — a page on the phone that rings when the assistant wants to talk, and a button I can press to call it. The page is a small installable app, and by the evening it was live in three places at once.
The idea came from a simple sentence. I asked for a link where Kruxo can call me, plus a mobile panel as an installable app. The files are small: a page, a script, a manifest, a service worker, two icons. The panel shows mood, awareness, do-not-disturb, voice, the app on screen, system load, the brain's last decision, and memory. The "Call Kruxo" button starts a voice session: the phone listens, the laptop thinks, and spoken audio comes back. While the page is open, it checks for an incoming call request every five seconds, so the laptop can ring the phone too.
The Voice That Did Not Exist
The first test looked like success and was not. The brain answered — "Hello Faisal, I hear you clearly. It is good to know everything is working properly." — in 3.2 seconds, but the audio came back empty. No sound at all. The cause was small and easy to miss: the voice name in the settings, "ur-PK-SwaraNeural", does not exist. The speech service's Urdu voices are only Asad and Uzma. The service failed with no audio received, and the page had nothing to play.
The fix tries en-US-AriaNeural first, then ur-PK-UzmaNeural. It was installed, the server was restarted, and the real test at 17:54:52 came back with a reply and 43,200 bytes of audio in the Aria voice, in 21.1 seconds. Slow — the first attempt had hung for more than ninety seconds on a slow round of thinking — but it completed, and a standalone test of the Aria voice produced a clean 30,528-byte audio file. A voice that does not exist cannot be fixed by trying harder. It has to be replaced.
The Watchdog That Never Ran
The same afternoon exposed a second silent failure. The watchdog — a scheduled task that restarts the tunnel, the server, and the app every five minutes when something is dead — had been installed at 11:45 in the morning. Its last-run time was empty. It had fired once and never again, because its trigger had a five-minute repetition with no duration.
The fix recreated the task with a 365-day repetition and start-when-available, and it also fixed a bug in the fix itself: the script used a PowerShell option that does not exist in PowerShell 5.1, so it failed before it could repair anything. After the correction the task showed State Ready, repetition every five minutes for a year, and a manual run finished clean with an empty log — empty, because everything was already up, which is exactly what a healthy watchdog log looks like.
Three Hosts, Three Small Fights
Deploying the page meant three hosts, and each one fought back a little. The main site needed file permissions fixed after copying — the folder at 755, the files at 644 — or it answered 403 and 404. The big icon showed 404 until the cache cleared. The two Firebase mirrors needed the files copied into the right folder first: the first deploy failed with "Not in a Firebase app directory" because the archive had expanded one level above where the config file lives. Both deploys finished with exit code 0, 27 files each, and every call address returned 200.
The Page That Said Offline While Online
Then I opened the page on the phone, and it said the laptop was offline. The green "online" dot was there, but every card was empty and the message read "Laptop is offline right now". The laptop was not offline. The tunnel's free tier shows a warning page to real browsers, and the page's data request received that warning page instead of data, so it failed and reported offline.
The fix sends a header that skips the warning on all four requests, and the server was updated to allow that header. Then the page still showed offline, because the service worker kept serving the old script from its cache. The cache name went from version one to version two and the handler changed to network-first: try the live file, save a fresh copy, fall back to the cache only when truly offline. It was redeployed everywhere and verified live on all three hosts. A test call request was set at 18:04:36 and is still pending — opening the page should now ring with "Test call — your PWA is live".
What Is Still Open
Two things remain. The page can only ring while it is open; ringing a closed phone needs web push, which is not wired up yet. And 21 seconds from question to spoken answer is slow for a live call — the thinking round and the voice round both take their time. Both are known, both are on the list, and neither was hidden behind the launch. A launch that hides its slow parts is not a launch. It is a demo.
If your assistant could call you instead of waiting to be asked, what is the first thing you would want it to call about?
Comments
Post a Comment