Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

wrap CityGalaxySky in Suspense so its texture load can't suspend the canvas

[._.]/ Adam Eivy775d581c12cd
diff --git a/client/src/components/city/CityScene.jsx b/client/src/components/city/CityScene.jsx
index 76313f17b5..2e430190e2 100644
--- a/client/src/components/city/CityScene.jsx
+++ b/client/src/components/city/CityScene.jsx
@@ -1,4 +1,4 @@
-import { useState, useCallback, useRef, useEffect } from 'react';
+import { useState, useCallback, useRef, useEffect, Suspense } from 'react';
import * as THREE from 'three';
import { Canvas } from '@react-three/fiber';
import { OrbitControls } from '@react-three/drei';
@@ -105,8 +105,14 @@ export default function CityScene({ apps, agentMap, onBuildingClick, cosStatus,
>
{showGradientBackground && <color attach="background" args={[background || '#030308']} />}
{/* Mount the galaxy dome only at night — keeps its 2.8MB texture from being
- fetched/decoded in full daylight, where it's fully faded out anyway. */}
- {!showGradientBackground && <CityGalaxySky settings={settings} />}
+ fetched/decoded in full daylight, where it's fully faded out anyway.
+ Wrapped in Suspense so the useLoader texture fetch can't suspend the
+ whole canvas tree while it streams in. */}
+ {!showGradientBackground && (
+ <Suspense fallback={null}>
+ <CityGalaxySky settings={settings} />
+ </Suspense>
+ )}
<CitySky settings={settings} />
<CityClouds settings={settings} />
<CityLights settings={settings} />