feat(ui): render the page toast from the status store

ShellFeedback and the scene director show toasts through createToast(),
each on its own timer as before, and the scene chrome renders the toast.
Every show rewrites the text, so a repeated message is announced again.
This commit is contained in:
Sameh Khamis committed 2026-10-31 19:58:59 -07:00
1 parent 3c391482f6
commit f846aaed4c
13 files changed
+203 -43

No files matched your search

+12 -2
View File
@@ -474,12 +474,22 @@ async function contacts() {
// SEARCH NEARBY SITES, as the user presses it.
await page.evaluate(() => {
document.getElementById('toast').textContent = '';
const toast = document.getElementById('toast');
const before = toast.firstChild;
document.getElementById('installations-search-btn').click();
window.__qaToastBefore = before;
});
// Every toast show writes a new text node, even for a repeated message.
await page
.waitForFunction(
() => document.getElementById('toast').textContent.trim().length > 0,
() => {
const toast = document.getElementById('toast');
return (
toast.classList.contains('visible') &&
toast.firstChild !== window.__qaToastBefore &&
toast.textContent.trim().length > 0
);
},
{ timeout: 20_000 },
)
.catch(() => {});