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

make City in-world labels legible in daytime across all 8 themes

[._.]/ Adam Eivyd0f275297545
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 7b6ca022e0..0a61240c37 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -13,4 +13,5 @@
- **City navigation is now map-style** — in orbital view, left-drag pans the camera across the city (so you can reach off-center districts without dropping into first-person), scroll zooms, right-drag (or ctrl-drag on a Mac trackpad) rotates, and arrow keys pan. Previously the only way to look away from the center was first-person mode.
- **City follows your PortOS theme** — the HUD panels (now fully opaque for readability) and the 3D scene's accent surfaces (ground grid, particles, online buildings, neon, and the CRT edge-glow) recolor to the active theme instead of being locked to dark cyan-on-black. The CRT affectations are opt-in per theme family: scanlines only on the terminal family, neon edge-glow on terminal + classic, and a cinematic vignette on all but the clean glass family. Status colors (stopped/red, warnings/amber) stay semantic.
- **City time-of-day follows your theme (day/night), with a real daytime look** — the old four-way sunrise/noon/sunset/midnight picker is now Auto/Day/Night. Auto (the default) renders a bright daytime city under light themes and a dark neon city under dark themes; you can still force Day or Night. Daytime is now a genuine bright, sunlit style rather than dusk: the night-tuned color grade, bloom, film grain, and chromatic aberration fade out in daylight; the sky opens to a luminous blue with high-key sun + sky fill; the ground sheds its neon grid and wet-street glow; and buildings shed their neon (edge strips, halos, base glow) to read as light, sunlit solids. The dark neon night look is unchanged. Existing installs pick up the coupling automatically (any previously-saved time-of-day reads as Auto).
+- **City labels stay readable in daytime** — in the daytime view, the in-world text labels (app and process names, plus every district readout — goals, health, task queue, memory, Jira, AI core, productivity, backup, federation mesh, voice, review/instance beacons, and the archive-district sign) no longer wash out against the bright sky. At night they keep their neon glow; as day comes up they switch to dark ink with a soft light halo so they read against sunlit buildings and the open sky. Decorative neon signage still dims in daylight, as it should. Works across all eight themes (four day, four night). No change to the night look.
- **[issue-875] CyberCity district layout internals consolidated** — the city's districts now share one set of layout primitives for grid placement, category tallies, and log-scaled building heights, so each district no longer carries its own copy of that math. No visible change to the city.
diff --git a/client/src/components/city/Building.jsx b/client/src/components/city/Building.jsx
index 119a1925c9..bccf9c54c6 100644
--- a/client/src/components/city/Building.jsx
+++ b/client/src/components/city/Building.jsx
@@ -1,8 +1,8 @@
import { useRef, useState, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
import * as THREE from 'three';
import { getBuildingColor, getBuildingHeight, getAccentColor, CITY_COLORS, BUILDING_PARAMS, PIXEL_FONT_URL, mixHex } from './cityConstants';
+import CityLabel from './CityLabel';
import HolographicPanel from './HolographicPanel';
import BuildingHologram from './BuildingHologram';
@@ -421,11 +421,12 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
</>
)}
- {/* Building name on front face - pixel font */}
- <Text
+ {/* Building name on front face - pixel font (dark ink + halo by day) */}
+ <CityLabel
position={[0, height * 0.88, depth / 2 + 0.02]}
fontSize={0.2}
color={edgeColor}
+ dayMix={dayMix}
fillOpacity={dimMul}
anchorX="center"
anchorY="middle"
@@ -433,13 +434,14 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
maxWidth={width * 0.9}
>
{displayName}
- </Text>
+ </CityLabel>
{/* Building name on back face */}
- <Text
+ <CityLabel
position={[0, height * 0.88, -(depth / 2 + 0.02)]}
fontSize={0.2}
color={edgeColor}
+ dayMix={dayMix}
fillOpacity={dimMul}
anchorX="center"
anchorY="middle"
@@ -448,13 +450,14 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
maxWidth={width * 0.9}
>
{displayName}
- </Text>
+ </CityLabel>
{/* Name on left side */}
- <Text
+ <CityLabel
position={[-(width / 2 + 0.02), height * 0.88, 0]}
fontSize={0.18}
color={accentColor}
+ dayMix={dayMix}
fillOpacity={dimMul}
anchorX="center"
anchorY="middle"
@@ -463,7 +466,7 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
maxWidth={depth * 0.85}
>
{displayName}
- </Text>
+ </CityLabel>
{/* Base glow circle - wider and brighter (night only) */}
{!daytime && (
diff --git a/client/src/components/city/BuildingCluster.jsx b/client/src/components/city/BuildingCluster.jsx
index d5f5b8761d..e28125470e 100644
--- a/client/src/components/city/BuildingCluster.jsx
+++ b/client/src/components/city/BuildingCluster.jsx
@@ -1,11 +1,12 @@
import { useMemo, useEffect } from 'react';
-import { Text } from '@react-three/drei';
import { computeCityLayout } from './cityLayout';
-import { DISTRICT_PARAMS, PIXEL_FONT_URL } from './cityConstants';
+import { DISTRICT_PARAMS, PIXEL_FONT_URL, cityDayMix } from './cityConstants';
import Borough from './Borough';
+import CityLabel from './CityLabel';
export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPositionsReady, playSfx, settings, proximityAppId, dimmedAppIds }) {
const positions = useMemo(() => computeCityLayout(apps), [apps]);
+ const dayMix = cityDayMix(settings);
// Notify parent when positions change (for data streams, roads, traffic)
useEffect(() => {
@@ -44,18 +45,19 @@ export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPos
);
})}
- {/* Warehouse district label - pixel font */}
+ {/* Warehouse district label - pixel font (dark ink + halo by day) */}
{hasArchived && (
- <Text
+ <CityLabel
position={[0, 1.5, warehouseMinZ - 2]}
fontSize={0.8}
color="#475569"
+ dayMix={dayMix}
anchorX="center"
anchorY="middle"
font={PIXEL_FONT_URL}
>
ARCHIVE DISTRICT
- </Text>
+ </CityLabel>
)}
</group>
);
diff --git a/client/src/components/city/CityAiCore.jsx b/client/src/components/city/CityAiCore.jsx
index 452993f4bb..480e3fd84d 100644
--- a/client/src/components/city/CityAiCore.jsx
+++ b/client/src/components/city/CityAiCore.jsx
@@ -1,8 +1,8 @@
import { useMemo, useRef } from 'react';
import * as THREE from 'three';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeAiCore, computeAiCoreBeams, AI_CORE } from '../../utils/cityAiCore';
// CyberCity's AI Core landmark (roadmap 2.1): a slender central spire above downtown from
@@ -81,6 +81,7 @@ export default function CityAiCore({ aiActivity, positions, apps, settings }) {
const apexRef = useRef();
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
const { position, height, apexY, color } = core;
// Per-op beams: targeted at the originating building when known, radial otherwise.
@@ -122,13 +123,13 @@ export default function CityAiCore({ aiActivity, positions, apps, settings }) {
))}
</group>
{/* Label above the apex */}
- <Text position={[0, apexY + 2.6, 0]} fontSize={1.4} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <CityLabel position={[0, apexY + 2.6, 0]} fontSize={1.4} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
AI CORE
- </Text>
+ </CityLabel>
{core.busy && (
- <Text position={[0, apexY + 1.5, 0]} fontSize={0.85} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <CityLabel position={[0, apexY + 1.5, 0]} fontSize={0.85} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
{`${core.activeCount} ACTIVE`}
- </Text>
+ </CityLabel>
)}
</group>
);
diff --git a/client/src/components/city/CityArtifacts.jsx b/client/src/components/city/CityArtifacts.jsx
index c528927c90..5f537cd019 100644
--- a/client/src/components/city/CityArtifacts.jsx
+++ b/client/src/components/city/CityArtifacts.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeArtifacts, ARTIFACTS } from '../../utils/cityArtifacts';
// CyberCity's earned artifacts (roadmap 3.5): a "Hall of Achievements" cluster of trophies
@@ -10,7 +10,7 @@ import { computeArtifacts, ARTIFACTS } from '../../utils/cityArtifacts';
// — visually distinct from the goal monuments' tower/scaffold so milestones don't read as
// goals. The emblems shimmer in unison via a single per-frame ref mutation, gated on the
// quality dial. Mirrors CityGoalMonuments / CityProductivityDistrict.
-function Artifact({ artifact }) {
+function Artifact({ artifact, dayMix = 0 }) {
const { color, intensity, label, position } = artifact;
const { pedestalWidth: pw, pedestalHeight: ph, emblemSize } = ARTIFACTS;
const emblemY = ph + emblemSize * 0.6;
@@ -33,9 +33,9 @@ function Artifact({ artifact }) {
<pointLight position={[0, emblemY, 0]} color={color} intensity={intensity * 1.5} distance={10} />
{/* Label below the pedestal */}
- <Text position={[0, ph + emblemSize * 1.7, 0]} fontSize={0.5} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
+ <CityLabel position={[0, ph + emblemSize * 1.7, 0]} fontSize={0.5} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
{label}
- </Text>
+ </CityLabel>
</group>
);
}
@@ -53,6 +53,7 @@ export default function CityArtifacts({ character, goals, productivityData, sett
// Honor the quality dial: drop the shimmer on the lowest preset, but keep the static glow so
// earned artifacts stay legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !groupRef.current) return;
@@ -69,17 +70,17 @@ export default function CityArtifacts({ character, goals, productivityData, sett
<group>
<group ref={groupRef}>
{artifacts.map((artifact) => (
- <Artifact key={artifact.id} artifact={artifact} />
+ <Artifact key={artifact.id} artifact={artifact} dayMix={dayMix} />
))}
</group>
{/* District title behind the cluster */}
- <Text position={[base[0], 10, base[2] + 4]} fontSize={1.2} color="#f59e0b" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
+ <CityLabel position={[base[0], 10, base[2] + 4]} fontSize={1.2} color="#f59e0b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
ACHIEVEMENTS
- </Text>
- <Text position={[base[0], 9, base[2] + 4]} fontSize={0.7} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
+ </CityLabel>
+ <CityLabel position={[base[0], 9, base[2] + 4]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
{`${total} EARNED`}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CityBackupVault.jsx b/client/src/components/city/CityBackupVault.jsx
index 269e306656..5a91b5536c 100644
--- a/client/src/components/city/CityBackupVault.jsx
+++ b/client/src/components/city/CityBackupVault.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeBackupVault } from '../../utils/cityBackupVault';
import { timeAgo } from '../../utils/formatters';
@@ -17,6 +17,7 @@ export default function CityBackupVault({ backupStatus, settings }) {
// Honor the quality dial: drop the seal pulse on the lowest preset, but keep the
// static glow so the vault's health is still legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !sealRef.current) return;
@@ -56,12 +57,12 @@ export default function CityBackupVault({ backupStatus, settings }) {
<meshStandardMaterial color={color} emissive={color} emissiveIntensity={vault.intensity} toneMapped={false} />
</mesh>
{/* Label + status/time-since sublabel above the vault */}
- <Text position={[0, height + 1.7, 0]} fontSize={1.3} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
+ <CityLabel position={[0, height + 1.7, 0]} fontSize={1.3} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
VAULT
- </Text>
- <Text position={[0, height + 0.85, 0]} fontSize={0.85} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
+ </CityLabel>
+ <CityLabel position={[0, height + 0.85, 0]} fontSize={0.85} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
{sublabel}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CityEasterEggs.jsx b/client/src/components/city/CityEasterEggs.jsx
index 9a56259412..ac60004a2b 100644
--- a/client/src/components/city/CityEasterEggs.jsx
+++ b/client/src/components/city/CityEasterEggs.jsx
@@ -1,8 +1,8 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
import { useTimeTick } from '../../hooks/useTimeTick';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeEasterEggs, EGGS } from '../../utils/cityEasterEggs';
// CyberCity's easter eggs (roadmap 3.5 follow-up, #824): rare, hidden emblems that only appear
@@ -10,7 +10,7 @@ import { computeEasterEggs, EGGS } from '../../utils/cityEasterEggs';
// clean-sweep goal board). Tucked in a quiet far corner so they read as a discovery, not a
// featured district. Each egg is a small glowing icosahedron with a tiny glyph label; they bob
// (each on its own phase offset) gated on the quality dial (mirrors CityArtifacts).
-function Egg({ egg, animate }) {
+function Egg({ egg, animate, dayMix = 0 }) {
const { color, label, hint, position, phase } = egg;
const s = EGGS.size;
const ref = useRef();
@@ -35,15 +35,15 @@ function Egg({ egg, animate }) {
<pointLight color={color} intensity={1.1} distance={8} />
{/* Tiny glyph so the egg hints at what it is without spelling it out. */}
- <Text position={[0, s + 0.5, 0]} fontSize={0.45} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
+ <CityLabel position={[0, s + 0.5, 0]} fontSize={0.45} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
{label}
- </Text>
+ </CityLabel>
{/* A muted hint sits below the glyph — the discovery payoff up close, kept small and dim
so eggs still read as "hidden" from across the city. */}
- <Text position={[0, s - 0.4, 0]} fontSize={0.28} color="#64748b" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={8}>
+ <CityLabel position={[0, s - 0.4, 0]} fontSize={0.28} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={8}>
{hint}
- </Text>
+ </CityLabel>
</group>
</group>
);
@@ -61,6 +61,7 @@ export default function CityEasterEggs({ date, character, goals, productivityDat
// Honor the quality dial: drop the bob on the lowest preset, keep the static glow.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
if (!cluster.hasData) return null;
@@ -69,13 +70,13 @@ export default function CityEasterEggs({ date, character, goals, productivityDat
return (
<group>
{eggs.map((egg) => (
- <Egg key={egg.id} egg={egg} animate={animate} />
+ <Egg key={egg.id} egg={egg} animate={animate} dayMix={dayMix} />
))}
{/* A faint marker so a found cluster has a label, kept small to preserve the "hidden" feel. */}
- <Text position={[base[0], 6, base[2]]} fontSize={0.7} color="#64748b" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <CityLabel position={[base[0], 6, base[2]]} fontSize={0.7} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
:)
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CityFederationHorizon.jsx b/client/src/components/city/CityFederationHorizon.jsx
index ad15044afd..cd7523d83f 100644
--- a/client/src/components/city/CityFederationHorizon.jsx
+++ b/client/src/components/city/CityFederationHorizon.jsx
@@ -1,8 +1,8 @@
import { useMemo, useRef, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
import * as THREE from 'three';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeFederationHorizon, FEDERATION } from '../../utils/cityFederation';
// The sync link reaching inward from a peer toward the city. Solid + bright when
@@ -47,7 +47,7 @@ function FederationBridge({ from, color, broken, intensity }) {
}
// A distant peer (or the void marker) rendered as a neon-trimmed silhouette.
-function Monolith({ position, width, height, color, opacity, label, sublabel, online, animate }) {
+function Monolith({ position, width, height, color, opacity, label, sublabel, online, animate, dayMix = 0 }) {
const capRef = useRef();
useFrame(({ clock }) => {
@@ -76,14 +76,14 @@ function Monolith({ position, width, height, color, opacity, label, sublabel, on
<meshStandardMaterial color={color} emissive={color} emissiveIntensity={online ? 0.9 : 0.4} transparent opacity={Math.min(1, opacity + 0.4)} depthWrite={false} />
</mesh>
{label && (
- <Text position={[0, height + 2.2, 0]} fontSize={1.6} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <CityLabel position={[0, height + 2.2, 0]} fontSize={1.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
{label}
- </Text>
+ </CityLabel>
)}
{sublabel && (
- <Text position={[0, height + 0.9, 0]} fontSize={1.0} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <CityLabel position={[0, height + 0.9, 0]} fontSize={1.0} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
{sublabel}
- </Text>
+ </CityLabel>
)}
</group>
);
@@ -98,6 +98,7 @@ export default function CityFederationHorizon({ instances, settings }) {
// The horizon is a handful of distant static meshes, but honor the quality
// dial: drop the gentle peer pulse on the lowest preset.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
return (
<group>
@@ -113,6 +114,7 @@ export default function CityFederationHorizon({ instances, settings }) {
sublabel={peer.online ? 'LINKED' : peer.status.toUpperCase()}
online={peer.online}
animate={animate}
+ dayMix={dayMix}
/>
<FederationBridge from={peer.position} color={peer.color} broken={peer.bridge.broken} intensity={peer.bridge.intensity} />
</group>
@@ -128,6 +130,7 @@ export default function CityFederationHorizon({ instances, settings }) {
sublabel="PRIMARY"
online={false}
animate={false}
+ dayMix={dayMix}
/>
</group>
);
diff --git a/client/src/components/city/CityGoalMonuments.jsx b/client/src/components/city/CityGoalMonuments.jsx
index dba5d5c695..be219c648f 100644
--- a/client/src/components/city/CityGoalMonuments.jsx
+++ b/client/src/components/city/CityGoalMonuments.jsx
@@ -1,8 +1,8 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
import CityTubeLine from './CityTubeLine';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeGoalMonuments, computeGoalForest, MONUMENTS, FOREST } from '../../utils/cityGoalMonuments';
// CyberCity's goal monuments (roadmap 2.7): each life goal is a structure in a
@@ -85,7 +85,7 @@ function MonumentBody({ monument, shimmerRef, isShimmer }) {
);
}
-function Monument({ monument, shimmerRef, isShimmer }) {
+function Monument({ monument, shimmerRef, isShimmer, dayMix = 0 }) {
const { height, width, color, opacity, intensity, position, milestoneTotal, milestoneDone, isSpire } = monument;
return (
@@ -99,12 +99,12 @@ function Monument({ monument, shimmerRef, isShimmer }) {
<MonumentBody monument={monument} shimmerRef={shimmerRef} isShimmer={isShimmer} />
{/* Title + progress label above the structure */}
- <Text position={[0, height + 1.4, 0]} fontSize={isSpire ? 0.85 : 0.7} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
+ <CityLabel position={[0, height + 1.4, 0]} fontSize={isSpire ? 0.85 : 0.7} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
{monument.title}
- </Text>
- <Text position={[0, height + 0.7, 0]} fontSize={0.55} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
+ </CityLabel>
+ <CityLabel position={[0, height + 0.7, 0]} fontSize={0.55} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
{monument.built ? 'COMPLETE' : milestoneTotal > 0 ? `${milestoneDone}/${milestoneTotal} STEPS` : `${Math.round(monument.progress)}%`}
- </Text>
+ </CityLabel>
</group>
);
}
@@ -113,19 +113,19 @@ function Monument({ monument, shimmerRef, isShimmer }) {
// parent→child structure; otherwise the flat row renders instead. The layout shows two
// visible levels; a child's deeper sub-tree is summarized by a "+N UNDER" badge and roots
// past the cap fold into a "+N MORE GOALS" marker, so nothing is silently dropped.
-function GoalForest({ forest, shimmerRef, shimmerId }) {
+function GoalForest({ forest, shimmerRef, shimmerId, dayMix = 0 }) {
return (
<group>
{forest.clusters.map((cluster) => (
<group key={cluster.spire.id}>
- <Monument monument={cluster.spire} shimmerRef={shimmerRef} isShimmer={cluster.spire.id === shimmerId} />
+ <Monument monument={cluster.spire} shimmerRef={shimmerRef} isShimmer={cluster.spire.id === shimmerId} dayMix={dayMix} />
{cluster.children.map((child) => (
<group key={child.id}>
- <Monument monument={child} shimmerRef={shimmerRef} isShimmer={child.id === shimmerId} />
+ <Monument monument={child} shimmerRef={shimmerRef} isShimmer={child.id === shimmerId} dayMix={dayMix} />
{child.descendantCount > 0 && (
- <Text position={[child.position[0], child.height + 1.9, child.position[2]]} fontSize={0.42} color="#64748b" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <CityLabel position={[child.position[0], child.height + 1.9, child.position[2]]} fontSize={0.42} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${child.descendantCount} UNDER`}
- </Text>
+ </CityLabel>
)}
</group>
))}
@@ -139,16 +139,16 @@ function GoalForest({ forest, shimmerRef, shimmerId }) {
/>
))}
{cluster.childOverflow > 0 && (
- <Text position={[cluster.spire.position[0], cluster.spire.height + 2.1, cluster.spire.position[2]]} fontSize={0.5} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <CityLabel position={[cluster.spire.position[0], cluster.spire.height + 2.1, cluster.spire.position[2]]} fontSize={0.5} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${cluster.childOverflow} SUB-GOALS`}
- </Text>
+ </CityLabel>
)}
</group>
))}
{/* Root overflow — top-level goal trees past the cap, mirroring the flat row's marker */}
{forest.rootOverflow > 0 && forest.clusters.length > 0 && (
- <Text
+ <CityLabel
position={[
forest.clusters[forest.clusters.length - 1].spire.position[0] + FOREST.clusterSpacing / 2,
MONUMENTS.minHeight + 2,
@@ -156,13 +156,14 @@ function GoalForest({ forest, shimmerRef, shimmerId }) {
]}
fontSize={0.6}
color="#94a3b8"
+ dayMix={dayMix}
anchorX="center"
anchorY="middle"
font={PIXEL_FONT_URL}
maxWidth={12}
>
{`+${forest.rootOverflow} MORE GOALS`}
- </Text>
+ </CityLabel>
)}
</group>
);
@@ -183,6 +184,7 @@ export default function CityGoalMonuments({ goals, settings }) {
// Honor the quality dial: drop the completed-monument shimmer on the lowest preset,
// but keep the static glow so each goal's status stays legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
// Pick the first completed monument to carry the shimmer (one per-frame ref mutation).
// In forest mode, scan spires then children; in row mode, scan the row.
@@ -219,7 +221,7 @@ export default function CityGoalMonuments({ goals, settings }) {
return (
<group>
{useForest ? (
- <GoalForest forest={forest} shimmerRef={shimmerRef} shimmerId={shimmer?.id} />
+ <GoalForest forest={forest} shimmerRef={shimmerRef} shimmerId={shimmer?.id} dayMix={dayMix} />
) : (
<>
{monuments.map((monument) => (
@@ -228,6 +230,7 @@ export default function CityGoalMonuments({ goals, settings }) {
monument={monument}
shimmerRef={shimmerRef}
isShimmer={monument.id === shimmer?.id}
+ dayMix={dayMix}
/>
))}
@@ -238,21 +241,21 @@ export default function CityGoalMonuments({ goals, settings }) {
<boxGeometry args={[MONUMENTS.baseWidth, MONUMENTS.minHeight, MONUMENTS.baseWidth]} />
<meshStandardMaterial color="#0c1424" emissive="#64748b" emissiveIntensity={0.2} metalness={0.5} roughness={0.6} />
</mesh>
- <Text position={[0, MONUMENTS.minHeight + 1, 0]} fontSize={0.6} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <CityLabel position={[0, MONUMENTS.minHeight + 1, 0]} fontSize={0.6} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${overflow.count} MORE`}
- </Text>
+ </CityLabel>
</group>
)}
</>
)}
{/* District title behind the row */}
- <Text position={[base[0], 16, base[2] - 3]} fontSize={1.4} color="#22c55e" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <CityLabel position={[base[0], 16, base[2] - 3]} fontSize={1.4} color="#22c55e" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
GOALS
- </Text>
- <Text position={[base[0], 15, base[2] - 3]} fontSize={0.8} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ </CityLabel>
+ <CityLabel position={[base[0], 15, base[2] - 3]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
{`${completedCount}/${total} ACHIEVED`}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CityHealthTower.jsx b/client/src/components/city/CityHealthTower.jsx
index f7cb4e1a6b..3fea897495 100644
--- a/client/src/components/city/CityHealthTower.jsx
+++ b/client/src/components/city/CityHealthTower.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeHealthTower } from '../../utils/cityHealthTower';
// CyberCity's biometric vitals tower (roadmap 2.9): a stacked cylindrical landmark in a
@@ -34,6 +34,7 @@ export default function CityHealthTower({ healthMetrics, settings }) {
// Honor the quality dial: drop the heartbeat pulse on the lowest preset, but keep the
// static glow so the vitals stay legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !heartRef.current || !tower.heartPresent) return;
@@ -68,27 +69,28 @@ export default function CityHealthTower({ healthMetrics, settings }) {
{/* Per-segment side labels so each tier is identifiable */}
{segments.map((segment) => (
- <Text
+ <CityLabel
key={`label-${segment.key}`}
position={[baseRadius + 0.6, segment.y, 0]}
fontSize={0.55}
color={segment.present ? segment.color : '#64748b'}
+ dayMix={dayMix}
anchorX="left"
anchorY="middle"
font={PIXEL_FONT_URL}
maxWidth={14}
>
{segment.present ? `${segment.label} ${segment.value}${segment.unit ? ' ' + segment.unit : ''}` : `${segment.label} —`}
- </Text>
+ </CityLabel>
))}
{/* Tower title + status above the stack */}
- <Text position={[0, totalHeight + 1.6, 0]} fontSize={1.2} color="#22c55e" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
+ <CityLabel position={[0, totalHeight + 1.6, 0]} fontSize={1.2} color="#22c55e" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
VITALS
- </Text>
- <Text position={[0, totalHeight + 0.8, 0]} fontSize={0.8} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
+ </CityLabel>
+ <CityLabel position={[0, totalHeight + 0.8, 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
{hasData ? `${tower.presentCount}/${segments.length} TRACKED` : 'NO HEALTH DATA'}
- </Text>
+ </CityLabel>
</group>
</group>
);
diff --git a/client/src/components/city/CityJiraDistrict.jsx b/client/src/components/city/CityJiraDistrict.jsx
index e8210503fd..52442d8e48 100644
--- a/client/src/components/city/CityJiraDistrict.jsx
+++ b/client/src/components/city/CityJiraDistrict.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeJiraDistrict, JIRA_DISTRICT } from '../../utils/cityJiraDistrict';
// CyberCity's JIRA sprint district (roadmap 3.7): the current sprint's tickets become a small
@@ -67,6 +67,7 @@ export default function CityJiraDistrict({ jiraTickets, settings }) {
const pulseRef = useRef();
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
// The first in-progress structure carries a breathing scaffold glow (one ref mutation/frame).
const pulseKey = useMemo(
@@ -98,18 +99,18 @@ export default function CityJiraDistrict({ jiraTickets, settings }) {
{/* Overflow marker — tickets past the render cap */}
{overflow > 0 && overflowPosition && (
- <Text position={[overflowPosition[0], 1.4, overflowPosition[2]]} fontSize={0.5} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <CityLabel position={[overflowPosition[0], 1.4, overflowPosition[2]]} fontSize={0.5} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${overflow} MORE`}
- </Text>
+ </CityLabel>
)}
{/* District title + sprint progress */}
- <Text position={[base[0], 12, base[2] - 2]} fontSize={1.2} color="#3b82f6" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <CityLabel position={[base[0], 12, base[2] - 2]} fontSize={1.2} color="#3b82f6" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
SPRINT
- </Text>
- <Text position={[base[0], 11.1, base[2] - 2]} fontSize={0.72} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ </CityLabel>
+ <CityLabel position={[base[0], 11.1, base[2] - 2]} fontSize={0.72} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
{`${counts.done}/${total} DONE · ${counts.inProgress} IN PROGRESS`}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CityLabel.jsx b/client/src/components/city/CityLabel.jsx
new file mode 100644
index 0000000000..5b599b31d5
--- /dev/null
+++ b/client/src/components/city/CityLabel.jsx
@@ -0,0 +1,29 @@
+import { forwardRef } from 'react';
+import { Text } from '@react-three/drei';
+import { cityLabelColors } from './cityConstants';
+
+// A drei <Text> for an informational in-world label (app/process names, district
+// readouts) that stays legible day AND night. Pass the night/neon `color` plus the
+// scene `dayMix` (0 night → 1 day); the label keeps its neon fill at night and swaps
+// to dark ink + a light outline halo as day ramps up. Every other <Text> prop
+// (position, fontSize, font, anchorX, fillOpacity, children, …) passes straight
+// through. A caller may still override `outlineColor` explicitly.
+//
+// Use this for content the user needs to READ in daytime. Decorative neon signage
+// (CityNeonSigns, ambient billboards) intentionally does NOT use it — neon should
+// dim in daylight like the real thing.
+const CityLabel = forwardRef(function CityLabel({ color, dayMix = 0, outlineColor, ...props }, ref) {
+ const themed = cityLabelColors(color, dayMix);
+ return (
+ <Text
+ ref={ref}
+ {...props}
+ color={themed.color}
+ outlineColor={outlineColor ?? themed.outlineColor}
+ outlineWidth={themed.outlineWidth}
+ outlineOpacity={themed.outlineOpacity}
+ />
+ );
+});
+
+export default CityLabel;
diff --git a/client/src/components/city/CityMemoryDistrict.jsx b/client/src/components/city/CityMemoryDistrict.jsx
index 687ba6cdb3..2e6040a23a 100644
--- a/client/src/components/city/CityMemoryDistrict.jsx
+++ b/client/src/components/city/CityMemoryDistrict.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import CityTubeLine from './CityTubeLine';
import { computeMemoryDistrict, MEMORY_DISTRICT } from '../../utils/cityMemoryDistrict';
@@ -16,7 +16,7 @@ import { computeMemoryDistrict, MEMORY_DISTRICT } from '../../utils/cityMemoryDi
// One category's crystal cluster: a small ring of octahedra of varying height around the
// cluster center, plus a category label. The tallest crystal carries the cluster's breathing
// glow (one per-frame ref mutation per cluster).
-function CrystalCluster({ cluster, glowRef, isGlow }) {
+function CrystalCluster({ cluster, glowRef, isGlow, dayMix = 0 }) {
const { position, color, height, crystals, label, count, isOverflow } = cluster;
// Arrange the crystals in a tight ring; the count is already capped in the helper.
const ring = useMemo(() => {
@@ -59,12 +59,12 @@ function CrystalCluster({ cluster, glowRef, isGlow }) {
/>
</mesh>
))}
- <Text position={[0, height + 1.3, 0]} fontSize={0.6} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <CityLabel position={[0, height + 1.3, 0]} fontSize={0.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{label}
- </Text>
- <Text position={[0, height + 0.7, 0]} fontSize={0.42} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ </CityLabel>
+ <CityLabel position={[0, height + 0.7, 0]} fontSize={0.42} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{count}
- </Text>
+ </CityLabel>
</group>
);
}
@@ -75,6 +75,7 @@ export default function CityMemoryDistrict({ memoryGraph, inboxDepth = 0, settin
const wellRef = useRef();
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
// The brightest (most important) cluster carries the breathing glow.
const glowCategory = useMemo(() => {
@@ -115,6 +116,7 @@ export default function CityMemoryDistrict({ memoryGraph, inboxDepth = 0, settin
cluster={cluster}
glowRef={glowRef}
isGlow={cluster.category === glowCategory}
+ dayMix={dayMix}
/>
))}
@@ -142,19 +144,19 @@ export default function CityMemoryDistrict({ memoryGraph, inboxDepth = 0, settin
<meshStandardMaterial color={wellColor} emissive={wellColor} emissiveIntensity={0.4} side={2} toneMapped={false} transparent opacity={0.85} />
</mesh>
{inboxActive && (
- <Text position={[0, 1.2, 0]} fontSize={0.5} color="#06b6d4" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <CityLabel position={[0, 1.2, 0]} fontSize={0.5} color="#06b6d4" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`${inboxDepth} TO SORT`}
- </Text>
+ </CityLabel>
)}
</group>
{/* District title */}
- <Text position={[base[0], 14, base[2] - 3]} fontSize={1.3} color="#8b5cf6" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <CityLabel position={[base[0], 14, base[2] - 3]} fontSize={1.3} color="#8b5cf6" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
MEMORY
- </Text>
- <Text position={[base[0], 13, base[2] - 3]} fontSize={0.75} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ </CityLabel>
+ <CityLabel position={[base[0], 13, base[2] - 3]} fontSize={0.75} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
{`${totalMemories} MEMORIES`}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CityProductivityDistrict.jsx b/client/src/components/city/CityProductivityDistrict.jsx
index 1de15ebc18..e904cfd464 100644
--- a/client/src/components/city/CityProductivityDistrict.jsx
+++ b/client/src/components/city/CityProductivityDistrict.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeProductivityMonument } from '../../utils/cityProductivity';
// CyberCity's productivity district (roadmap 2.6): a tapered streak monument (an obelisk on
@@ -17,6 +17,7 @@ export default function CityProductivityDistrict({ productivityData, settings })
// Honor the quality dial: drop the capstone pulse on the lowest preset, but keep the
// static glow so the streak is still legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !capRef.current) return;
@@ -64,18 +65,18 @@ export default function CityProductivityDistrict({ productivityData, settings })
</mesh>
{/* District title + streak above the monument */}
- <Text position={[0, shaftTop + 2.6, 0]} fontSize={1.3} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
+ <CityLabel position={[0, shaftTop + 2.6, 0]} fontSize={1.3} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
{monument.streakLabel}
- </Text>
- <Text position={[0, shaftTop + 1.7, 0]} fontSize={0.8} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
+ </CityLabel>
+ <CityLabel position={[0, shaftTop + 1.7, 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
{sublabel}
- </Text>
+ </CityLabel>
</group>
{/* Ground readout of today's throughput */}
- <Text position={[0, 0.05, baseWidth * 1.1]} rotation={[-Math.PI / 2, 0, 0]} fontSize={0.7} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
+ <CityLabel position={[0, 0.05, baseWidth * 1.1]} rotation={[-Math.PI / 2, 0, 0]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
{monument.completedToday !== null ? `TODAY ${monument.completedToday} DONE` : 'PRODUCTIVITY'}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CityScene.jsx b/client/src/components/city/CityScene.jsx
index 28686eea2d..ce26bd1205 100644
--- a/client/src/components/city/CityScene.jsx
+++ b/client/src/components/city/CityScene.jsx
@@ -144,7 +144,7 @@ export default function CityScene({ apps, agentMap, onBuildingClick, cosStatus,
instances={instances}
productivityData={productivityData}
/>
- <CitySignalBeacons positions={positions} reviewCounts={reviewCounts} instances={instances} />
+ <CitySignalBeacons positions={positions} reviewCounts={reviewCounts} instances={instances} settings={settings} />
<CityVolumetricLights positions={positions} />
<CityNeonSigns positions={positions} />
<CityWeather stoppedCount={stoppedCount} totalCount={totalCount} playSfx={playSfx} />
diff --git a/client/src/components/city/CitySeasonalDecor.jsx b/client/src/components/city/CitySeasonalDecor.jsx
index fd3f58e908..521d2814c4 100644
--- a/client/src/components/city/CitySeasonalDecor.jsx
+++ b/client/src/components/city/CitySeasonalDecor.jsx
@@ -1,8 +1,8 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
import { useTimeTick } from '../../hooks/useTimeTick';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeSeasonalDecor, SEASONAL_DECOR } from '../../utils/citySeasonalDecor';
// CyberCity's seasonal decorations (roadmap 3.5 follow-up, #824): date-driven city dressing
@@ -58,6 +58,7 @@ export default function CitySeasonalDecor({ date, settings }) {
// Honor the quality dial: drop the bob/shimmer on the lowest preset, keep the static glow.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
if (!decor.hasData) return null;
@@ -70,9 +71,9 @@ export default function CitySeasonalDecor({ date, settings }) {
))}
{/* Season/holiday banner high above the city center so it reads as ambient context. */}
- <Text position={[base[0], 34, base[2]]} fontSize={1.6} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={40}>
+ <CityLabel position={[base[0], 34, base[2]]} fontSize={1.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={40}>
{label}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/CitySignalBeacons.jsx b/client/src/components/city/CitySignalBeacons.jsx
index 938f91e353..28380de526 100644
--- a/client/src/components/city/CitySignalBeacons.jsx
+++ b/client/src/components/city/CitySignalBeacons.jsx
@@ -1,10 +1,10 @@
import { useMemo, useRef } from 'react';
-import { Text } from '@react-three/drei';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
-function SignalBeacon({ position, color, label, sublabel, intensity = 1 }) {
+function SignalBeacon({ position, color, label, sublabel, intensity = 1, dayMix = 0 }) {
const groupRef = useRef();
const glowRef = useRef();
const beamRef = useRef();
@@ -47,34 +47,37 @@ function SignalBeacon({ position, color, label, sublabel, intensity = 1 }) {
<meshBasicMaterial color={color} transparent opacity={0.18} blending={THREE.AdditiveBlending} depthWrite={false} />
</mesh>
- <Text
+ <CityLabel
position={[0, 5.9, 0]}
fontSize={0.32}
color={color}
+ dayMix={dayMix}
anchorX="center"
anchorY="middle"
font={PIXEL_FONT_URL}
>
{label}
- </Text>
+ </CityLabel>
{sublabel && (
- <Text
+ <CityLabel
position={[0, 5.45, 0]}
fontSize={0.18}
color="#cbd5e1"
+ dayMix={dayMix}
anchorX="center"
anchorY="middle"
font={PIXEL_FONT_URL}
maxWidth={6}
>
{sublabel}
- </Text>
+ </CityLabel>
)}
</group>
);
}
-export default function CitySignalBeacons({ positions, reviewCounts, instances }) {
+export default function CitySignalBeacons({ positions, reviewCounts, instances, settings }) {
+ const dayMix = cityDayMix(settings);
const config = useMemo(() => {
if (!positions || positions.size === 0) return [];
@@ -123,7 +126,7 @@ export default function CitySignalBeacons({ positions, reviewCounts, instances }
return (
<group>
{config.map(beacon => (
- <SignalBeacon key={beacon.id} {...beacon} />
+ <SignalBeacon key={beacon.id} {...beacon} dayMix={dayMix} />
))}
</group>
);
diff --git a/client/src/components/city/CityTaskQueue.jsx b/client/src/components/city/CityTaskQueue.jsx
index a259710c2c..9b35062c5b 100644
--- a/client/src/components/city/CityTaskQueue.jsx
+++ b/client/src/components/city/CityTaskQueue.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeTaskQueue, TASK_QUEUE } from '../../utils/cityTaskQueue';
// CyberCity's CoS task-queue silhouette (roadmap 2.2): a warehouse east of downtown with
@@ -32,6 +32,7 @@ export default function CityTaskQueue({ cosTasks, settings }) {
// Honor the quality dial: drop the roof-light pulse on the lowest preset, but keep the
// static glow so the queue state stays legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !roofRef.current) return;
@@ -87,12 +88,12 @@ export default function CityTaskQueue({ cosTasks, settings }) {
)}
{/* Label + count sublabel above the stack */}
- <Text position={[0, stackTop + crateSize * (overflow ? 1.2 : 0.9), 0]} fontSize={1.1} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <CityLabel position={[0, stackTop + crateSize * (overflow ? 1.2 : 0.9), 0]} fontSize={1.1} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
COS QUEUE
- </Text>
- <Text position={[0, stackTop + crateSize * (overflow ? 0.6 : 0.3), 0]} fontSize={0.8} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ </CityLabel>
+ <CityLabel position={[0, stackTop + crateSize * (overflow ? 0.6 : 0.3), 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
{sublabel}
- </Text>
+ </CityLabel>
</group>
</group>
);
diff --git a/client/src/components/city/CityVoiceMarker.jsx b/client/src/components/city/CityVoiceMarker.jsx
index bbf05878bc..8e0fbd8312 100644
--- a/client/src/components/city/CityVoiceMarker.jsx
+++ b/client/src/components/city/CityVoiceMarker.jsx
@@ -1,7 +1,7 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
-import { PIXEL_FONT_URL } from './cityConstants';
+import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import CityLabel from './CityLabel';
import { computeVoiceMarker } from '../../utils/cityVoiceMarker';
// CyberCity's voice-agent district marker (roadmap 2.4): a modest ground-level beacon
@@ -16,6 +16,7 @@ export default function CityVoiceMarker({ voiceState, settings }) {
// Honor the quality dial: drop the beacon pulse on the lowest preset, but keep the
// static glow so the voice state stays legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
+ const dayMix = cityDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !orbRef.current) return;
@@ -50,12 +51,12 @@ export default function CityVoiceMarker({ voiceState, settings }) {
<meshStandardMaterial color={color} emissive={color} emissiveIntensity={marker.intensity} toneMapped={false} />
</mesh>
{/* Label + live-state sublabel above the beacon */}
- <Text position={[0, poleHeight + beaconRadius * 0.6 + 1.6, 0]} fontSize={1} color={color} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
+ <CityLabel position={[0, poleHeight + beaconRadius * 0.6 + 1.6, 0]} fontSize={1} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
VOICE
- </Text>
- <Text position={[0, poleHeight + beaconRadius * 0.6 + 0.9, 0]} fontSize={0.7} color="#94a3b8" anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
+ </CityLabel>
+ <CityLabel position={[0, poleHeight + beaconRadius * 0.6 + 0.9, 0]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
{label}
- </Text>
+ </CityLabel>
</group>
);
}
diff --git a/client/src/components/city/ProcessBuilding.jsx b/client/src/components/city/ProcessBuilding.jsx
index 152e4db5cb..c8f149979f 100644
--- a/client/src/components/city/ProcessBuilding.jsx
+++ b/client/src/components/city/ProcessBuilding.jsx
@@ -1,8 +1,8 @@
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
-import { Text } from '@react-three/drei';
import * as THREE from 'three';
import { CITY_COLORS, PROCESS_BUILDING_PARAMS, PIXEL_FONT_URL, mixHex } from './cityConstants';
+import CityLabel from './CityLabel';
const STATUS_COLORS = {
online: '#06b6d4',
@@ -82,11 +82,12 @@ export default function ProcessBuilding({ process, pm2Status, position, seed, di
<meshBasicMaterial color={color} transparent opacity={0.4 * dimMul * (1 - dayMix * 0.6)} />
</mesh>
- {/* Process name on front face */}
- <Text
+ {/* Process name on front face (dark ink + halo by day) */}
+ <CityLabel
position={[0, height * 0.7, depth / 2 + 0.02]}
fontSize={0.1}
color={color}
+ dayMix={dayMix}
fillOpacity={dimMul}
anchorX="center"
anchorY="middle"
@@ -94,7 +95,7 @@ export default function ProcessBuilding({ process, pm2Status, position, seed, di
maxWidth={width * 0.85}
>
{displayName}
- </Text>
+ </CityLabel>
{/* Blinking tip light */}
<mesh ref={blinkRef} position={[0, height + 0.12, 0]}>
diff --git a/client/src/components/city/cityConstants.js b/client/src/components/city/cityConstants.js
index dc0e303ece..9e1832e3ca 100644
--- a/client/src/components/city/cityConstants.js
+++ b/client/src/components/city/cityConstants.js
@@ -295,6 +295,29 @@ export const cityDayMix = (settings) => {
return smoothstepRange(0.35, 1, preset?.daylightFactor ?? 0);
};
+// Drei <Text> props for an informational in-world label that stays legible in both
+// the night-neon scene AND the bright daytime scene. At night (dayMix→0) the label
+// keeps its neon fill with no outline, so the established look is untouched. As day
+// ramps up (dayMix→1) the fill lerps toward a dark ink — readable against the bright
+// sky and sunlit mid-tone facades where a glowing neon fill just washes out — and a
+// light outline halo fades in to lift the glyphs off whatever's behind them. The ink
+// keeps a hint of the label's hue so day labels stay loosely color-coded by status.
+// Continuous in dayMix so it degrades gracefully if an intermediate time-of-day is
+// ever re-enabled (today dayMix is strictly 0 or 1). Decorative neon signage is NOT
+// a caller — it is meant to dim in daylight like real neon.
+export const cityLabelColors = (neonColor, dayMix = 0) => {
+ const d = Math.max(0, Math.min(1, dayMix || 0));
+ const darkInk = mixHex('#0d1422', neonColor, 0.22);
+ return {
+ color: mixHex(neonColor, darkInk, d),
+ outlineColor: '#eef4ff',
+ // Percentage strings are relative to fontSize, so the halo scales with each label.
+ // At night d=0 → "0.00%", which drei treats as a zero-width (i.e. no) outline.
+ outlineWidth: `${(d * 9).toFixed(2)}%`,
+ outlineOpacity: d * 0.85,
+ };
+};
+
// Get a deterministic neon accent color per app (for windows/decorations)
export const getAccentColor = (app) => {
const hash = hashString(app.name || app.id);
diff --git a/client/src/components/city/cityTheme.test.js b/client/src/components/city/cityTheme.test.js
index 6f51b7b32e..0f9946b311 100644
--- a/client/src/components/city/cityTheme.test.js
+++ b/client/src/components/city/cityTheme.test.js
@@ -1,6 +1,6 @@
import { describe, it, expect, beforeEach } from 'vitest';
-import { deriveCityPalette, applyCityBrandColors, resolveCityTimeOfDay, CITY_COLORS, getBuildingColor } from './cityConstants';
-import { getTheme } from '../../themes/portosThemes';
+import { deriveCityPalette, applyCityBrandColors, resolveCityTimeOfDay, cityLabelColors, CITY_COLORS, getBuildingColor } from './cityConstants';
+import { getTheme, THEMES } from '../../themes/portosThemes';
describe('deriveCityPalette', () => {
it('derives the accent hex from a theme --port-accent triplet', () => {
@@ -49,6 +49,29 @@ describe('deriveCityPalette', () => {
expect(resolveCityTimeOfDay('night', true)).toEqual({ daytime: false, presetKey: 'sunset' });
});
+ it('derives a valid palette for every shipped theme (4 day + 4 night)', () => {
+ const themes = Object.values(THEMES);
+ const day = themes.filter((t) => t.mode === 'day');
+ const night = themes.filter((t) => t.mode === 'night');
+ // The City must support all 8 PortOS themes — 4 day, 4 night.
+ expect(day).toHaveLength(4);
+ expect(night).toHaveLength(4);
+
+ for (const theme of themes) {
+ const p = deriveCityPalette(theme);
+ expect(p.themeId).toBe(theme.id);
+ expect(p.isDay).toBe(theme.mode === 'day');
+ // Accent is parsed to a concrete hex (never left as a raw triplet/empty).
+ expect(p.accent).toMatch(/^#[0-9a-f]{6}$/);
+ // Day surround is a bright sky; night surround is a near-black void — and the
+ // two are always distinct so the backdrop actually swaps with time of day.
+ expect(p.dayBackground).toMatch(/^#[0-9a-f]{6}$/);
+ expect(p.nightBackground).toMatch(/^#[0-9a-f]{6}$/);
+ expect(p.dayBackground).not.toBe(p.nightBackground);
+ expect(p.background).toBe(p.isDay ? p.dayBackground : p.nightBackground);
+ }
+ });
+
it('opts CRT effects in per theme family', () => {
// terminal (Phosphor) — full CRT
expect(deriveCityPalette(getTheme('black-ice-terminal-day')).crt)
@@ -65,6 +88,33 @@ describe('deriveCityPalette', () => {
});
});
+describe('cityLabelColors', () => {
+ it('keeps the neon fill and adds no outline at night (dayMix 0)', () => {
+ const c = cityLabelColors('#06b6d4', 0);
+ expect(c.color).toBe('#06b6d4'); // untouched neon
+ expect(c.outlineWidth).toBe('0.00%'); // drei reads a 0% outline as none
+ expect(c.outlineOpacity).toBe(0);
+ });
+
+ it('darkens the fill toward ink and fades in a light outline by day (dayMix 1)', () => {
+ const c = cityLabelColors('#06b6d4', 1);
+ // Fill lands on the dark ink (a near-black tinted 22% toward the label hue),
+ // i.e. clearly darker than the original neon so it reads on a bright sky.
+ expect(c.color).not.toBe('#06b6d4');
+ const lum = parseInt(c.color.slice(1, 3), 16) + parseInt(c.color.slice(3, 5), 16) + parseInt(c.color.slice(5, 7), 16);
+ expect(lum).toBeLessThan(180); // dark ink (~140), far below the neon's ~400
+ expect(c.outlineColor).toBe('#eef4ff');
+ expect(c.outlineWidth).toBe('9.00%');
+ expect(c.outlineOpacity).toBeCloseTo(0.85);
+ });
+
+ it('clamps out-of-range / missing dayMix', () => {
+ expect(cityLabelColors('#06b6d4', 2).outlineOpacity).toBeCloseTo(0.85);
+ expect(cityLabelColors('#06b6d4', -1).outlineWidth).toBe('0.00%');
+ expect(cityLabelColors('#06b6d4').color).toBe('#06b6d4'); // undefined → night
+ });
+});
+
describe('applyCityBrandColors', () => {
// Restore the cyan baseline after each test so mutation doesn't leak across the suite.
beforeEach(() => applyCityBrandColors(deriveCityPalette(undefined)));