You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Opening a starting app shows "is still starting (0s)" at once, and the 10-second toast is irregular #142
openApp() in web/src/openApp.ts calls onWaiting(waited) on every probe, with waited = Math.round((Date.now() - started) / 1000). The Store's Open button (web/src/screens/Store.tsx, around line 670) uses it to toast every 10 seconds:
openApp(live, liveUrl, {onWaiting: (sec) => sec % 10 === 0 && toast(`${live.name ?? app.name} is still starting (${sec}s)…`)})
The first probe happens immediately, so sec is 0 and 0 % 10 === 0 is true. The "Opening X…" toast that was shown a moment earlier is replaced at once by "X is still starting (0s)…".
The loop sleeps 2000 ms plus the time the probe takes, so sec drifts and only lands on a multiple of 10 by chance. Simulating the loop with a probe that takes 100 ms gives these values for sec: 0, 2, 4, 6, 8, 11, 13, 15, ... 29, 32, ... 38, 40, 42, ... 50, 53 ... so the toast shows at 0, 40, 50, 80, 90, 120, 130 and so on, with gaps of 30 seconds and runs of consecutive ones. With a 50 ms probe it shows at 0 and 10, then not again until 70.
So the user sees a wrong "0s" message and then an erratic number of reminders.
How to reproduce
Start an app so its web page is still "starting" (for example restart Home Assistant), open the Store page for it and press Open. The toast "…is still starting (0s)…" appears immediately.
For the drift, I ran this in node:
let t = 0; const seen = []
while (true) { const w = Math.round(t / 1000); if (w > 180) break; seen.push(w); t += 100 + 2000 }
seen.filter((x) => x % 10 === 0) // [0, 40, 50, 80, 90, 120, 130, 160, 170]
Expected: no toast at 0 s, and one about every 10 seconds.
Suggested fix
In the caller, skip sec === 0 and track the time of the last toast (for example toast when sec - lastShown >= 10) instead of testing sec % 10.
Activity
calledtoconstruct commentedon Nov 22, 2026
Working to resolve this.
No open pull request references this issue, and no one has commented that they are working on it.
#526, #342, #525, #524, #527, #133, #102, #777, #129, #239, #243, #236, #233, #232, #242, and #443 share the app store with this and will land in one pull request.
🤖 Generated with Grok 4.7
calledtoconstruct commentedon Nov 22, 2026
Thanks @nixfred. A starting app waits before the first toast, then shows one about every 10 seconds. This ships in #876.
🤖 Generated with Grok 4.7