File size: 8,104 Bytes
1dbc34b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | <!doctype html>
<html lang="en" suppressHydrationWarning>
<head>
<meta charset="UTF-8" />
<title>Automaker - Autonomous AI Development Studio</title>
<meta name="description" content="Build software autonomously with AI agents" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"
/>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<!-- PWA -->
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#09090b" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Automaker" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="apple-touch-icon" href="/logo_larger.png" />
<!-- Performance: Preload critical assets with fetchpriority for faster First Contentful Paint -->
<link rel="preload" href="/logo.png" as="image" fetchpriority="high" />
<link
rel="preload"
href="/automaker.svg"
as="image"
type="image/svg+xml"
fetchpriority="high"
/>
<!-- Critical inline styles: prevent white/wrong-color flash on mobile PWA cold start -->
<!-- These styles are applied before any external CSS loads, eliminating FOUC -->
<style>
html {
background-color: #09090b;
}
@media (prefers-color-scheme: light) {
html:not([class]) {
background-color: #fff;
}
}
html.light,
html.cream,
html.solarizedlight,
html.github,
html.paper,
html.rose,
html.mint,
html.lavender,
html.sand,
html.sky,
html.peach,
html.snow,
html.sepia,
html.gruvboxlight,
html.nordlight,
html.blossom,
html.ayu-light,
html.onelight,
html.bluloco,
html.feather {
background-color: #fff;
}
html,
body {
margin: 0;
overflow: hidden;
position: fixed;
width: 100%;
height: 100%;
}
#app {
height: 100vh;
height: 100dvh;
overflow: hidden;
}
/* Inline app shell: shows logo + spinner while JS bundle downloads.
On slow mobile networks the bundle can take 2-5s; this eliminates
the blank screen and gives immediate visual feedback.
React's createRoot().render() replaces #app's innerHTML, removing this. */
.app-shell {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
gap: 24px;
opacity: 1;
}
.app-shell-logo {
width: 56px;
height: 56px;
opacity: 0.9;
}
/* Default (dark): light spinner + logo strokes */
.app-shell-spinner {
width: 20px;
height: 20px;
border: 2px solid rgba(255, 255, 255, 0.1);
border-top-color: rgba(255, 255, 255, 0.5);
border-radius: 50%;
animation: shell-spin 0.8s linear infinite;
}
.app-shell-logo-stroke {
stroke: rgba(255, 255, 255, 0.7);
}
.app-shell-logo-bg {
fill: rgba(255, 255, 255, 0.08);
}
/* Light themes: dark spinner + logo strokes.
The theme script below sets data-theme-type="light" on <html> for any light
theme, so future theme additions only need to update the script — not CSS. */
html[data-theme-type='light'] .app-shell-spinner {
border-color: rgba(0, 0, 0, 0.08);
border-top-color: rgba(0, 0, 0, 0.4);
}
html[data-theme-type='light'] .app-shell-logo-stroke {
stroke: rgba(0, 0, 0, 0.55);
}
html[data-theme-type='light'] .app-shell-logo-bg {
fill: rgba(0, 0, 0, 0.06);
}
/* System light preference when no theme class is applied yet */
@media (prefers-color-scheme: light) {
html:not([class]) .app-shell-spinner {
border-color: rgba(0, 0, 0, 0.08);
border-top-color: rgba(0, 0, 0, 0.4);
}
html:not([class]) .app-shell-logo-stroke {
stroke: rgba(0, 0, 0, 0.55);
}
html:not([class]) .app-shell-logo-bg {
fill: rgba(0, 0, 0, 0.06);
}
}
@keyframes shell-spin {
to {
transform: rotate(360deg);
}
}
</style>
<script>
// Prevent theme flash - apply stored theme before React hydrates
(function () {
try {
// Primary key used by current builds for pre-React theme persistence.
var theme = localStorage.getItem('automaker:theme');
// Backward compatibility: older builds stored theme in the Zustand blob.
if (!theme) {
var stored = localStorage.getItem('automaker-storage');
if (stored) {
var data = JSON.parse(stored);
theme = data?.state?.theme || data?.theme || null;
}
}
// Light theme names — kept in sync with the background-color rule above.
// Adding a new light theme only requires updating this array.
var lightThemes = [
'light',
'cream',
'solarizedlight',
'github',
'paper',
'rose',
'mint',
'lavender',
'sand',
'sky',
'peach',
'snow',
'sepia',
'gruvboxlight',
'nordlight',
'blossom',
'ayu-light',
'onelight',
'bluloco',
'feather',
];
if (theme && theme !== 'system') {
// Apply the stored theme class directly (covers 'light', 'dark', and
// all named themes like 'cream', 'nord', etc.)
document.documentElement.classList.add(theme);
if (lightThemes.indexOf(theme) !== -1) {
document.documentElement.setAttribute('data-theme-type', 'light');
}
} else if (
theme === 'system' &&
window.matchMedia('(prefers-color-scheme: dark)').matches
) {
document.documentElement.classList.add('dark');
} else if (
theme === 'system' &&
window.matchMedia('(prefers-color-scheme: light)').matches
) {
document.documentElement.setAttribute('data-theme-type', 'light');
}
// Detect PWA standalone mode early so CSS can apply reduced bottom safe-area
// before first paint, preventing a layout shift on notched devices.
if (
window.matchMedia('(display-mode: standalone)').matches ||
navigator.standalone === true
) {
document.documentElement.setAttribute('data-pwa', 'standalone');
}
} catch (e) {}
})();
</script>
</head>
<body class="antialiased">
<div id="app">
<!-- Inline app shell: renders instantly while JS downloads on slow mobile networks.
React's createRoot().render() replaces this content automatically. -->
<div class="app-shell">
<svg
class="app-shell-logo"
viewBox="0 0 256 256"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<rect class="app-shell-logo-bg" x="16" y="16" width="224" height="224" rx="56" />
<g
class="app-shell-logo-stroke"
fill="none"
stroke-width="20"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M92 92 L52 128 L92 164" />
<path d="M144 72 L116 184" />
<path d="M164 92 L204 128 L164 164" />
</g>
</svg>
<div class="app-shell-spinner" role="status" aria-label="Loading…"></div>
</div>
</div>
<script type="module" src="/src/renderer.tsx"></script>
</body>
</html>
|