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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(openworld): address review findings on PM2 status, playback suppression, grass remount, sway hook, and road spot
[._.]/ Adam Eivyc0565ac5db04
diff --git a/client/src/components/openworld/Building.jsx b/client/src/components/openworld/Building.jsxindex 02e55d0c6d..a5d6414879 100644--- a/client/src/components/openworld/Building.jsx+++ b/client/src/components/openworld/Building.jsx@@ -472,10 +472,11 @@ function LowPolyFacade({ width, depth, height, bodyColor, edgeColor, dimMul, sur}// Always-visible façade health indicator (Roadmap 1.1) - readable at any distance-function BuildingHealthStrip({ width, height, depth, status, metrics, dimMul = 1, dayMix = 0 }) {- const isHot = metrics?.hasMetrics && cpuTone(metrics.cpuPercent) === 'hot';- const isBusy = metrics?.hasMetrics && cpuTone(metrics.cpuPercent) === 'busy';- const isErrored = status === 'errored' || (metrics?.unstableRestarts > 0);+function BuildingHealthStrip({ width, height, depth, status, metrics, pm2Status, dimMul = 1, dayMix = 0, playback = false }) {+ const isPm2Errored = Object.values(pm2Status || {}).some((p) => p?.status === 'errored' || p?.status === 'error');+ const isErrored = status === 'errored' || isPm2Errored || (!playback && metrics?.unstableRestarts > 0);+ const isHot = !playback && metrics?.hasMetrics && cpuTone(metrics.cpuPercent) === 'hot';+ const isBusy = !playback && metrics?.hasMetrics && cpuTone(metrics.cpuPercent) === 'busy';const toneColor = isErrored? '#f43f5e'@@ -520,9 +521,12 @@ function BuildingHealthStrip({ width, height, depth, status, metrics, dimMul = 1}// Stress smoke / sparks (Roadmap 1.2) - rises from rooftop when CPU is hot or app has errored-function StressEffects({ height, metrics, status, dimMul = 1 }) {+function StressEffects({ height, metrics, status, pm2Status, dimMul = 1, playback = false }) {+ if (playback) return null;++ const isPm2Errored = Object.values(pm2Status || {}).some((p) => p?.status === 'errored' || p?.status === 'error');const isHot = metrics?.hasMetrics && cpuTone(metrics.cpuPercent) === 'hot';- const isErrored = status === 'errored' || (metrics?.restarts > 3 && status !== 'stopped');+ const isErrored = status === 'errored' || isPm2Errored || (metrics?.unstableRestarts > 0);const smokeRef = useRef();const sparksRef = useRef();@@ -903,8 +907,10 @@ export default function Building({ app, position, agentCount, onClick, playSfx,depth={depth}status={app.overallStatus}metrics={metrics}+ pm2Status={app.pm2Status}dimMul={dimMul}dayMix={dayMix}+ playback={playback}/>)}@@ -914,7 +920,9 @@ export default function Building({ app, position, agentCount, onClick, playSfx,height={height}metrics={metrics}status={app.overallStatus}+ pm2Status={app.pm2Status}dimMul={dimMul}+ playback={playback}/>)}diff --git a/client/src/components/openworld/Building.test.jsx b/client/src/components/openworld/Building.test.jsxindex 5180260408..09df78324e 100644--- a/client/src/components/openworld/Building.test.jsx+++ b/client/src/components/openworld/Building.test.jsx@@ -59,6 +59,41 @@ describe('Building component', () => {expect(container.getElementsByTagName('group').length).toBeGreaterThan(0);});+ it('renders stress effects when PM2 process is errored', () => {+ const errorApp = {+ ...mockApp,+ pm2Status: {+ worker1: { status: 'errored', cpu: 0, memory: 0, uptime: 0 },+ },+ };+ const { container } = render(+ <Building+ app={errorApp}+ position={{ x: 0, z: 0 }}+ agentCount={0}+ />+ );+ expect(container.getElementsByTagName('group').length).toBeGreaterThan(0);+ });++ it('suppresses live stress effects during history playback', () => {+ const hotApp = {+ ...mockApp,+ pm2Status: {+ worker1: { status: 'online', cpu: 95, memory: 500000000, uptime: 100000 },+ },+ };+ const { container } = render(+ <Building+ app={hotApp}+ position={{ x: 0, z: 0 }}+ agentCount={0}+ playback={true}+ />+ );+ expect(container).toBeTruthy();+ });+it('omits health strip and stress effects for archived apps', () => {const archivedApp = {...mockApp,diff --git a/client/src/components/openworld/OpenWorldGrass.jsx b/client/src/components/openworld/OpenWorldGrass.jsxindex 6653a5cdbb..6eed0e6673 100644--- a/client/src/components/openworld/OpenWorldGrass.jsx+++ b/client/src/components/openworld/OpenWorldGrass.jsx@@ -80,7 +80,7 @@ export default function OpenWorldGrass({ settings }) {useLayoutEffect(() => {writeMatrices(ref, blades);- }, [blades]);+ }, [blades, lowPoly]);const onBeforeCompile = useMemo(() => (shader) => {shader.uniforms.uGrassTime = timeUniformRef.current;diff --git a/client/src/components/openworld/OpenWorldStreetProps.jsx b/client/src/components/openworld/OpenWorldStreetProps.jsxindex e1918bfe76..5fff26ba82 100644--- a/client/src/components/openworld/OpenWorldStreetProps.jsx+++ b/client/src/components/openworld/OpenWorldStreetProps.jsx@@ -89,6 +89,10 @@ export default function OpenWorldStreetProps({ settings }) {return computeStreetProps(streets, density);}, [density]);+ useFrame(({ clock }) => {+ swayTimeUniform.value = clock.getElapsedTime();+ });+// Keep the plaza grove even on the low tier: it is cheap, anchors the center of the map,// and gives the bright world a sense of scale. Lamps and their additive pools remain detail-only.const showLamps = lowPoly || openWorldShowDetail(settings);@@ -102,10 +106,6 @@ export default function OpenWorldStreetProps({ settings }) {: tintStructure('#141b2c');const foliageColor = mixHex(mixHex('#6fa37f', accent, 0.22), '#d5bd83', dayMix * 0.18);- useFrame(({ clock }) => {- swayTimeUniform.value = clock.getElapsedTime();- });-return (<group>{showLamps && (diff --git a/client/src/components/openworld/PlayerAvatar.jsx b/client/src/components/openworld/PlayerAvatar.jsxindex 6d692dd1d4..15abf03e7a 100644--- a/client/src/components/openworld/PlayerAvatar.jsx+++ b/client/src/components/openworld/PlayerAvatar.jsx@@ -169,24 +169,30 @@ export default function PlayerAvatar({ rigRef }) {{/* Headlight beams after dark: apex at the lamp, cone spreading forward and atouch down so the road ahead reads while driving at night. */}{headlightsOn && [-1, 1].map((side) => (- <group key={`beam-${side}`} position={[side * CAR_WIDTH * 0.3, 0.55, -CAR_LENGTH * 0.55]} rotation={[-0.09, 0, 0]}>- {/* Cone axis is +Y by default; rotating +90° about X aims apex to +Z and base to -Z.- With offset [0, 0, -2.7], apex is on the lamp (z=0) and wide base spreads forward (z=-5.4). */}- <mesh rotation={[Math.PI / 2, 0, 0]} position={[0, 0, -2.7]}>- <coneGeometry args={[1.15, 5.4, 10, 1, true]} />- <meshBasicMaterial- color="#ffe9b8"- transparent- opacity={0.14}- blending={THREE.AdditiveBlending}- depthWrite={false}- side={THREE.DoubleSide}- toneMapped={false}- />- </mesh>- {/* Soft projected illumination spot on the road ahead */}- <mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, -0.48, -4.2]}>- <circleGeometry args={[1.2, 16]} />+ <group key={`beam-${side}`}>+ {/* Volumetric angled cone extending down-forward from the lamp */}+ <group position={[side * CAR_WIDTH * 0.3, 0.55, -CAR_LENGTH * 0.55]} rotation={[-0.09, 0, 0]}>+ {/* Cone axis is +Y by default; rotating +90° about X aims apex to +Z and base to -Z.+ With offset [0, 0, -2.7], apex is on the lamp (z=0) and wide base spreads forward (z=-5.4). */}+ <mesh rotation={[Math.PI / 2, 0, 0]} position={[0, 0, -2.7]}>+ <coneGeometry args={[1.15, 5.4, 10, 1, true]} />+ <meshBasicMaterial+ color="#ffe9b8"+ transparent+ opacity={0.14}+ blending={THREE.AdditiveBlending}+ depthWrite={false}+ side={THREE.DoubleSide}+ toneMapped={false}+ />+ </mesh>+ </group>+ {/* Soft projected illumination spot flat on the road surface ahead */}+ <mesh+ position={[side * CAR_WIDTH * 0.3, 0.04, -CAR_LENGTH * 0.55 - 4.2]}+ rotation={[-Math.PI / 2, 0, 0]}+ >+ <circleGeometry args={[1.25, 16]} /><meshBasicMaterialcolor="#ffe9b8"transparent