Spaces:
Sleeping
Sleeping
sync: push from tools/sync_space_to_hub.py (no artifacts/)
Browse files
web/dist/assets/index-CgsS5yzT.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
web/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
<link rel="icon" type="image/svg+xml" href="/ui/favicon.svg" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>EV Grid Oracle — Pixel City</title>
|
| 8 |
-
<script type="module" crossorigin src="/ui/assets/index-
|
| 9 |
<link rel="stylesheet" crossorigin href="/ui/assets/index-C03a0R4A.css">
|
| 10 |
</head>
|
| 11 |
<body>
|
|
|
|
| 5 |
<link rel="icon" type="image/svg+xml" href="/ui/favicon.svg" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>EV Grid Oracle — Pixel City</title>
|
| 8 |
+
<script type="module" crossorigin src="/ui/assets/index-CgsS5yzT.js"></script>
|
| 9 |
<link rel="stylesheet" crossorigin href="/ui/assets/index-C03a0R4A.css">
|
| 10 |
</head>
|
| 11 |
<body>
|
web/src/phaser/startCommandCenter.ts
CHANGED
|
@@ -67,7 +67,29 @@ async function withDeadline<T>(p: Promise<T>, ms: number, label: string): Promis
|
|
| 67 |
export function startCommandCenter(args: Args) {
|
| 68 |
const mountBaseline = document.getElementById(args.baselineMountId);
|
| 69 |
const mountOracle = document.getElementById(args.oracleMountId);
|
| 70 |
-
if (!mountBaseline || !mountOracle)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
const mkGame = (mount: HTMLElement) => {
|
| 73 |
const config: Phaser.Types.Core.GameConfig = {
|
|
|
|
| 67 |
export function startCommandCenter(args: Args) {
|
| 68 |
const mountBaseline = document.getElementById(args.baselineMountId);
|
| 69 |
const mountOracle = document.getElementById(args.oracleMountId);
|
| 70 |
+
if (!mountBaseline || !mountOracle) {
|
| 71 |
+
pill(args.baselineBadge, "bad", "UI ERROR");
|
| 72 |
+
pill(args.oracleBadge, "bad", "UI ERROR");
|
| 73 |
+
args.eventsEl.textContent =
|
| 74 |
+
"ERROR: mount nodes missing.\n\n" +
|
| 75 |
+
`baselineMountId=${args.baselineMountId} oracleMountId=${args.oracleMountId}\n` +
|
| 76 |
+
"This is a frontend wiring issue (DOM ids).";
|
| 77 |
+
return;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
// Surface unexpected runtime errors in the UI (HF Spaces users often don't open DevTools).
|
| 81 |
+
const reportFatal = (label: string, detail: unknown) => {
|
| 82 |
+
pill(args.baselineBadge, "bad", label);
|
| 83 |
+
pill(args.oracleBadge, "bad", label);
|
| 84 |
+
const msg = detail instanceof Error ? `${detail.name}: ${detail.message}` : String(detail);
|
| 85 |
+
args.eventsEl.textContent = `${label}\n${msg}`;
|
| 86 |
+
args.oracleEl.textContent = `${label}\n${msg}`;
|
| 87 |
+
args.dreamEl.textContent =
|
| 88 |
+
`${label}\n${msg}\n\n` +
|
| 89 |
+
"Tip: hard refresh (Ctrl+F5) to clear cached JS after a Space rebuild.";
|
| 90 |
+
};
|
| 91 |
+
window.addEventListener("error", (ev) => reportFatal("RUNTIME ERROR", (ev as ErrorEvent).error || (ev as ErrorEvent).message));
|
| 92 |
+
window.addEventListener("unhandledrejection", (ev) => reportFatal("PROMISE REJECTION", (ev as PromiseRejectionEvent).reason));
|
| 93 |
|
| 94 |
const mkGame = (mount: HTMLElement) => {
|
| 95 |
const config: Phaser.Types.Core.GameConfig = {
|