fix(mac): keep webchat boot dots

This commit is contained in:
Peter Steinberger
2025-12-12 15:01:20 +00:00
parent 19e7c708ce
commit 6b64039fcb
3 changed files with 36 additions and 3 deletions

View File

@@ -13,7 +13,8 @@ const logStatus = (msg) => {
try { try {
console.log(msg); console.log(msg);
const el = document.getElementById("app"); const el = document.getElementById("app");
if (el && !el.dataset.booted) el.textContent = msg; // Keep the animated boot loader visible; don't overwrite it with status text.
if (el && !el.dataset.booted) el.dataset.status = msg;
} catch { } catch {
// Ignore logging failures—never block bootstrap. // Ignore logging failures—never block bootstrap.
} }

View File

@@ -196364,7 +196364,7 @@ const logStatus = (msg) => {
try { try {
console.log(msg); console.log(msg);
const el = document.getElementById("app"); const el = document.getElementById("app");
if (el && !el.dataset.booted) el.textContent = msg; if (el && !el.dataset.booted) el.dataset.status = msg;
} catch {} } catch {}
}; };
const randomId = () => { const randomId = () => {

View File

@@ -133,6 +133,36 @@ final class WebChatWindowController: NSWindowController, WKNavigationDelegate, N
private func loadPlaceholder() { private func loadPlaceholder() {
let html = """ let html = """
<html> <html>
<head>
<style>
html, body { height: 100%; margin: 0; padding: 0; }
body {
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.boot {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.boot span {
width: 10px;
height: 10px;
border-radius: 50%;
background: #0f172a;
animation: boot-pulse 1s ease-in-out infinite;
}
.boot span:nth-child(2) { animation-delay: 0.15s; }
.boot span:nth-child(3) { animation-delay: 0.3s; }
@keyframes boot-pulse {
0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
40% { opacity: 1; transform: scale(1.1); }
}
</style>
</head>
<body style='font-family:-apple-system; <body style='font-family:-apple-system;
margin:0; margin:0;
padding:0; padding:0;
@@ -141,7 +171,9 @@ final class WebChatWindowController: NSWindowController, WKNavigationDelegate, N
justify-content:center; justify-content:center;
height:100vh; height:100vh;
color:#888'> color:#888'>
Connecting to web chat… <div class="boot" aria-label="Booting web chat">
<span></span><span></span><span></span>
</div>
</body> </body>
</html> </html>
""" """