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

address review (codex): register arrow-key panning + make ground/particles consume the themed accent

[._.]/ Adam Eivy61e7acb7ed8b
diff --git a/client/src/components/city/CityGround.jsx b/client/src/components/city/CityGround.jsx
index 7f24bfe2fc..46852194a4 100644
--- a/client/src/components/city/CityGround.jsx
+++ b/client/src/components/city/CityGround.jsx
@@ -44,7 +44,7 @@ function RollingFog({ dayMix = 0 }) {
<mesh ref={ref} rotation={[-Math.PI / 2, 0, 0]} position={[0, 0.5, 0]}>
<planeGeometry args={[100, 100]} />
<meshBasicMaterial
- color="#06b6d4"
+ color={CITY_COLORS.ground}
transparent
opacity={0.012}
blending={THREE.AdditiveBlending}
@@ -66,10 +66,12 @@ export default function CityGround({ settings }) {
groundColorTarget.current.set(preset.groundColor ?? '#0a0a20');
const targetRoughness = preset.groundRoughness ?? 0.7;
- // The neon grid + additive fog are a night look — at day the grid mutes to faint
- // pavement lines and the glow fog fades out.
- const gridCellColor = mixHex('#0e7490', '#a7afb8', dayMix);
- const gridSectionColor = mixHex('#06b6d4', '#bcc4cc', dayMix);
+ // The neon grid + additive fog follow the themed accent (CITY_COLORS.ground is
+ // recolored per theme by applyCityBrandColors). At night they read as accent neon;
+ // by day the grid mutes to faint pavement lines and the glow fog fades out.
+ const accent = CITY_COLORS.ground;
+ const gridSectionColor = mixHex(accent, '#bcc4cc', dayMix);
+ const gridCellColor = mixHex(mixHex(accent, '#0a1420', 0.5), '#a7afb8', dayMix);
const groundFogOpacity = 0.045 * (1 - dayMix);
useFrame((_, delta) => {
@@ -136,7 +138,7 @@ export default function CityGround({ settings }) {
<mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, 0.1, 0]}>
<planeGeometry args={[80, 80]} />
<meshBasicMaterial
- color="#06b6d4"
+ color={accent}
transparent
opacity={groundFogOpacity}
blending={THREE.AdditiveBlending}
diff --git a/client/src/components/city/CityParticles.jsx b/client/src/components/city/CityParticles.jsx
index 251fddb803..c12fd69c47 100644
--- a/client/src/components/city/CityParticles.jsx
+++ b/client/src/components/city/CityParticles.jsx
@@ -1,5 +1,5 @@
import { Sparkles } from '@react-three/drei';
-import { cityDayMix } from './cityConstants';
+import { cityDayMix, CITY_COLORS } from './cityConstants';
export default function CityParticles({ settings }) {
const density = settings?.particleDensity ?? 1.0;
@@ -9,14 +9,15 @@ export default function CityParticles({ settings }) {
return (
<>
- {/* Cyan ambient sparkles - main atmosphere */}
+ {/* Primary ambient sparkles — follow the themed accent (CITY_COLORS.particles
+ is recolored per theme by applyCityBrandColors) */}
<Sparkles
count={scale(120)}
scale={[50, 20, 50]}
size={1.8}
speed={0.3}
opacity={0.3 * dayFade}
- color="#06b6d4"
+ color={CITY_COLORS.particles}
/>
{/* Pink/magenta secondary sparkles */}
<Sparkles
diff --git a/client/src/components/city/CityScene.jsx b/client/src/components/city/CityScene.jsx
index 14badd5663..28686eea2d 100644
--- a/client/src/components/city/CityScene.jsx
+++ b/client/src/components/city/CityScene.jsx
@@ -47,9 +47,21 @@ export default function CityScene({ apps, agentMap, onBuildingClick, cosStatus,
const [proximityApp, setProximityApp] = useState(null);
const [transitioning, setTransitioning] = useState(false);
const prevExplorationRef = useRef(false);
+ const orbitRef = useRef(null);
const explorationMode = settings?.explorationMode || false;
+ // drei's `keyEvents` only (re)connects pointer events to the DOM element in this
+ // three-stdlib version — it does NOT attach the keydown listener OrbitControls
+ // needs for arrow-key panning. Wire that explicitly when the orbital controls are
+ // mounted (re-runs when the mode flips them in/out), with matching teardown.
+ useEffect(() => {
+ const controls = orbitRef.current;
+ if (!controls?.listenToKeyEvents) return undefined;
+ controls.listenToKeyEvents(window);
+ return () => controls.stopListenToKeyEvents?.();
+ }, [explorationMode, transitioning, photoMode]);
+
// Set transitioning=true when exploration mode toggles
useEffect(() => {
if (prevExplorationRef.current !== explorationMode) {
@@ -154,9 +166,10 @@ export default function CityScene({ apps, agentMap, onBuildingClick, cosStatus,
<OrbitControls
// Map-style navigation: left-drag pans the camera across the city (so you can
// reach off-center districts without first-person mode), right-drag rotates, scroll
- // zooms, arrow keys pan. On a Mac trackpad, ctrl+drag registers as a right-click so
- // it rotates. screenSpacePanning=false keeps panning in the ground plane (map feel).
- keyEvents
+ // zooms, arrow keys pan (wired via listenToKeyEvents in the effect above). On a Mac
+ // trackpad, ctrl+drag registers as a right-click so it rotates. screenSpacePanning=
+ // false keeps panning in the ground plane (map feel).
+ ref={orbitRef}
enablePan
screenSpacePanning={false}
panSpeed={1.0}