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

fix(city): improve archive district visibility and building name display

Adam Eivy6a1b3643a75f
diff --git a/.changelog/v0.12.x.md b/.changelog/v0.12.x.md
index 085a9638fe..0458d2ff46 100644
--- a/.changelog/v0.12.x.md
+++ b/.changelog/v0.12.x.md
@@ -146,6 +146,9 @@ This release adds branch management and automated release workflow capabilities
- **Full orbit controls**: Mouse drag to rotate, scroll to zoom, right-click to pan around the city
- **Lazy-loaded**: CyberCity bundle only loads when navigating to `/city`, keeping the main bundle lean
- **Real-time updates**: Buildings update live via WebSocket when apps start/stop, agents appear/complete via CoS socket events
+- **Twinkling starfield**: Enhanced sky with 1500 color-varied stars using a custom shader — soft circular points, per-star twinkle animation, and fog-immune rendering so stars are visible through the atmospheric haze
+- **Full building names**: App names display in full on building facades using intelligent word-wrapping — hyphens, underscores, and dots are replaced with spaces (e.g., "void-server" renders as "VOID SERVER" across two lines)
+- **Visible archive district**: Archived buildings are taller, brighter, and closer to the main city — upgraded from near-invisible to a clearly distinguishable warehouse district with brighter slate wireframes and always-on holographic labels
**Client changes**:
- `client/src/pages/CyberCity.jsx` — Page component with data hook integration and HUD overlay
diff --git a/client/src/components/city/Building.jsx b/client/src/components/city/Building.jsx
index 5005861311..887c97ec0f 100644
--- a/client/src/components/city/Building.jsx
+++ b/client/src/components/city/Building.jsx
@@ -81,10 +81,9 @@ export default function Building({ app, position, agentCount, onClick }) {
[accentColor, width, height, seed]
);
- // Truncate name for building face display
+ // Format name for building face: replace separators with spaces, full name
const displayName = useMemo(() => {
- const name = app.name || '';
- return name.length > 10 ? name.slice(0, 9) + '.' : name;
+ return (app.name || '').replace(/[-_.]/g, ' ').toUpperCase();
}, [app.name]);
useFrame(({ clock }) => {
@@ -118,7 +117,7 @@ export default function Building({ app, position, agentCount, onClick }) {
emissiveIntensity={0.1}
map={windowTexture}
transparent
- opacity={app.archived ? 0.5 : 0.95}
+ opacity={app.archived ? 0.75 : 0.95}
/>
</mesh>
@@ -127,21 +126,19 @@ export default function Building({ app, position, agentCount, onClick }) {
<lineBasicMaterial
color={edgeColor}
transparent
- opacity={app.archived ? 0.2 : 0.9}
+ opacity={app.archived ? 0.5 : 0.9}
/>
</lineSegments>
{/* Neon accent strip at building top */}
- {!app.archived && (
- <mesh position={[0, height + 0.02, 0]} rotation={[-Math.PI / 2, 0, 0]}>
- <planeGeometry args={[width + 0.1, depth + 0.1]} />
- <meshBasicMaterial
- color={edgeColor}
- transparent
- opacity={0.4}
- />
- </mesh>
- )}
+ <mesh position={[0, height + 0.02, 0]} rotation={[-Math.PI / 2, 0, 0]}>
+ <planeGeometry args={[width + 0.1, depth + 0.1]} />
+ <meshBasicMaterial
+ color={edgeColor}
+ transparent
+ opacity={app.archived ? 0.2 : 0.4}
+ />
+ </mesh>
{/* Building name on front face - pixel font */}
<Text
@@ -154,7 +151,7 @@ export default function Building({ app, position, agentCount, onClick }) {
font={PIXEL_FONT_URL}
maxWidth={width * 0.9}
>
- {displayName.toUpperCase()}
+ {displayName}
</Text>
{/* Building name on back face */}
@@ -168,7 +165,7 @@ export default function Building({ app, position, agentCount, onClick }) {
font={PIXEL_FONT_URL}
maxWidth={width * 0.9}
>
- {displayName.toUpperCase()}
+ {displayName}
</Text>
{/* Vertical name on left side */}
@@ -182,7 +179,7 @@ export default function Building({ app, position, agentCount, onClick }) {
font={PIXEL_FONT_URL}
maxWidth={depth * 0.85}
>
- {displayName.toUpperCase()}
+ {displayName}
</Text>
{/* Base glow circle */}
@@ -211,7 +208,7 @@ export default function Building({ app, position, agentCount, onClick }) {
)}
{/* Holographic label */}
- {(hovered || isOnline) && (
+ {(hovered || isOnline || app.archived) && (
<HolographicPanel
app={app}
agentCount={agentCount}
diff --git a/client/src/components/city/BuildingCluster.jsx b/client/src/components/city/BuildingCluster.jsx
index f1b10d1b40..d5bde104fe 100644
--- a/client/src/components/city/BuildingCluster.jsx
+++ b/client/src/components/city/BuildingCluster.jsx
@@ -53,7 +53,7 @@ export default function BuildingCluster({ apps, agentMap, onBuildingClick }) {
<Text
position={[0, 0.5, warehouseMinZ - 2]}
fontSize={0.8}
- color="#1e293b"
+ color="#475569"
anchorX="center"
anchorY="middle"
font={PIXEL_FONT_URL}
diff --git a/client/src/components/city/CityStarfield.jsx b/client/src/components/city/CityStarfield.jsx
index 258bd44029..d2fb797bf9 100644
--- a/client/src/components/city/CityStarfield.jsx
+++ b/client/src/components/city/CityStarfield.jsx
@@ -2,60 +2,106 @@ import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
+const STAR_VERT = `
+ attribute float size;
+ attribute float phase;
+ attribute vec3 starColor;
+ varying float vPhase;
+ varying vec3 vColor;
+ uniform float uTime;
+ void main() {
+ vPhase = phase;
+ vColor = starColor;
+ vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
+ gl_PointSize = size * (200.0 / -mvPosition.z);
+ gl_Position = projectionMatrix * mvPosition;
+ }
+`;
+
+const STAR_FRAG = `
+ varying float vPhase;
+ varying vec3 vColor;
+ uniform float uTime;
+ void main() {
+ // Soft circular point
+ float d = length(gl_PointCoord - vec2(0.5));
+ if (d > 0.5) discard;
+ float alpha = smoothstep(0.5, 0.15, d);
+ // Twinkle: slow shimmer unique per star
+ float twinkle = 0.7 + 0.3 * sin(uTime * (0.4 + vPhase * 0.6) + vPhase * 6.2831);
+ gl_FragColor = vec4(vColor, alpha * twinkle);
+ }
+`;
+
export default function CityStarfield() {
const pointsRef = useRef();
+ const matRef = useRef();
- const { positions, sizes } = useMemo(() => {
- const count = 800;
+ const { positions, sizes, phases, colors } = useMemo(() => {
+ const count = 1500;
const pos = new Float32Array(count * 3);
const sz = new Float32Array(count);
+ const ph = new Float32Array(count);
+ const col = new Float32Array(count * 3);
+
+ // Star color palette: white, blue-white, warm-white, cyan-tinted
+ const palette = [
+ [1.0, 1.0, 1.0],
+ [0.8, 0.85, 1.0],
+ [1.0, 0.95, 0.85],
+ [0.75, 0.9, 1.0],
+ [0.85, 0.8, 1.0],
+ ];
for (let i = 0; i < count; i++) {
- // Distribute on upper hemisphere (above city)
const theta = Math.random() * Math.PI * 2;
- const phi = Math.random() * Math.PI * 0.45; // Upper hemisphere only
- const r = 80 + Math.random() * 40;
+ const phi = Math.random() * Math.PI * 0.5; // Upper hemisphere
+ const r = 60 + Math.random() * 50;
pos[i * 3] = r * Math.sin(phi) * Math.cos(theta);
- pos[i * 3 + 1] = r * Math.cos(phi) + 10; // Offset up
+ pos[i * 3 + 1] = r * Math.cos(phi) + 8;
pos[i * 3 + 2] = r * Math.sin(phi) * Math.sin(theta);
- sz[i] = 0.3 + Math.random() * 1.2;
+ // Most stars small, a few bright ones
+ const bright = Math.random();
+ sz[i] = bright < 0.05 ? 2.0 + Math.random() * 1.5 : 0.4 + Math.random() * 1.0;
+
+ ph[i] = Math.random(); // Unique twinkle phase
+
+ const c = palette[Math.floor(Math.random() * palette.length)];
+ col[i * 3] = c[0];
+ col[i * 3 + 1] = c[1];
+ col[i * 3 + 2] = c[2];
}
- return { positions: pos, sizes: sz };
+ return { positions: pos, sizes: sz, phases: ph, colors: col };
}, []);
useFrame(({ clock }) => {
if (!pointsRef.current) return;
- // Very slow rotation for living sky feel
pointsRef.current.rotation.y = clock.getElapsedTime() * 0.003;
+ if (matRef.current) {
+ matRef.current.uniforms.uTime.value = clock.getElapsedTime();
+ }
});
return (
<points ref={pointsRef}>
<bufferGeometry>
- <bufferAttribute
- attach="attributes-position"
- count={positions.length / 3}
- array={positions}
- itemSize={3}
- />
- <bufferAttribute
- attach="attributes-size"
- count={sizes.length}
- array={sizes}
- itemSize={1}
- />
+ <bufferAttribute attach="attributes-position" count={positions.length / 3} array={positions} itemSize={3} />
+ <bufferAttribute attach="attributes-size" count={sizes.length} array={sizes} itemSize={1} />
+ <bufferAttribute attach="attributes-phase" count={phases.length} array={phases} itemSize={1} />
+ <bufferAttribute attach="attributes-starColor" count={colors.length / 3} array={colors} itemSize={3} />
</bufferGeometry>
- <pointsMaterial
- color="#ffffff"
- size={0.15}
- sizeAttenuation
+ <shaderMaterial
+ ref={matRef}
+ vertexShader={STAR_VERT}
+ fragmentShader={STAR_FRAG}
+ uniforms={{ uTime: { value: 0 } }}
transparent
- opacity={0.8}
blending={THREE.AdditiveBlending}
depthWrite={false}
+ fog={false}
/>
</points>
);
diff --git a/client/src/components/city/cityConstants.js b/client/src/components/city/cityConstants.js
index 11640f393f..1ff8b70f9d 100644
--- a/client/src/components/city/cityConstants.js
+++ b/client/src/components/city/cityConstants.js
@@ -11,7 +11,7 @@ export const CITY_COLORS = {
stopped: '#f59e0b',
not_started: '#6366f1',
not_found: '#6366f1',
- archived: '#1e293b',
+ archived: '#475569',
},
buildingBody: '#080816',
particles: '#06b6d4',
@@ -32,7 +32,7 @@ export const BUILDING_PARAMS = {
stopped: 2.5,
not_started: 1.5,
not_found: 1.5,
- archived: 1.0,
+ archived: 2.0,
},
processHeightBonus: 0.8,
// Height variation: seeded by app name hash for consistent randomness
@@ -41,7 +41,7 @@ export const BUILDING_PARAMS = {
export const DISTRICT_PARAMS = {
warehouseOffset: 18,
- gap: 6,
+ gap: 4,
};
// Simple string hash for consistent per-app randomness