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
Rebuild OpenWorld as a living PortOS village (#5418)
[._.]/ Adam Eivy60b9ff429397
diff --git a/client/src/components/openworld/CameraTransition.jsx b/client/src/components/openworld/CameraTransition.jsxindex 2bfc21bd50..37723ef66a 100644--- a/client/src/components/openworld/CameraTransition.jsx+++ b/client/src/components/openworld/CameraTransition.jsx@@ -4,7 +4,7 @@ import * as THREE from 'three';import { smoothstep } from '../../utils/easing';import { DEFAULT_SPAWN_Z, EYE_HEIGHT, THIRD_PERSON, thirdPersonCamera } from '../../utils/openWorldPlayerRig';-const ORBITAL_POS = new THREE.Vector3(0, 25, 45);+const ORBITAL_POS = new THREE.Vector3(0, 95, 125);const ORBITAL_TARGET = new THREE.Vector3(0, 0, 0);const DEFAULT_EXPLORATION_RIG = { x: 0, y: EYE_HEIGHT, z: DEFAULT_SPAWN_Z };const DEFAULT_EXPLORATION_FRAME = thirdPersonCamera({diff --git a/client/src/components/openworld/OpenWorldAiCore.jsx b/client/src/components/openworld/OpenWorldAiCore.jsxindex 5384fda555..240120e9cf 100644--- a/client/src/components/openworld/OpenWorldAiCore.jsx+++ b/client/src/components/openworld/OpenWorldAiCore.jsx@@ -6,8 +6,8 @@ import { useOpenWorldPalette } from './OpenWorldPaletteContext';import OpenWorldLabel from './OpenWorldLabel';import { computeAiCore, computeAiCoreBeams, AI_CORE } from '../../utils/openWorldAiCore';-// OpenWorld's AI Core landmark (roadmap 2.1): a slender central spire above downtown from-// which all model activity radiates. The apex orb glows by the active model tier (cyan+// OpenWorld's AI Core landmark: a low kinetic seed at the center of The Port from+// which all model activity radiates. The suspended orb glows by the active model tier (cyan// light → blue medium → violet heavy) and brightens with the number of in-flight calls;// activity beams fan outward from the apex while AI work is happening, and a fast call// still produces a brief flare. Idle, the core sits a dim slate. Driven by the live@@ -74,32 +74,6 @@ function TargetedBeam({ target, thickness, color, seed }) {);}-function SpireLightRings({ height, color, dayMix }) {- const rings = useMemo(() => {- const count = Math.max(7, Math.floor(height / 1.6));- return Array.from({ length: count }, (_, i) => {- const ratio = (i + 1) / (count + 1);- return {- key: `ring-${i}`,- y: ratio * height,- radius: 1.4 + (0.5 - 1.4) * ratio + 0.04,- opacity: (i === count - 1 ? 0.58 : 0.28 + (i % 3) * 0.08) * (1 - dayMix * 0.7),- };- });- }, [dayMix, height]);-- return (- <group>- {rings.map((ring) => (- <mesh key={ring.key} position={[0, ring.y, 0]} rotation={[Math.PI / 2, 0, 0]}>- <torusGeometry args={[ring.radius, 0.025, 6, 8]} />- <meshBasicMaterial color={mixHex('#f8fbff', color, 0.36)} transparent opacity={ring.opacity} toneMapped={false} depthWrite={false} />- </mesh>- ))}- </group>- );-}-export default function OpenWorldAiCore({ aiActivity, positions, apps, settings }) {const { tintStructure } = useOpenWorldPalette();const core = useMemo(@@ -108,18 +82,18 @@ export default function OpenWorldAiCore({ aiActivity, positions, apps, settings);const apexRef = useRef();const apexGlowRef = useRef();+ const orbitRef = useRef();+ const petalRef = useRef();const animate = (settings?.particleDensity ?? 1) >= 0.5;const dayMix = openWorldDayMix(settings);- const { position, height, apexY, color } = core;+ const { position, apexY, color } = core;const orbColor = core.busy ? color : mixHex('#67e8f9', color, 0.28);const orbEmissive = (core.busy ? 0.85 : 0.48) + core.intensity * 0.45;const orbGlowOpacity = (0.14 + core.intensity * 0.08) * (1 - dayMix * 0.45);- const nightSpireBase = mixHex(tintStructure('#2a416c'), color, 0.24);- const daySpireBase = mixHex('#707988', color, 0.1);- const spireBodyColor = mixHex(nightSpireBase, daySpireBase, dayMix);- const spireEdgeOpacity = 0.24 + (1 - dayMix) * 0.28;- const spireGlowColor = mixHex('#7dd3fc', orbColor, 0.5);+ const baseColor = mixHex(tintStructure('#203b46'), '#8d9078', dayMix);+ const petalColor = mixHex(tintStructure('#365666'), '#b89a6c', dayMix);+ const ringColor = mixHex('#7dd3fc', orbColor, 0.5);// Per-op beams: targeted at the originating building when known, radial otherwise.// While flaring with no live op (a fast call that already cleared) keep one radial pulse.@@ -142,41 +116,74 @@ export default function OpenWorldAiCore({ aiActivity, positions, apps, settingsconst scale = 1 + pulse * 0.04;apexGlowRef.current.scale.setScalar(scale);}+ if (orbitRef.current) {+ orbitRef.current.rotation.y = clock.getElapsedTime() * (core.busy ? 0.42 : 0.12);+ orbitRef.current.rotation.z = Math.sin(clock.getElapsedTime() * 0.18) * 0.08;+ }+ if (petalRef.current) {+ petalRef.current.rotation.y = -clock.getElapsedTime() * (core.busy ? 0.12 : 0.025);+ }});return (<group position={position}>- {/* Slender spire body — tapered so it reads as a tower, not a column */}- <mesh position={[0, height / 2, 0]}>- <cylinderGeometry args={[0.5, 1.4, height, 8]} />- <meshStandardMaterial- color={spireBodyColor}- emissive={spireGlowColor}- emissiveIntensity={0.55 + core.intensity * 0.35}- metalness={0.45}- roughness={0.46}- toneMapped={false}- />+ {/* Terraced plaza: broad enough to be legible from orbit, low enough that it+ never hides the live app boroughs behind a decorative tower. */}+ <mesh position={[0, 0.12, 0]}>+ <cylinderGeometry args={[6.4, 6.8, 0.24, 12]} />+ <meshStandardMaterial color={baseColor} roughness={0.9} metalness={0.08} flatShading /></mesh>- <mesh position={[0, height / 2, 0]}>- <cylinderGeometry args={[0.52, 1.43, height + 0.04, 8]} />- <meshBasicMaterial- color={color}- wireframe- transparent- opacity={spireEdgeOpacity}- toneMapped={false}- depthWrite={false}- />+ <mesh position={[0, 0.34, 0]}>+ <cylinderGeometry args={[4.8, 5.2, 0.3, 12]} />+ <meshStandardMaterial color={petalColor} roughness={0.78} metalness={0.16} flatShading /></mesh>- <SpireLightRings height={height} color={color} dayMix={dayMix} />- {/* Apex orb — the live AI-activity indicator */}+ <group ref={petalRef}>+ {Array.from({ length: 8 }, (_, index) => {+ const angle = (index / 8) * Math.PI * 2;+ return (+ <mesh+ key={`core-petal-${index}`}+ position={[Math.cos(angle) * 3.5, 0.68, Math.sin(angle) * 3.5]}+ rotation={[0, -angle, (index % 2 ? -1 : 1) * 0.08]}+ >+ <boxGeometry args={[3.6, 0.34, 1.05]} />+ <meshStandardMaterial+ color={petalColor}+ emissive={orbColor}+ emissiveIntensity={core.busy ? 0.24 : 0.06}+ roughness={0.72}+ metalness={0.22}+ flatShading+ />+ </mesh>+ );+ })}+ </group>+ <mesh position={[0, 2.7, 0]}>+ <cylinderGeometry args={[0.34, 0.78, 3.4, 6]} />+ <meshStandardMaterial color={baseColor} emissive={orbColor} emissiveIntensity={0.28} roughness={0.48} metalness={0.35} flatShading />+ </mesh>+ <group ref={orbitRef} position={[0, apexY, 0]}>+ <mesh rotation={[Math.PI / 2, 0.22, 0]}>+ <torusGeometry args={[2.55, 0.07, 6, 32]} />+ <meshBasicMaterial color={ringColor} transparent opacity={0.7} toneMapped={false} />+ </mesh>+ <mesh rotation={[0.42, Math.PI / 2, 0.4]}>+ <torusGeometry args={[2.1, 0.055, 6, 28]} />+ <meshBasicMaterial color={orbColor} transparent opacity={0.52} toneMapped={false} />+ </mesh>+ <mesh rotation={[-0.55, 0.18, Math.PI / 2]}>+ <torusGeometry args={[1.65, 0.045, 6, 24]} />+ <meshBasicMaterial color="#fff1c7" transparent opacity={0.42} toneMapped={false} />+ </mesh>+ </group>+ {/* Suspended seed — the live AI-activity indicator. */}<mesh ref={apexRef} position={[0, apexY, 0]}>- <icosahedronGeometry args={[1.6, 1]} />+ <icosahedronGeometry args={[1.25, 1]} /><meshStandardMaterial color={orbColor} emissive={orbColor} emissiveIntensity={orbEmissive} roughness={0.28} metalness={0.15} toneMapped={false} /></mesh><mesh ref={apexGlowRef} position={[0, apexY, 0]}>- <sphereGeometry args={[1.95, 24, 16]} />+ <sphereGeometry args={[1.62, 20, 12]} /><meshBasicMaterialcolor={orbColor}transparent@@ -186,7 +193,7 @@ export default function OpenWorldAiCore({ aiActivity, positions, apps, settingstoneMapped={false}/></mesh>- <pointLight position={[0, apexY, 0]} color={orbColor} intensity={0.85 + core.intensity * 0.8} distance={22} decay={2} />+ <pointLight position={[0, apexY, 0]} color={orbColor} intensity={0.55 + core.intensity * 0.65} distance={18} decay={2} />{/* Activity beams emanate from the apex while AI work is in flight */}<group position={[0, apexY, 0]}>{beams.map((b, i) => (@@ -197,14 +204,14 @@ export default function OpenWorldAiCore({ aiActivity, positions, apps, settings</group>{/* Label above the apex */}<OpenWorldLabel- position={[0, apexY + 4.25, 0]}- fontSize={1.15}+ position={[0, apexY + 3.2, 0]}+ fontSize={0.72}color={orbColor}dayMix={dayMix}anchorX="center"anchorY="middle"font={PIXEL_FONT_URL}- maxWidth={20}+ maxWidth={14}renderOrder={40}material-depthTest={false}>@@ -212,8 +219,8 @@ export default function OpenWorldAiCore({ aiActivity, positions, apps, settings</OpenWorldLabel>{core.busy && (<OpenWorldLabel- position={[0, apexY + 3.15, 0]}- fontSize={0.75}+ position={[0, apexY + 2.45, 0]}+ fontSize={0.42}color="#94a3b8"dayMix={dayMix}anchorX="center"diff --git a/client/src/components/openworld/OpenWorldArchipelago.jsx b/client/src/components/openworld/OpenWorldArchipelago.jsxnew file mode 100644index 0000000000..aae83bc33c--- /dev/null+++ b/client/src/components/openworld/OpenWorldArchipelago.jsx@@ -0,0 +1,923 @@+import { useEffect, useLayoutEffect, useMemo, useRef } from 'react';+import { Text } from '@react-three/drei';+import { useFrame } from '@react-three/fiber';+import * as THREE from 'three';+import {+ ARCHIPELAGO_ISLANDS,+ ARCHIPELAGO_LINKS,+ PARCELS,+ VILLAGE_GROUND,+ VILLAGE_ROUTES,+ WORLD,+ archipelagoLinkPoints,+ computeVillageAppLayout,+ isOnArchipelagoIsland,+ openWorldTerrainHeight,+} from '../../utils/openWorldPlan';+import { computeArtifacts } from '../../utils/openWorldArtifacts';+import { computeBackupVault } from '../../utils/openWorldBackupVault';+import { computeDataHarbor } from '../../utils/openWorldDataHarbor';+import { computeGoalMonuments } from '../../utils/openWorldGoalMonuments';+import { computeHealthTower } from '../../utils/openWorldHealthTower';+import { computeMemoryDistrict } from '../../utils/openWorldMemoryDistrict';+import { computeProductivityMonument } from '../../utils/openWorldProductivity';+import { computeTaskQueue } from '../../utils/openWorldTaskQueue';+import { computeVoiceMarker } from '../../utils/openWorldVoiceMarker';+import {+ PIXEL_FONT_URL,+ mixHex,+ openWorldDayMix,+ openWorldShowDetail,+ seededRand,+} from './openWorldConstants';+import { useOpenWorldPalette } from './OpenWorldPaletteContext';++const dummy = new THREE.Object3D();++const BIOME_COLORS = {+ port: ['#244c43', '#78a66f'],+ memory: ['#24483f', '#5b916c'],+ forge: ['#604c3b', '#a77955'],+ signal: ['#315866', '#6d9d96'],+ harbor: ['#31545b', '#66929a'],+ archive: ['#475448', '#82956f'],+ garden: ['#315c42', '#79a65f'],+ wellness: ['#37644e', '#82ad73'],+};++const VILLAGE_SITES = [+ { id: 'core', parcel: 'aiCore', label: 'PORTOS COMMON', wall: '#f3d6a6', roof: '#ec755d', accent: '#ffd166', special: 'core' },+ { id: 'memory', parcel: 'memory', label: 'MEMORY HOUSE', wall: '#d7c6ee', roof: '#7c5aa6', accent: '#cab6ff' },+ { id: 'backup', parcel: 'backupVault', label: 'BACKUP COTTAGE', wall: '#d9d0bf', roof: '#47645b', accent: '#91d2b5' },+ { id: 'tasks', parcel: 'taskQueue', label: 'TASK WORKSHOP', wall: '#f1c7a3', roof: '#b95f4d', accent: '#ffb86b' },+ { id: 'archive', parcel: 'warehouse', label: 'ARCHIVE LODGE', wall: '#d7d8c8', roof: '#5f6c59', accent: '#b8c99d' },+ { id: 'wellness', parcel: 'health', label: 'WELLNESS', wall: '#d9edc6', roof: '#4d8b67', accent: '#9ee493', special: 'greenhouse' },+ { id: 'focus', parcel: 'productivity', label: 'FOCUS FARM', wall: '#f2ddb4', roof: '#d18b47', accent: '#ffd166' },+ { id: 'sprint', parcel: 'jira', label: 'SPRINT STUDIO', wall: '#cadde4', roof: '#597c91', accent: '#93d8ef' },+ { id: 'quiet', parcel: 'easterEggs', label: 'QUIET CORNER', wall: '#dfd0e8', roof: '#7d678f', accent: '#d0b1e8' },+ { id: 'goals', parcel: 'goals', label: 'GOALS LODGE', wall: '#f2c7bd', roof: '#b74e66', accent: '#ff8fa3' },+ { id: 'voice', parcel: 'voice', label: 'VOICE RADIO', wall: '#c8dce8', roof: '#49778c', accent: '#85d8e8', special: 'radio' },+ { id: 'artifacts', parcel: 'artifacts', label: 'TROPHY HOUSE', wall: '#ecd9aa', roof: '#b98439', accent: '#ffe29a' },+ { id: 'harbor', parcel: 'dataHarbor', label: 'DATA PIER', wall: '#c7d8d3', roof: '#3f7180', accent: '#85d8e8', special: 'harbor' },+];++function islandOutline(island, count = 28) {+ const rand = seededRand(island.seed);+ return Array.from({ length: count }, (_, index) => {+ const angle = (index / count) * Math.PI * 2;+ const wobble = 0.9 + rand() * 0.14;+ return [+ island.center[0] + Math.cos(angle) * island.radiusX * wobble,+ island.center[1] + Math.sin(angle) * island.radiusZ * wobble,+ ];+ });+}++function createIslandGeometry(island) {+ const outline = islandOutline(island);+ const segments = outline.length;+ // Enough radial samples for the shared height field to read as rolling terrain, while+ // keeping a subtle low-poly character instead of giant pie-slice lighting facets.+ const rings = 14;+ const positions = [island.center[0], openWorldTerrainHeight(...island.center), island.center[1]];+ const topIndices = [];++ for (let ring = 1; ring <= rings; ring += 1) {+ const fraction = ring / rings;+ outline.forEach(([outerX, outerZ]) => {+ const x = island.center[0] + (outerX - island.center[0]) * fraction;+ const z = island.center[1] + (outerZ - island.center[1]) * fraction;+ positions.push(x, openWorldTerrainHeight(x, z), z);+ });+ }++ for (let segment = 0; segment < segments; segment += 1) {+ // XZ polygons wind clockwise when viewed from +Y; reverse the naïve outline order so+ // the playable top faces upward instead of being culled and exposing the ocean below.+ topIndices.push(0, 1 + ((segment + 1) % segments), 1 + segment);+ }+ for (let ring = 1; ring < rings; ring += 1) {+ const innerStart = 1 + (ring - 1) * segments;+ const outerStart = 1 + ring * segments;+ for (let segment = 0; segment < segments; segment += 1) {+ const next = (segment + 1) % segments;+ const a = innerStart + segment;+ const b = outerStart + segment;+ const c = outerStart + next;+ const d = innerStart + next;+ topIndices.push(a, d, b, b, d, c);+ }+ }++ const sideIndices = [];+ const outerStart = 1 + (rings - 1) * segments;+ const sideStart = positions.length / 3;+ outline.forEach((_, segment) => {+ const source = (outerStart + segment) * 3;+ positions.push(positions[source], positions[source + 1], positions[source + 2]);+ positions.push(positions[source], WORLD.terrainY, positions[source + 2]);+ });+ for (let segment = 0; segment < segments; segment += 1) {+ const next = (segment + 1) % segments;+ const topA = sideStart + segment * 2;+ const bottomA = topA + 1;+ const topB = sideStart + next * 2;+ const bottomB = topB + 1;+ sideIndices.push(topA, bottomA, topB, bottomA, bottomB, topB);+ }++ const geometry = new THREE.BufferGeometry();+ geometry.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));+ geometry.setIndex([...topIndices, ...sideIndices]);+ geometry.addGroup(0, topIndices.length, 0);+ geometry.addGroup(topIndices.length, sideIndices.length, 1);+ geometry.computeVertexNormals();+ return { geometry, outline };+}++function Island({ island, dayMix, detailed }) {+ const { surface } = useOpenWorldPalette();+ const { geometry, outline } = useMemo(() => createIslandGeometry(island), [island]);+ const rimGeometry = useMemo(() => {+ if (!detailed) return null;+ const curve = new THREE.CatmullRomCurve3(+ outline.map(([x, z]) => new THREE.Vector3(x, openWorldTerrainHeight(x, z) + 0.06, z)),+ true,+ 'centripetal',+ );+ return new THREE.TubeGeometry(curve, outline.length * 2, 0.045, 4, true);+ }, [detailed, outline]);++ useEffect(() => () => {+ geometry.dispose();+ rimGeometry?.dispose();+ }, [geometry, rimGeometry]);++ const [nightColor, dayColor] = BIOME_COLORS[island.biome] || BIOME_COLORS.port;+ return (+ <group>+ <mesh geometry={geometry} receiveShadow>+ <meshStandardMaterial attach="material-0" {...surface} color={mixHex(nightColor, dayColor, dayMix)} roughness={0.98} metalness={0} flatShading />+ <meshStandardMaterial attach="material-1" {...surface} color={mixHex('#1d302a', '#5d6955', dayMix)} roughness={1} metalness={0} flatShading />+ </mesh>+ {rimGeometry && (+ <mesh geometry={rimGeometry}>+ <meshBasicMaterial color={mixHex('#7bb6a0', '#d8d6a7', dayMix)} transparent opacity={0.34} toneMapped={false} />+ </mesh>+ )}+ </group>+ );+}++const routeCurve = (route) => new THREE.CatmullRomCurve3(+ route.points.map(([x, z]) => new THREE.Vector3(x, 0, z)),+ Boolean(route.closed),+ 'centripetal',+);++function createRouteRibbon(route, width, yOffset) {+ const curve = routeCurve(route);+ const segments = Math.max(24, route.points.length * 16);+ const positions = [];+ const indices = [];+ for (let index = 0; index <= segments; index += 1) {+ const t = index / segments;+ const point = curve.getPointAt(t);+ const tangent = curve.getTangentAt(Math.min(0.9999, t)).normalize();+ const left = new THREE.Vector3(-tangent.z, 0, tangent.x).multiplyScalar(width / 2);+ const y = openWorldTerrainHeight(point.x, point.z) + yOffset;+ positions.push(point.x + left.x, y, point.z + left.z, point.x - left.x, y, point.z - left.z);+ if (index < segments) {+ const start = index * 2;+ indices.push(start, start + 2, start + 1, start + 2, start + 3, start + 1);+ }+ }+ const geometry = new THREE.BufferGeometry();+ geometry.setAttribute('position', new THREE.Float32BufferAttribute(positions, 3));+ geometry.setIndex(indices);+ geometry.computeVertexNormals();+ return { curve, geometry };+}++function VillageRoutes({ dayMix, detailed }) {+ const routeMeshes = useMemo(() => VILLAGE_ROUTES.map((route) => ({+ ...route,+ shoulder: createRouteRibbon(route, route.width + 1.1, 0.045),+ lane: createRouteRibbon(route, route.width, 0.065),+ })), []);++ useEffect(() => () => routeMeshes.forEach((route) => {+ route.shoulder.geometry.dispose();+ route.lane.geometry.dispose();+ }), [routeMeshes]);++ return (+ <group>+ {routeMeshes.map((route) => (+ <group key={route.id}>+ <mesh geometry={route.shoulder.geometry} receiveShadow>+ <meshStandardMaterial color={mixHex('#4a4b40', '#e5d3a2', dayMix)} roughness={1} flatShading />+ </mesh>+ <mesh geometry={route.lane.geometry} receiveShadow>+ <meshStandardMaterial+ color={route.kind === 'path' ? mixHex('#6e5546', '#c89968', dayMix) : mixHex('#364749', '#7e8b7d', dayMix)}+ roughness={0.96}+ flatShading+ />+ </mesh>+ {detailed && route.kind === 'road' && Array.from({ length: route.closed ? 22 : 7 }, (_, index) => {+ const t = (index + 0.5) / (route.closed ? 22 : 7);+ const point = route.lane.curve.getPointAt(t);+ const tangent = route.lane.curve.getTangentAt(Math.min(0.999, t));+ return (+ <mesh+ key={`${route.id}-marker-${index}`}+ position={[point.x, openWorldTerrainHeight(point.x, point.z) + 0.09, point.z]}+ rotation={[-Math.PI / 2, 0, Math.atan2(tangent.z, tangent.x)]}+ >+ <planeGeometry args={[1.15, 0.12]} />+ <meshBasicMaterial color={mixHex('#79b9b2', '#f4e1a7', dayMix)} transparent opacity={0.66} toneMapped={false} />+ </mesh>+ );+ })}+ </group>+ ))}+ </group>+ );+}++function createCausewayGeometries() {+ return ARCHIPELAGO_LINKS.map((link) => createRouteRibbon(+ { points: archipelagoLinkPoints(link) },+ link.width + 0.7,+ 0.02,+ ).geometry);+}++function VillageCauseways({ dayMix }) {+ const geometries = useMemo(() => createCausewayGeometries(), []);+ useEffect(() => () => geometries.forEach((geometry) => geometry.dispose()), [geometries]);+ return geometries.map((geometry, index) => (+ <mesh key={`causeway-${index}`} geometry={geometry} receiveShadow>+ <meshStandardMaterial color={mixHex('#40514b', '#b8a77f', dayMix)} roughness={1} flatShading />+ </mesh>+ ));+}++const distanceToSegment = (x, z, start, end) => {+ const dx = end[0] - start[0];+ const dz = end[1] - start[1];+ const lengthSq = dx * dx + dz * dz;+ const t = lengthSq <= 1e-8 ? 0 : Math.max(0, Math.min(1, ((x - start[0]) * dx + (z - start[1]) * dz) / lengthSq));+ return Math.hypot(x - (start[0] + dx * t), z - (start[1] + dz * t));+};++const nearRoute = (x, z, padding = 0) => VILLAGE_ROUTES.some((route) => {+ for (let index = 1; index < route.points.length; index += 1) {+ if (distanceToSegment(x, z, route.points[index - 1], route.points[index]) < route.width / 2 + padding) return true;+ }+ if (route.closed && distanceToSegment(x, z, route.points.at(-1), route.points[0]) < route.width / 2 + padding) return true;+ return false;+});++const nearDoorstep = (x, z, radius = 7) => Object.values(PARCELS).some((parcel) => (+ Math.hypot(x - parcel.anchor[0], z - parcel.anchor[2]) < radius+));++function createDressing(detail) {+ const rand = seededRand(4079);+ const trees = [];+ const grass = [];+ const flowers = [];+ const rocks = [];+ const addCandidate = (list, total, options = {}) => {+ let attempts = 0;+ while (list.length < total && attempts < total * 18) {+ attempts += 1;+ const x = -66 + rand() * 132;+ const z = -82 + rand() * 142;+ if (!isOnArchipelagoIsland(x, z, options.inset || 2)) continue;+ if (nearRoute(x, z, options.routePadding || 0.8)) continue;+ if (nearDoorstep(x, z, options.doorstep || 6.5)) continue;+ const marketRadius = Math.hypot(x, z);+ if (options.clearMarket && marketRadius > 10.4 && marketRadius < 19.4) continue;+ list.push({ x, z, yaw: rand() * Math.PI * 2, scale: (options.minScale || 0.65) + rand() * (options.scaleRange || 0.7), variant: Math.floor(rand() * 4) });+ }+ };+ addCandidate(trees, Math.round(205 * detail), { routePadding: 1.7, doorstep: 8.5, minScale: 0.72, scaleRange: 0.85, inset: 3, clearMarket: true });+ addCandidate(grass, Math.round(980 * detail), { routePadding: 0.5, doorstep: 5, minScale: 0.65, scaleRange: 0.85, inset: 1.5 });+ addCandidate(flowers, Math.round(185 * detail), { routePadding: 0.36, doorstep: 4.5, minScale: 0.7, scaleRange: 0.76, inset: 2 });+ addCandidate(rocks, Math.round(38 * detail), { routePadding: 1, doorstep: 7, minScale: 0.35, scaleRange: 0.75, inset: 2.5, clearMarket: true });+ return { trees, grass, flowers, rocks };+}++function VillageDressing({ settings, dayMix }) {+ const { surface } = useOpenWorldPalette();+ const detail = settings?.effectiveTier === 'low' ? 0.34 : settings?.effectiveTier === 'medium' ? 0.68 : settings?.effectiveTier === 'ultra' ? 1.2 : 1;+ const { trees, grass, flowers, rocks } = useMemo(() => createDressing(detail), [detail]);+ const trunkRef = useRef();+ const canopyRefs = useRef([]);+ const grassRef = useRef();+ const flowerRef = useRef();+ const rockRef = useRef();++ useLayoutEffect(() => {+ trees.forEach((tree, index) => {+ const y = openWorldTerrainHeight(tree.x, tree.z);+ dummy.position.set(tree.x, y + 0.85 * tree.scale, tree.z);+ dummy.rotation.set(0, tree.yaw, 0);+ dummy.scale.set(tree.scale, tree.scale, tree.scale);+ dummy.updateMatrix();+ trunkRef.current?.setMatrixAt(index, dummy.matrix);+ [[-0.5, 2.15, 0.05, 1], [0.5, 2.15, 0.12, 0.92], [0, 2.62, -0.08, 0.95]].forEach(([ox, oy, oz, size], canopyIndex) => {+ dummy.position.set(tree.x + ox * tree.scale, y + oy * tree.scale, tree.z + oz * tree.scale);+ dummy.rotation.set(tree.yaw * 0.13, tree.yaw + canopyIndex * 0.5, tree.yaw * 0.08);+ dummy.scale.setScalar(tree.scale * size);+ dummy.updateMatrix();+ canopyRefs.current[canopyIndex]?.setMatrixAt(index, dummy.matrix);+ });+ });+ grass.forEach((item, index) => {+ dummy.position.set(item.x, openWorldTerrainHeight(item.x, item.z) + 0.23 * item.scale, item.z);+ dummy.rotation.set(0, item.yaw, (item.variant - 1.5) * 0.035);+ dummy.scale.set(item.scale, item.scale, item.scale);+ dummy.updateMatrix();+ grassRef.current?.setMatrixAt(index, dummy.matrix);+ });+ flowers.forEach((item, index) => {+ dummy.position.set(item.x, openWorldTerrainHeight(item.x, item.z) + 0.2 * item.scale, item.z);+ dummy.rotation.set(0, item.yaw, 0);+ dummy.scale.setScalar(item.scale);+ dummy.updateMatrix();+ flowerRef.current?.setMatrixAt(index, dummy.matrix);+ });+ rocks.forEach((item, index) => {+ dummy.position.set(item.x, openWorldTerrainHeight(item.x, item.z) + 0.2 * item.scale, item.z);+ dummy.rotation.set(item.yaw * 0.1, item.yaw, item.yaw * 0.08);+ dummy.scale.set(item.scale * 1.2, item.scale * 0.72, item.scale);+ dummy.updateMatrix();+ rockRef.current?.setMatrixAt(index, dummy.matrix);+ });+ [trunkRef.current, ...canopyRefs.current, grassRef.current, flowerRef.current, rockRef.current].forEach((mesh) => {+ if (!mesh) return;+ mesh.instanceMatrix.needsUpdate = true;+ mesh.computeBoundingSphere?.();+ });+ }, [flowers, grass, rocks, trees]);++ const leafColors = [+ mixHex('#315f48', '#6ea35f', dayMix),+ mixHex('#3a5c4b', '#8aad66', dayMix),+ mixHex('#5f4a4e', '#d78b82', dayMix),+ ];+ return (+ <group>+ <instancedMesh ref={trunkRef} args={[undefined, undefined, trees.length]} castShadow receiveShadow>+ <cylinderGeometry args={[0.14, 0.26, 1.7, 7]} />+ <meshStandardMaterial {...surface} color={mixHex('#2d372f', '#75553c', dayMix)} roughness={1} flatShading />+ </instancedMesh>+ {leafColors.map((color, index) => (+ <instancedMesh key={color} ref={(node) => { canopyRefs.current[index] = node; }} args={[undefined, undefined, trees.length]} castShadow>+ <dodecahedronGeometry args={[0.95, 0]} />+ <meshStandardMaterial {...surface} color={color} roughness={1} flatShading />+ </instancedMesh>+ ))}+ <instancedMesh ref={grassRef} args={[undefined, undefined, grass.length]} receiveShadow>+ <coneGeometry args={[0.24, 0.7, 4]} />+ <meshStandardMaterial color={mixHex('#29533f', '#86a94f', dayMix)} roughness={1} flatShading />+ </instancedMesh>+ <instancedMesh ref={flowerRef} args={[undefined, undefined, flowers.length]}>+ <octahedronGeometry args={[0.16, 0]} />+ <meshStandardMaterial color={mixHex('#bd76b4', '#ffd166', dayMix * 0.38)} emissive="#c46fad" emissiveIntensity={0.16} roughness={0.9} flatShading />+ </instancedMesh>+ <instancedMesh ref={rockRef} args={[undefined, undefined, rocks.length]} castShadow receiveShadow>+ <dodecahedronGeometry args={[0.62, 0]} />+ <meshStandardMaterial {...surface} color={mixHex('#33434a', '#85877b', dayMix)} roughness={1} flatShading />+ </instancedMesh>+ </group>+ );+}++function WarmWindow({ position, scale = [0.8, 0.74, 0.06], color }) {+ return (+ <mesh position={position}>+ <boxGeometry args={scale} />+ <meshStandardMaterial color="#3b5361" emissive={color} emissiveIntensity={0.42} roughness={0.52} />+ </mesh>+ );+}++function Cottage({ site, dayMix, metric }) {+ const parcel = PARCELS[site.parcel];+ const x = parcel.anchor[0];+ const z = parcel.anchor[2];+ const y = openWorldTerrainHeight(x, z);+ const width = site.special === 'harbor' ? 6.8 : 5.2;+ const depth = site.special === 'harbor' ? 4.2 : 4.6;+ const roofColor = mixHex(site.roof, '#5c5047', 1 - dayMix);+ const labelSize = site.label.length > 13 ? 0.235 : site.label.length > 10 ? 0.265 : 0.3;++ return (+ <group position={[x, y, z]}>+ {site.special === 'harbor' && (+ <mesh position={[0, 0.08, 2.8]} receiveShadow>+ <boxGeometry args={[11, 0.22, 7.5]} />+ <meshStandardMaterial color={mixHex('#32433f', '#9a7651', dayMix)} roughness={1} />+ </mesh>+ )}+ <mesh position={[0, 1.55, 0]} castShadow receiveShadow>+ <boxGeometry args={[width, 3.1, depth]} />+ <meshStandardMaterial color={site.wall} roughness={0.96} flatShading />+ </mesh>+ <mesh position={[0, 3.55, 0]} rotation={[0, Math.PI / 4, 0]} castShadow>+ <coneGeometry args={[width * 0.73, 1.65, 4]} />+ <meshStandardMaterial color={roofColor} roughness={0.95} flatShading />+ </mesh>+ <mesh position={[0, 0.95, depth / 2 + 0.07]}>+ <boxGeometry args={[1.05, 1.9, 0.13]} />+ <meshStandardMaterial color={mixHex('#263a3b', '#755742', dayMix)} roughness={0.9} />+ </mesh>+ <WarmWindow position={[-1.55, 1.75, depth / 2 + 0.08]} color={site.accent} />+ <WarmWindow position={[1.55, 1.75, depth / 2 + 0.08]} color={site.accent} />+ {/* The plaque sits below and in front of the roofline. Its old y-position was exactly+ level with the roof's lower edge, so the eave hid every destination name. */}+ <mesh position={[0, 2.4, depth / 2 + 0.28]} castShadow>+ <boxGeometry args={[3.65, metric ? 0.82 : 0.62, 0.16]} />+ <meshStandardMaterial color={mixHex('#263c3a', '#fff1cc', dayMix * 0.16)} roughness={0.88} />+ </mesh>+ <Text position={[0, metric ? 2.55 : 2.4, depth / 2 + 0.39]} font={PIXEL_FONT_URL} fontSize={labelSize} color={mixHex(site.accent, '#fff0cf', dayMix * 0.72)} anchorX="center" anchorY="middle" letterSpacing={0.045}>+ {site.label}+ </Text>+ {metric && (+ <Text position={[0, 2.25, depth / 2 + 0.395]} font={PIXEL_FONT_URL} fontSize={0.145} color={mixHex(metric.color || site.accent, '#f7dfae', 0.46)} anchorX="center" anchorY="middle" letterSpacing={0.035}>+ {metric.label}+ </Text>+ )}+ <mesh position={[0, 0.17, depth / 2 + 1.15]} receiveShadow>+ <boxGeometry args={[2.7, 0.22, 1.6]} />+ <meshStandardMaterial color={mixHex('#3b4e45', '#c2a16d', dayMix)} roughness={1} />+ </mesh>+ {site.special === 'greenhouse' && (+ <mesh position={[0, 4.75, 0]}>+ <sphereGeometry args={[1.4, 16, 9, 0, Math.PI * 2, 0, Math.PI / 2]} />+ <meshStandardMaterial color="#b7ead3" transparent opacity={0.5} roughness={0.18} metalness={0.08} />+ </mesh>+ )}+ {site.special === 'radio' && (+ <group position={[0, 5.4, 0]}>+ <mesh rotation={[0, 0, -0.18]}><cylinderGeometry args={[0.05, 0.05, 3.1, 7]} /><meshStandardMaterial color="#38545d" roughness={0.65} metalness={0.25} /></mesh>+ <mesh position={[0.25, 1.25, 0]} rotation={[0, 0, 0.38]}><coneGeometry args={[0.7, 0.34, 14, 1, true]} /><meshStandardMaterial color={site.accent} emissive={site.accent} emissiveIntensity={0.28} side={THREE.DoubleSide} /></mesh>+ </group>+ )}+ {[[-width / 2 - 0.8, depth / 2 + 0.3], [width / 2 + 0.8, depth / 2 + 0.3]].map(([px, pz], index) => (+ <group key={`${site.id}-planter-${index}`} position={[px, 0, pz]}>+ <mesh position={[0, 0.24, 0]}><cylinderGeometry args={[0.48, 0.38, 0.48, 8]} /><meshStandardMaterial color={mixHex('#4a3b35', '#b97856', dayMix)} roughness={1} /></mesh>+ <mesh position={[0, 0.72, 0]}><dodecahedronGeometry args={[0.48, 0]} /><meshStandardMaterial color={mixHex('#2d5a42', '#71a55f', dayMix)} roughness={1} flatShading /></mesh>+ </group>+ ))}+ </group>+ );+}++function CorePavilion({ site, dayMix }) {+ const [x, , z] = PARCELS.aiCore.anchor;+ const y = openWorldTerrainHeight(x, z);+ const orbRef = useRef();+ useFrame(({ clock }) => {+ if (!orbRef.current) return;+ const t = clock.getElapsedTime();+ orbRef.current.position.y = 2.45 + Math.sin(t * 1.4) * 0.12;+ orbRef.current.rotation.y = t * 0.45;+ });+ return (+ <group position={[x, y, z]}>+ <mesh receiveShadow position={[0, 0.08, 0]}><cylinderGeometry args={[7.2, 7.8, 0.34, 24]} /><meshStandardMaterial color={mixHex('#3f554e', '#d7c593', dayMix)} roughness={1} flatShading /></mesh>+ {Array.from({ length: 8 }, (_, index) => {+ const angle = (index / 8) * Math.PI * 2;+ return (+ <mesh key={`core-seat-${index}`} position={[Math.cos(angle) * 5.3, 0.34, Math.sin(angle) * 5.3]} rotation={[0, -angle, 0]} castShadow>+ <boxGeometry args={[2.2, 0.32, 0.78]} />+ <meshStandardMaterial color={mixHex('#31433d', '#ad7c52', dayMix)} roughness={1} />+ </mesh>+ );+ })}+ {[0, 1, 2].map((index) => {+ const angle = (index / 3) * Math.PI * 2;+ return (+ <mesh key={`core-arch-${index}`} position={[Math.cos(angle) * 3.6, 2.5, Math.sin(angle) * 3.6]} rotation={[0, -angle, 0]} castShadow>+ <boxGeometry args={[0.56, 5, 0.72]} />+ <meshStandardMaterial color={mixHex('#334d48', site.wall, dayMix * 0.72)} roughness={0.92} flatShading />+ </mesh>+ );+ })}+ <group ref={orbRef} position={[0, 2.45, 0]}>+ <mesh castShadow><dodecahedronGeometry args={[1.42, 0]} /><meshStandardMaterial color={site.accent} emissive={site.accent} emissiveIntensity={0.66} roughness={0.4} flatShading toneMapped={false} /></mesh>+ <mesh rotation={[Math.PI / 2, 0, 0]}><torusGeometry args={[2.1, 0.07, 8, 42]} /><meshBasicMaterial color="#fff1bb" transparent opacity={0.78} toneMapped={false} /></mesh>+ </group>+ <mesh position={[0, 0.52, 5.4]}><boxGeometry args={[3.8, 0.72, 0.18]} /><meshStandardMaterial color={mixHex('#263b39', '#f2ddb4', dayMix * 0.15)} roughness={0.9} /></mesh>+ <Text position={[0, 0.52, 5.52]} font={PIXEL_FONT_URL} fontSize={0.38} color={mixHex(site.accent, '#fff0cf', dayMix * 0.72)} anchorX="center" anchorY="middle" letterSpacing={0.08}>PORTOS COMMON</Text>+ </group>+ );+}++function VillageSites({ dayMix, metrics, jiraEnabled }) {+ return VILLAGE_SITES.filter((site) => site.id !== 'sprint' || jiraEnabled).map((site) => (+ site.special === 'core'+ ? <CorePavilion key={site.id} site={site} dayMix={dayMix} />+ : <Cottage key={site.id} site={site} dayMix={dayMix} metric={metrics?.[site.id]} />+ ));+}++const APP_STATUS_COLOR = {+ online: '#67c77b',+ stopped: '#ef6b63',+ not_started: '#e5b85c',+ unknown: '#91a0a3',+ not_found: '#91a0a3',+};++const appDisplayName = (app) => {+ const name = String(app?.name || app?.id || 'APP').trim().toUpperCase();+ return name.length > 17 ? `${name.slice(0, 15)}…` : name;+};++const activeAgentsForApp = (agentMap, appId) => {+ const agents = agentMap?.get?.(appId)?.agents;+ if (!Array.isArray(agents)) return 0;+ return agents.filter((agent) => ['running', 'coding', 'thinking', 'investigating'].includes(agent?.status || agent?.state)).length;+};++function AppKiosk({ app, position, agentMap, dayMix, onBuildingClick }) {+ const statusColor = APP_STATUS_COLOR[app.overallStatus] || APP_STATUS_COLOR.unknown;+ const activeAgents = Math.min(3, activeAgentsForApp(agentMap, app.id));+ const label = appDisplayName(app);+ const y = openWorldTerrainHeight(position.x, position.z);+ const labelSize = label.length > 13 ? 0.19 : 0.225;++ return (+ <group+ position={[position.x, y, position.z]}+ rotation={[0, position.yaw, 0]}+ onClick={(event) => {+ event.stopPropagation();+ onBuildingClick?.(app);+ }}+ >+ <mesh position={[0, 0.08, 0]} receiveShadow>+ <boxGeometry args={[2.55, 0.16, 1.85]} />+ <meshStandardMaterial color={mixHex('#3c4a42', '#c5a16b', dayMix)} roughness={1} />+ </mesh>+ <mesh position={[0, 0.93, -0.34]} castShadow receiveShadow>+ <boxGeometry args={[2.28, 1.7, 0.56]} />+ <meshStandardMaterial color={mixHex('#4b5660', '#eee0be', dayMix)} roughness={0.94} />+ </mesh>+ <mesh position={[0, 1.86, -0.08]} rotation={[0, Math.PI / 4, 0]} castShadow>+ <coneGeometry args={[1.52, 0.72, 4]} />+ <meshStandardMaterial color={mixHex('#38595a', statusColor, dayMix * 0.55)} roughness={0.96} flatShading />+ </mesh>+ <mesh position={[0, 0.78, 0.63]} castShadow>+ <boxGeometry args={[2.22, 0.2, 0.55]} />+ <meshStandardMaterial color={mixHex('#31443e', '#8b6446', dayMix)} roughness={1} />+ </mesh>+ <mesh position={[0, 1.28, 0.34]}>+ <boxGeometry args={[2.08, 0.5, 0.12]} />+ <meshStandardMaterial color={mixHex('#263b39', '#fff1cf', dayMix * 0.14)} roughness={0.9} />+ </mesh>+ <Text position={[0, 1.29, 0.415]} font={PIXEL_FONT_URL} fontSize={labelSize} color={mixHex(statusColor, '#fff0cf', dayMix * 0.58)} anchorX="center" anchorY="middle" letterSpacing={0.035}>+ {label}+ </Text>+ <mesh position={[0.92, 2.38, -0.08]} castShadow>+ <sphereGeometry args={[0.16, 8, 6]} />+ <meshStandardMaterial color={statusColor} emissive={statusColor} emissiveIntensity={app.overallStatus === 'online' ? 0.72 : 0.3} roughness={0.5} />+ </mesh>+ {Array.from({ length: activeAgents }, (_, index) => (+ <mesh key={`agent-${index}`} position={[-0.42 + index * 0.42, 1.02, 0.58]}>+ <dodecahedronGeometry args={[0.105, 0]} />+ <meshBasicMaterial color="#fff0a6" toneMapped={false} />+ </mesh>+ ))}+ </group>+ );+}++function VillageAppMarket({ apps, appPositions, agentMap, dayMix, onBuildingClick }) {+ const managedApps = (Array.isArray(apps) ? apps : []).filter((app) => app?.id && !app.archived);+ const visibleApps = managedApps.filter((app) => appPositions?.has?.(app.id));+ const activeCount = managedApps.filter((app) => app.overallStatus === 'online').length;+ const totalManaged = managedApps.length;+ const overflow = Math.max(0, totalManaged - visibleApps.length);+ const banner = totalManaged === 0+ ? 'MANAGED APPS · READY FOR ARRIVALS'+ : `MANAGED APPS · ${activeCount}/${totalManaged} ONLINE${overflow ? ` · +${overflow} MORE` : ''}`;++ return (+ <group>+ <group position={[-5.8, openWorldTerrainHeight(-5.8, 10.5), 10.5]} rotation={[0, 0.18, 0]}>+ <mesh position={[-2.5, 1.22, 0]} castShadow><boxGeometry args={[0.12, 2.45, 0.14]} /><meshStandardMaterial color="#76553d" roughness={1} /></mesh>+ <mesh position={[2.5, 1.22, 0]} castShadow><boxGeometry args={[0.12, 2.45, 0.14]} /><meshStandardMaterial color="#76553d" roughness={1} /></mesh>+ <mesh position={[0, 2.1, 0]} castShadow><boxGeometry args={[5.2, 0.68, 0.15]} /><meshStandardMaterial color={mixHex('#29413d', '#f4dfad', dayMix * 0.15)} roughness={0.92} /></mesh>+ <Text position={[0, 2.1, 0.09]} font={PIXEL_FONT_URL} fontSize={0.185} color={mixHex('#80d5b0', '#fff0cf', dayMix * 0.72)} anchorX="center" anchorY="middle" letterSpacing={0.035}>{banner}</Text>+ </group>+ {visibleApps.map((app) => (+ <AppKiosk key={app.id} app={app} position={appPositions.get(app.id)} agentMap={agentMap} dayMix={dayMix} onBuildingClick={onBuildingClick} />+ ))}+ </group>+ );+}++function MemoryGrove({ district, inboxDepth, dayMix }) {+ return (+ <group>+ {district.clusters.slice(0, 7).map((cluster) => {+ const [x, , z] = cluster.position;+ const y = openWorldTerrainHeight(x, z);+ return (+ <group key={cluster.category} position={[x, y, z]}>+ <mesh position={[0, 0.65, 0]} castShadow><cylinderGeometry args={[0.09, 0.16, 1.3, 7]} /><meshStandardMaterial color="#71533f" roughness={1} /></mesh>+ {[[-0.32, 1.38], [0.32, 1.42], [0, 1.76]].map(([offset, height], blossomIndex) => (+ <mesh key={blossomIndex} position={[offset, height, (blossomIndex - 1) * 0.08]} castShadow>+ <dodecahedronGeometry args={[0.48 + Math.min(0.18, cluster.count * 0.015), 0]} />+ <meshStandardMaterial color={cluster.color} emissive={cluster.color} emissiveIntensity={0.16 + Math.min(0.32, cluster.importance * 0.025)} roughness={0.78} flatShading />+ </mesh>+ ))}+ <Text position={[0, 0.28, 0.52]} font={PIXEL_FONT_URL} fontSize={0.14} color={mixHex(cluster.color, '#4b4037', dayMix * 0.65)} anchorX="center" anchorY="middle">{cluster.count}</Text>+ </group>+ );+ })}+ {inboxDepth > 0 && (+ <group position={[-38, openWorldTerrainHeight(-38, -25), -25]}>+ <mesh position={[0, 0.3, 0]}><cylinderGeometry args={[0.72, 0.9, 0.6, 12]} /><meshStandardMaterial color="#46544d" roughness={1} /></mesh>+ <mesh position={[0, 0.57, 0]} rotation={[-Math.PI / 2, 0, 0]}><circleGeometry args={[0.56, 18]} /><meshBasicMaterial color="#cab6ff" transparent opacity={0.82} toneMapped={false} /></mesh>+ <Text position={[0, 1.12, 0]} font={PIXEL_FONT_URL} fontSize={0.14} color="#cab6ff" anchorX="center" anchorY="middle">{`${inboxDepth} TO SORT`}</Text>+ </group>+ )}+ </group>+ );+}++function TaskYard({ queue, dayMix }) {+ const [x, , z] = PARCELS.taskQueue.anchor;+ return (+ <group position={[x + 4.2, openWorldTerrainHeight(x + 4.2, z), z - 0.5]}>+ {queue.crates.map((crate, index) => {+ const column = index % 2;+ const row = Math.floor(index / 2);+ return (+ <mesh key={crate.index} position={[(column - 0.5) * 1.12, 0.46 + row * 0.86, 0]} castShadow receiveShadow>+ <boxGeometry args={[0.98, 0.78, 0.92]} />+ <meshStandardMaterial color={mixHex('#5d493d', queue.color, dayMix * 0.34)} emissive={queue.color} emissiveIntensity={queue.active ? 0.13 : 0.03} roughness={0.95} />+ </mesh>+ );+ })}+ {queue.hasBlocked && <mesh position={[0, 4.15, 0]} rotation={[0, 0, Math.PI / 4]}><octahedronGeometry args={[0.42, 0]} /><meshBasicMaterial color={queue.color} toneMapped={false} /></mesh>}+ </group>+ );+}++function BackupPost({ vault }) {+ const [x, , z] = PARCELS.backupVault.anchor;+ const px = x - 4.2;+ const pz = z + 0.3;+ const pulse = vault.running || vault.alerting ? 0.78 : 0.38;+ return (+ <group position={[px, openWorldTerrainHeight(px, pz), pz]}>+ <mesh position={[0, 1.05, 0]} castShadow><cylinderGeometry args={[0.08, 0.12, 2.1, 7]} /><meshStandardMaterial color="#644b3a" roughness={1} /></mesh>+ <mesh position={[0, 2.08, 0]} castShadow><dodecahedronGeometry args={[0.48, 0]} /><meshStandardMaterial color={vault.color} emissive={vault.color} emissiveIntensity={pulse} roughness={0.62} /></mesh>+ <Text position={[0, 2.82, 0]} font={PIXEL_FONT_URL} fontSize={0.15} color={vault.color} anchorX="center" anchorY="middle">{vault.statusLabel}</Text>+ </group>+ );+}++function DataCargo({ harbor, dayMix }) {+ if (harbor.empty) return null;+ const count = Math.min(8, harbor.silos.length + harbor.racks.length);+ const [x, , z] = PARCELS.dataHarbor.anchor;+ return (+ <group>+ {Array.from({ length: count }, (_, index) => {+ const side = index % 2 === 0 ? -1 : 1;+ const row = Math.floor(index / 2);+ const px = x + side * (4.4 + row * 0.9);+ const pz = z + 0.4 - row * 0.55;+ return (+ <mesh key={`data-cargo-${index}`} position={[px, openWorldTerrainHeight(px, pz) + 0.48, pz]} castShadow receiveShadow>+ <boxGeometry args={[1.25, 0.92, 0.92]} />+ <meshStandardMaterial color={mixHex('#375158', index % 3 === 0 ? '#77c2b1' : '#d29b62', dayMix * 0.62)} roughness={0.9} metalness={0.04} />+ </mesh>+ );+ })}+ </group>+ );+}++function GoalFlags({ goals, dayMix }) {+ const [x, , z] = PARCELS.goals.anchor;+ return (+ <group>+ {goals.monuments.slice(0, 6).map((goal, index) => {+ const px = x - 5 + index * 1.65;+ const pz = z + 4.2;+ return (+ <group key={goal.id} position={[px, openWorldTerrainHeight(px, pz), pz]}>+ <mesh position={[0, 1.15, 0]}><cylinderGeometry args={[0.035, 0.05, 2.3, 6]} /><meshStandardMaterial color="#654d3c" roughness={1} /></mesh>+ <mesh position={[0.32, 1.82, 0]} rotation={[0, 0, -0.12]}><coneGeometry args={[0.33, 0.68, 3]} /><meshStandardMaterial color={mixHex(goal.color, '#f0c97b', dayMix * 0.16)} emissive={goal.color} emissiveIntensity={goal.built ? 0.28 : 0.08} roughness={0.86} /></mesh>+ </group>+ );+ })}+ </group>+ );+}++function VillagePortosLife({+ apps,+ appPositions,+ agentMap,+ backupStatus,+ cosTasks,+ healthMetrics,+ productivityData,+ goals,+ character,+ memoryGraph,+ inboxDepth,+ jiraTickets,+ jiraEnabled,+ introspection,+ voiceState,+ dayMix,+ onBuildingClick,+}) {+ const memory = useMemo(() => computeMemoryDistrict(memoryGraph), [memoryGraph]);+ const queue = useMemo(() => computeTaskQueue(cosTasks), [cosTasks]);+ const vault = useMemo(() => computeBackupVault(backupStatus), [backupStatus]);+ const harbor = useMemo(() => computeDataHarbor(introspection), [introspection]);+ const goalData = useMemo(() => computeGoalMonuments(Array.isArray(goals) ? goals : goals?.goals), [goals]);+ const artifacts = useMemo(() => computeArtifacts({ character, goals }), [character, goals]);+ const health = useMemo(() => computeHealthTower(healthMetrics), [healthMetrics]);+ const productivity = useMemo(() => computeProductivityMonument(productivityData), [productivityData]);+ const voice = useMemo(() => computeVoiceMarker(voiceState), [voiceState]);+ const archivedCount = (Array.isArray(apps) ? apps : []).filter((app) => app?.archived).length;+ const dataCount = harbor.empty ? 0 : harbor.silos.length + harbor.racks.length;+ const metrics = {+ memory: { label: `${memory.totalMemories} MEMORIES${inboxDepth > 0 ? ` · ${inboxDepth} TO SORT` : ''}`, color: '#8c6fd1' },+ backup: { label: vault.statusLabel, color: vault.color },+ tasks: { label: queue.total ? `${queue.total} OPEN · ${queue.state.toUpperCase()}` : 'QUEUE CLEAR', color: queue.color },+ archive: { label: `${archivedCount} ARCHIVED APP${archivedCount === 1 ? '' : 'S'}`, color: '#71806c' },+ wellness: { label: `${health.presentCount}/4 VITALS REPORTING`, color: health.hasData ? '#4d9b67' : '#71806c' },+ focus: { label: productivity.throughputLabel, color: productivity.color },+ sprint: { label: `${Array.isArray(jiraTickets) ? jiraTickets.length : 0} SPRINT TICKETS`, color: '#4f8ea9' },+ quiet: { label: 'SECRETS LIVE HERE', color: '#9477a5' },+ goals: { label: `${goalData.completedCount}/${goalData.total} GOALS COMPLETE`, color: '#b74e66' },+ voice: { label: voice.label, color: voice.color },+ artifacts: { label: `${artifacts.total} TROPH${artifacts.total === 1 ? 'Y' : 'IES'} EARNED`, color: '#b98439' },+ harbor: { label: `${dataCount} DATA DOMAINS`, color: harbor.dbDown ? '#c46b62' : '#4f8e91' },+ };++ return (+ <group>+ <VillageSites dayMix={dayMix} metrics={metrics} jiraEnabled={jiraEnabled} />+ <VillageAppMarket apps={apps} appPositions={appPositions} agentMap={agentMap} dayMix={dayMix} onBuildingClick={onBuildingClick} />+ <MemoryGrove district={memory} inboxDepth={inboxDepth} dayMix={dayMix} />+ <TaskYard queue={queue} dayMix={dayMix} />+ <BackupPost vault={vault} />+ <DataCargo harbor={harbor} dayMix={dayMix} />+ <GoalFlags goals={goalData} dayMix={dayMix} />+ </group>+ );+}++function Bench({ position, rotation = 0, dayMix }) {+ return (+ <group position={[position[0], openWorldTerrainHeight(position[0], position[1]), position[1]]} rotation={[0, rotation, 0]}>+ <mesh position={[0, 0.55, 0]} castShadow><boxGeometry args={[2.4, 0.22, 0.55]} /><meshStandardMaterial color={mixHex('#3a443d', '#bb8052', dayMix)} roughness={1} /></mesh>+ <mesh position={[0, 1.04, 0.22]} rotation={[-0.12, 0, 0]} castShadow><boxGeometry args={[2.4, 0.82, 0.18]} /><meshStandardMaterial color={mixHex('#3a443d', '#bb8052', dayMix)} roughness={1} /></mesh>+ {[-0.82, 0.82].map((x) => <mesh key={x} position={[x, 0.24, 0]}><boxGeometry args={[0.18, 0.48, 0.42]} /><meshStandardMaterial color="#34423f" roughness={0.8} /></mesh>)}+ </group>+ );+}++function VillageProps({ dayMix }) {+ const lanterns = [[-12, 32], [12, 32], [-27, 11], [28, 3], [-16, -18], [17, -18], [0, -37], [0, -53]];+ return (+ <group>+ <group position={[0, openWorldTerrainHeight(0, 41), 41]}>+ {[-3.3, 3.3].map((x) => <mesh key={x} position={[x, 3, 0]} castShadow><boxGeometry args={[0.52, 6, 0.65]} /><meshStandardMaterial color={mixHex('#354943', '#b98554', dayMix)} roughness={1} /></mesh>)}+ <mesh position={[0, 5.7, 0]} castShadow><boxGeometry args={[7.15, 0.65, 0.72]} /><meshStandardMaterial color={mixHex('#354943', '#b98554', dayMix)} roughness={1} /></mesh>+ <mesh position={[0, 5.08, 0.38]}><boxGeometry args={[3.8, 0.95, 0.18]} /><meshStandardMaterial color={mixHex('#293d39', '#f0ddb2', dayMix * 0.18)} roughness={0.9} /></mesh>+ <Text position={[0, 5.08, 0.5]} font={PIXEL_FONT_URL} fontSize={0.38} color={mixHex('#94d7bf', '#fff0cf', dayMix * 0.78)} anchorX="center" anchorY="middle" letterSpacing={0.08}>PORTOS VILLAGE</Text>+ </group>+ {lanterns.map(([x, z], index) => (+ <group key={`lantern-${index}`} position={[x, openWorldTerrainHeight(x, z), z]}>+ <mesh position={[0, 1.2, 0]} castShadow><cylinderGeometry args={[0.07, 0.11, 2.4, 7]} /><meshStandardMaterial color="#344746" roughness={0.75} metalness={0.12} /></mesh>+ <mesh position={[0, 2.25, 0]} castShadow><boxGeometry args={[0.52, 0.68, 0.52]} /><meshStandardMaterial color="#355058" emissive="#ffd27a" emissiveIntensity={0.58} roughness={0.48} /></mesh>+ <mesh position={[0, 2.67, 0]} rotation={[0, Math.PI / 4, 0]}><coneGeometry args={[0.5, 0.35, 4]} /><meshStandardMaterial color="#a85749" roughness={1} /></mesh>+ </group>+ ))}+ <Bench position={[-8, 9]} rotation={0.58} dayMix={dayMix} />+ <Bench position={[10, 10]} rotation={-0.6} dayMix={dayMix} />+ <Bench position={[-7, -30]} rotation={2.7} dayMix={dayMix} />+ {Array.from({ length: 20 }, (_, index) => {+ const row = Math.floor(index / 5);+ const column = index % 5;+ const x = -40 + column * 1.15;+ const z = 19 + row * 1.1;+ return (+ <group key={`crop-${index}`} position={[x, openWorldTerrainHeight(x, z), z]}>+ <mesh position={[0, 0.1, 0]}><boxGeometry args={[0.9, 0.16, 0.78]} /><meshStandardMaterial color="#74533c" roughness={1} /></mesh>+ <mesh position={[0, 0.47, 0]}><dodecahedronGeometry args={[0.34, 0]} /><meshStandardMaterial color={index % 3 === 0 ? '#e7b84b' : '#69a45b'} roughness={1} flatShading /></mesh>+ </group>+ );+ })}+ <mesh position={[8, openWorldTerrainHeight(8, 17) + 0.035, 17]} rotation={[-Math.PI / 2, 0, -0.18]}>+ <circleGeometry args={[4.7, 32]} />+ <meshStandardMaterial color={mixHex('#224f5c', '#69b4aa', dayMix)} emissive="#4e9d9b" emissiveIntensity={0.12} roughness={0.28} metalness={0.08} transparent opacity={0.92} />+ </mesh>+ </group>+ );+}++function Fireflies({ dayMix }) {+ const refs = useRef([]);+ const particles = useMemo(() => Array.from({ length: 24 }, (_, index) => ({ x: -24 + ((index * 17) % 49), z: -26 + ((index * 29) % 59), phase: index * 0.83 })), []);+ useFrame(({ clock }) => {+ const time = clock.getElapsedTime();+ refs.current.forEach((mesh, index) => {+ if (!mesh) return;+ const point = particles[index];+ mesh.position.set(point.x + Math.sin(time * 0.43 + point.phase) * 1.4, openWorldTerrainHeight(point.x, point.z) + 1.3 + Math.sin(time * 1.2 + point.phase) * 0.55, point.z + Math.cos(time * 0.37 + point.phase) * 1.1);+ });+ });+ return (+ <group>+ {particles.map((particle, index) => (+ <mesh key={particle.phase} ref={(node) => { refs.current[index] = node; }}><sphereGeometry args={[0.075, 6, 5]} /><meshBasicMaterial color={mixHex('#7ee4d5', '#fff0a6', dayMix)} transparent opacity={0.84} toneMapped={false} /></mesh>+ ))}+ </group>+ );+}++export default function OpenWorldArchipelago({+ settings,+ explorationMode = false,+ apps = [],+ appPositions = null,+ agentMap = null,+ backupStatus = null,+ cosTasks = [],+ healthMetrics = null,+ productivityData = null,+ goals = null,+ character = null,+ memoryGraph = null,+ inboxDepth = 0,+ jiraTickets = [],+ jiraEnabled = true,+ introspection = null,+ voiceState = null,+ onBuildingClick,+}) {+ const naturalDayMix = openWorldDayMix(settings);+ // Keep the village colorful through evening hours. Night is expressed by warm windows,+ // lanterns, and the sky—not by turning the entire playable ground into near-black ink.+ const dayMix = explorationMode ? Math.max(0.74, naturalDayMix) : naturalDayMix;+ const detailed = openWorldShowDetail(settings);+ const resolvedAppPositions = useMemo(+ () => appPositions || computeVillageAppLayout(apps),+ [appPositions, apps],+ );+ return (+ <group>+ {explorationMode+ ? <Island island={VILLAGE_GROUND} dayMix={dayMix} detailed={detailed} />+ : ARCHIPELAGO_ISLANDS.map((island) => <Island key={island.id} island={island} dayMix={dayMix} detailed={detailed} />)}+ {!explorationMode && <VillageCauseways dayMix={dayMix} />}+ <VillageRoutes dayMix={dayMix} detailed={detailed} />+ <VillageDressing settings={settings} dayMix={dayMix} />+ {explorationMode && (+ <>+ <VillagePortosLife+ apps={apps}+ appPositions={resolvedAppPositions}+ agentMap={agentMap}+ backupStatus={backupStatus}+ cosTasks={cosTasks}+ healthMetrics={healthMetrics}+ productivityData={productivityData}+ goals={goals}+ character={character}+ memoryGraph={memoryGraph}+ inboxDepth={inboxDepth}+ jiraTickets={jiraTickets}+ jiraEnabled={jiraEnabled}+ introspection={introspection}+ voiceState={voiceState}+ dayMix={dayMix}+ onBuildingClick={onBuildingClick}+ />+ <VillageProps dayMix={dayMix} />+ {detailed && <Fireflies dayMix={dayMix} />}+ </>+ )}+ </group>+ );+}diff --git a/client/src/components/openworld/OpenWorldBackupVault.jsx b/client/src/components/openworld/OpenWorldBackupVault.jsxindex 2e93c63858..d3ad5fc56a 100644--- a/client/src/components/openworld/OpenWorldBackupVault.jsx+++ b/client/src/components/openworld/OpenWorldBackupVault.jsx@@ -37,32 +37,33 @@ export default function OpenWorldBackupVault({ backupStatus, settings }) {return (<group position={position}>- {/* Armored vault body — dark slab with a faint health-tinted glow */}- <mesh position={[0, height / 2, 0]}>- <boxGeometry args={[width, height, width * 0.8]} />+ {/* A faceted memory cairn reads as part of the landscape, while its live seal+ preserves the original backup-health contract. */}+ <mesh position={[0, height * 0.36, 0]} scale={[1, 0.82, 0.82]}>+ <dodecahedronGeometry args={[width * 0.62, 0]} /><meshStandardMaterial- color={tintStructure('#0a0e16')}+ color={tintStructure('#263238')}emissive={color}emissiveIntensity={0.12 + vault.intensity * 0.18}- metalness={0.6}- roughness={0.5}+ metalness={0.2}+ roughness={0.86}+ flatShading/></mesh>- {/* Beveled cap so it reads as a sealed bunker, not just a box */}- <mesh position={[0, height + 0.25, 0]}>- <boxGeometry args={[width * 1.1, 0.5, width * 0.9]} />- <meshStandardMaterial color={tintStructure('#0d131f')} emissive={color} emissiveIntensity={0.25} metalness={0.7} roughness={0.4} />+ <mesh position={[0, 0.16, 0]}>+ <cylinderGeometry args={[width * 0.76, width * 0.9, 0.32, 10]} />+ <meshStandardMaterial color={tintStructure('#344247')} emissive={color} emissiveIntensity={0.16} roughness={0.9} flatShading /></mesh>{/* Circular vault seal on the front (+Z) face — the live health indicator */}- <mesh ref={sealRef} position={[0, height * 0.5, width * 0.4 + 0.05]} rotation={[Math.PI / 2, 0, 0]}>+ <mesh ref={sealRef} position={[0, height * 0.37, width * 0.52]} rotation={[Math.PI / 2, 0, 0]}><cylinderGeometry args={[width * 0.28, width * 0.28, 0.12, 24]} /><meshStandardMaterial color={color} emissive={color} emissiveIntensity={vault.intensity} toneMapped={false} /></mesh>{/* Label + status/time-since sublabel above the vault */}- <OpenWorldLabel position={[0, height + 1.7, 0]} fontSize={1.3} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>+ <OpenWorldLabel position={[0, height * 0.78, 0]} fontSize={0.64} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>VAULT</OpenWorldLabel>- <OpenWorldLabel position={[0, height + 0.85, 0]} fontSize={0.85} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>+ <OpenWorldLabel position={[0, height * 0.69, 0]} fontSize={0.38} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>{sublabel}</OpenWorldLabel></group>diff --git a/client/src/components/openworld/OpenWorldFastTravel.jsx b/client/src/components/openworld/OpenWorldFastTravel.jsxindex b390fb920a..7484d0d85e 100644--- a/client/src/components/openworld/OpenWorldFastTravel.jsx+++ b/client/src/components/openworld/OpenWorldFastTravel.jsx@@ -1,8 +1,13 @@import { useEffect, useMemo, useRef, useState } from 'react';import Modal from '../ui/Modal';-import { MINI_MAP_PADDING, projectGeography, projectPoint, spreadProjectedPoints } from '../../utils/openWorldMiniMap';+import {+ MINI_MAP_PADDING,+ computeBounds,+ projectPoint,+ spreadProjectedPoints,+} from '../../utils/openWorldMiniMap';import { listRegions, searchRegions } from '../../utils/openWorldRegions';-import { WORLD } from '../../utils/openWorldPlan';+import { VILLAGE_GROUND, VILLAGE_ROUTES } from '../../utils/openWorldPlan';import useOpenWorldViewport from '../../hooks/useOpenWorldViewport';// OpenWorld's world map — the thing that makes this an open world rather than one city you pan@@ -20,18 +25,28 @@ import useOpenWorldViewport from '../../hooks/useOpenWorldViewport';// here because every class this panel wears (`port-media-overlay*`) is global rather than// scoped under `.openworld-themed`.-// The map plate's world extent: the whole playable square, so a region's marker sits where-// the district actually is rather than being normalized against a shifting building cloud.-const MAP_BOUNDS = {- minX: -WORLD.landHalf - 8,- maxX: WORLD.landHalf + 8,- minZ: WORLD.shorelineZ - 20,- maxZ: WORLD.landHalf + 8,+// The plate projects the same unified ground and curved lane registry as street-level+// rendering. This keeps the map spatially honest without resurrecting the old island graph.+const MAP_BOUNDS = computeBounds([+ { x: VILLAGE_GROUND.center[0] - VILLAGE_GROUND.radiusX, z: VILLAGE_GROUND.center[1] },+ { x: VILLAGE_GROUND.center[0] + VILLAGE_GROUND.radiusX, z: VILLAGE_GROUND.center[1] },+ { x: VILLAGE_GROUND.center[0], z: VILLAGE_GROUND.center[1] - VILLAGE_GROUND.radiusZ },+ { x: VILLAGE_GROUND.center[0], z: VILLAGE_GROUND.center[1] + VILLAGE_GROUND.radiusZ },+]);+const villageCenter = projectPoint({ x: VILLAGE_GROUND.center[0], z: VILLAGE_GROUND.center[1] }, MAP_BOUNDS, MINI_MAP_PADDING);+const villageEdgeX = projectPoint({ x: VILLAGE_GROUND.center[0] + VILLAGE_GROUND.radiusX, z: VILLAGE_GROUND.center[1] }, MAP_BOUNDS, MINI_MAP_PADDING);+const villageEdgeZ = projectPoint({ x: VILLAGE_GROUND.center[0], z: VILLAGE_GROUND.center[1] + VILLAGE_GROUND.radiusZ }, MAP_BOUNDS, MINI_MAP_PADDING);+const MAP_GROUND = {+ nx: villageCenter.nx,+ ny: villageCenter.ny,+ radiusX: Math.abs(villageEdgeX.nx - villageCenter.nx),+ radiusY: Math.abs(villageEdgeZ.ny - villageCenter.ny),};--// Waterfront on the plate, read from the same projector the mini-map uses so the two can't-// disagree about where the bay starts.-const GEOGRAPHY = projectGeography(MAP_BOUNDS, MINI_MAP_PADDING);+const MAP_ROUTES = VILLAGE_ROUTES.map((route) => ({+ ...route,+ points: [...route.points, ...(route.closed ? [route.points[0]] : [])]+ .map(([x, z]) => projectPoint({ x, z }, MAP_BOUNDS, MINI_MAP_PADDING)),+}));export default function OpenWorldFastTravel({ open, onClose, onTravel, activeRegionId, onLeaveRegion, isFeatureEnabled }) {const [query, setQuery] = useState('');@@ -75,18 +90,19 @@ export default function OpenWorldFastTravel({ open, onClose, onTravel, activeRegonClose={onClose}size="none"usePortal- ariaLabel="World map"+ ariaLabel="Village map"+ zIndexClassName="z-[120]"panelClassName="w-full max-w-3xl max-h-[85vh] rounded-xl border port-media-overlay flex flex-col overflow-hidden"><div className="flex items-center gap-3 px-4 py-3 border-b border-current/10">- <div className="font-pixel text-[12px] tracking-widest">WORLD MAP</div>+ <div className="font-pixel text-[12px] tracking-widest">VILLAGE MAP</div><inputref={inputRef}type="text"value={query}onChange={(e) => setQuery(e.target.value)}- placeholder="Search regions…"- aria-label="Search regions"+ placeholder="Search village places…"+ aria-label="Search village places"className="flex-1 min-w-0 font-pixel text-[11px] px-2 py-1.5 rounded border border-current/20 bg-transparent focus:outline-none focus:border-current/50"/>{/* The only way back out of a region to the whole-world overview — without it a@@ -109,23 +125,38 @@ export default function OpenWorldFastTravel({ open, onClose, onTravel, activeReg</button></div>- <div className="flex-1 min-h-0 grid grid-cols-1 md:grid-cols-[220px_1fr] gap-3 p-3 overflow-hidden">+ <div className={`flex-1 min-h-0 grid gap-3 p-3 overflow-hidden ${isCondensed ? 'grid-cols-1 grid-rows-[minmax(190px,36vh)_minmax(0,1fr)]' : 'grid-cols-[240px_1fr]'}`}>{/* World plate — regions in their real plan positions, so the list and the mapcan't disagree about where a place is. Compact viewports get a full-widthtouch-sized plate above the searchable list; desktop keeps the square rail. */}<div- className={`${isCondensed ? 'block w-full aspect-[4/3]' : 'hidden md:block aspect-square'} relative rounded-lg border border-current/15 overflow-hidden`}+ className="block w-full h-full relative rounded-lg border border-current/15 overflow-hidden"role="region"- aria-label="World map"+ aria-label="Village map">- <div className="absolute inset-0 bg-current/5" />- {GEOGRAPHY && (- <div- className="absolute inset-x-0 top-0 bg-current/10"- style={{ height: `${GEOGRAPHY.shorelineY * 100}%` }}- aria-hidden="true"+ <div className="absolute inset-0 bg-[#132521]/95" />+ <svg className="absolute inset-0 w-full h-full pointer-events-none" viewBox="0 0 100 100" aria-hidden="true">+ <ellipse+ cx={MAP_GROUND.nx * 100}+ cy={MAP_GROUND.ny * 100}+ rx={MAP_GROUND.radiusX * 100}+ ry={MAP_GROUND.radiusY * 100}+ fill="rgba(116, 156, 91, 0.86)"+ stroke="rgba(228, 218, 163, 0.78)"+ strokeWidth="1.2"/>- )}+ {MAP_ROUTES.map((route) => (+ <polyline+ key={route.id}+ points={route.points.map((point) => `${point.nx * 100},${point.ny * 100}`).join(' ')}+ fill="none"+ stroke={route.kind === 'path' ? 'rgba(218, 170, 112, 0.88)' : 'rgba(239, 221, 165, 0.92)'}+ strokeWidth={route.kind === 'path' ? '1.25' : '2.4'}+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ ))}+ </svg>{regions.map((region) => {const { nx, ny } = markersById.get(region.id);const isActive = region.id === activeRegionId;@@ -137,16 +168,19 @@ export default function OpenWorldFastTravel({ open, onClose, onTravel, activeRegtitle={region.label}aria-label={`Teleport to ${region.label}`}onClick={() => travel(region)}- className={`absolute -translate-x-1/2 -translate-y-1/2 rounded-full border transition-all flex items-center justify-center ${- isActive- ? 'w-11 h-11 md:w-3.5 md:h-3.5 border-current bg-current'- : isMatch- ? 'w-11 h-11 md:w-2.5 md:h-2.5 border-current/70 bg-current/50 md:hover:w-3.5 md:hover:h-3.5'- : 'w-11 h-11 md:w-2 md:h-2 border-current/30 bg-current/10'- }`}+ className={`absolute -translate-x-1/2 -translate-y-1/2 rounded-full transition-all flex items-center justify-center ${isCondensed ? 'w-11 h-11' : 'w-5 h-5 hover:scale-125'}`}style={{ left: `${nx * 100}%`, top: `${ny * 100}%` }}>- <span className="w-2 h-2 md:w-1.5 md:h-1.5 rounded-full bg-current" aria-hidden="true" />+ <span+ className={`rounded-full border shadow-sm ${+ isActive+ ? 'w-4 h-4 border-[#fff5c7] bg-[#fff0a6] ring-2 ring-[#fff0a6]/35'+ : isMatch+ ? 'w-3 h-3 border-[#f5e7bd] bg-[#f5e7bd]/85'+ : 'w-2.5 h-2.5 border-current/40 bg-current/25'+ }`}+ aria-hidden="true"+ /></button>);})}diff --git a/client/src/components/openworld/OpenWorldFastTravel.test.jsx b/client/src/components/openworld/OpenWorldFastTravel.test.jsxindex 417a6dc35c..4c8d6e628f 100644--- a/client/src/components/openworld/OpenWorldFastTravel.test.jsx+++ b/client/src/components/openworld/OpenWorldFastTravel.test.jsx@@ -43,16 +43,16 @@ describe('OpenWorldFastTravel', () => {it('filters the list by the search box', () => {renderPanel();- fireEvent.change(screen.getByLabelText('Search regions'), { target: { value: 'memory' } });+ fireEvent.change(screen.getByLabelText('Search village places'), { target: { value: 'memory house' } });const list = screen.getByRole('list');- expect(within(list).getByText('Memory Quarter')).toBeInTheDocument();- expect(within(list).queryByText('Data Harbor')).not.toBeInTheDocument();+ expect(within(list).getByText('Memory House')).toBeInTheDocument();+ expect(within(list).queryByText('Data Pier')).not.toBeInTheDocument();});it('reports an empty result rather than an empty panel', () => {renderPanel();- fireEvent.change(screen.getByLabelText('Search regions'), { target: { value: 'zzzz' } });+ fireEvent.change(screen.getByLabelText('Search village places'), { target: { value: 'zzzz' } });expect(screen.getByText(/NO REGION MATCHES/)).toBeInTheDocument();});@@ -65,7 +65,7 @@ describe('OpenWorldFastTravel', () => {it('omits the OPEN affordance for a region with no page behind it', () => {renderPanel();- fireEvent.change(screen.getByLabelText('Search regions'), { target: { value: 'quiet corner' } });+ fireEvent.change(screen.getByLabelText('Search village places'), { target: { value: 'quiet corner' } });const list = screen.getByRole('list');expect(within(list).getByText('Quiet Corner')).toBeInTheDocument();expect(within(list).queryByText('OPEN')).not.toBeInTheDocument();@@ -99,7 +99,7 @@ describe('OpenWorldFastTravel', () => {const dialog = screen.getByRole('dialog');expect(dialog).toHaveAttribute('aria-modal', 'true');- expect(dialog).toHaveAttribute('aria-label', 'World map');+ expect(dialog).toHaveAttribute('aria-label', 'Village map');fireEvent.click(dialog.parentElement);expect(onClose).toHaveBeenCalledTimes(1);@@ -114,7 +114,7 @@ describe('OpenWorldFastTravel', () => {for (const region of OPEN_WORLD_REGIONS) {expect(screen.getByLabelText(`Teleport to ${region.label}`)).toBeInTheDocument();}- fireEvent.click(screen.getByLabelText('Teleport to Data Harbor'));+ fireEvent.click(screen.getByLabelText('Teleport to Data Pier'));expect(onTravel.mock.calls[0][0].id).toBe('data-harbor');});});diff --git a/client/src/components/openworld/OpenWorldHud.jsx b/client/src/components/openworld/OpenWorldHud.jsxindex 3212b4eb54..0376a9709b 100644--- a/client/src/components/openworld/OpenWorldHud.jsx+++ b/client/src/components/openworld/OpenWorldHud.jsx@@ -36,7 +36,10 @@ function ControlsHint({ visible, isDesktop }) {return (<div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none animate-in fade-in duration-500"><div className="openworld-hud-panel px-5 py-4 text-center">- <div className="openworld-hud-eyebrow mb-3">FREE ROAM</div>+ <div className="openworld-hud-eyebrow mb-2">WELCOME TO THE VILLAGE</div>+ <div className="mb-3 font-pixel text-[9px] tracking-[0.14em] text-[rgb(var(--port-text))]">+ TAKE THE LONG WAY · THERE IS ALWAYS SOMETHING AROUND THE BEND+ </div><div className="mb-3 flex items-center justify-center gap-1.5">{['W', 'A', 'S', 'D'].map((key) => (<span key={key} className="flex h-7 w-7 items-center justify-center rounded-lg border border-[rgb(var(--port-accent)/.28)] bg-[rgb(var(--port-accent)/.08)] font-pixel text-[10px] text-[rgb(var(--port-text))]">@@ -45,21 +48,13 @@ function ControlsHint({ visible, isDesktop }) {))}</div><div className="font-pixel text-[8px] tracking-wide text-[rgb(var(--port-text-muted))]">- WASD DRIVE <span className="mx-1 opacity-50">·</span> SHIFT BOOST <span className="mx-1 opacity-50">·</span> CTRL BRAKE <span className="mx-1 opacity-50">·</span> SPACE JUMP <span className="mx-1 opacity-50">·</span> SCROLL ZOOM <span className="mx-1 opacity-50">·</span> M MAP+ WASD DRIVE <span className="mx-1 opacity-50">·</span> SHIFT BOOST <span className="mx-1 opacity-50">·</span> F VISIT <span className="mx-1 opacity-50">·</span> SPACE HOP <span className="mx-1 opacity-50">·</span> M VILLAGE MAP</div></div></div>);}-function Crosshair() {- return (- <div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none">- <div className="openworld-hud-crosshair" />- </div>- );-}-function SystemMetric({ label, value }) {return (<div className="flex items-baseline justify-between gap-1">@@ -193,6 +188,53 @@ export default function OpenWorldHud({onOpenDestination,};+ if (explorationMode) {+ const speedKmh = Math.round(Math.abs(playerPose?.speed || 0) * 3.6);+ const progress = totalShards > 0 ? Math.min(100, Math.round((collectedCount / totalShards) * 100)) : 0;+ const settingsOpen = location.pathname === '/openworld/settings';+ const toggleSettings = () => navigate(settingsOpen ? `/openworld${location.search}` : `/openworld/settings${location.search}`);++ return (+ <div className="absolute inset-0 z-20 pointer-events-none openworld-hud-shell overflow-hidden" {...noPointerFocusSurfaceProps}>+ <div className="openworld-village-status pointer-events-auto">+ <span className={`openworld-village-status__dot ${sentinel.dot}`} aria-hidden="true" />+ <span>+ <small>PORTOS VILLAGE</small>+ <strong>{activeRegion?.label || 'The Common'}</strong>+ </span>+ <span className="openworld-village-status__echo" aria-label={`${collectedCount} of ${totalShards} echoes recovered`}>+ <i style={{ width: `${progress}%` }} />+ ⯁ {collectedCount}/{totalShards}+ </span>+ </div>++ <div className="openworld-village-actions pointer-events-auto" role="toolbar" aria-label="Village controls">+ {onOpenFastTravel && <HudAction icon={MapIcon} label="Village map" hint="M" onClick={onOpenFastTravel} />}+ {onEnterPhotoMode && <HudAction icon={Camera} label="Take a postcard" onClick={onEnterPhotoMode} />}+ <HudAction icon={Compass} label="Fly out to world view" hint="TAB" onClick={onToggleExploration} />+ <HudAction icon={Settings} label="Village settings" active={settingsOpen} onClick={toggleSettings} />+ </div>++ <div className="openworld-village-speed" aria-label={`${speedKmh} kilometers per hour`}>+ <strong>{speedKmh}</strong><span>km/h</span>+ </div>++ {isFocused && (+ <OpenWorldFocusPanel+ app={focusedApp}+ notFound={focusNotFound}+ agents={focusAgents}+ onClose={onCloseFocus}+ onFocusInWorld={onFocusInWorld}+ isDesktop={isDesktop}+ />+ )}+ <OpenWorldInteractionPrompt target={proximityTarget} compact={!isDesktop} />+ <ControlsHint visible isDesktop={isDesktop} />+ </div>+ );+ }+return (// The HUD floats over a keyboard-driven world (WASD to move, Space to jump,// the playback transport keys). A click on any HUD control must hand focus@@ -203,32 +245,44 @@ export default function OpenWorldHud({<div className="absolute left-4 top-4 pointer-events-auto"><div className="openworld-hud-panel w-[min(17rem,calc(100vw-2rem))] px-4 py-3.5"><div className="flex items-center justify-between gap-4">- <span className="openworld-hud-eyebrow">OpenWorld / free roam</span>+ <span className="openworld-hud-eyebrow">{explorationMode ? 'OpenWorld / signal trail' : 'OpenWorld / world view'}</span><span className={`h-2.5 w-2.5 rounded-full ${sentinel.dot}`} title={sentinel.label} aria-label={`World health ${sentinel.label}`} /></div>- <div className="mt-2 flex items-end justify-between gap-4">- <span className="font-pixel text-2xl tracking-[0.12em] text-[rgb(var(--port-text))]">{formatClockTime(time, { seconds: false })}</span>- <span className="font-pixel text-[9px] tracking-[0.12em] text-[rgb(var(--port-accent))]">{activeApps}/{totalApps} ACTIVE</span>- </div>- <div className="mt-2">- <HealthBar value={activeApps} max={totalApps} color="rgb(var(--port-accent))" />- </div>- <div- className="mt-2 grid grid-cols-3 gap-3 border-t border-[rgb(var(--port-accent)/.14)] pt-2"- aria-label="System resource usage"- >- <SystemMetric label="CPU" value={cpuPct} />- <SystemMetric label="MEM" value={memPct} />- <SystemMetric label="DISK" value={diskPct} />- </div>- <div className="mt-2 flex items-center justify-between gap-3 font-pixel text-[8px] tracking-[0.12em] text-[rgb(var(--port-text-muted))]">- <span className="truncate">{activeRegion?.label || 'DOWNTOWN'}</span>- <span className={sentinel.text}>{sentinel.label}</span>- </div>+ {explorationMode ? (+ <>+ <div className="mt-2 font-pixel text-lg tracking-[0.1em] text-[rgb(var(--port-text))]">{activeRegion?.label || 'THE PORT'}</div>+ <div className="mt-2 flex items-center justify-between gap-3 border-t border-[rgb(var(--port-accent)/.14)] pt-2 font-pixel text-[9px] tracking-[0.1em]">+ <span className="text-[rgb(var(--port-text-muted))]">ECHOES RECOVERED</span>+ <span className="text-[rgb(var(--port-accent))]">⯁ {collectedCount}/{totalShards}</span>+ </div>+ </>+ ) : (+ <>+ <div className="mt-2 flex items-end justify-between gap-4">+ <span className="font-pixel text-2xl tracking-[0.12em] text-[rgb(var(--port-text))]">{formatClockTime(time, { seconds: false })}</span>+ <span className="font-pixel text-[9px] tracking-[0.12em] text-[rgb(var(--port-accent))]">{activeApps}/{totalApps} ACTIVE</span>+ </div>+ <div className="mt-2">+ <HealthBar value={activeApps} max={totalApps} color="rgb(var(--port-accent))" />+ </div>+ <div+ className="mt-2 grid grid-cols-3 gap-3 border-t border-[rgb(var(--port-accent)/.14)] pt-2"+ aria-label="System resource usage"+ >+ <SystemMetric label="CPU" value={cpuPct} />+ <SystemMetric label="MEM" value={memPct} />+ <SystemMetric label="DISK" value={diskPct} />+ </div>+ <div className="mt-2 flex items-center justify-between gap-3 font-pixel text-[8px] tracking-[0.12em] text-[rgb(var(--port-text-muted))]">+ <span className="truncate">{activeRegion?.label || 'THE PORT'}</span>+ <span className={sentinel.text}>{sentinel.label}</span>+ </div>+ </>+ )}</div></div>- {filter && onFilterChange && (+ {!explorationMode && filter && onFilterChange && (<div className="absolute left-1/2 top-4 -translate-x-1/2"><OpenWorldFilterBarfilter={filter}@@ -239,7 +293,7 @@ export default function OpenWorldHud({</div>)}- <div className="absolute right-4 top-4 pointer-events-auto">+ {!explorationMode && <div className="absolute right-4 top-4 pointer-events-auto"><div className="openworld-hud-panel openworld-hud-panel--quiet flex items-center gap-3 px-3.5 py-2.5"><div className="flex items-center gap-2"><span className={`h-2 w-2 rounded-full ${connected ? 'bg-port-success' : 'bg-port-error animate-pulse'}`} />@@ -253,7 +307,7 @@ export default function OpenWorldHud({<span className="font-pixel text-[9px] tracking-[0.12em] text-[rgb(var(--port-text-muted))]">CoS {cosStatus?.running ? 'RUN' : 'IDLE'}</span></div></div>- </div>+ </div>}{isFocused ? (<OpenWorldFocusPanel@@ -278,8 +332,8 @@ export default function OpenWorldHud({/>)}- <OpenWorldAgentBar cosAgents={cosAgents} agentMap={agentMap} />- <OpenWorldXpBadge character={character} onOpenDestination={onOpenDestination} />+ {!explorationMode && <OpenWorldAgentBar cosAgents={cosAgents} agentMap={agentMap} />}+ {!explorationMode && <OpenWorldXpBadge character={character} onOpenDestination={onOpenDestination} />}<div className="absolute bottom-4 left-4 pointer-events-auto flex flex-col gap-2 items-start"><OpenWorldMiniMap@@ -355,7 +409,6 @@ export default function OpenWorldHud({/>)}- {explorationMode && <Crosshair />}{explorationMode && isDesktop && <OpenWorldInteractionPrompt target={proximityTarget} />}<ControlsHint visible={explorationMode} isDesktop={isDesktop} /></div>diff --git a/client/src/components/openworld/OpenWorldHud.test.jsx b/client/src/components/openworld/OpenWorldHud.test.jsxindex 2abef26381..6e4fe86084 100644--- a/client/src/components/openworld/OpenWorldHud.test.jsx+++ b/client/src/components/openworld/OpenWorldHud.test.jsx@@ -54,4 +54,20 @@ describe('OpenWorldHud', () => {expect(within(metrics).getByText('DISK')).toBeInTheDocument();expect(within(metrics).getByText('91%')).toBeInTheDocument();});++ it('gives exploration a quiet village hierarchy instead of dashboard telemetry', () => {+ renderHud({+ explorationMode: true,+ activeRegion: { id: 'memory', label: 'Memory Wilds' },+ collectedCount: 3,+ totalShards: 17,+ });++ expect(screen.queryByLabelText('System resource usage')).not.toBeInTheDocument();+ expect(screen.getAllByText('Memory Wilds').length).toBeGreaterThan(0);+ expect(screen.getByText('PORTOS VILLAGE')).toBeInTheDocument();+ expect(screen.getByText('WELCOME TO THE VILLAGE')).toBeInTheDocument();+ expect(screen.getAllByText(/3\/17/).length).toBeGreaterThan(0);+ expect(screen.getByText(/Take the long way/i)).toBeInTheDocument();+ });});diff --git a/client/src/components/openworld/OpenWorldLights.jsx b/client/src/components/openworld/OpenWorldLights.jsxindex 05cfbde09f..3964b548a4 100644--- a/client/src/components/openworld/OpenWorldLights.jsx+++ b/client/src/components/openworld/OpenWorldLights.jsx@@ -88,7 +88,9 @@ export default function OpenWorldLights({ settings, lightingTier }) {const timeOfDay = settings?.timeOfDay ?? 'sunset';const skyTheme = settings?.skyTheme ?? 'cyberpunk';const preset = getTimeOfDayPreset(timeOfDay, skyTheme);- const nightGlow = 1 - Math.min(1, preset.daylightFactor ?? 0);+ const cozyLighting = Boolean(settings?.explorationMode);+ const daylightFactor = cozyLighting ? Math.max(0.72, preset.daylightFactor ?? 0) : (preset.daylightFactor ?? 0);+ const nightGlow = 1 - Math.min(1, daylightFactor);// Medium tier and up — the same gate the rest of the optional set dressing uses, so the// low tier sheds light count along with the props those lights were there to accent.@@ -103,23 +105,23 @@ export default function OpenWorldLights({ settings, lightingTier }) {// Neon scale: dim neon point lights during daytime (30% at noon, 100% at night)const neonScaleRef = useRef(1);- const targetNeonScale = 1.0 - (preset.daylightFactor ?? 0) * 0.7;+ const targetNeonScale = 1.0 - daylightFactor * 0.7;// Hemisphere light refs — provides natural sky fill (like Unreal Engine's Sky Light)const hemiRef = useRef();const hemiSkyTarget = useRef(new THREE.Color(preset.hemiSkyColor));const hemiGroundTarget = useRef(new THREE.Color(preset.hemiGroundColor));- hemiSkyTarget.current.set(preset.hemiSkyColor);- hemiGroundTarget.current.set(preset.hemiGroundColor);+ hemiSkyTarget.current.set(cozyLighting ? '#b9d9dc' : preset.hemiSkyColor);+ hemiGroundTarget.current.set(cozyLighting ? '#7c7153' : preset.hemiGroundColor);const hemiIntensityTarget = useRef(preset.hemiIntensity);- hemiIntensityTarget.current = preset.hemiIntensity * brightnessRef.current;+ hemiIntensityTarget.current = (cozyLighting ? 0.92 : preset.hemiIntensity) * brightnessRef.current;// Ambient light refsconst ambientRef = useRef();const ambientColorTarget = useRef(new THREE.Color(preset.ambientColor));- ambientColorTarget.current.set(preset.ambientColor);+ ambientColorTarget.current.set(cozyLighting ? '#fff0ce' : preset.ambientColor);const ambientIntensityTarget = useRef(preset.ambientIntensity);- ambientIntensityTarget.current = preset.ambientIntensity * brightnessRef.current;+ ambientIntensityTarget.current = (cozyLighting ? 0.3 : preset.ambientIntensity) * brightnessRef.current;useFrame((_, delta) => {const lf = Math.min(1, delta * 3);@@ -146,22 +148,48 @@ export default function OpenWorldLights({ settings, lightingTier }) {{/* Hemisphere sky light — like Unreal Engine's Sky Light, illuminates all geometry from sky/ground */}<hemisphereLight ref={hemiRef} color="#1a1a3a" groundColor="#0a0a20" intensity={0.3} /><ambientLight ref={ambientRef} intensity={0.18} color="#1a1a3a" />- {/* Main overhead cyan */}- <ReactivePointLight position={[0, 30, 0]} baseIntensity={1.2} color="#06b6d4" distance={100} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- {/* Secondary overhead fill - broad white/blue */}- <ReactivePointLight position={[0, 20, 10]} baseIntensity={0.5} color="#4488cc" distance={90} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- {/* Broad nighttime city glow — signage bounce + moonlit haze, faded in daylight */}- <ReactivePointLight position={[0, 16, 0]} baseIntensity={1.8 * nightGlow} color={ground} distance={150} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- <ReactivePointLight position={[-28, 10, 24]} baseIntensity={1.05 * nightGlow} color="#ec4899" distance={118} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- <ReactivePointLight position={[30, 12, -22]} baseIntensity={1.1 * nightGlow} color="#60a5fa" distance={120} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- {/* Magenta accent from left - animated color shift */}- <AnimatedLight position={[-20, 12, -15]} baseColor="#ec4899" baseIntensity={0.7} distance={60} speed={0.3} shiftRange={0.15} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- {/* Blue accent from right - animated shift */}- <AnimatedLight position={[20, 12, 15]} baseColor="#3b82f6" baseIntensity={0.7} distance={60} speed={0.4} shiftRange={0.12} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- {/* Purple from behind - more presence */}- <ReactivePointLight position={[0, 15, -25]} baseIntensity={0.5} color="#8b5cf6" distance={60} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />- {/* Warm orange ground level accent */}- <ReactivePointLight position={[10, 3, 5]} baseIntensity={0.35} color="#f97316" distance={35} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {cozyLighting && (+ <>+ {/* One authored sun creates the long readable shadows and object grounding the+ village references rely on. A soft amber fill keeps shaded porches warm. */}+ <directionalLight+ position={[-42, 68, 36]}+ color="#fff0c4"+ intensity={(0.72 + daylightFactor * 1.15) * brightnessRef.current}+ castShadow={showAccentLights}+ shadow-mapSize-width={2048}+ shadow-mapSize-height={2048}+ shadow-camera-left={-78}+ shadow-camera-right={78}+ shadow-camera-top={78}+ shadow-camera-bottom={-78}+ shadow-camera-near={1}+ shadow-camera-far={165}+ shadow-normalBias={0.035}+ />+ <ReactivePointLight position={[18, 14, 26]} baseIntensity={0.42} color="#ffb982" distance={82} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ </>+ )}+ {!cozyLighting && (+ <>+ {/* Main overhead cyan */}+ <ReactivePointLight position={[0, 30, 0]} baseIntensity={1.2} color="#06b6d4" distance={100} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {/* Secondary overhead fill - broad white/blue */}+ <ReactivePointLight position={[0, 20, 10]} baseIntensity={0.5} color="#4488cc" distance={90} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {/* Broad nighttime city glow — signage bounce + moonlit haze, faded in daylight */}+ <ReactivePointLight position={[0, 16, 0]} baseIntensity={1.8 * nightGlow} color={ground} distance={150} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ <ReactivePointLight position={[-28, 10, 24]} baseIntensity={1.05 * nightGlow} color="#ec4899" distance={118} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ <ReactivePointLight position={[30, 12, -22]} baseIntensity={1.1 * nightGlow} color="#60a5fa" distance={120} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {/* Magenta accent from left - animated color shift */}+ <AnimatedLight position={[-20, 12, -15]} baseColor="#ec4899" baseIntensity={0.7} distance={60} speed={0.3} shiftRange={0.15} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {/* Blue accent from right - animated shift */}+ <AnimatedLight position={[20, 12, 15]} baseColor="#3b82f6" baseIntensity={0.7} distance={60} speed={0.4} shiftRange={0.12} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {/* Purple from behind - more presence */}+ <ReactivePointLight position={[0, 15, -25]} baseIntensity={0.5} color="#8b5cf6" distance={60} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {/* Warm orange ground level accent */}+ <ReactivePointLight position={[10, 3, 5]} baseIntensity={0.35} color="#f97316" distance={35} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ </>+ )}{/* Ground-level small-radius accents (green + red warning). Culled on the low tier:every mounted light costs a per-fragment iteration in the lighting loop of everyMeshStandardMaterial in the scene, whatever its intensity — so dimming them saves@@ -169,7 +197,7 @@ export default function OpenWorldLights({ settings, lightingTier }) {significant of the set: lowest intensity (0.2 / 0.15) and smallest radius (25 / 22units), so they only tint a small patch of street the low tier already renderswithout its set dressing. */}- {showAccentLights && (+ {showAccentLights && !cozyLighting && (<>{/* Additional green accent - ground level from opposite side */}<ReactivePointLight position={[-12, 3, 8]} baseIntensity={0.2} color="#22c55e" distance={25} brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />@@ -178,7 +206,7 @@ export default function OpenWorldLights({ settings, lightingTier }) {</>)}{/* Sweeping searchlight */}- <Searchlight brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />+ {!cozyLighting && <Searchlight brightnessRef={brightnessRef} neonScaleRef={neonScaleRef} />}</>);}diff --git a/client/src/components/openworld/OpenWorldMiniMap.jsx b/client/src/components/openworld/OpenWorldMiniMap.jsxindex 33bd6133ee..cefee40016 100644--- a/client/src/components/openworld/OpenWorldMiniMap.jsx+++ b/client/src/components/openworld/OpenWorldMiniMap.jsx@@ -3,8 +3,8 @@ import { computeOpenWorldLayout } from './openWorldLayout';import { useOpenWorldPalette } from './OpenWorldPaletteContext';import { computeMiniMap } from '../../utils/openWorldMiniMap';-// OpenWorld mini-map overlay (roadmap 2.8). A compact top-down map in a HUD corner showing-// every building as a dot at its REAL layout position, colored by status. The layout comes+// OpenWorld's compact top-down Signal Map. It shows the authored archipelago and every+// building at its real layout position, colored by status. The layout comes// from `computeOpenWorldLayout(apps)` — the same function OpenWorldScene uses to place buildings — so// the map can't drift from the actual city. Status colors reuse `getBuildingColor`, so a dot// matches its building's color exactly.@@ -37,45 +37,61 @@ export default function OpenWorldMiniMap({});}, [apps, positions, playerPose]);- if (view.empty) return null;+ if (view.empty && !view.geography) return null;return (<div className={`${alwaysShow ? 'block' : 'hidden md:block'} mb-2 w-fit pointer-events-auto`}><div className="openworld-hud-panel openworld-hud-map relative w-fit p-2"><div className="flex items-center justify-between mb-1.5 px-0.5">- <span className="font-pixel text-[8px] text-cyan-500/60 tracking-wider">MAP</span>- <span className="font-pixel text-[8px] text-cyan-400/80 tracking-wider">{view.count}</span>+ <span className="font-pixel text-[8px] text-cyan-500/60 tracking-wider">SIGNAL MAP</span>+ <span className="font-pixel text-[8px] text-cyan-400/80 tracking-wider">{view.count} LIVE</span></div><div- className="relative rounded-sm border border-cyan-500/20 bg-cyan-500/[0.03] overflow-hidden"+ className="relative rounded-sm border border-cyan-500/20 bg-[#061520]/90 overflow-hidden"style={{ width: MAP_SIZE, height: MAP_SIZE }}>- {/* The bay: everything above the shoreline reads as water, matching the city's- real geography (the bay sits north / -Z, projected to the top of the map). */}+ {/* The same island/link graph that drives the 3D terrain. SVG keeps the shape+ legible at this compact size without creating dozens of positioned divs. */}{view.geography && (- <div className="absolute inset-0 pointer-events-none" aria-hidden="true">- <div- className="absolute left-0 right-0 top-0 bg-cyan-400/10 border-b border-cyan-400/25"- style={{ height: `${(view.geography.shorelineY * 100).toFixed(2)}%` }}- />- {/* Data Harbor pier marker. */}- <div- className="absolute w-1.5 h-1.5 rounded-[1px] bg-cyan-300/70 -translate-x-1/2 -translate-y-1/2 rotate-45"- style={{- left: `${(view.geography.harbor.nx * 100).toFixed(2)}%`,- top: `${(view.geography.harbor.ny * 100).toFixed(2)}%`,- boxShadow: '0 0 4px rgba(103, 232, 249, 0.8)',- }}- title={view.geography.harbor.label}- />- </div>+ <svg className="absolute inset-0 w-full h-full pointer-events-none" viewBox="0 0 100 100" aria-hidden="true">+ <defs>+ <filter id="signal-map-glow" x="-50%" y="-50%" width="200%" height="200%">+ <feGaussianBlur stdDeviation="1.1" result="blur" />+ <feMerge><feMergeNode in="blur" /><feMergeNode in="SourceGraphic" /></feMerge>+ </filter>+ </defs>+ {view.geography.links.map((link) => (+ <polyline+ key={link.id}+ points={link.points.map((point) => `${point.nx * 100},${point.ny * 100}`).join(' ')}+ fill="none"+ stroke="rgba(103,232,249,0.78)"+ strokeWidth="1.7"+ strokeLinecap="round"+ strokeLinejoin="round"+ filter="url(#signal-map-glow)"+ />+ ))}+ {view.geography.islands.map((island) => (+ <ellipse+ key={island.id}+ cx={island.nx * 100}+ cy={island.ny * 100}+ rx={island.radiusX * 100}+ ry={island.radiusY * 100}+ fill={island.id === 'core' ? 'rgba(74,138,112,0.74)' : 'rgba(51,104,93,0.78)'}+ stroke="rgba(165,243,224,0.52)"+ strokeWidth="0.7"+ />+ ))}+ </svg>)}- {/* Faint grid lines for orientation */}+ {/* Cardinal ticks replace the old city-block grid. */}<div className="absolute inset-0 pointer-events-none" aria-hidden="true">- <div className="absolute top-1/2 left-0 right-0 h-px bg-cyan-500/10" />- <div className="absolute left-1/2 top-0 bottom-0 w-px bg-cyan-500/10" />+ <span className="absolute top-1 left-1/2 -translate-x-1/2 font-pixel text-[6px] text-cyan-200/45">N</span>+ <span className="absolute bottom-1 left-1/2 -translate-x-1/2 font-pixel text-[6px] text-cyan-200/35">S</span></div>{/* District landmark indicators */}diff --git a/client/src/components/openworld/OpenWorldMobileControls.jsx b/client/src/components/openworld/OpenWorldMobileControls.jsxindex d81be9cb61..4584789c25 100644--- a/client/src/components/openworld/OpenWorldMobileControls.jsx+++ b/client/src/components/openworld/OpenWorldMobileControls.jsx@@ -1,5 +1,5 @@import { useCallback, useEffect, useRef, useState } from 'react';-import { ArrowUp, Eye, Hand, LogOut, Zap } from 'lucide-react';+import { ArrowUp, Hand, Zap } from 'lucide-react';const STICK_TRAVEL = 32;@@ -44,8 +44,6 @@ function HoldButton({ label, hint, icon: Icon, onStart, onEnd, wide = false }) {export default function OpenWorldMobileControls({mobileInputRef,playerActionRef,- onToggleCameraView,- onToggleExploration,}) {const joystickRef = useRef(null);const joystickPointerRef = useRef(null);@@ -178,24 +176,6 @@ export default function OpenWorldMobileControls({<Hand size={18} strokeWidth={1.9} aria-hidden="true" /><span>ACTION</span></button>- <button- type="button"- aria-label="Switch camera view"- className="openworld-mobile-action"- onClick={onToggleCameraView}- >- <Eye size={18} strokeWidth={1.9} aria-hidden="true" />- <span>VIEW</span>- </button>- <button- type="button"- aria-label="Fly out to orbital view"- className="openworld-mobile-action openworld-mobile-action--exit"- onClick={onToggleExploration}- >- <LogOut size={17} strokeWidth={1.9} aria-hidden="true" />- <span>EXIT</span>- </button></div></div>);diff --git a/client/src/components/openworld/OpenWorldMobileControls.test.jsx b/client/src/components/openworld/OpenWorldMobileControls.test.jsxindex c3a50402f7..2daeae5ce0 100644--- a/client/src/components/openworld/OpenWorldMobileControls.test.jsx+++ b/client/src/components/openworld/OpenWorldMobileControls.test.jsx@@ -21,8 +21,6 @@ function renderControls(overrides = {}) {const props = {mobileInputRef,playerActionRef,- onToggleCameraView: vi.fn(),- onToggleExploration: vi.fn(),...overrides,};@@ -30,7 +28,7 @@ function renderControls(overrides = {}) {}describe('OpenWorldMobileControls', () => {- it('exposes the complete touch action set', () => {+ it('exposes a focused touch action set', () => {renderControls();expect(screen.getByRole('group', { name: 'Movement joystick' })).toBeInTheDocument();@@ -38,8 +36,8 @@ describe('OpenWorldMobileControls', () => {expect(screen.getByRole('button', { name: 'BOOST' })).toBeInTheDocument();expect(screen.getByRole('button', { name: 'JUMP' })).toBeInTheDocument();expect(screen.getByRole('button', { name: 'Interact with nearby building or warp pad' })).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Switch camera view' })).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Fly out to orbital view' })).toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'Switch camera view' })).not.toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'Fly out to orbital view' })).not.toBeInTheDocument();});it('maps hold actions to the game input refs and clears them on release', () => {@@ -151,18 +149,12 @@ describe('OpenWorldMobileControls', () => {expect(mobileInputRef.current.lookDeltaY).toBe(-6);});- it('routes action buttons to their game callbacks', () => {- const onToggleCameraView = vi.fn();- const onToggleExploration = vi.fn();- const { playerActionRef } = renderControls({ onToggleCameraView, onToggleExploration });+ it('routes the action button to the interaction callback', () => {+ const { playerActionRef } = renderControls();fireEvent.click(screen.getByRole('button', { name: 'Interact with nearby building or warp pad' }));- fireEvent.click(screen.getByRole('button', { name: 'Switch camera view' }));- fireEvent.click(screen.getByRole('button', { name: 'Fly out to orbital view' }));expect(playerActionRef.current.interact).toHaveBeenCalledTimes(1);- expect(onToggleCameraView).toHaveBeenCalledTimes(1);- expect(onToggleExploration).toHaveBeenCalledTimes(1);});it('clears active touch state when the controls unmount', () => {diff --git a/client/src/components/openworld/OpenWorldScene.jsx b/client/src/components/openworld/OpenWorldScene.jsxindex 469709e879..7fa4789f2d 100644--- a/client/src/components/openworld/OpenWorldScene.jsx+++ b/client/src/components/openworld/OpenWorldScene.jsx@@ -2,7 +2,6 @@ import { memo, useState, useCallback, useRef, useEffect, useMemo, Suspense } froimport * as THREE from 'three';import { Canvas } from '@react-three/fiber';import { OrbitControls } from '@react-three/drei';-import WorldGround from './WorldGround';import OpenWorldLights from './OpenWorldLights';import OpenWorldParticles from './OpenWorldParticles';import OpenWorldStarfield from './OpenWorldStarfield';@@ -14,7 +13,6 @@ import OpenWorldWeather from './OpenWorldWeather';import OpenWorldBillboards from './OpenWorldBillboards';import OpenWorldShootingStars from './OpenWorldShootingStars';import OpenWorldVolumetricLights from './OpenWorldVolumetricLights';-import OpenWorldSkyline from './OpenWorldSkyline';import OpenWorldFederationHorizon from './OpenWorldFederationHorizon';import OpenWorldBackupVault from './OpenWorldBackupVault';import OpenWorldTaskQueue from './OpenWorldTaskQueue';@@ -36,14 +34,9 @@ import OpenWorldEmbers from './OpenWorldEmbers';import OpenWorldSignalBeacons from './OpenWorldSignalBeacons';import OpenWorldSky from './OpenWorldSky';import OpenWorldGalaxySky from './OpenWorldGalaxySky';-import OpenWorldLandscape from './OpenWorldLandscape';import OpenWorldClouds from './OpenWorldClouds';-import OpenWorldNature from './OpenWorldNature';-import OpenWorldGrass from './OpenWorldGrass';import OpenWorldWater from './OpenWorldWater';-import OpenWorldStreets from './OpenWorldStreets';-import OpenWorldStreetProps from './OpenWorldStreetProps';-import OpenWorldTransitLoop from './OpenWorldTransitLoop';+import OpenWorldArchipelago from './OpenWorldArchipelago';import OpenWorldEnergyOverlay from './OpenWorldEnergyOverlay';import OpenWorldSpeedPads from './OpenWorldSpeedPads';import OpenWorldCollectibles from './OpenWorldCollectibles';@@ -60,6 +53,7 @@ import { listRegions } from '../../utils/openWorldRegions';import { getResolvedLandmarks } from '../../utils/openWorldProximity';import { getCollectiblesList } from '../../utils/openWorldCollectibles';import { computeEasterEggs } from '../../utils/openWorldEasterEggs';+import { computeVillageAppLayout } from '../../utils/openWorldPlan';import { OpenWorldPaletteProvider } from './OpenWorldPaletteContext';import ErrorBoundary from '../ErrorBoundary';import { useVisibilityEvent } from '../../hooks/useVisibilityEvent';@@ -120,7 +114,6 @@ function OpenWorldScene({}) {const [positions, setPositions] = useState(null);const [proximityApp, setProximityApp] = useState(null);- const [proximityWarpPad, setProximityWarpPad] = useState(null);const [transitioning, setTransitioning] = useState(false);const [webglLost, setWebglLost] = useState(false);const [canvasRevision, setCanvasRevision] = useState(0);@@ -145,6 +138,7 @@ function OpenWorldScene({const prevExplorationRef = useRef(null);const orbitRef = useRef(null);const contextCleanupRef = useRef(null);+ const villageAppPositions = useMemo(() => computeVillageAppLayout(apps), [apps]);const contextLostTimerRef = useRef(null);const activeCanvasRef = useRef(null);const contextRecoveryRef = useRef(0);@@ -243,27 +237,11 @@ function OpenWorldScene({setProximityApp(app);}, []);- const handleWarpPadProximity = useCallback((region) => {- setProximityWarpPad(region);- }, []);-useEffect(() => {if (explorationMode) return;setProximityApp(null);- setProximityWarpPad(null);- }, [explorationMode]);-- useEffect(() => {- if (!explorationMode) {- onProximityChange?.(null);- return;- }- if (proximityWarpPad) {- onProximityChange?.({ type: 'warpPad', id: proximityWarpPad.id, label: proximityWarpPad.label });- return;- }- onProximityChange?.(proximityApp ? { type: 'building', id: proximityApp.id, label: proximityApp.name } : null);- }, [explorationMode, onProximityChange, proximityApp, proximityWarpPad]);+ onProximityChange?.(null);+ }, [explorationMode, onProximityChange]);const handleTransitionComplete = useCallback(() => {setTransitioning(false);@@ -340,9 +318,9 @@ function OpenWorldScene({<div className="absolute inset-0" style={{ background: fallbackBackground }}><Canvaskey={`${photoMode ? 'photo' : 'live'}-${canvasRevision}`}- camera={{ position: [0, 25, 45], fov: THIRD_PERSON.fov }}+ camera={{ position: [0, 95, 125], fov: THIRD_PERSON.fov }}dpr={dpr}- shadows={false}+ shadows={explorationMode && settings?.effectiveTier !== 'low'}// Photo mode freezes the scene for a clean still (roadmap 3.6): "demand" stops the// frameloop once the camera-fly settles, so particles/streams/weather/pulses pause for a// deliberate shot. OpenWorldPhotoCamera pumps invalidate() during the fly; capture renders@@ -351,7 +329,7 @@ function OpenWorldScene({// Photo mode always keeps its own demand loop so capture still works in a hidden tab.frameloop={photoMode ? 'demand' : (documentHidden ? 'never' : 'always')}onCreated={handleCanvasCreated}- style={{ background: sceneClearColor, cursor: explorationMode ? 'crosshair' : 'auto', opacity: webglLost ? 0 : 1 }}+ style={{ background: sceneClearColor, cursor: explorationMode ? 'grab' : 'auto', opacity: webglLost ? 0 : 1 }}// preserveDrawingBuffer is only needed while taking postcards. Keeping it// always-on makes Chromium's WebGL context much easier to lose in the live// dashboard, which reads as a blank white scene.@@ -379,40 +357,58 @@ function OpenWorldScene({) : (<color attach="background" args={[sceneClearColor]} />)}+ {explorationMode && <fog attach="fog" args={[sceneClearColor, 72, 190]} />}<OpenWorldSky settings={renderSettings} />{/* `lightingTier` is the SETTLED tier, deliberately not the warm-up-clampedone: the accent-light gate changes the scene's light COUNT, which is partof three.js's shader program cache key, so letting the clamp toggle itwould recompile every lit material 1.2s into each load. */}<OpenWorldLights settings={renderSettings} lightingTier={settings?.effectiveTier} />- <OpenWorldLandscape settings={renderSettings} />- {palette?.lowPoly && <OpenWorldClouds settings={renderSettings} />}- <OpenWorldNature settings={renderSettings} />- <OpenWorldGrass settings={renderSettings} /><OpenWorldWater settings={renderSettings} />- <OpenWorldEnergyOverlay chronotype={chronotype} settings={renderSettings} />+ <OpenWorldArchipelago+ settings={renderSettings}+ explorationMode={explorationMode}+ apps={apps}+ appPositions={villageAppPositions}+ agentMap={agentMap}+ backupStatus={backupStatus}+ cosTasks={cosTasks}+ healthMetrics={healthMetrics}+ productivityData={productivityData}+ goals={goals}+ character={character}+ memoryGraph={memoryGraph}+ inboxDepth={inboxDepth}+ jiraTickets={jiraTickets}+ jiraEnabled={jiraFeatureEnabled}+ introspection={introspection}+ voiceState={voiceState}+ onBuildingClick={onBuildingClick}+ />+ {palette?.lowPoly && <OpenWorldClouds settings={renderSettings} />}+ {!explorationMode && <OpenWorldEnergyOverlay chronotype={chronotype} settings={renderSettings} />}{neonLayers && <OpenWorldStarfield settings={renderSettings} />}{neonLayers && <OpenWorldShootingStars playSfx={playSfx} settings={renderSettings} />}{!explorationMode && !palette?.lowPoly && <OpenWorldCelestial settings={renderSettings} />}- <OpenWorldSkyline settings={renderSettings} />- <OpenWorldFederationHorizon instances={instances} settings={renderSettings} />- <OpenWorldBackupVault backupStatus={backupStatus} settings={renderSettings} />- <OpenWorldTaskQueue cosTasks={cosTasks} settings={renderSettings} />- <OpenWorldHealthTower healthMetrics={healthMetrics} settings={renderSettings} />- <OpenWorldProductivityDistrict productivityData={productivityData} settings={renderSettings} />- <OpenWorldActivityHeatmap calendarData={activityCalendar} settings={renderSettings} />- <OpenWorldTaskFlowRiver cosTasks={cosTasks} productivityData={productivityData} calendarData={activityCalendar} settings={renderSettings} />- <OpenWorldGoalMonuments goals={goals} settings={renderSettings} />- <OpenWorldArtifacts character={character} goals={goals} settings={renderSettings} />- <OpenWorldEasterEggs character={character} goals={goals} settings={renderSettings} />- <OpenWorldVoiceMarker voiceState={voiceState} settings={renderSettings} />- <OpenWorldMemoryDistrict memoryGraph={memoryGraph} inboxDepth={inboxDepth} settings={renderSettings} />- <OpenWorldDataHarbor introspection={introspection} settings={renderSettings} />- {jiraFeatureEnabled && <OpenWorldJiraDistrict jiraTickets={jiraTickets} settings={renderSettings} />}- <OpenWorldAiCore aiActivity={aiActivity} positions={positions} apps={apps} settings={renderSettings} />- <WorldGround settings={renderSettings} />- <OpenWorldStreets settings={renderSettings} />- <OpenWorldStreetProps settings={renderSettings} />+ {!explorationMode && (+ <>+ <OpenWorldFederationHorizon instances={instances} settings={renderSettings} />+ <OpenWorldBackupVault backupStatus={backupStatus} settings={renderSettings} />+ <OpenWorldTaskQueue cosTasks={cosTasks} settings={renderSettings} />+ <OpenWorldHealthTower healthMetrics={healthMetrics} settings={renderSettings} />+ <OpenWorldProductivityDistrict productivityData={productivityData} settings={renderSettings} />+ <OpenWorldActivityHeatmap calendarData={activityCalendar} settings={renderSettings} />+ <OpenWorldTaskFlowRiver cosTasks={cosTasks} productivityData={productivityData} calendarData={activityCalendar} settings={renderSettings} />+ <OpenWorldGoalMonuments goals={goals} settings={renderSettings} />+ <OpenWorldArtifacts character={character} goals={goals} settings={renderSettings} />+ <OpenWorldEasterEggs character={character} goals={goals} settings={renderSettings} />+ <OpenWorldVoiceMarker voiceState={voiceState} settings={renderSettings} />+ <OpenWorldMemoryDistrict memoryGraph={memoryGraph} inboxDepth={inboxDepth} settings={renderSettings} />+ <OpenWorldDataHarbor introspection={introspection} settings={renderSettings} />+ {jiraFeatureEnabled && <OpenWorldJiraDistrict jiraTickets={jiraTickets} settings={renderSettings} />}+ <OpenWorldAiCore aiActivity={aiActivity} positions={positions} apps={apps} settings={renderSettings} />+ </>+ )}<OpenWorldSpeedPads settings={renderSettings} /><OpenWorldCollectiblescollectedShardIds={collectedShardIds}@@ -420,39 +416,41 @@ function OpenWorldScene({settings={renderSettings}shards={collectibles}/>- <OpenWorldTransitLoop settings={renderSettings} />-- <BuildingCluster- apps={apps}- agentMap={agentMap}- onBuildingClick={onBuildingClick}- onPositionsReady={handlePositionsReady}- playSfx={playSfx}- settings={renderSettings}- proximityAppId={proximityApp?.id}- dimmedAppIds={dimmedAppIds}- focusedAppId={focusedAppId}- playback={playback}- />- <OpenWorldDataStreams positions={positions} apps={apps} agentMap={agentMap} />- <OpenWorldTraffic positions={positions} />- <OpenWorldBillboards- positions={positions}- apps={apps}- cosStatus={cosStatus}- reviewCounts={reviewCounts}- instances={instances}- productivityData={productivityData}- />- <OpenWorldSignalBeacons- positions={positions}- reviewCounts={reviewCounts}- instances={instances}- settings={renderSettings}- activeRegionId={focusedRegion?.id}- onTravelToRegion={onTravelToRegion}- regions={warpRegions}- />+ {!explorationMode && (+ <>+ <BuildingCluster+ apps={apps}+ agentMap={agentMap}+ onBuildingClick={onBuildingClick}+ onPositionsReady={handlePositionsReady}+ playSfx={playSfx}+ settings={renderSettings}+ proximityAppId={proximityApp?.id}+ dimmedAppIds={dimmedAppIds}+ focusedAppId={focusedAppId}+ playback={playback}+ />+ <OpenWorldDataStreams positions={positions} apps={apps} agentMap={agentMap} />+ <OpenWorldTraffic positions={positions} />+ <OpenWorldBillboards+ positions={positions}+ apps={apps}+ cosStatus={cosStatus}+ reviewCounts={reviewCounts}+ instances={instances}+ productivityData={productivityData}+ />+ <OpenWorldSignalBeacons+ positions={positions}+ reviewCounts={reviewCounts}+ instances={instances}+ settings={renderSettings}+ activeRegionId={focusedRegion?.id}+ onTravelToRegion={onTravelToRegion}+ regions={warpRegions}+ />+ </>+ )}{neonLayers && <OpenWorldVolumetricLights positions={positions} settings={renderSettings} />}{neonLayers && <OpenWorldNeonSigns positions={positions} />}<OpenWorldWeather stoppedCount={stoppedCount} totalCount={totalCount} playSfx={playSfx} />@@ -462,9 +460,8 @@ function OpenWorldScene({{explorationMode && (<PlayerControllerkeysRef={keysRef}- positions={positions}+ positions={villageAppPositions}onBuildingProximity={handleBuildingProximity}- onWarpPadProximity={handleWarpPadProximity}onProximityChange={onProximityChange}onBuildingClick={onBuildingClick}onToggleCameraView={onToggleCameraView}@@ -473,7 +470,9 @@ function OpenWorldScene({transitioning={transitioning}cameraView={settings?.cameraView ?? 'third'}teleport={playerTeleport}- warpPads={warpRegions}+ // Street-level travel is attached to visible cottages and landmarks. The old+ // invisible region pads produced prompts in the middle of otherwise empty roads.+ warpPads={[]}landmarks={landmarks}onWarpPadInteract={onTravelToRegion}easterEggs={easterEggsList.eggs}diff --git a/client/src/components/openworld/OpenWorldSignalBeacons.jsx b/client/src/components/openworld/OpenWorldSignalBeacons.jsxindex 8cb1d4b33b..f16d88e58f 100644--- a/client/src/components/openworld/OpenWorldSignalBeacons.jsx+++ b/client/src/components/openworld/OpenWorldSignalBeacons.jsx@@ -168,8 +168,8 @@ function WarpPad({ region, active, detailed, dayMix, onTravel }) {</group>)}<OpenWorldLabel- position={[0, detailed ? 6.45 : 2, 0]}- fontSize={detailed ? 0.3 : 0.22}+ position={[0, active ? 3.7 : 1.55, 0]}+ fontSize={active ? 0.28 : 0.17}color={color}dayMix={dayMix}anchorX="center"@@ -180,7 +180,7 @@ function WarpPad({ region, active, detailed, dayMix, onTravel }) {</OpenWorldLabel>{detailed && active && (<OpenWorldLabel- position={[0, 5.98, 0]}+ position={[0, 3.25, 0]}fontSize={0.16}color="#d8e5ea"dayMix={dayMix}diff --git a/client/src/components/openworld/OpenWorldSpeedPads.jsx b/client/src/components/openworld/OpenWorldSpeedPads.jsxindex acda1a1103..a005f9a4df 100644--- a/client/src/components/openworld/OpenWorldSpeedPads.jsx+++ b/client/src/components/openworld/OpenWorldSpeedPads.jsx@@ -2,6 +2,7 @@ import { useMemo, useRef } from 'react';import { useFrame } from '@react-three/fiber';import * as THREE from 'three';import { getSpeedPadsList } from '../../utils/openWorldSpeedPads';+import { openWorldTerrainHeight } from '../../utils/openWorldPlan';function SpeedPad({ pad, animate }) {const { x, z, angle, width, length, color } = pad;@@ -10,46 +11,39 @@ function SpeedPad({ pad, animate }) {useFrame(({ clock }) => {if (!animate || !chevronsRef.current) return;const t = clock.getElapsedTime();- // Pulse and animate chevron brightness+ // A soft traveling paint shimmer makes the boost readable without a neon plate.chevronsRef.current.children.forEach((mesh, index) => {if (!mesh?.material) return;const phase = (t * 3.5 - index * 0.4) % Math.PI;const intensity = Math.sin(Math.max(0, phase));- mesh.material.opacity = 0.35 + intensity * 0.55;+ mesh.material.opacity = 0.5 + intensity * 0.35;});});return (- <group position={[x, 0.03, z]} rotation={[0, angle, 0]}>- {/* Base pad plate */}- <mesh rotation={[-Math.PI / 2, 0, 0]}>+ <group position={[x, openWorldTerrainHeight(x, z) + 0.07, z]} rotation={[0, angle, 0]}>+ <mesh rotation={[-Math.PI / 2, 0, 0]} receiveShadow><planeGeometry args={[length, width]} /><meshStandardMaterial- color="#0f172a"+ color="#d8bc7d"emissive={color}- emissiveIntensity={0.25}- roughness={0.8}- metalness={0.3}+ emissiveIntensity={0.06}+ roughness={0.96}+ metalness={0}/></mesh>- {/* Outer border trim */}- <mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, 0.005, 0]}>- <ringGeometry args={[width * 0.46, width * 0.49, 4]} />- <meshBasicMaterial color={color} transparent opacity={0.6} blending={THREE.AdditiveBlending} />- </mesh>-- {/* Chevrons pointing forward (+X in local rotated space) */}+ {/* Three hand-painted arrows point along the lane. */}<group ref={chevronsRef} position={[0, 0.01, 0]}>- {[-1.3, 0, 1.3].map((offsetX, idx) => (+ {[-1.25, 0, 1.25].map((offsetX, idx) => (<mesh key={idx} position={[offsetX, 0, 0]} rotation={[-Math.PI / 2, 0, -Math.PI / 2]}>- <coneGeometry args={[0.7, 0.9, 3]} />+ <coneGeometry args={[0.62, 0.82, 3]} /><meshBasicMaterialcolor={color}transparent- opacity={0.6}- blending={THREE.AdditiveBlending}+ opacity={0.72}depthWrite={false}+ side={THREE.DoubleSide}/></mesh>))}diff --git a/client/src/components/openworld/OpenWorldTaskQueue.jsx b/client/src/components/openworld/OpenWorldTaskQueue.jsxindex cf8864a08d..11155628d4 100644--- a/client/src/components/openworld/OpenWorldTaskQueue.jsx+++ b/client/src/components/openworld/OpenWorldTaskQueue.jsx@@ -45,7 +45,7 @@ export default function OpenWorldTaskQueue({ cosTasks, settings }) {});const { position, color, crates, overflow, pending, inProgress, blocked } = queue;- const { crateSize, warehouseWidth, warehouseHeight } = TASK_QUEUE;+ const { crateSize, warehouseWidth } = TASK_QUEUE;// Where the overflow marker (and label) sits: just above the visible crate stack.const stackTop = crates.length ? crates[crates.length - 1].y + crateSize : crateSize;@@ -59,19 +59,19 @@ export default function OpenWorldTaskQueue({ cosTasks, settings }) {return (<group position={position}>- {/* Warehouse base — a wide low dock the crates sit on */}- <mesh position={[0, warehouseHeight / 2, 0]}>- <boxGeometry args={[warehouseWidth, warehouseHeight, warehouseWidth * 0.9]} />- <meshStandardMaterial color={tintStructure('#0c1620')} emissive={color} emissiveIntensity={0.1} metalness={0.4} roughness={0.6} />+ {/* Queueworks is an open hexagonal maker dais, not another opaque warehouse. */}+ <mesh position={[0, 0.32, 0]}>+ <cylinderGeometry args={[warehouseWidth * 0.62, warehouseWidth * 0.76, 0.64, 8]} />+ <meshStandardMaterial color={tintStructure('#27373c')} emissive={color} emissiveIntensity={0.16} metalness={0.12} roughness={0.84} flatShading /></mesh>{/* Roof light bar — the live queue-state indicator */}- <mesh ref={roofRef} position={[0, warehouseHeight + 0.2, 0]}>- <boxGeometry args={[warehouseWidth * 1.05, 0.4, warehouseWidth * 0.95]} />+ <mesh ref={roofRef} position={[0, 0.7, 0]} rotation={[-Math.PI / 2, 0, 0]}>+ <torusGeometry args={[warehouseWidth * 0.44, 0.12, 8, 8]} /><meshStandardMaterial color={color} emissive={color} emissiveIntensity={0.6} toneMapped={false} /></mesh>{/* Crate stack rises from the dock roof; height ∝ pending backlog */}- <group position={[0, warehouseHeight + 0.4, 0]}>+ <group position={[0, 0.8, 0]}>{crates.map((crate, i) => (<Cratekey={crate.index}@@ -90,10 +90,10 @@ export default function OpenWorldTaskQueue({ cosTasks, settings }) {)}{/* Label + count sublabel above the stack */}- <OpenWorldLabel 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+ <OpenWorldLabel position={[0, stackTop + crateSize * (overflow ? 1.05 : 0.78), 0]} fontSize={0.58} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>+ QUEUEWORKS</OpenWorldLabel>- <OpenWorldLabel 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}>+ <OpenWorldLabel position={[0, stackTop + crateSize * (overflow ? 0.62 : 0.32), 0]} fontSize={0.36} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>{sublabel}</OpenWorldLabel></group>diff --git a/client/src/components/openworld/OpenWorldWater.jsx b/client/src/components/openworld/OpenWorldWater.jsxindex 3332b53c49..fd02e9f475 100644--- a/client/src/components/openworld/OpenWorldWater.jsx+++ b/client/src/components/openworld/OpenWorldWater.jsx@@ -5,11 +5,10 @@ import { openWorldDayMix, mixHex } from './openWorldConstants';import { useOpenWorldPalette } from './OpenWorldPaletteContext';import { WORLD } from '../../utils/openWorldPlan';-// The bay: a water plane filling everything north of the master plan's shoreline-// (see openWorldPlan.js — the Data Harbor's piers stand over it, the federation peers-// read as cities across it). Deliberately cheap: one textured plane + one additive-// shimmer strip at the shoreline — no reflection/refraction passes, matching the-// city's no-postprocessing rule. Day/night follows openWorldDayMix like every surface.+// The world-sea below the PortOS archipelago. Deliberately cheap: one tiled wave+// texture and a soft second swell layer, no reflection/refraction pass. The raised+// islands provide the shoreline, so the water can continue beneath every causeway+// and through every inlet without geometry seams.const NIGHT_WATER = '#050d1c'; // near-black ink so neon reflections readconst DAY_WATER = '#2e4f6e'; // steel-blue daytime bay@@ -22,12 +21,12 @@ const makeWaveTexture = () => {canvas.height = 256;const ctx = canvas.getContext('2d');ctx.clearRect(0, 0, 256, 256);- ctx.lineWidth = 1.2;- for (let row = 0; row < 10; row++) {- const y = (row + 0.5) * 25.6;+ ctx.lineWidth = 0.8;+ for (let row = 0; row < 8; row++) {+ const y = (row + 0.5) * 32;const amp = 2 + (row % 3) * 1.5;const phase = row * 1.7;- ctx.strokeStyle = `rgba(255, 255, 255, ${0.16 + (row % 4) * 0.05})`;+ ctx.strokeStyle = `rgba(255, 255, 255, ${0.07 + (row % 4) * 0.025})`;ctx.beginPath();for (let x = 0; x <= 256; x += 4) {const wy = y + Math.sin(x / 28 + phase) * amp;@@ -39,74 +38,60 @@ const makeWaveTexture = () => {const tex = new THREE.CanvasTexture(canvas);tex.wrapS = THREE.RepeatWrapping;tex.wrapT = THREE.RepeatWrapping;- tex.repeat.set(26, 14);+ tex.repeat.set(18, 10);return tex;};export default function OpenWorldWater({ settings }) {const { accent } = useOpenWorldPalette();- const dayMix = openWorldDayMix(settings);+ const naturalDayMix = openWorldDayMix(settings);+ const dayMix = settings?.explorationMode ? Math.max(0.68, naturalDayMix) : naturalDayMix;const waveTex = useMemo(() => makeWaveTexture(), []);useEffect(() => () => waveTex.dispose(), [waveTex]);- const shimmerRef = useRef();+ const swellRef = useRef();const waterColor = mixHex(NIGHT_WATER, DAY_WATER, dayMix);// Night: the swell glows faint accent neon. Day: barely-there white glints.const emissiveColor = mixHex(accent, '#dfeaf2', dayMix);- const emissiveIntensity = 0.4 * (1 - dayMix) + 0.1 * dayMix;+ const emissiveIntensity = 0.28 * (1 - dayMix) + 0.07 * dayMix;useFrame(({ clock }, delta) => {- // Slow drift toward shore with a gentle cross-current wobble.+ // Two motions at different scales keep the sea from reading as a scrolling decal.waveTex.offset.y -= delta * 0.012;waveTex.offset.x = Math.sin(clock.getElapsedTime() * 0.05) * 0.03;- if (shimmerRef.current) {+ if (swellRef.current) {const t = clock.getElapsedTime();- shimmerRef.current.material.opacity =- (0.14 + Math.sin(t * 0.9) * 0.05) * (1 - dayMix) + 0.05 * dayMix;+ swellRef.current.rotation.z = Math.sin(t * 0.035) * 0.025;+ swellRef.current.material.opacity = 0.04 + Math.sin(t * 0.22) * 0.012;}});const span = WORLD.waterSpan;- const centerZ = WORLD.shorelineZ - span / 2;return (<group>- <mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, WORLD.waterY, centerZ]}>- <planeGeometry args={[span * 2, span]} />+ <mesh rotation={[-Math.PI / 2, 0, 0]} position={[0, WORLD.waterY, 0]}>+ <planeGeometry args={[span * 2, span * 2]} /><meshStandardMaterialcolor={waterColor}- roughness={0.18}- metalness={0.55}+ roughness={0.4}+ metalness={0.28}emissive={emissiveColor}emissiveIntensity={emissiveIntensity}emissiveMap={waveTex}/></mesh>- {/* Shoreline shimmer — dual additive surf lines where land meets the bay. */}<mesh- ref={shimmerRef}+ ref={swellRef}rotation={[-Math.PI / 2, 0, 0]}- position={[0, WORLD.waterY + 0.015, WORLD.shorelineZ - 0.9]}+ position={[0, WORLD.waterY + 0.018, 0]}>- <planeGeometry args={[320, 1.8]} />+ <ringGeometry args={[34, 185, 96]} /><meshBasicMaterial- color={accent}+ color={mixHex(accent, '#dff7ff', dayMix * 0.7)}transparent- opacity={0.14}- blending={THREE.AdditiveBlending}- depthWrite={false}- />- </mesh>- <mesh- rotation={[-Math.PI / 2, 0, 0]}- position={[0, WORLD.waterY + 0.012, WORLD.shorelineZ - 2.4]}- >- <planeGeometry args={[320, 1.2]} />- <meshBasicMaterial- color={mixHex(accent, '#ffffff', 0.4)}- transparent- opacity={0.08 * (1 - dayMix) + 0.04 * dayMix}+ opacity={0.04}blending={THREE.AdditiveBlending}depthWrite={false}/>diff --git a/client/src/components/openworld/PlayerAvatar.jsx b/client/src/components/openworld/PlayerAvatar.jsxindex 15abf03e7a..f956a3c7e9 100644--- a/client/src/components/openworld/PlayerAvatar.jsx+++ b/client/src/components/openworld/PlayerAvatar.jsx@@ -2,22 +2,26 @@ import { useRef } from 'react';import { useFrame } from '@react-three/fiber';import * as THREE from 'three';import { useOpenWorldPalette } from './OpenWorldPaletteContext';-import { dampFactor, EYE_HEIGHT, VEHICLE } from '../../utils/openWorldPlayerRig';+import { dampFactor, EYE_HEIGHT, solveVehicleSuspensionPose, VEHICLE } from '../../utils/openWorldPlayerRig';+import { openWorldTerrainHeight } from '../../utils/openWorldPlan';import { mixHex } from './openWorldConstants';-// A small, procedural low-poly rover keeps the third-person actor local to OpenWorld.-// It is intentionally made from primitives instead of another downloaded GLB: the car-// inherits the active theme, loads instantly, and stays readable while sprinting, jumping,-// or flying above the city.+// A small procedural utility cart keeps the player local to OpenWorld. Its orchard-orange+// body, canvas roof, timber cargo bed, and chunky suspension belong to the village instead+// of reading like a generic sports car dropped into it.const CAR_LENGTH = VEHICLE.bodyLength;const CAR_WIDTH = VEHICLE.bodyWidth;-const WHEEL_RADIUS = 0.24;+const WHEEL_RADIUS = 0.34;const WHEEL_X = CAR_WIDTH * 0.57;const WHEEL_Z = CAR_LENGTH * 0.31;const _rootTarget = new THREE.Vector3();+const _suspensionTarget = new THREE.Quaternion();+const _bankTarget = new THREE.Quaternion();+const _identityTarget = new THREE.Quaternion();+const _bankAxis = new THREE.Vector3(0, 0, 1);export default function PlayerAvatar({ rigRef }) {- const { accent, surface, isDay } = useOpenWorldPalette();+ const { accent, surface } = useOpenWorldPalette();const rootRef = useRef();const bodyRef = useRef();const hoverRingRef = useRef();@@ -25,17 +29,13 @@ export default function PlayerAvatar({ rigRef }) {const thrusterRef = useRef();const brakeLightRef = useRef();const skidSmokeRef = useRef();- const wheelRefs = useRef([]);+ const wheelSteerRefs = useRef([]);+ const wheelRollRefs = useRef([]);- const bodyColor = mixHex('#ee8f68', accent, 0.16);- const bodyShadow = mixHex('#263447', accent, 0.16);- const glassColor = mixHex('#294765', accent, 0.22);+ const bodyColor = mixHex('#e98b55', accent, 0.1);+ const bodyShadow = mixHex('#36544f', accent, 0.12);+ const glassColor = mixHex('#6ca7aa', accent, 0.14);const wheelColor = '#17212d';- // Night driving readability: additive light cones project from the headlamps after- // dark (the palette's day flag doubles as the world's local time of day). Visual-only- // beams — no real light — keeps the rig free of per-frame shadow/light cost.- const headlightsOn = !isDay;-useFrame(({ clock }, delta) => {const root = rootRef.current;const body = bodyRef.current;@@ -55,22 +55,45 @@ export default function PlayerAvatar({ rigRef }) {root.position.lerp(_rootTarget.set(rig.position.x, targetY, rig.position.z), follow);root.rotation.y = rig.facing;- root.rotation.z = rig.bank * 0.58;+ root.rotation.z = 0;++ const terrainHeight = openWorldTerrainHeight(rig.position.x, rig.position.z);+ const suspension = solveVehicleSuspensionPose({+ x: rig.position.x,+ z: rig.position.z,+ heading: rig.facing,+ centerHeight: terrainHeight,+ halfWidth: WHEEL_X,+ halfLength: WHEEL_Z,+ heightAt: openWorldTerrainHeight,+ });+ _suspensionTarget.set(+ suspension.rotation.x,+ suspension.rotation.y,+ suspension.rotation.z,+ suspension.rotation.w,+ );+ _bankTarget.setFromAxisAngle(_bankAxis, rig.bank * 0.24);+ _suspensionTarget.multiply(_bankTarget);const bob = hovering? 0.2 + Math.sin(t * 2.4) * 0.07: Math.sin(t * (7 + speedRatio * 8)) * 0.018 * speedRatio;- body.position.y += (bob - body.position.y) * follow;- body.rotation.x = hovering ? Math.sin(t * 2.1) * 0.045 : -speedRatio * 0.018;- body.rotation.z = rig.bank * 0.34;+ const rideOffset = hovering || rig.jumping ? 0 : suspension.translation.y;+ body.position.y += (rideOffset + bob - body.position.y) * follow;+ body.quaternion.slerp(hovering || rig.jumping ? _identityTarget : _suspensionTarget, dampFactor(12, delta));const wheelSpeed = speed !== 0 ? speed / WHEEL_RADIUS : running ? 15 : moving ? 8 : 0;- wheelRefs.current.forEach((wheel, index) => {- if (!wheel) return;- wheel.rotation.x -= wheelSpeed * delta;- // The front axle follows the damped steering angle. Rear wheels stay planted while- // the whole rover banks, which makes steering readable even at low speed.- wheel.rotation.y = index >= 2 ? (rig.wheelAngle || 0) : 0;+ wheelSteerRefs.current.forEach((steerPivot, index) => {+ if (!steerPivot) return;+ // Steering, suspension travel, and rolling live on separate nested pivots. Combining+ // them on one Euler made the cylinder's roll axis precess as the front wheels turned,+ // which read as a wobble even on flat ground.+ steerPivot.rotation.y = index >= 2 ? (rig.wheelAngle || 0) : 0;+ const wheelOffset = hovering || rig.jumping ? -0.08 : suspension.wheelTravel[index];+ steerPivot.position.y += ((WHEEL_RADIUS + wheelOffset) - steerPivot.position.y) * dampFactor(15, delta);+ const rollPivot = wheelRollRefs.current[index];+ if (rollPivot) rollPivot.rotation.y -= wheelSpeed * delta;});if (hoverRingRef.current) {@@ -102,54 +125,78 @@ export default function PlayerAvatar({ rigRef }) {}});- const setWheelRef = (index) => (node) => {- wheelRefs.current[index] = node;+ const setWheelSteerRef = (index) => (node) => {+ wheelSteerRefs.current[index] = node;+ };++ const setWheelRollRef = (index) => (node) => {+ wheelRollRefs.current[index] = node;};return (<group ref={rootRef}><group ref={bodyRef}>- {/* Low-poly body and cabin */}- <mesh position={[0, 0.48, 0]}>+ {/* Low, friendly utility-cart body. */}+ <mesh position={[0, 0.48, 0]} castShadow receiveShadow><boxGeometry args={[CAR_WIDTH, 0.42, CAR_LENGTH]} /><meshStandardMaterial {...surface} color={bodyColor} roughness={0.58} metalness={0.22} /></mesh>- <mesh position={[0, 0.74, 0.08]}>- <boxGeometry args={[CAR_WIDTH * 0.72, 0.26, CAR_LENGTH * 0.46]} />+ <mesh position={[0, 0.76, -CAR_LENGTH * 0.12]} castShadow receiveShadow>+ <boxGeometry args={[CAR_WIDTH * 0.72, 0.3, CAR_LENGTH * 0.38]} /><meshStandardMaterial {...surface} color={glassColor} roughness={0.24} metalness={0.36} transparent opacity={0.92} /></mesh>- {/* Hood scoop breaks up the flat hood line and reads at speed. */}- <mesh position={[0, 0.72, -CAR_LENGTH * 0.16]}>- <boxGeometry args={[CAR_WIDTH * 0.26, 0.06, CAR_LENGTH * 0.16]} />+ <mesh position={[0, 0.7, -CAR_LENGTH * 0.38]} castShadow receiveShadow>+ <boxGeometry args={[CAR_WIDTH * 0.62, 0.08, CAR_LENGTH * 0.2]} /><meshStandardMaterial {...surface} color={bodyShadow} roughness={0.5} metalness={0.3} /></mesh>- {/* Aero: front splitter + side skirts ground the body visually. */}- <mesh position={[0, 0.2, -CAR_LENGTH * 0.48]}>- <boxGeometry args={[CAR_WIDTH * 0.94, 0.05, 0.18]} />- <meshStandardMaterial color={wheelColor} roughness={0.85} metalness={0.1} />- </mesh>++ {/* Canvas sun roof and roll bars give the cart a memorable toy-like profile. */}{[-1, 1].map((side) => (- <mesh key={`skirt-${side}`} position={[side * (CAR_WIDTH / 2), 0.24, 0]}>- <boxGeometry args={[0.06, 0.13, CAR_LENGTH * 0.66]} />- <meshStandardMaterial color={wheelColor} roughness={0.85} metalness={0.1} />+ <mesh key={`rollbar-${side}`} position={[side * CAR_WIDTH * 0.31, 1.03, -CAR_LENGTH * 0.08]} castShadow>+ <boxGeometry args={[0.07, 0.56, 0.07]} />+ <meshStandardMaterial color="#584b3d" roughness={0.82} metalness={0.12} /></mesh>))}- {/* Rear wing on two struts — the silhouette cue that says "rover" from far away. */}+ <mesh position={[0, 1.3, -CAR_LENGTH * 0.08]} castShadow receiveShadow>+ <boxGeometry args={[CAR_WIDTH * 0.82, 0.08, CAR_LENGTH * 0.5]} />+ <meshStandardMaterial color="#f4d8a8" roughness={0.94} metalness={0} />+ </mesh>+ <mesh position={[0, 1.345, -CAR_LENGTH * 0.08]}>+ <boxGeometry args={[CAR_WIDTH * 0.55, 0.012, CAR_LENGTH * 0.34]} />+ <meshStandardMaterial color={accent} roughness={0.7} metalness={0} />+ </mesh>++ {/* Timber cargo bed makes this a working village runabout. */}+ <mesh position={[0, 0.75, CAR_LENGTH * 0.3]} castShadow receiveShadow>+ <boxGeometry args={[CAR_WIDTH * 0.74, 0.13, CAR_LENGTH * 0.3]} />+ <meshStandardMaterial color="#8b5e3c" roughness={0.9} metalness={0} />+ </mesh>{[-1, 1].map((side) => (- <mesh key={`strut-${side}`} position={[side * CAR_WIDTH * 0.28, 0.76, CAR_LENGTH * 0.38]}>- <boxGeometry args={[0.05, 0.14, 0.07]} />- <meshStandardMaterial {...surface} color={bodyShadow} roughness={0.5} metalness={0.35} />+ <mesh key={`cargo-rail-${side}`} position={[side * CAR_WIDTH * 0.33, 0.91, CAR_LENGTH * 0.31]} castShadow>+ <boxGeometry args={[0.07, 0.24, CAR_LENGTH * 0.34]} />+ <meshStandardMaterial color="#5c402f" roughness={0.92} metalness={0} /></mesh>))}- <mesh position={[0, 0.85, CAR_LENGTH * 0.4]}>- <boxGeometry args={[CAR_WIDTH * 1.04, 0.05, CAR_LENGTH * 0.13]} />- <meshStandardMaterial {...surface} color={bodyShadow} roughness={0.45} metalness={0.4} />+ <mesh position={[0.18, 0.93, CAR_LENGTH * 0.31]} rotation={[0.08, 0.18, 0]} castShadow>+ <boxGeometry args={[0.42, 0.28, 0.48]} />+ <meshStandardMaterial color="#d6a64d" roughness={0.92} metalness={0} /></mesh>- {/* Trailing accent strip along the wing's back edge. */}- <mesh position={[0, 0.85, CAR_LENGTH * 0.5]}>- <boxGeometry args={[CAR_WIDTH * 1.02, 0.03, 0.02]} />- <meshStandardMaterial color={accent} emissive={accent} emissiveIntensity={0.5} />+ <mesh position={[-0.25, 0.92, CAR_LENGTH * 0.31]} rotation={[0, 0, Math.PI / 2]} castShadow>+ <cylinderGeometry args={[0.13, 0.13, 0.42, 12]} />+ <meshStandardMaterial color="#7ea89a" roughness={0.95} metalness={0} /></mesh>++ {/* Sturdy bumpers and running boards ground the silhouette. */}+ <mesh position={[0, 0.24, -CAR_LENGTH * 0.52]} castShadow>+ <boxGeometry args={[CAR_WIDTH * 0.94, 0.09, 0.16]} />+ <meshStandardMaterial color="#584b3d" roughness={0.84} metalness={0.1} />+ </mesh>+ {[-1, 1].map((side) => (+ <mesh key={`step-${side}`} position={[side * (CAR_WIDTH * 0.54), 0.27, 0]} castShadow>+ <boxGeometry args={[0.12, 0.08, CAR_LENGTH * 0.5]} />+ <meshStandardMaterial color="#584b3d" roughness={0.84} metalness={0.1} />+ </mesh>+ ))}<mesh position={[0, 0.39, -CAR_LENGTH * 0.53]}><boxGeometry args={[CAR_WIDTH * 0.88, 0.08, 0.1]} /><meshStandardMaterial color={accent} emissive={accent} emissiveIntensity={0.45} />@@ -158,52 +205,10 @@ export default function PlayerAvatar({ rigRef }) {<boxGeometry args={[CAR_WIDTH * 0.82, 0.07, 0.08]} /><meshStandardMaterial color="#ef5252" emissive="#ef5252" emissiveIntensity={0.28} /></mesh>- {/* Twin exhaust tips below the rear light bar. */}- {[-1, 1].map((side) => (- <mesh key={`exhaust-${side}`} position={[side * CAR_WIDTH * 0.18, 0.3, CAR_LENGTH * 0.54]} rotation={[Math.PI / 2, 0, 0]}>- <cylinderGeometry args={[0.045, 0.05, 0.09, 8]} />- <meshStandardMaterial color={bodyShadow} roughness={0.35} metalness={0.65} />- </mesh>- ))}-- {/* Headlight beams after dark: apex at the lamp, cone spreading forward and a- touch down so the road ahead reads while driving at night. */}- {headlightsOn && [-1, 1].map((side) => (- <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]} />- <meshBasicMaterial- color="#ffe9b8"- transparent- opacity={0.09}- blending={THREE.AdditiveBlending}- depthWrite={false}- side={THREE.DoubleSide}- />- </mesh>- </group>- ))}+ <mesh position={[0, 0.3, CAR_LENGTH * 0.55]} castShadow>+ <boxGeometry args={[CAR_WIDTH * 0.9, 0.08, 0.12]} />+ <meshStandardMaterial color="#584b3d" roughness={0.84} metalness={0.1} />+ </mesh><group ref={thrusterRef} position={[0, 0.38, CAR_LENGTH * 0.58]} visible={false}>{[-CAR_WIDTH * 0.24, CAR_WIDTH * 0.24].map((offsetX, i) => (@@ -214,16 +219,20 @@ export default function PlayerAvatar({ rigRef }) {))}</group>- {/* Front lamps and the small roof beacon make the vehicle readable in both views. */}+ {/* Front lamps and a little village pennant make the cart readable in both views. */}{[-1, 1].map((side) => (<mesh key={`lamp-${side}`} position={[side * CAR_WIDTH * 0.3, 0.55, -CAR_LENGTH * 0.53]}><boxGeometry args={[0.13, 0.08, 0.035]} /><meshBasicMaterial color="#fff5cf" toneMapped={false} /></mesh>))}- <mesh position={[0, 0.96, 0.08]}>- <sphereGeometry args={[0.055, 8, 6]} />- <meshBasicMaterial color={accent} toneMapped={false} />+ <mesh position={[0, 1.56, -CAR_LENGTH * 0.08]} castShadow>+ <cylinderGeometry args={[0.018, 0.018, 0.44, 6]} />+ <meshStandardMaterial color="#584b3d" roughness={0.8} />+ </mesh>+ <mesh position={[0.13, 1.69, -CAR_LENGTH * 0.08]} rotation={[0, 0, -0.18]} castShadow>+ <coneGeometry args={[0.16, 0.3, 3]} />+ <meshStandardMaterial color={accent} emissive={accent} emissiveIntensity={0.12} roughness={0.8} /></mesh>{/* Wheels are deliberately chunky: the actor should read as a vehicle at a glance. */}@@ -233,15 +242,19 @@ export default function PlayerAvatar({ rigRef }) {[-WHEEL_X, -WHEEL_Z],[WHEEL_X, -WHEEL_Z],].map(([x, z], index) => (- <group key={`wheel-${index}`} ref={setWheelRef(index)} position={[x, WHEEL_RADIUS, z]} rotation={[0, 0, Math.PI / 2]}>- <mesh>- <cylinderGeometry args={[WHEEL_RADIUS, WHEEL_RADIUS, 0.16, 12]} />- <meshStandardMaterial color={wheelColor} roughness={0.88} metalness={0.08} />- </mesh>- <mesh rotation={[0, Math.PI / 2, 0]}>- <cylinderGeometry args={[WHEEL_RADIUS * 0.44, WHEEL_RADIUS * 0.44, 0.17, 10]} />- <meshStandardMaterial color={bodyShadow} roughness={0.48} metalness={0.4} />- </mesh>+ <group key={`wheel-${index}`} ref={setWheelSteerRef(index)} position={[x, WHEEL_RADIUS, z]}>+ <group rotation={[0, 0, Math.PI / 2]}>+ <group ref={setWheelRollRef(index)}>+ <mesh castShadow receiveShadow>+ <cylinderGeometry args={[WHEEL_RADIUS, WHEEL_RADIUS, 0.16, 12]} />+ <meshStandardMaterial color={wheelColor} roughness={0.88} metalness={0.08} />+ </mesh>+ <mesh>+ <cylinderGeometry args={[WHEEL_RADIUS * 0.44, WHEEL_RADIUS * 0.44, 0.17, 10]} />+ <meshStandardMaterial color={bodyShadow} roughness={0.48} metalness={0.4} />+ </mesh>+ </group>+ </group></group>))}</group>diff --git a/client/src/components/openworld/PlayerController.jsx b/client/src/components/openworld/PlayerController.jsxindex 916d1a2c69..c527c4d47d 100644--- a/client/src/components/openworld/PlayerController.jsx+++ b/client/src/components/openworld/PlayerController.jsx@@ -10,7 +10,9 @@ import {dampFactor, dampAngle, moveFacing, avatarState, bankAngle, stepVehicle,moveWithCollisions, PLAYER_COLLISION_RADIUS, VEHICLE_COLLISION,} from '../../utils/openWorldPlayerRig';-import { isWalkable, WORLD } from '../../utils/openWorldPlan';+import {+ isWalkable, openWorldTerrainHeight, VILLAGE_COLLIDERS, WORLD,+} from '../../utils/openWorldPlan';import { BOROUGH_PARAMS, BUILDING_PARAMS, PROCESS_BUILDING_PARAMS } from './openWorldConstants';import { regionWarpPadPosition, getRegion } from '../../utils/openWorldRegions';import { checkSpeedPadOverlap } from '../../utils/openWorldSpeedPads';@@ -24,7 +26,7 @@ const JUMP_SPEED = 10; // initial upward velocity of a Space jump (units/s)const GRAVITY = -26; // downward acceleration applied through the jump arc (units/s²)const MAX_CAMERA_HEIGHT = 160;const BUILDING_FLYOVER_HEIGHT = 12; // above this the player clears rooftops, so skip collision-const AIRBORNE_HEIGHT = EYE_HEIGHT + 0.6; // above this the avatar reads as flying (hover state)+const AIRBORNE_CLEARANCE = 0.6; // above the local terrain eye-line the avatar reads as flyingconst MOUSE_SENSITIVITY = 0.002;const PITCH_LIMIT = Math.PI / 2 - 0.02;const POSE_REPORT_INTERVAL_SECONDS = 0.1;@@ -88,25 +90,27 @@ export default function PlayerController({});// Stable array view of the positions Map for the per-frame boom collision test —// re-collected only when the layout itself changes, never per frame.- const buildingList = useMemo(() => (positions ? [...positions.values()] : []), [positions]);+ const buildingList = useMemo(() => [+ ...VILLAGE_COLLIDERS.map(({ x, z, height }) => ({ x, z, height })),+ ...(positions ? [...positions.values()] : []),+ ], [positions]);// Movement colliders mirror the rendered footprint: app buildings are boxes and// process pylons are round. The boom keeps its own larger camera-only padding above.const collisionShapes = useMemo(() => {- if (!positions) return [];const appById = new Map((apps || []).map((app) => [app.id, app]));- const shapes = [];+ const shapes = [...VILLAGE_COLLIDERS];- positions.forEach((pos, appId) => {+ positions?.forEach((pos, appId) => {shapes.push({shape: 'box',x: pos.x,z: pos.z,- halfWidth: BUILDING_PARAMS.width / 2,- halfDepth: BUILDING_PARAMS.depth / 2,+ halfWidth: pos.halfWidth ?? BUILDING_PARAMS.width / 2,+ halfDepth: pos.halfDepth ?? BUILDING_PARAMS.depth / 2,});const app = appById.get(appId);- const processCount = app?.archived || !Array.isArray(app?.processes) ? 0 : app.processes.length;+ const processCount = pos.compact || app?.archived || !Array.isArray(app?.processes) ? 0 : app.processes.length;const processRadius = Math.max(PROCESS_BUILDING_PARAMS.width, PROCESS_BUILDING_PARAMS.depth) * 0.58;for (let index = 0; index < processCount; index += 1) {const angle = (index / processCount) * Math.PI * 2;@@ -175,16 +179,9 @@ export default function PlayerController({if (lastSpawnRef.current) {rig.position.copy(lastSpawnRef.current);} else {- // Spawn behind front row, facing downtown- let maxZ = 0;- positions?.forEach((pos) => {- if (pos.z > maxZ) maxZ = pos.z;- });- // With an empty or single-app install, `maxZ + 8` places the rover inside the- // central plaza's sightline and the AI Core fills the entire mobile viewport.- // Keep the same city-facing drop-in, but start far enough back to reveal the- // playable streets and landmarks before the player drives toward downtown.- rig.position.set(0, EYE_HEIGHT, Math.max(maxZ + 8, DEFAULT_SPAWN_Z));+ // Every install enters at the authored Port overlook. App count must not move the+ // player's starting line onto Archive Rise or behind a data-driven building row.+ rig.position.set(0, EYE_HEIGHT + openWorldTerrainHeight(0, DEFAULT_SPAWN_Z), DEFAULT_SPAWN_Z);rig.yaw = THIRD_PERSON.isometricYaw;rig.heading = THIRD_PERSON.isometricYaw;rig.pitch = 0;@@ -208,7 +205,7 @@ export default function PlayerController({useEffect(() => {if (!active || teleportToken === null || !teleport) return;const rig = rigRef.current;- rig.position.set(teleport.x, EYE_HEIGHT, teleport.z);+ rig.position.set(teleport.x, EYE_HEIGHT + openWorldTerrainHeight(teleport.x, teleport.z), teleport.z);// Face the destination from the same diagonal heading as the default isometric view.rig.yaw = THIRD_PERSON.isometricYaw;rig.heading = THIRD_PERSON.isometricYaw;@@ -418,7 +415,8 @@ export default function PlayerController({// holds altitude when released (no gravity). Gravity applies ONLY during an active// Space jump arc.const flyDir = (keys.has('e') ? 1 : 0) - (keys.has('q') ? 1 : 0);- const grounded = rig.position.y <= EYE_HEIGHT + 1e-3;+ const currentGroundY = EYE_HEIGHT + openWorldTerrainHeight(rig.position.x, rig.position.z);+ const grounded = rig.position.y <= currentGroundY + 1e-3;let dy = 0;if (flyDir !== 0) {rig.jumping = false;@@ -466,17 +464,20 @@ export default function PlayerController({}}+ const nextGroundY = EYE_HEIGHT + openWorldTerrainHeight(nextPos.x, nextPos.z);+ if (!rig.jumping && flyDir === 0) nextPos.y = nextGroundY;+if (blocked) {if (isVehicle) rig.speed = 0;}// World boundsnextPos.x = Math.max(-WORLD.bound, Math.min(WORLD.bound, nextPos.x));- nextPos.y = Math.max(EYE_HEIGHT, Math.min(MAX_CAMERA_HEIGHT, nextPos.y));+ nextPos.y = Math.max(nextGroundY, Math.min(MAX_CAMERA_HEIGHT, nextPos.y));nextPos.z = Math.max(-WORLD.bound, Math.min(WORLD.bound, nextPos.z));// Landed- if (nextPos.y <= EYE_HEIGHT + 1e-3 || nextPos.y >= MAX_CAMERA_HEIGHT) {- if (rig.jumping && nextPos.y <= EYE_HEIGHT + 1e-3) {+ if (nextPos.y <= nextGroundY + 1e-3 || nextPos.y >= MAX_CAMERA_HEIGHT) {+ if (rig.jumping && nextPos.y <= nextGroundY + 1e-3) {playSfx?.('land');}rig.vy = 0;@@ -518,7 +519,7 @@ export default function PlayerController({rig.state = avatarState({moving,sprinting: isVehicle ? Math.abs(rig.speed) > 16 || (isSprinting && moving) : isSprinting && moving,- airborne: rig.position.y > AIRBORNE_HEIGHT,+ airborne: rig.position.y > EYE_HEIGHT + openWorldTerrainHeight(rig.position.x, rig.position.z) + AIRBORNE_CLEARANCE,});if (isVehicle) {const prevFacing = rig.facing;@@ -571,7 +572,7 @@ export default function PlayerController({skid: rig.skid,state: rig.state,jumping: rig.jumping,- airborne: rig.position.y > AIRBORNE_HEIGHT,+ airborne: rig.position.y > EYE_HEIGHT + openWorldTerrainHeight(rig.position.x, rig.position.z) + AIRBORNE_CLEARANCE,boosting: isSprinting,});}diff --git a/client/src/index.css b/client/src/index.cssindex cc61967a40..d565738c70 100644--- a/client/src/index.css+++ b/client/src/index.css@@ -1632,6 +1632,113 @@ html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-500/5"]:hover { bbackground: rgb(var(--port-accent) / 0.14);}+/* Street-level OpenWorld uses one quiet, toy-like interface shared by desktop and+ touch. Operational dashboards stay in orbital mode; the village only names the+ current place, the errand progress, and four reversible exits/tools. */+.openworld-village-status {+ position: absolute;+ top: 1rem;+ left: 1rem;+ display: flex;+ min-height: 3.2rem;+ max-width: min(23rem, calc(100vw - 15rem));+ align-items: center;+ gap: 0.7rem;+ padding: 0.55rem 0.75rem;+ border: 1px solid rgb(var(--port-accent) / 0.26);+ border-radius: 1.05rem;+ background: linear-gradient(145deg, rgb(var(--port-card) / 0.82), rgb(var(--port-bg) / 0.64));+ box-shadow: 0 12px 34px rgb(0 0 0 / 0.14), inset 0 1px 0 rgb(255 255 255 / 0.12);+ backdrop-filter: blur(14px) saturate(1.08);+}++.openworld-village-status__dot {+ width: 0.58rem;+ height: 0.58rem;+ flex: 0 0 auto;+ border-radius: 50%;+ box-shadow: 0 0 10px currentColor;+}++.openworld-village-status small,+.openworld-village-status strong {+ display: block;+ overflow: hidden;+ max-width: 10rem;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.openworld-village-status small {+ margin-bottom: 0.12rem;+ color: var(--ow-muted);+ font-family: var(--ow-micro-font);+ font-size: 0.5rem;+ font-weight: 700;+ letter-spacing: 0.15em;+}++.openworld-village-status strong {+ color: var(--ow-ink);+ font-size: 0.86rem;+ font-weight: 720;+ letter-spacing: 0.015em;+}++.openworld-village-status__echo {+ position: relative;+ min-width: 4.6rem;+ margin-left: auto;+ overflow: hidden;+ padding: 0.34rem 0.45rem;+ border-radius: 0.65rem;+ background: rgb(var(--port-accent) / 0.08);+ color: var(--ow-accent);+ font-family: var(--ow-micro-font);+ font-size: 0.62rem;+ font-weight: 700;+ letter-spacing: 0.06em;+ text-align: center;+}++.openworld-village-status__echo i {+ position: absolute;+ inset: auto auto 0 0;+ height: 2px;+ border-radius: 999px;+ background: var(--ow-accent);+ transition: width 240ms ease;+}++.openworld-village-actions {+ position: absolute;+ top: 1rem;+ right: 1rem;+ display: flex;+ gap: 0.28rem;+ padding: 0.28rem;+ border: 1px solid rgb(var(--port-accent) / 0.22);+ border-radius: 1rem;+ background: rgb(var(--port-card) / 0.72);+ box-shadow: 0 12px 32px rgb(0 0 0 / 0.13), inset 0 1px 0 rgb(255 255 255 / 0.1);+ backdrop-filter: blur(14px) saturate(1.08);+}++.openworld-village-speed {+ position: absolute;+ bottom: 1rem;+ left: 1rem;+ display: flex;+ align-items: baseline;+ gap: 0.28rem;+ color: rgb(255 255 255 / 0.88);+ font-variant-numeric: tabular-nums;+ text-shadow: 0 2px 12px rgb(0 0 0 / 0.55);+}++.openworld-village-speed strong { font-size: 1.4rem; font-weight: 760; }+.openworld-village-speed span { font-family: var(--ow-micro-font); font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase; }+.openworld-hud-crosshair {position: relative;width: 1.75rem;@@ -1730,11 +1837,37 @@ html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-500/5"]:hover { b.openworld-hud-action-copy { display: inline; }}+/* The village toolbar shares the top edge with a status card, so its four long labels+ need more room than the general HUD actions. Keep the tablet layout icon-only. */+.openworld-village-actions .openworld-hud-action-copy { display: none; }++@media (min-width: 1280px) {+ .openworld-village-actions .openworld-hud-action-copy { display: inline; }+}+@media (max-width: 767px) {.openworld-hud-panel { border-radius: 16px; }.openworld-hud-dock { border-radius: 16px; overflow-x: auto; scrollbar-width: none; }.openworld-hud-dock::-webkit-scrollbar { display: none; }.openworld-hud-action { min-height: 2.75rem; min-width: 2.75rem; }+ .openworld-village-status {+ top: 0.65rem;+ left: 0.65rem;+ min-height: 2.85rem;+ max-width: calc(100vw - 13.25rem);+ gap: 0.5rem;+ padding: 0.45rem 0.55rem;+ }+ .openworld-village-status__dot { width: 0.5rem; height: 0.5rem; }+ .openworld-village-status small { font-size: 0.42rem; }+ .openworld-village-status strong { font-size: 0.72rem; }+ .openworld-village-status__echo { min-width: 3.7rem; padding-inline: 0.28rem; font-size: 0.52rem; }+ .openworld-village-actions { top: 0.65rem; right: 0.65rem; }+ .openworld-village-actions .openworld-hud-action { min-width: 2.45rem; min-height: 2.45rem; padding: 0.32rem; }+ .openworld-village-speed { top: 4.15rem; bottom: auto; left: 0.85rem; }+ .openworld-village-speed strong { font-size: 1.05rem; }+ .openworld-village-speed span { font-size: 0.46rem; }+ .openworld-interaction-prompt--compact { bottom: calc(5.4rem + env(safe-area-inset-bottom)); }}/* === OpenWorld mobile game controls ===@@ -1748,7 +1881,7 @@ html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-500/5"]:hover { b.openworld-mobile-look-zone {position: absolute;right: 0.4rem;- bottom: calc(6.3rem + env(safe-area-inset-bottom));+ bottom: calc(0.8rem + env(safe-area-inset-bottom));width: 48%;height: 46%;pointer-events: auto;@@ -1776,9 +1909,9 @@ html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-500/5"]:hover { b.openworld-mobile-joystick {position: absolute;left: 1rem;- bottom: calc(5.8rem + env(safe-area-inset-bottom));- width: 7rem;- height: 7rem;+ bottom: calc(1rem + env(safe-area-inset-bottom));+ width: 6.4rem;+ height: 6.4rem;border: 1px solid rgb(var(--port-accent) / 0.34);border-radius: 50%;background: radial-gradient(circle, rgb(var(--port-accent) / 0.14), rgb(var(--port-bg) / 0.42));@@ -1839,7 +1972,7 @@ html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-500/5"]:hover { b.openworld-mobile-actions {position: absolute;right: 0.5rem;- bottom: calc(5.8rem + env(safe-area-inset-bottom));+ bottom: calc(1rem + env(safe-area-inset-bottom));display: flex;align-items: flex-end;gap: 0.2rem;diff --git a/client/src/pages/OpenWorld.fastTravel.test.jsx b/client/src/pages/OpenWorld.fastTravel.test.jsxindex b250426f20..c0fbef48f0 100644--- a/client/src/pages/OpenWorld.fastTravel.test.jsx+++ b/client/src/pages/OpenWorld.fastTravel.test.jsx@@ -131,7 +131,7 @@ describe('OpenWorld — fast travel wiring', () => {renderAt('/openworld');act(() => { fireEvent.keyDown(window, { key: 'm' }); });- fireEvent.click(screen.getByLabelText('Teleport to Memory Quarter'));+ fireEvent.click(screen.getByLabelText('Teleport to Memory House'));expect(screen.getByTestId('path')).toHaveTextContent('/openworld/region/memory');expect(sceneProps.current.focusedRegion.id).toBe('memory');@@ -140,16 +140,16 @@ describe('OpenWorld — fast travel wiring', () => {it('opens fast travel from the HUD button too', () => {renderAt('/openworld');fireEvent.click(screen.getByText('hud-fast-travel'));- expect(screen.getByLabelText('Teleport to Memory Quarter')).toBeInTheDocument();+ expect(screen.getByLabelText('Teleport to Memory House')).toBeInTheDocument();});it('closes fast travel with Escape', () => {renderAt('/openworld');act(() => { fireEvent.keyDown(window, { key: 'm' }); });- expect(screen.getByLabelText('Search regions')).toBeInTheDocument();+ expect(screen.getByLabelText('Search village places')).toBeInTheDocument();act(() => { fireEvent.keyDown(window, { key: 'Escape' }); });- expect(screen.queryByLabelText('Search regions')).not.toBeInTheDocument();+ expect(screen.queryByLabelText('Search village places')).not.toBeInTheDocument();});it('arms no arrival point until something is actually warped to', () => {@@ -163,7 +163,7 @@ describe('OpenWorld — fast travel wiring', () => {// land at the region rather than the old spawn.renderAt('/openworld');act(() => { fireEvent.keyDown(window, { key: 'm' }); });- fireEvent.click(screen.getByLabelText('Teleport to Memory Quarter'));+ fireEvent.click(screen.getByLabelText('Teleport to Memory House'));const teleport = sceneProps.current.playerTeleport;expect(teleport).toMatchObject({ x: expect.any(Number), z: expect.any(Number) });@@ -174,7 +174,7 @@ describe('OpenWorld — fast travel wiring', () => {localStorage.setItem('portos-city-settings', JSON.stringify({ explorationMode: true }));renderAt('/openworld');act(() => { fireEvent.keyDown(window, { key: 'm' }); });- fireEvent.click(screen.getByLabelText('Teleport to Memory Quarter'));+ fireEvent.click(screen.getByLabelText('Teleport to Memory House'));const teleport = sceneProps.current.playerTeleport;expect(teleport).toMatchObject({ x: expect.any(Number), z: expect.any(Number) });@@ -185,11 +185,11 @@ describe('OpenWorld — fast travel wiring', () => {renderAt('/openworld');act(() => { fireEvent.keyDown(window, { key: 'm' }); });- fireEvent.click(screen.getByLabelText('Teleport to Memory Quarter'));+ fireEvent.click(screen.getByLabelText('Teleport to Memory House'));expect(sceneProps.current.playerTeleport.token).toBe(1);act(() => { fireEvent.keyDown(window, { key: 'm' }); });- fireEvent.click(screen.getByLabelText('Teleport to Memory Quarter'));+ fireEvent.click(screen.getByLabelText('Teleport to Memory House'));// Same destination, new warp — a plain {x,z} identity check would have swallowed this.expect(sceneProps.current.playerTeleport.token).toBe(2);});@@ -200,11 +200,11 @@ describe('OpenWorld — fast travel wiring', () => {renderAt('/openworld');fireEvent.click(screen.getByText('hud-photo'));act(() => { fireEvent.keyDown(window, { key: 'm' }); });- expect(screen.queryByLabelText('Search regions')).not.toBeInTheDocument();+ expect(screen.queryByLabelText('Search village places')).not.toBeInTheDocument();fireEvent.keyDown(window, { key: 'Escape' }); // leave photo modeact(() => {});- expect(screen.queryByLabelText('Search regions')).not.toBeInTheDocument();+ expect(screen.queryByLabelText('Search village places')).not.toBeInTheDocument();});it('tells the HUD which region is active', () => {diff --git a/client/src/pages/OpenWorld.jsx b/client/src/pages/OpenWorld.jsxindex db304516d5..5c11f92069 100644--- a/client/src/pages/OpenWorld.jsx+++ b/client/src/pages/OpenWorld.jsx@@ -549,7 +549,10 @@ function OpenWorldInner() {return (<OpenWorldPaletteProvider palette={openWorldPalette}>- <div className="relative w-full h-full openworld-themed" style={{ background: sceneBackground, isolation: 'isolate' }}>+ <div+ className={`${settings?.explorationMode ? 'fixed inset-0 z-[90]' : 'relative w-full h-full'} openworld-themed`}+ style={{ background: sceneBackground, isolation: 'isolate' }}+ ><OpenWorldScene// A theme switch recolors the live scene in place — NO full-scene remount.// Every themed surface either reads the palette fresh each render (declarative@@ -656,8 +659,6 @@ function OpenWorldInner() {<OpenWorldMobileControlsmobileInputRef={mobileInputRef}playerActionRef={playerActionRef}- onToggleCameraView={handleToggleCameraView}- onToggleExploration={handleToggleExploration}/>)}<OpenWorldPhotoOverlaydiff --git a/client/src/utils/openWorldAiCore.js b/client/src/utils/openWorldAiCore.jsindex 9b5899eafc..c6028dce59 100644--- a/client/src/utils/openWorldAiCore.js+++ b/client/src/utils/openWorldAiCore.js@@ -15,9 +15,9 @@import { PARCELS } from './openWorldPlan';export const AI_CORE = {- position: PARCELS.aiCore.anchor, // city center — the spire rises above the building grid- height: 28, // tall enough to clear downtown while leaving the plaza visible around it- apexY: 28, // beams/glow originate from the apex+ position: PARCELS.aiCore.anchor, // world center — the kinetic core anchors The Port+ height: 6,+ apexY: 5.5, // beams/glow originate from the suspended seed above the plazamaxBeams: 6, // visible activity beams cap// How long an op with no terminal (complete/error) event lingers before being pruned,// so a dropped/never-finished call can't pin the core "busy" forever.diff --git a/client/src/utils/openWorldCollectibles.test.js b/client/src/utils/openWorldCollectibles.test.jsindex 7ff45ace73..f296ef5b9f 100644--- a/client/src/utils/openWorldCollectibles.test.js+++ b/client/src/utils/openWorldCollectibles.test.js@@ -8,6 +8,7 @@ import {SHARD_COLLECTION_RADIUS,isCollectibleVisible,} from './openWorldCollectibles';+import { isWalkable } from './openWorldPlan';describe('openWorldCollectibles', () => {it('defines a non-empty array of valid collectible shards with unique ids', () => {@@ -23,6 +24,7 @@ describe('openWorldCollectibles', () => {expect(typeof shard.z).toBe('number');expect(typeof shard.color).toBe('string');expect(typeof shard.value).toBe('number');+ expect(isWalkable(shard.x, shard.z), shard.id).toBe(true);expect(ids.has(shard.id)).toBe(false);ids.add(shard.id);});diff --git a/client/src/utils/openWorldMiniMap.js b/client/src/utils/openWorldMiniMap.jsindex 0114b01872..572b23850f 100644--- a/client/src/utils/openWorldMiniMap.js+++ b/client/src/utils/openWorldMiniMap.js@@ -6,13 +6,17 @@// fixed-size map box — plus bounds and empty/degenerate handling. No React / three.js// imports so the topology stays unit-testable (mirrors openWorldTaskQueue.js).//-// Geography awareness: the bay, shoreline, and Data Harbor are read from the SAME master-// town plan (`openWorldPlan.js`) the 3D scene uses, so the map's waterfront can't drift from the-// real city either. `geographyWorldPoints()` feeds those anchors into the map bounds so the-// bay is visible, and `projectGeography()` returns normalized shoreline/harbor coordinates-// for the overlay to draw.--import { WORLD, PARCELS } from './openWorldPlan';+// Geography awareness: every island and Signal Trail causeway is read from the SAME+// archipelago plan (`openWorldPlan.js`) the 3D scene uses. `geographyWorldPoints()` feeds+// the island extents into the map bounds and `projectGeography()` projects the actual+// island/link geometry, so the HUD map cannot drift back into the old rectangular city.++import {+ ARCHIPELAGO_ISLANDS,+ ARCHIPELAGO_LINKS,+ PARCELS,+ archipelagoLinkPoints,+} from './openWorldPlan';// Padding (as a fraction of the box) so dots never sit exactly on the frame edge.export const MINI_MAP_PADDING = 0.08;@@ -106,37 +110,43 @@ function clamp01(v) {return v;}-// World-space anchor points for the city's waterfront, read from the master town plan. These-// are folded into the map bounds (when geography is enabled) so the bay north of the shoreline-// and the Data Harbor's piers are actually inside the visible box — building positions alone-// only span the land, so the water would otherwise sit off-frame.+// World-space extrema for every island. These are folded into the map bounds so the+// complete playable world remains visible even when the install has few or no app buildings.export function geographyWorldPoints() {- const harbor = PARCELS.dataHarbor;- const [hx, , hz] = harbor.anchor;- const halfW = harbor.w / 2;- const halfD = harbor.d / 2;- return [- // Shoreline span across the paved land width, at the waterline.- { x: -WORLD.landHalf, z: WORLD.shorelineZ },- { x: WORLD.landHalf, z: WORLD.shorelineZ },- // Data Harbor footprint (out over the bay, z < shoreline).- { x: hx - halfW, z: hz - halfD },- { x: hx + halfW, z: hz + halfD },- ];+ return ARCHIPELAGO_ISLANDS.flatMap((island) => {+ const [x, z] = island.center;+ return [+ { x: x - island.radiusX, z },+ { x: x + island.radiusX, z },+ { x, z: z - island.radiusZ },+ { x, z: z + island.radiusZ },+ ];+ });}-// Normalized (0..1) projection of the waterfront for the overlay to draw, given the SAME-// bounds the dots use. `shorelineY` is the vertical position of the waterline (water is above-// it on the map — smaller z projects to smaller ny); `harbor` is the harbor marker's point.-// Returns null when bounds are null (empty city) so the overlay skips the water layer.+// Normalized (0..1) projection of the authored islands and their Signal Trail links.export function projectGeography(bounds, padding = MINI_MAP_PADDING) {if (!bounds) return null;- const harbor = PARCELS.dataHarbor;- const { ny: shorelineY } = projectPoint({ x: 0, z: WORLD.shorelineZ }, bounds, padding);- const harborPoint = projectPoint({ x: harbor.anchor[0], z: harbor.anchor[2] }, bounds, padding);return {- shorelineY,- harbor: { nx: harborPoint.nx, ny: harborPoint.ny, label: harbor.label },+ islands: ARCHIPELAGO_ISLANDS.map((island) => {+ const [x, z] = island.center;+ const center = projectPoint({ x, z }, bounds, padding);+ const edgeX = projectPoint({ x: x + island.radiusX, z }, bounds, padding);+ const edgeZ = projectPoint({ x, z: z + island.radiusZ }, bounds, padding);+ return {+ id: island.id,+ label: island.label,+ biome: island.biome,+ nx: center.nx,+ ny: center.ny,+ radiusX: Math.abs(edgeX.nx - center.nx),+ radiusY: Math.abs(edgeZ.ny - center.ny),+ };+ }),+ links: ARCHIPELAGO_LINKS.map((link) => ({+ id: link.id,+ points: archipelagoLinkPoints(link).map(([x, z]) => projectPoint({ x, z }, bounds, padding)),+ })),};}@@ -190,9 +200,8 @@ export function projectLandmarks(bounds, padding = MINI_MAP_PADDING) {// (defensive — every active/archived app should have one). Handles empty/non-array inputs by// returning an empty, bounds-null view.//-// `opts.geography` (default false) folds the bay/shoreline/harbor anchors into the bounds and-// returns a `geography` view-model (shoreline + harbor in normalized coords). It's opt-in so-// the pure projection tests keep building-only bounds; the live overlay passes `true`.+// `opts.geography` (default false) folds the whole archipelago into the bounds and returns+// its projected island/link view-model. The live overlay passes `true`.export function computeMiniMap(apps, positions, opts = {}) {const padding = opts.padding ?? MINI_MAP_PADDING;const includeGeography = opts.geography === true;@@ -207,9 +216,9 @@ export function computeMiniMap(apps, positions, opts = {}) {placed.push({ app, pos });}- // Geography anchors expand the box so the waterfront is on-frame, but never become dots.+ // Geography anchors expand the box to the complete playable world, but never become dots.const boundsPoints = placed.map(({ pos }) => pos);- if (includeGeography && boundsPoints.length > 0) boundsPoints.push(...geographyWorldPoints());+ if (includeGeography) boundsPoints.push(...geographyWorldPoints());const bounds = computeBounds(boundsPoints);const dots = placed.map(({ app, pos }) => {diff --git a/client/src/utils/openWorldMiniMap.test.js b/client/src/utils/openWorldMiniMap.test.jsindex e74d40ae48..bfce6e9b76 100644--- a/client/src/utils/openWorldMiniMap.test.js+++ b/client/src/utils/openWorldMiniMap.test.js@@ -11,7 +11,7 @@ import {projectLandmarks,spreadProjectedPoints,} from './openWorldMiniMap';-import { WORLD, PARCELS } from './openWorldPlan';+import { ARCHIPELAGO_ISLANDS, ARCHIPELAGO_LINKS } from './openWorldPlan';const pos = (x, z, district = 'downtown') => ({ x, z, district });@@ -206,52 +206,61 @@ describe('computeMiniMap', () => {expect(vm.geography).toBeNull();});- it('keeps geography null for an empty city even when requested', () => {+ it('keeps the playable archipelago visible for an install with no app buildings', () => {const vm = computeMiniMap([], new Map(), { geography: true });- expect(vm.geography).toBeNull();+ expect(vm.geography).not.toBeNull();+ expect(vm.geography.islands).toHaveLength(ARCHIPELAGO_ISLANDS.length);+ expect(vm.bounds).not.toBeNull();expect(vm.empty).toBe(true);});- it('folds the waterfront into the bounds when geography is enabled', () => {+ it('folds the whole archipelago into the bounds when geography is enabled', () => {const apps = [{ id: 'a', overallStatus: 'online' }];const land = computeMiniMap(apps, positions([['a', 0, 0]]));const sea = computeMiniMap(apps, positions([['a', 0, 0]]), { geography: true });- // The bay (z < shorelineZ, well north of a single downtown building) must push the- // box's minZ above the shoreline so the water is on-frame.- expect(sea.bounds.minZ).toBeLessThanOrEqual(WORLD.shorelineZ);expect(sea.bounds.minZ).toBeLessThan(land.bounds.minZ);+ expect(sea.bounds.maxZ).toBeGreaterThan(land.bounds.maxZ);+ expect(sea.bounds.minX).toBeLessThan(land.bounds.minX);+ expect(sea.bounds.maxX).toBeGreaterThan(land.bounds.maxX);expect(sea.geography).not.toBeNull();- expect(sea.geography.harbor.label).toBe(PARCELS.dataHarbor.label);+ expect(sea.geography.links).toHaveLength(ARCHIPELAGO_LINKS.length);});- it('projects the shoreline above the harbor marker (water reads north / top)', () => {+ it('projects every island and every link inside the normalized map', () => {const apps = [{ id: 'a', overallStatus: 'online' },{ id: 'b', overallStatus: 'online' },];const vm = computeMiniMap(apps, positions([['a', -20, 20], ['b', 20, 40]]), { geography: true });- const { shorelineY, harbor } = vm.geography;- // The harbor sits out in the bay (z = -64, beyond the shoreline at z = -56), so it- // projects above the shoreline line — a smaller ny (north reads as the top of the map).- expect(harbor.ny).toBeLessThan(shorelineY);- for (const v of [shorelineY, harbor.nx, harbor.ny]) {- expect(v).toBeGreaterThanOrEqual(0);- expect(v).toBeLessThanOrEqual(1);+ for (const island of vm.geography.islands) {+ for (const value of [island.nx, island.ny, island.radiusX, island.radiusY]) {+ expect(value).toBeGreaterThanOrEqual(0);+ expect(value).toBeLessThanOrEqual(1);+ }+ }+ for (const link of vm.geography.links) {+ expect(link.points.length).toBeGreaterThanOrEqual(2);+ link.points.forEach((point) => {+ expect(point.nx).toBeGreaterThanOrEqual(0);+ expect(point.nx).toBeLessThanOrEqual(1);+ expect(point.ny).toBeGreaterThanOrEqual(0);+ expect(point.ny).toBeLessThanOrEqual(1);+ });}});});describe('geographyWorldPoints', () => {- it('returns shoreline + harbor anchors from the master plan', () => {+ it('returns four extrema for every island in the master plan', () => {const pts = geographyWorldPoints();- expect(pts).toHaveLength(4);- // Shoreline endpoints span the paved land width at the waterline.- expect(pts[0]).toEqual({ x: -WORLD.landHalf, z: WORLD.shorelineZ });- expect(pts[1]).toEqual({ x: WORLD.landHalf, z: WORLD.shorelineZ });- // Harbor footprint corners straddle the parcel anchor out over the bay.- const harbor = PARCELS.dataHarbor;- expect(pts[2].z).toBeLessThan(WORLD.shorelineZ);- expect(pts[3].x).toBeCloseTo(harbor.anchor[0] + harbor.w / 2);+ expect(pts).toHaveLength(ARCHIPELAGO_ISLANDS.length * 4);+ ARCHIPELAGO_ISLANDS.forEach((island, index) => {+ const offset = index * 4;+ expect(pts[offset]).toEqual({ x: island.center[0] - island.radiusX, z: island.center[1] });+ expect(pts[offset + 1]).toEqual({ x: island.center[0] + island.radiusX, z: island.center[1] });+ expect(pts[offset + 2]).toEqual({ x: island.center[0], z: island.center[1] - island.radiusZ });+ expect(pts[offset + 3]).toEqual({ x: island.center[0], z: island.center[1] + island.radiusZ });+ });});});@@ -260,13 +269,12 @@ describe('projectGeography', () => {expect(projectGeography(null)).toBeNull();});- it('projects shoreline + harbor into normalized coordinates', () => {+ it('projects islands and links into normalized coordinates', () => {const bounds = { minX: -60, maxX: 60, minZ: -70, maxZ: 60 };const geo = projectGeography(bounds);- expect(geo.shorelineY).toBeGreaterThanOrEqual(0);- expect(geo.shorelineY).toBeLessThanOrEqual(1);- expect(geo.harbor.label).toBe(PARCELS.dataHarbor.label);- expect(geo.harbor.ny).toBeLessThan(geo.shorelineY);+ expect(geo.islands).toHaveLength(ARCHIPELAGO_ISLANDS.length);+ expect(geo.links).toHaveLength(ARCHIPELAGO_LINKS.length);+ expect(geo.islands.find((island) => island.id === 'harbor')?.label).toBe('Data Harbor');});});diff --git a/client/src/utils/openWorldPlan.js b/client/src/utils/openWorldPlan.jsindex 2f8d5a32f3..dbabf7cd1a 100644--- a/client/src/utils/openWorldPlan.js+++ b/client/src/utils/openWorldPlan.js@@ -1,38 +1,117 @@-// OpenWorld's master town plan — THE single source of truth for the city's geography.+// OpenWorld's master archipelago plan — THE single source of truth for its geography.// Every district helper anchors its parcel here (instead of each module hardcoding its own// compass position), so streets, the transit loop, the waterfront, and the overlap/shoreline// invariant tests all read the same map. No three.js / React imports — the whole plan is// plain data + pure math, unit-testable in node (mirrors openWorldDistrictLayout.js).//-// Geography at a glance (top-down, default camera looks from +Z toward -Z):-//-// ~ ~ ~ BAY (water, z < shoreline) ~ ~ ~-// [federation peers on the far horizon, radius 76+]-// ════ DATA HARBOR (piers) ════-// ── shoreline z = -56 ──────────────────────────────────-// jira yard voice beacon goal monuments-// memory quarter │ avenue │ artifacts hall-// backup vault ╭── plaza ──╮ task queue-// │ AI CORE │-// productivity ╰─ downtown ╯ health tower-// + heatmap easter eggs-// warehouse (archived, grows +Z)-//-// The bay sits NORTH (-Z) on purpose: the default camera at [0,25,45] faces it, the archive-// warehouse grows the opposite way (+Z) so it can never reach the water, and the federation-// horizon's distant peers read as sister cities across the bay.+// The Port sits at the center; Memory Wilds and Maker Reach branch north, Signal Cape+// carries their trails to Data Harbor, and Archive Rise branches south into the Focus+// Gardens and Wellness Grove. Open water makes those regions readable at a glance.export const WORLD = {bound: 180, // hard XZ world bound (matches PlayerController)shorelineZ: -56, // land for z > shorelineZ; water (the bay) beyondlandHalf: 60, // half-extent of the paved city ground plane (x ±landHalf, z shoreline→+landHalf)- // The ground y-stack, bottom to top: terrain shader < water plane < city ground.- terrainY: -0.08,- waterY: -0.04,- groundY: -0.02,+ // The new world is a chain of raised islands. Live landmarks still sit at y=0,+ // while the ocean and distant terrain sit well below the playable shelves.+ terrainY: -2.8,+ waterY: -2.55,+ groundY: 0,waterSpan: 520, // how far the water plane extends past the shoreline / to each side};+// OpenWorld is an authored archipelago rather than a rectangular city slab. Each+// island owns a recognizable PortOS biome; bridges make a continuous Signal Trail+// through all of them. The same data drives rendering, collision, and the mini-map.+// Radii are deliberately generous around landmark anchors so a live-data structure+// never appears to float off the terrain when its own footprint grows slightly.+export const ARCHIPELAGO_ISLANDS = [+ // The street-level game now reads as one cozy valley rather than eight empty plates.+ // Overlap is deliberate: the named neighborhoods remain legible on the map, while the+ // playable ground joins into an Animal-Crossing-like village with no dead ocean gaps.+ { id: 'core', label: 'The Port', center: [0, -4], radiusX: 56, radiusZ: 51, seed: 111, biome: 'port' },+ { id: 'memory', label: 'Memory Wilds', center: [-39, -33], radiusX: 29, radiusZ: 24, seed: 223, biome: 'memory' },+ { id: 'forge', label: 'Maker Reach', center: [39, -29], radiusX: 29, radiusZ: 24, seed: 337, biome: 'forge' },+ { id: 'signal', label: 'Signal Cape', center: [7, -48], radiusX: 20, radiusZ: 15, seed: 449, biome: 'signal' },+ { id: 'harbor', label: 'Data Harbor', center: [0, -66], radiusX: 31, radiusZ: 18, seed: 557, biome: 'harbor' },+ { id: 'archive', label: 'Archive Rise', center: [0, 40], radiusX: 46, radiusZ: 28, seed: 661, biome: 'archive' },+ { id: 'garden', label: 'Focus Gardens', center: [-45, 32], radiusX: 23, radiusZ: 20, seed: 773, biome: 'garden' },+ { id: 'wellness', label: 'Wellness Grove', center: [45, 30], radiusX: 23, radiusZ: 20, seed: 887, biome: 'wellness' },+];++// The close game renders one continuous valley shelf. Named neighborhood islands remain+// as semantic geography for orbital view and compatibility, while this outline is the+// street-level ground and the Village Map silhouette.+export const VILLAGE_GROUND = {+ id: 'village-ground',+ label: 'PortOS Village',+ center: [0, -5],+ radiusX: 74,+ radiusZ: 80,+ seed: 1061,+ biome: 'port',+};++// Causeways use explicit waypoints so the visual path can arc around landmarks.+// `width` is the full rendered deck width and also the ground-collision corridor.+export const ARCHIPELAGO_LINKS = [+ { id: 'core-memory', from: 'core', to: 'memory', width: 5.2, points: [[-18, -11], [-28, -22]] },+ { id: 'core-forge', from: 'core', to: 'forge', width: 5.2, points: [[18, -10], [28, -19]] },+ { id: 'core-signal', from: 'core', to: 'signal', width: 5.6, points: [[2, -27], [5, -35]] },+ { id: 'signal-harbor', from: 'signal', to: 'harbor', width: 5.6, points: [[5, -50], [2, -57]] },+ { id: 'core-archive', from: 'core', to: 'archive', width: 6.2, points: [[0, 26], [0, 31]] },+ { id: 'archive-garden', from: 'archive', to: 'garden', width: 4.8, points: [[-18, 39], [-32, 36]] },+ { id: 'archive-wellness', from: 'archive', to: 'wellness', width: 4.8, points: [[18, 38], [32, 34]] },+ { id: 'memory-signal', from: 'memory', to: 'signal', width: 4.4, points: [[-23, -39], [-9, -42]] },+ { id: 'forge-signal', from: 'forge', to: 'signal', width: 4.4, points: [[24, -36], [15, -41]] },+];++const islandById = (id) => ARCHIPELAGO_ISLANDS.find((island) => island.id === id);++export const archipelagoLinkPoints = (link) => {+ const from = islandById(link?.from);+ const to = islandById(link?.to);+ if (!from || !to) return [];+ return [from.center, ...(link.points || []), to.center];+};++const pointNearSegment = (x, z, start, end, radius) => {+ const dx = end[0] - start[0];+ const dz = end[1] - start[1];+ const lengthSq = dx * dx + dz * dz;+ if (lengthSq <= 1e-9) return Math.hypot(x - start[0], z - start[1]) <= radius;+ const t = Math.max(0, Math.min(1, ((x - start[0]) * dx + (z - start[1]) * dz) / lengthSq));+ return Math.hypot(x - (start[0] + dx * t), z - (start[1] + dz * t)) <= radius;+};++export const isOnArchipelagoIsland = (x, z, inset = 0) => ARCHIPELAGO_ISLANDS.some((island) => {+ const safeX = Math.max(0.5, island.radiusX - inset);+ const safeZ = Math.max(0.5, island.radiusZ - inset);+ const nx = (x - island.center[0]) / safeX;+ const nz = (z - island.center[1]) / safeZ;+ return nx * nx + nz * nz <= 1;+});++// Street-level rendering uses one continuous valley shelf rather than the orbital+// archipelago plates. Keep its collision outline beside the authored ground descriptor so+// the rover never hits an invisible island boundary while still visibly on village grass.+export const isOnVillageGround = (x, z, inset = 0) => {+ const safeX = Math.max(0.5, VILLAGE_GROUND.radiusX - inset);+ const safeZ = Math.max(0.5, VILLAGE_GROUND.radiusZ - inset);+ const nx = (x - VILLAGE_GROUND.center[0]) / safeX;+ const nz = (z - VILLAGE_GROUND.center[1]) / safeZ;+ return nx * nx + nz * nz <= 1;+};++export const isOnArchipelagoLink = (x, z, padding = 0) => ARCHIPELAGO_LINKS.some((link) => {+ const points = archipelagoLinkPoints(link);+ const radius = link.width / 2 + padding;+ for (let index = 1; index < points.length; index += 1) {+ if (pointNearSegment(x, z, points[index - 1], points[index], radius)) return true;+ }+ return false;+});+// Land parcels. `anchor` is the district's center on the ground; `w`/`d` are the static// footprint (x-width / z-depth) used by the invariant tests and the tinted ground pads.// `dynamic: true` marks data-driven grids (downtown/warehouse) whose extent grows with the@@ -63,6 +142,136 @@ export const PARCELS = {export const PLAZA = { center: [0, 0, 0], radius: 12, sidewalkOuter: 14.5 };+// Street-level cottage footprints. Rendering, rover collision, and camera avoidance all+// share these envelopes so the cozy village is a physical place instead of set dressing+// the player can ghost through. The central pavilion stays open; only its floating core+// is solid so the rover can still circle between the benches and arches.+export const VILLAGE_COLLIDERS = [+ { id: 'core', shape: 'circle', x: 0, z: 0, radius: 2.35, height: 5.2 },+ ...[+ 'memory', 'backupVault', 'taskQueue', 'warehouse', 'health', 'productivity',+ 'jira', 'easterEggs', 'goals', 'voice', 'artifacts', 'dataHarbor',+ ].map((parcelId) => {+ const [x, , z] = PARCELS[parcelId].anchor;+ return { id: parcelId, shape: 'box', x, z, halfWidth: 3.1, halfDepth: 2.6, height: 6.4 };+ }),+];++// Curved village lanes are the visual and play rhythm of street-level OpenWorld. The+// broad heart loop keeps a landmark or garden entering the frame every few seconds; short+// branches terminate at real PortOS destinations. Curves are rendered from this registry,+// so art direction and vehicle route composition cannot drift apart.+export const VILLAGE_ROUTES = [+ {+ id: 'heart-loop',+ kind: 'road',+ width: 5.4,+ closed: true,+ points: [[0, 36], [-16, 32], [-27, 18], [-29, 1], [-20, -14], [-5, -22], [13, -20], [28, -8], [29, 11], [19, 28]],+ },+ { id: 'harbor-lane', kind: 'road', width: 5.2, points: [[-5, -22], [0, -36], [3, -50], [0, -64]] },+ { id: 'memory-lane', kind: 'path', width: 3.8, points: [[-20, -14], [-31, -22], [-44, -30]] },+ { id: 'maker-lane', kind: 'path', width: 3.8, points: [[13, -20], [28, -26], [43, -28]] },+ { id: 'garden-lane', kind: 'path', width: 3.6, points: [[-16, 32], [-30, 34], [-47, 31]] },+ { id: 'wellness-lane', kind: 'path', width: 3.6, points: [[19, 28], [32, 30], [47, 28]] },+ { id: 'arrival-lane', kind: 'road', width: 5.4, points: [[0, 50], [0, 43], [0, 36]] },+];++// Managed apps become a little market around the Common in exploration mode. The first+// ring reads from the main road; a staggered second ring lets larger installs keep their+// identity without rebuilding the village around app count. Archived apps belong to the+// Archive Lodge and are summarized there instead of occupying active market stalls.+export const VILLAGE_APP_MARKET = {+ innerRadius: 12.8,+ outerRadius: 17.2,+ innerCapacity: 8,+ maxKiosks: 18,+ halfWidth: 1.28,+ halfDepth: 0.92,+ height: 3.25,+};++const APP_STATUS_ORDER = { online: 0, stopped: 1, not_started: 2, unknown: 3, not_found: 4 };++export function computeVillageAppLayout(apps = []) {+ const active = (Array.isArray(apps) ? apps : [])+ .filter((app) => app?.id && !app.archived)+ .sort((a, b) => {+ const statusDelta = (APP_STATUS_ORDER[a.overallStatus] ?? 5) - (APP_STATUS_ORDER[b.overallStatus] ?? 5);+ if (statusDelta !== 0) return statusDelta;+ return String(a.name || a.id).localeCompare(String(b.name || b.id));+ })+ .slice(0, VILLAGE_APP_MARKET.maxKiosks);++ const positions = new Map();+ active.forEach((app, index) => {+ const outer = index >= VILLAGE_APP_MARKET.innerCapacity;+ const ringIndex = outer ? index - VILLAGE_APP_MARKET.innerCapacity : index;+ const ringCount = outer+ ? Math.max(1, active.length - VILLAGE_APP_MARKET.innerCapacity)+ : Math.min(active.length, VILLAGE_APP_MARKET.innerCapacity);+ const radius = outer ? VILLAGE_APP_MARKET.outerRadius : VILLAGE_APP_MARKET.innerRadius;+ const stagger = outer ? Math.PI / Math.max(3, ringCount) : 0;+ // Begin in the Common's front-right quarter so even a one-app install presents a+ // storefront on arrival instead of hiding its only kiosk behind the pavilion.+ const angle = (ringIndex / ringCount) * Math.PI * 2 + stagger + Math.PI / 4;+ const x = Math.cos(angle) * radius;+ const z = Math.sin(angle) * radius;+ positions.set(app.id, {+ x,+ z,+ yaw: Math.atan2(x, z),+ district: 'village-market',+ height: VILLAGE_APP_MARKET.height,+ halfWidth: VILLAGE_APP_MARKET.halfWidth,+ halfDepth: VILLAGE_APP_MARKET.halfDepth,+ compact: true,+ });+ });+ return positions;+}++const smoothstep = (edge0, edge1, value) => {+ const t = Math.max(0, Math.min(1, (value - edge0) / (edge1 - edge0)));+ return t * t * (3 - 2 * t);+};++// Pure height function shared by the terrain mesh, player grounding, camera, and rover+// suspension. Broad rolls establish a toy-diorama silhouette; fine ripples are deliberately+// small enough for a Kabsch-fitted chassis to reveal them without making the route bumpy.+export function openWorldTerrainHeight(x, z) {+ let influence = 0;+ let seed = 0;+ for (const island of ARCHIPELAGO_ISLANDS) {+ const nx = (x - island.center[0]) / island.radiusX;+ const nz = (z - island.center[1]) / island.radiusZ;+ const radius = Math.hypot(nx, nz);+ if (radius >= 1) continue;+ const nextInfluence = smoothstep(1, 0.18, radius);+ if (nextInfluence > influence) {+ influence = nextInfluence;+ seed = island.seed;+ }+ }+ if (influence <= 0) return 0;++ const broad = Math.sin((x + seed * 0.01) * 0.075) * 0.28+ + Math.cos((z - seed * 0.006) * 0.09) * 0.22;+ const fine = Math.sin(x * 0.31 + z * 0.19) * 0.055;+ const arrivalHump = 0.48 * Math.exp(-((x * x) + ((z - 42) * (z - 42)) * 0.55) / 34);+ const harborDip = -0.28 * Math.exp(-((x * x) + ((z + 56) * (z + 56))) / 95);++ // Keep the immediate doorstep of every destination calm so cottages and live-data+ // monuments share a dependable foundation in both game and orbital modes.+ const nearestParcel = Object.values(PARCELS).reduce((nearest, parcel) => {+ const distance = Math.hypot(x - parcel.anchor[0], z - parcel.anchor[2]);+ return Math.min(nearest, distance);+ }, Infinity);+ const doorstep = smoothstep(3.5, 9, nearestParcel);++ return (broad + fine + arrivalHump + harborDip) * influence * (0.28 + doorstep * 0.72);+}+// Elevated transit loop — a closed ride through every quarter, rendered as a glowing tube// with trams orbiting it. District stops are DERIVED from their parcel anchors (pulled 10%// toward the city center so the track skims districts instead of impaling their monuments)@@ -98,14 +307,13 @@ export const TRANSIT = {// players on land). `margin` extends the water zone toward land (positive = stricter).export const isInWater = (_x, z, margin = 0) => z < WORLD.shorelineZ + margin;-// True where a ground-level player may stand: any land, plus the Data Harbor's piers —-// the one parcel built over the water (reached by the avenue gangway). Flying players-// (above rooftop height) ignore this entirely.+// True where a ground-level player may stand: inside the continuous village shelf or on+// an authored causeway. Flying players (above rooftop height) ignore this entirely.export const isWalkable = (x, z) => {- if (!isInWater(x, z)) return true;- const harbor = PARCELS.dataHarbor;- return Math.abs(x - harbor.anchor[0]) <= harbor.w / 2- && z >= harbor.anchor[2] - harbor.d / 2;+ // Pull the collision boundary slightly inside the decorative village rim so the+ // rover cannot balance over open water on its outside wheels. Causeways get a+ // small forgiving shoulder for analog controls and high-speed boost entries.+ return isOnVillageGround(x, z, 0.75) || isOnArchipelagoLink(x, z, 0.45);};// ---------------------------------------------------------------------------diff --git a/client/src/utils/openWorldPlan.test.js b/client/src/utils/openWorldPlan.test.jsindex 2439821774..3846f93cd5 100644--- a/client/src/utils/openWorldPlan.test.js+++ b/client/src/utils/openWorldPlan.test.js@@ -1,6 +1,20 @@import { describe, it, expect } from 'vitest';import {- WORLD, PARCELS, PLAZA, TRANSIT, isInWater, isWalkable, computeStreets, computeStreetProps,+ ARCHIPELAGO_ISLANDS,+ ARCHIPELAGO_LINKS,+ WORLD,+ PARCELS,+ PLAZA,+ TRANSIT,+ VILLAGE_APP_MARKET,+ archipelagoLinkPoints,+ computeVillageAppLayout,+ isInWater,+ isOnArchipelagoIsland,+ isOnVillageGround,+ isWalkable,+ computeStreets,+ computeStreetProps,} from './openWorldPlan';const staticParcels = Object.entries(PARCELS).filter(([, p]) => !p.dynamic);@@ -66,13 +80,66 @@ describe('isInWater', () => {});describe('isWalkable', () => {- it('allows all land, blocks open water, but keeps the harbor piers reachable', () => {- expect(isWalkable(0, 0)).toBe(true); // downtown- expect(isWalkable(50, WORLD.shorelineZ - 5)).toBe(false); // open bay- const harbor = PARCELS.dataHarbor;- expect(isWalkable(harbor.anchor[0], harbor.anchor[2])).toBe(true); // on the pier- expect(isWalkable(0, WORLD.shorelineZ - 2)).toBe(true); // the gangway off the avenue- expect(isWalkable(harbor.anchor[0] + harbor.w, harbor.anchor[2])).toBe(false); // beside the pier+ it('allows the continuous village shelf and connected causeways while blocking open water', () => {+ ARCHIPELAGO_ISLANDS.forEach((island) => {+ expect(isWalkable(island.center[0], island.center[1]), island.id).toBe(true);+ expect(isOnArchipelagoIsland(island.center[0], island.center[1]), island.id).toBe(true);+ });+ ARCHIPELAGO_LINKS.forEach((link) => {+ const points = archipelagoLinkPoints(link);+ for (let index = 1; index < points.length; index += 1) {+ const [x1, z1] = points[index - 1];+ const [x2, z2] = points[index];+ expect(isWalkable((x1 + x2) / 2, (z1 + z2) / 2), link.id).toBe(true);+ }+ });+ // The close game renders one valley outline, including grass between the named+ // orbital islands. That visible shelf must not contain an invisible collision wall.+ expect(isOnArchipelagoIsland(68, 0, 0.75)).toBe(false);+ expect(isOnVillageGround(68, 0, 0.75)).toBe(true);+ expect(isWalkable(68, 0)).toBe(true);+ expect(isWalkable(78, -58)).toBe(false);+ expect(isWalkable(-75, 0)).toBe(false);+ });++ it('keeps every island inside the hard world bound', () => {+ ARCHIPELAGO_ISLANDS.forEach((island) => {+ expect(Math.abs(island.center[0]) + island.radiusX, island.id).toBeLessThanOrEqual(WORLD.bound);+ expect(Math.abs(island.center[1]) + island.radiusZ, island.id).toBeLessThanOrEqual(WORLD.bound);+ });+ });+});++describe('computeVillageAppLayout', () => {+ it('places active apps in compact market rings and leaves archived apps at the lodge', () => {+ const apps = [+ { id: 'stopped', name: 'Stopped', overallStatus: 'stopped' },+ { id: 'online', name: 'Online', overallStatus: 'online' },+ { id: 'archived', name: 'Archived', archived: true },+ ];+ const positions = computeVillageAppLayout(apps);++ expect([...positions.keys()]).toEqual(['online', 'stopped']);+ expect(positions.has('archived')).toBe(false);+ for (const position of positions.values()) {+ expect(position.compact).toBe(true);+ expect(position.halfWidth).toBe(VILLAGE_APP_MARKET.halfWidth);+ expect(position.halfDepth).toBe(VILLAGE_APP_MARKET.halfDepth);+ expect(Math.hypot(position.x, position.z)).toBeCloseTo(VILLAGE_APP_MARKET.innerRadius, 6);+ }+ });++ it('caps stalls deterministically for very large installs', () => {+ const apps = Array.from({ length: VILLAGE_APP_MARKET.maxKiosks + 5 }, (_, index) => ({+ id: `app-${index}`,+ name: `App ${index}`,+ overallStatus: 'online',+ }));+ const first = computeVillageAppLayout(apps);+ const second = computeVillageAppLayout([...apps].reverse());++ expect(first.size).toBe(VILLAGE_APP_MARKET.maxKiosks);+ expect([...first]).toEqual([...second]);});});diff --git a/client/src/utils/openWorldPlayerRig.js b/client/src/utils/openWorldPlayerRig.jsindex 599f1977a6..194763e2d4 100644--- a/client/src/utils/openWorldPlayerRig.js+++ b/client/src/utils/openWorldPlayerRig.js@@ -14,22 +14,22 @@ export const EYE_HEIGHT = 1.6;// facade. Player movement uses the shape-aware colliders below instead of this radius.export const BUILDING_COLLISION_RADIUS = 3.5;export const PLAYER_COLLISION_RADIUS = 0.55;-export const DEFAULT_SPAWN_Z = 52;+export const DEFAULT_SPAWN_Z = 48;export const THIRD_PERSON = {- boom: 16.5, // camera distance behind the character- shoulder: 0.95, // lateral over-the-shoulder offset (positive = right)- height: 3.6, // camera rise above the character's feet at pitch 0- isometricYaw: Math.PI / 12, // slight diagonal framing keeps the downtown avenue in view- isometricPitch: 0.62, // about 36° above the landscape, keeping landmarks in the frame- fov: 42, // broader perspective gives the rover room to move through the landscape+ boom: 10.5, // intimate chase framing: the rover is a character, not a map cursor+ shoulder: 0.72, // slight lateral offset keeps the next cottage visible past the cab+ height: 3.1, // low enough for fences and trees to create useful occlusion+ isometricYaw: Math.PI / 18, // nearly aligned with the arrival lane and village gate+ isometricPitch: 0.36, // cozy diorama angle without flattening the street into a map+ fov: 42, // restrained perspective keeps nearby props substantialminPitch: -0.45, // looking up from under the character — floor-limitedmaxPitch: 1.15, // looking down over the characterminCamY: 0.6, // the camera never dips into the pavement- lookAhead: 2.4, // compose the rover against the road and landmarks ahead- lookHeight: 0.85, // aim just above the rover so the landscape owns the frame- camDampRate: 8, // camera position smoothing (lower = floatier)- lookDampRate: 12, // aim smoothing (tighter than position so aim stays crisp)+ lookAhead: 3.2, // compose the rover against the next bend and doorway+ lookHeight: 1.05, // aim just over the roof so village silhouettes fill the frame+ camDampRate: 10, // close camera needs a little less float through tight paths+ lookDampRate: 14, // aim smoothing stays tighter than position};// Scroll-wheel boom zoom: a multiplier over THIRD_PERSON.boom. Steps are multiplicative@@ -49,8 +49,8 @@ export const nextBoomZoom = (current, deltaY) =>// dashboard canvas, while still borrowing the important reference-game cues — ramped// acceleration, a real brake, reverse, speed-weighted steering, and a little drift.export const VEHICLE = {- bodyLength: 1.85,- bodyWidth: 1.06,+ bodyLength: 2.5,+ bodyWidth: 1.46,maxSpeed: 24,boostMaxSpeed: 38,reverseMaxSpeed: 10,@@ -67,10 +67,119 @@ export const VEHICLE = {// one place so the rover cannot visually overlap a wall without bringing back the old// multi-unit empty cushion around every building.export const VEHICLE_COLLISION = {- halfWidth: 0.7,- halfLength: 0.98,+ halfWidth: 0.92,+ halfLength: 1.36,};+const centroid = (points) => {+ const total = points.reduce((sum, point) => ({+ x: sum.x + point.x,+ y: sum.y + point.y,+ z: sum.z + point.z,+ }), { x: 0, y: 0, z: 0 });+ const count = Math.max(1, points.length);+ return { x: total.x / count, y: total.y / count, z: total.z / count };+};++const rotateByQuaternion = (point, quaternion) => {+ const { x, y, z, w } = quaternion;+ const ix = w * point.x + y * point.z - z * point.y;+ const iy = w * point.y + z * point.x - x * point.z;+ const iz = w * point.z + x * point.y - y * point.x;+ const iw = -x * point.x - y * point.y - z * point.z;+ return {+ x: ix * w + iw * -x + iy * -z - iz * -y,+ y: iy * w + iw * -y + iz * -x - ix * -z,+ z: iz * w + iw * -z + ix * -y - iy * -x,+ };+};++// Horn's quaternion form of the Kabsch fit. Given matching point clouds, return the+// one rigid transform that best maps `reference` onto `target`. The suspension uses it+// to let four contradictory wheel heights agree on one rigid chassis pose—roll, pitch,+// and ride-height emerge from the fit instead of being faked from steering input.+export function solveKabschTransform(reference, target) {+ if (!Array.isArray(reference) || !Array.isArray(target) || reference.length !== target.length || reference.length < 3) {+ return { rotation: { x: 0, y: 0, z: 0, w: 1 }, translation: { x: 0, y: 0, z: 0 }, residual: 0 };+ }+ const fromCenter = centroid(reference);+ const toCenter = centroid(target);+ const covariance = Array.from({ length: 3 }, () => [0, 0, 0]);+ reference.forEach((point, index) => {+ const p = [point.x - fromCenter.x, point.y - fromCenter.y, point.z - fromCenter.z];+ const q = [target[index].x - toCenter.x, target[index].y - toCenter.y, target[index].z - toCenter.z];+ for (let row = 0; row < 3; row += 1) {+ for (let column = 0; column < 3; column += 1) covariance[row][column] += p[row] * q[column];+ }+ });+ const [[sxx, sxy, sxz], [syx, syy, syz], [szx, szy, szz]] = covariance;+ const horn = [+ [sxx + syy + szz, syz - szy, szx - sxz, sxy - syx],+ [syz - szy, sxx - syy - szz, sxy + syx, szx + sxz],+ [szx - sxz, sxy + syx, -sxx + syy - szz, syz + szy],+ [sxy - syx, szx + sxz, syz + szy, -sxx - syy + szz],+ ];+ // Shift the symmetric matrix above zero so power iteration finds its greatest+ // algebraic eigenvalue rather than whichever signed eigenvalue has greatest magnitude.+ const shift = Math.max(...horn.map((row) => row.reduce((sum, value) => sum + Math.abs(value), 0))) + 1e-9;+ let vector = [1, 0, 0, 0];+ for (let iteration = 0; iteration < 18; iteration += 1) {+ const next = horn.map((row, rowIndex) => row.reduce((sum, value, column) => sum + value * vector[column], shift * vector[rowIndex]));+ const length = Math.hypot(...next) || 1;+ vector = next.map((value) => value / length);+ }+ const rotation = { w: vector[0], x: vector[1], y: vector[2], z: vector[3] };+ const rotatedCenter = rotateByQuaternion(fromCenter, rotation);+ const translation = {+ x: toCenter.x - rotatedCenter.x,+ y: toCenter.y - rotatedCenter.y,+ z: toCenter.z - rotatedCenter.z,+ };+ const residual = Math.sqrt(reference.reduce((sum, point, index) => {+ const rotated = rotateByQuaternion(point, rotation);+ const dx = rotated.x + translation.x - target[index].x;+ const dy = rotated.y + translation.y - target[index].y;+ const dz = rotated.z + translation.z - target[index].z;+ return sum + dx * dx + dy * dy + dz * dz;+ }, 0) / reference.length);+ return { rotation, translation, residual };+}++export function solveVehicleSuspensionPose({+ x = 0,+ z = 0,+ heading = 0,+ centerHeight = 0,+ halfWidth = VEHICLE.bodyWidth * 0.57,+ halfLength = VEHICLE.bodyLength * 0.31,+ heightAt = () => centerHeight,+} = {}) {+ const reference = [+ { x: -halfWidth, y: 0, z: halfLength },+ { x: halfWidth, y: 0, z: halfLength },+ { x: -halfWidth, y: 0, z: -halfLength },+ { x: halfWidth, y: 0, z: -halfLength },+ ];+ const cosine = Math.cos(heading);+ const sine = Math.sin(heading);+ const wheelOffsets = reference.map((mount) => {+ const worldX = x + mount.x * cosine + mount.z * sine;+ const worldZ = z - mount.x * sine + mount.z * cosine;+ return heightAt(worldX, worldZ) - centerHeight;+ });+ const target = reference.map((mount, index) => ({ ...mount, y: wheelOffsets[index] }));+ const pose = solveKabschTransform(reference, target);+ // The rigid chassis pose already accounts for the shared slope under all four mounts.+ // Per-wheel travel is only the vertical residual that the best-fit plane could not+ // explain. Applying the full wheel offset again would double the slope: uphill tires+ // float while downhill tires sink even though the chassis is already tilted correctly.+ const wheelTravel = reference.map((mount, index) => {+ const fitted = rotateByQuaternion(mount, pose.rotation);+ return wheelOffsets[index] - (fitted.y + pose.translation.y);+ });+ return { ...pose, wheelOffsets, wheelTravel };+}+export const clampPitch = (pitch) =>Math.min(THIRD_PERSON.maxPitch, Math.max(THIRD_PERSON.minPitch, pitch));diff --git a/client/src/utils/openWorldPlayerRig.test.js b/client/src/utils/openWorldPlayerRig.test.jsindex e93b7113d6..50d1b3d529 100644--- a/client/src/utils/openWorldPlayerRig.test.js+++ b/client/src/utils/openWorldPlayerRig.test.js@@ -1,12 +1,69 @@import { describe, it, expect } from 'vitest';import {- THIRD_PERSON, BOOM_ZOOM, clampPitch, thirdPersonCamera, nextBoomZoom, resolveBoom,+ DEFAULT_SPAWN_Z, THIRD_PERSON, BOOM_ZOOM, clampPitch, thirdPersonCamera, nextBoomZoom, resolveBoom,dampFactor, dampAngle, moveFacing, avatarState, bankAngle, stepVehicle,- moveWithCollisions, VEHICLE_COLLISION,+ moveWithCollisions, solveKabschTransform, solveVehicleSuspensionPose, VEHICLE_COLLISION,} from './openWorldPlayerRig';+import { isWalkable } from './openWorldPlan';const pos = { x: 0, y: 1.6, z: 0 };+describe('authored arrival', () => {+ it('starts the rover on The Port rather than deriving spawn from app layout', () => {+ expect(DEFAULT_SPAWN_Z).toBeGreaterThan(0);+ expect(DEFAULT_SPAWN_Z).toBeGreaterThan(40);+ expect(DEFAULT_SPAWN_Z).toBeLessThan(55);+ expect(isWalkable(0, DEFAULT_SPAWN_Z)).toBe(true);+ });+});++describe('terrain suspension', () => {+ it('preserves an identity point cloud with no residual', () => {+ const points = [+ { x: -1, y: 0, z: 1 },+ { x: 1, y: 0, z: 1 },+ { x: -1, y: 0, z: -1 },+ { x: 1, y: 0, z: -1 },+ ];+ const pose = solveKabschTransform(points, points);+ expect(pose.rotation.w).toBeCloseTo(1, 6);+ expect(pose.rotation.x).toBeCloseTo(0, 6);+ expect(pose.rotation.z).toBeCloseTo(0, 6);+ expect(pose.residual).toBeCloseTo(0, 6);+ });++ it('fits the chassis to four independently sampled wheel contacts', () => {+ const pose = solveVehicleSuspensionPose({+ x: 4,+ z: -7,+ heading: 0.4,+ centerHeight: 0,+ halfWidth: 0.8,+ halfLength: 1.1,+ heightAt: (x, z) => x * 0.1 + z * 0.06,+ });+ expect(new Set(pose.wheelOffsets.map((value) => value.toFixed(4))).size).toBeGreaterThan(2);+ expect(Math.hypot(pose.rotation.x, pose.rotation.z)).toBeGreaterThan(0.02);+ expect(Math.hypot(pose.rotation.x, pose.rotation.y, pose.rotation.z, pose.rotation.w)).toBeCloseTo(1, 6);+ expect(pose.residual).toBeLessThan(0.02);+ });++ it('uses only the small fit residual for per-wheel travel on a planar slope', () => {+ const pose = solveVehicleSuspensionPose({+ x: 0,+ z: 0,+ heading: 0,+ centerHeight: 0,+ halfWidth: 0.8,+ halfLength: 1.1,+ heightAt: (_x, z) => z * 0.25,+ });++ expect(Math.max(...pose.wheelOffsets.map(Math.abs))).toBeGreaterThan(0.2);+ expect(Math.max(...pose.wheelTravel.map(Math.abs))).toBeLessThan(0.01);+ });+});+describe('nextBoomZoom', () => {it('zooms in for an upward wheel scroll and out for a downward one', () => {const zoomIn = nextBoomZoom(1, -120);diff --git a/client/src/utils/openWorldProximity.js b/client/src/utils/openWorldProximity.jsindex 8265fec115..e1df78c7ad 100644--- a/client/src/utils/openWorldProximity.js+++ b/client/src/utils/openWorldProximity.js@@ -15,16 +15,18 @@ export const PROXIMITY_DISTANCES = {// Curated list of recognizable world landmarks derived from the master town planexport const WORLD_LANDMARKS = [- { id: 'ai-core', regionId: 'ai-core', parcel: 'aiCore', label: 'AI Core Plaza', eyebrow: 'LANDMARK REACTOR', action: 'INSPECT AI RUNS' },- { id: 'backup-vault', regionId: 'backup-vault', parcel: 'backupVault', label: 'Backup Vault', eyebrow: 'LANDMARK VAULT', action: 'INSPECT BACKUPS' },- { id: 'task-queue', regionId: 'task-queue', parcel: 'taskQueue', label: 'Task Queue Depot', eyebrow: 'LANDMARK DEPOT', action: 'VIEW TASKS' },- { id: 'wellness', regionId: 'wellness', parcel: 'health', label: 'Wellness Tower', eyebrow: 'LANDMARK TOWER', action: 'VIEW VITALS' },- { id: 'memory', regionId: 'memory', parcel: 'memory', label: 'Memory Quarter', eyebrow: 'LANDMARK DISTRICT', action: 'VIEW MEMORY GRAPH' },- { id: 'sprint-yard', regionId: 'sprint-yard', parcel: 'jira', feature: 'jira', label: 'Sprint Yard', eyebrow: 'LANDMARK SPRINT', action: 'VIEW SPRINT TICKETS' },- { id: 'goals', regionId: 'goals', parcel: 'goals', label: 'Goal Monuments', eyebrow: 'LANDMARK MONUMENT', action: 'VIEW LIFE GOALS' },- { id: 'artifacts', regionId: 'artifacts', parcel: 'artifacts', label: 'Hall of Achievements', eyebrow: 'LANDMARK HALL', action: 'VIEW ACHIEVEMENTS' },- { id: 'voice', regionId: 'voice', parcel: 'voice', label: 'Voice Beacon', eyebrow: 'LANDMARK BEACON', action: 'VIEW VOICE AGENT' },- { id: 'data-harbor', regionId: 'data-harbor', parcel: 'dataHarbor', label: 'Data Harbor Piers', eyebrow: 'LANDMARK HARBOR', action: 'VIEW DATA HARBOR' },+ { id: 'ai-core', regionId: 'ai-core', parcel: 'aiCore', label: 'PortOS Common', eyebrow: 'VILLAGE COMMON', action: 'VISIT THE AI CORE' },+ { id: 'backup-vault', regionId: 'backup-vault', parcel: 'backupVault', label: 'Backup Cottage', eyebrow: 'VILLAGE HOUSE', action: 'CHECK THE BACKUPS' },+ { id: 'task-queue', regionId: 'task-queue', parcel: 'taskQueue', label: 'Task Workshop', eyebrow: 'VILLAGE HOUSE', action: 'VISIT THE TASKS' },+ { id: 'archive', regionId: 'archive', parcel: 'warehouse', label: 'Archive Lodge', eyebrow: 'VILLAGE HOUSE', action: 'VISIT THE ARCHIVE' },+ { id: 'wellness', regionId: 'wellness', parcel: 'health', label: 'Wellness Greenhouse', eyebrow: 'VILLAGE GARDEN', action: 'CHECK THE VITALS' },+ { id: 'memory', regionId: 'memory', parcel: 'memory', label: 'Memory House', eyebrow: 'VILLAGE HOUSE', action: 'VISIT MEMORY' },+ { id: 'sprint-yard', regionId: 'sprint-yard', parcel: 'jira', feature: 'jira', label: 'Sprint Yard', eyebrow: 'VILLAGE YARD', action: 'VISIT THE SPRINT' },+ { id: 'quiet-corner', regionId: 'quiet-corner', parcel: 'easterEggs', label: 'Quiet Cottage', eyebrow: 'VILLAGE SECRET', action: 'VISIT THE QUIET CORNER' },+ { id: 'goals', regionId: 'goals', parcel: 'goals', label: 'Goals Lodge', eyebrow: 'VILLAGE HOUSE', action: 'VISIT THE GOALS' },+ { id: 'artifacts', regionId: 'artifacts', parcel: 'artifacts', label: 'Trophy House', eyebrow: 'VILLAGE HOUSE', action: 'SEE THE TROPHIES' },+ { id: 'voice', regionId: 'voice', parcel: 'voice', label: 'Voice Radio', eyebrow: 'VILLAGE RADIO', action: 'VISIT VOICE' },+ { id: 'data-harbor', regionId: 'data-harbor', parcel: 'dataHarbor', label: 'Data Pier', eyebrow: 'VILLAGE HARBOR', action: 'VISIT THE PIER' },];export function getResolvedLandmarks(isFeatureEnabled) {diff --git a/client/src/utils/openWorldProximity.test.js b/client/src/utils/openWorldProximity.test.jsindex 71ac7f9ec9..06b9299e56 100644--- a/client/src/utils/openWorldProximity.test.js+++ b/client/src/utils/openWorldProximity.test.js@@ -36,7 +36,7 @@ describe('openWorldProximity', () => {expect(target).toBeDefined();expect(target?.type).toBe('landmark');expect(target?.id).toBe('ai-core');- expect(target?.action).toBe('INSPECT AI RUNS');+ expect(target?.action).toBe('VISIT THE AI CORE');});it('detects warp pad with higher priority when close to warp pad', () => {@@ -99,6 +99,7 @@ describe('openWorldProximity', () => {playerPos: { x: -45.5, y: 1.6, z: 40.5 },easterEggs: { eggs: [], total: 0, hasData: false },warpPads: { warpPadList: [] },+ landmarks: [],});expect(target).toBeNull();});diff --git a/client/src/utils/openWorldRegions.js b/client/src/utils/openWorldRegions.jsindex 2a3aa9cfd0..ab1f6bd953 100644--- a/client/src/utils/openWorldRegions.js+++ b/client/src/utils/openWorldRegions.js@@ -13,7 +13,7 @@// scrapes the `id:` values out of this array and fails if a region has no ⌘K / voice command// (or vice versa), so a new region can't ship unreachable.-import { PARCELS } from './openWorldPlan';+import { ARCHIPELAGO_ISLANDS, PARCELS, isWalkable } from './openWorldPlan';// Ordered for the fast-travel list: the two places you look at most first, then a clockwise// sweep of the outer districts, then the far shore. `parcel` keys into PARCELS for geography;@@ -26,20 +26,20 @@ import { PARCELS } from './openWorldPlan';// buildings actually on the ground instead of framing a fixed rectangle and clipping the// outer towers.export const OPEN_WORLD_REGIONS = [- { id: 'downtown', parcel: 'downtown', district: 'downtown', label: 'Downtown', blurb: 'Every managed app, one tower each.', appPath: '/apps', aliases: ['downtown', 'apps district', 'app towers'] },- { id: 'ai-core', parcel: 'aiCore', label: 'AI Core Plaza', blurb: 'The reactor at the center — live AI provider activity.', appPath: '/ai', aliases: ['ai core', 'core plaza', 'the core', 'reactor'] },- { id: 'task-queue', parcel: 'taskQueue', label: 'Task Queue', blurb: 'Chief of Staff work stacked up and moving.', appPath: '/cos/tasks', aliases: ['task queue', 'queue', 'cos queue'] },- { id: 'wellness', parcel: 'health', label: 'Wellness Tower', blurb: 'System vitals — CPU, memory, disk.', appPath: '/system-resources/overview', aliases: ['wellness tower', 'health tower', 'vitals tower'] },- { id: 'archive', parcel: 'warehouse', district: 'warehouse', label: 'Archive District', blurb: 'Cold storage for archived apps.', appPath: '/apps', aliases: ['archive district', 'warehouse', 'cold storage'] },+ { id: 'downtown', parcel: 'downtown', district: 'downtown', label: 'Village Green', blurb: 'The sunny crossroads where every PortOS lane meets.', appPath: '/apps', aliases: ['downtown', 'apps district', 'app towers', 'village green'] },+ { id: 'ai-core', parcel: 'aiCore', label: 'PortOS Common', blurb: 'A gathering circle around the bright AI pavilion.', appPath: '/ai', aliases: ['ai core', 'core plaza', 'the core', 'reactor', 'common'] },+ { id: 'task-queue', parcel: 'taskQueue', label: 'Task Workshop', blurb: 'Chief of Staff work stacked, sorted, and ready to go.', appPath: '/cos/tasks', aliases: ['task queue', 'queue', 'cos queue', 'task workshop'] },+ { id: 'wellness', parcel: 'health', label: 'Wellness Greenhouse', blurb: 'A glass garden for CPU, memory, disk, and personal vitals.', appPath: '/system-resources/overview', aliases: ['wellness tower', 'health tower', 'vitals tower', 'greenhouse'] },+ { id: 'archive', parcel: 'warehouse', district: 'warehouse', label: 'Archive Lodge', blurb: 'A quiet lodge for archived apps and older work.', appPath: '/apps', aliases: ['archive district', 'warehouse', 'cold storage', 'archive lodge'] },{ id: 'quiet-corner', parcel: 'easterEggs', label: 'Quiet Corner', blurb: 'The odd little things the world keeps to itself.', appPath: null, aliases: ['quiet corner', 'easter eggs'] },- { id: 'productivity', parcel: 'productivity', label: 'Productivity Terrace', blurb: 'Throughput, pace, and the activity heatmap.', appPath: '/insights/overview', aliases: ['productivity terrace', 'productivity', 'throughput district', 'streak district'] },- { id: 'backup-vault', parcel: 'backupVault', label: 'Backup Vault', blurb: 'The sealed door — last backup and its health.', appPath: '/settings/backup', aliases: ['backup vault', 'the vault'] },- { id: 'memory', parcel: 'memory', label: 'Memory Quarter', blurb: 'Crystal clusters of long-term memory and the inbox well.', appPath: '/brain/inbox', aliases: ['memory quarter', 'memory district', 'knowledge district'] },- { id: 'sprint-yard', parcel: 'jira', label: 'Sprint Yard', blurb: 'The current sprint, laid out as a yard of tickets.', appPath: '/devtools/jira', feature: 'jira', aliases: ['sprint yard', 'jira yard', 'sprint district'] },- { id: 'voice', parcel: 'voice', label: 'Voice Beacon', blurb: 'Lights up while the voice agent is listening.', appPath: '/digital-twin/voice', aliases: ['voice beacon', 'the beacon'] },- { id: 'goals', parcel: 'goals', label: 'Goal Monuments', blurb: 'One monument per life goal, height by progress.', appPath: '/goals/tree', aliases: ['goal monuments', 'monuments', 'goals district'] },- { id: 'artifacts', parcel: 'artifacts', label: 'Hall of Achievements', blurb: 'Earned artifacts on display.', appPath: '/character', aliases: ['hall of achievements', 'artifact hall', 'achievements hall'] },- { id: 'data-harbor', parcel: 'dataHarbor', label: 'Data Harbor', blurb: 'Piers over the bay — database tables and data domains.', appPath: '/data', aliases: ['data harbor', 'the harbor', 'piers'] },+ { id: 'productivity', parcel: 'productivity', label: 'Focus Farm', blurb: 'Crops, throughput, pace, and the activity calendar.', appPath: '/insights/overview', aliases: ['productivity terrace', 'productivity', 'throughput district', 'streak district', 'focus farm'] },+ { id: 'backup-vault', parcel: 'backupVault', label: 'Backup Cottage', blurb: 'The snug house that watches over the latest backup.', appPath: '/settings/backup', aliases: ['backup vault', 'the vault', 'backup cottage'] },+ { id: 'memory', parcel: 'memory', label: 'Memory House', blurb: 'A wooded home for long-term memory and the inbox well.', appPath: '/brain/inbox', aliases: ['memory quarter', 'memory district', 'knowledge district', 'memory house'] },+ { id: 'sprint-yard', parcel: 'jira', label: 'Sprint Studio', blurb: 'The current sprint laid out as a little maker yard.', appPath: '/devtools/jira', feature: 'jira', aliases: ['sprint yard', 'jira yard', 'sprint district', 'sprint studio'] },+ { id: 'voice', parcel: 'voice', label: 'Voice Radio', blurb: 'A tiny radio house that wakes when the voice agent listens.', appPath: '/digital-twin/voice', aliases: ['voice beacon', 'the beacon', 'voice radio'] },+ { id: 'goals', parcel: 'goals', label: 'Goals Lodge', blurb: 'A lodge for life goals and the paths toward them.', appPath: '/goals/tree', aliases: ['goal monuments', 'monuments', 'goals district', 'goals lodge'] },+ { id: 'artifacts', parcel: 'artifacts', label: 'Trophy House', blurb: 'Earned artifacts on cheerful display.', appPath: '/character', aliases: ['hall of achievements', 'artifact hall', 'achievements hall', 'trophy house'] },+ { id: 'data-harbor', parcel: 'dataHarbor', label: 'Data Pier', blurb: 'A cottage over the bay for tables and data domains.', appPath: '/data', aliases: ['data harbor', 'the harbor', 'piers', 'data pier'] },];// Route prefix the fast-travel deep links live under. Exported so callers build the URL from@@ -99,15 +99,34 @@ export function searchRegions(query, isFeatureEnabled) {|| (r.aliases || []).some((a) => a.includes(q)));}-// Where a walking player lands when they warp in. Ground level at the parcel's near (+Z)+// Where a walking player lands when they warp in. Start from the parcel's near (+Z)// edge, pulled back far enough to see the district rather than spawning inside a monument.-// Regions over the water (the harbor) land on the pier itself, which `isWalkable` allows.+// If that point falls beyond its island's authored shoreline, pull it toward the nearest+// island interior. This keeps every gate on visible ground without teaching the region+// registry a second, drifting set of hard-coded arrival coordinates.export const REGION_ARRIVAL_SETBACK = 6;export function regionArrivalPoint(region) {if (!region) return null;const [x, , z] = region.anchor;- return { x, z: z + region.d / 2 + REGION_ARRIVAL_SETBACK };+ const proposed = { x, z: z + region.d / 2 + REGION_ARRIVAL_SETBACK };+ if (isWalkable(proposed.x, proposed.z)) return proposed;++ const island = ARCHIPELAGO_ISLANDS.reduce((nearest, candidate) => {+ const normalized = ((x - candidate.center[0]) / candidate.radiusX) ** 2+ + ((z - candidate.center[1]) / candidate.radiusZ) ** 2;+ return !nearest || normalized < nearest.normalized ? { island: candidate, normalized } : nearest;+ }, null)?.island;+ if (!island) return proposed;++ const dx = proposed.x - island.center[0];+ const dz = proposed.z - island.center[1];+ const normalizedRadius = Math.hypot(dx / island.radiusX, dz / island.radiusZ);+ const scale = normalizedRadius > 0.72 ? 0.72 / normalizedRadius : 1;+ return {+ x: island.center[0] + dx * scale,+ z: island.center[1] + dz * scale,+ };}// The arrival point is also the physical location of a region's warp pad. Keeping thediff --git a/client/src/utils/openWorldSpeedPads.js b/client/src/utils/openWorldSpeedPads.jsindex 52ad4bb4ab..45da9e287a 100644--- a/client/src/utils/openWorldSpeedPads.js+++ b/client/src/utils/openWorldSpeedPads.js@@ -1,5 +1,5 @@-// Pure deterministic helpers for OpenWorld speed boost pads.-// Boost pads are luminous road markings with animated forward chevron arrows.+// Pure deterministic helpers for OpenWorld boost markings.+// They are painted lane flourishes in the village rather than sci-fi metal plates.// Driving onto a boost pad gives an instant surge of acceleration and plays a turbo SFX.// No three.js / React imports — pure, testable in node.@@ -7,89 +7,49 @@ export const DEFAULT_PAD_BOOST_SPEED = 48; // Peak surge velocity in units/sexport const PAD_TRIGGER_RADIUS = 2.4;export const SPEED_PADS = [- // Harbor Grand Avenue (accelerating north toward the water){- id: 'pad-avenue-north',- label: 'Harbor Sprint (North)',+ id: 'pad-harbor-lane',+ label: 'Harbor Lane',x: 0,- z: -20,- angle: -Math.PI / 2, // Facing north (-Z)- width: 3.8,- length: 5.5,+ z: -41,+ angle: -Math.PI / 2,+ width: 3.7,+ length: 5.2,boostSpeed: DEFAULT_PAD_BOOST_SPEED,- color: '#06b6d4',+ color: '#7cc9be',},- // Harbor Grand Avenue (accelerating south back toward downtown){- id: 'pad-avenue-south',- label: 'Plaza Approach (South)',+ id: 'pad-arrival-lane',+ label: 'Village Welcome',x: 0,- z: -42,- angle: Math.PI / 2, // Facing south (+Z)- width: 3.8,- length: 5.5,+ z: 34,+ angle: -Math.PI / 2,+ width: 3.7,+ length: 5.2,boostSpeed: DEFAULT_PAD_BOOST_SPEED,- color: '#06b6d4',+ color: '#f3b856',},- // Southern Arrival Lane (heading into downtown){- id: 'pad-arrival-north',- label: 'Downtown Gateway',- x: 0,- z: 42,- angle: -Math.PI / 2, // Facing north (-Z)- width: 3.8,- length: 5.5,- boostSpeed: DEFAULT_PAD_BOOST_SPEED,- color: '#38bdf8',- },- // Western Avenue to Memory Quarter & Backup Vault- {- id: 'pad-west-spoke',- label: 'Memory Quarter Express',- x: -24,- z: -14,- angle: Math.PI * 0.85,- width: 3.0,- length: 4.8,- boostSpeed: DEFAULT_PAD_BOOST_SPEED,- color: '#a855f7',- },- // Eastern Avenue to Goal Monuments & Artifacts Hall- {- id: 'pad-east-spoke',- label: 'Achievements Boulevard',- x: 24,- z: -14,- angle: -Math.PI * 0.85,- width: 3.0,- length: 4.8,- boostSpeed: DEFAULT_PAD_BOOST_SPEED,- color: '#facc15',- },- // South-West Spoke to Productivity District- {- id: 'pad-sw-spoke',- label: 'Productivity Turnpike',+ id: 'pad-west-loop',+ label: 'Orchard Bend',x: -28,- z: 20,- angle: Math.PI * 0.35,- width: 3.0,+ z: 8,+ angle: -Math.PI / 2,+ width: 3.6,length: 4.8,boostSpeed: DEFAULT_PAD_BOOST_SPEED,- color: '#22c55e',+ color: '#ec8265',},- // South-East Spoke to Wellness District{- id: 'pad-se-spoke',- label: 'Wellness Expressway',+ id: 'pad-east-loop',+ label: 'Pond Bend',x: 28,- z: 20,- angle: -Math.PI * 0.35,- width: 3.0,+ z: 6,+ angle: Math.PI / 2,+ width: 3.6,length: 4.8,boostSpeed: DEFAULT_PAD_BOOST_SPEED,- color: '#10b981',+ color: '#8ccf9e',},];diff --git a/docs/features/openworld.md b/docs/features/openworld.mdindex ee1f3d1055..806f279acf 100644--- a/docs/features/openworld.md+++ b/docs/features/openworld.md@@ -1,306 +1,190 @@# OpenWorld> **Renamed 2026-08-19.** This surface shipped as *CyberCity* at `/city`. It is now-> **OpenWorld** at `/openworld`; the whole `/city` prefix (including `/city/settings`-> and `/city/apps/:appId`) redirects, so old bookmarks, pinned sidebar rows, stored ⌘K-> history, and peers' deep links keep working. The nav-command **ids** are deliberately-> unchanged (`nav.cybercity`) — they're opaque and persisted in palette history.--## Intent--OpenWorld is the **spatial systems map** of PortOS. A single `/openworld` page that-turns the abstract state of every managed app, every active agent, every system-signal into a 3D world you can glance at, search, teleport across, and act in.--It does three jobs:--1. **Make operational pressure legible at a glance** — which buildings are hot,- where is review pressure piling up, what needs your attention right now.-2. **Provide a fast spatial front-end to PortOS** — search any app, jump into- any detail page, take action on any building.-3. **Be a memorable, distinctive aesthetic layer** — a bright low-poly OpenWorld- or a neon-night Cyber City that feels good to spend time in.--## Current State (as of 2026-08-19)--Strong rendering shell already exists: 3D scene with apps as buildings (PM2-driven),-boroughs, archive district, weather, traffic, particles, neon signs, billboards,-HUD with vitals + activity log + agent bar, exploration mode (WASD), and an-OrbitControls default view.--Tech: React Three Fiber + Three.js (no postprocessing _library_ — bloom is custom-emissive/additive materials, not a composer pass). The one composited effect is-photo mode's depth-of-field, which mounts an `EffectComposer` + `BokehPass` from-three's bundled addons (no extra npm dependency) only while photo mode is active —-see `OpenWorldDepthOfField.jsx`.--Current gaps:--- **Always-on per-building signal** — live CPU/MEM/uptime/restarts from `app.pm2Status`- now surface in the building hologram (hover / proximity / focus) and the focus panel- (see `openWorldAppMetrics`); what remains is a glyph visible at any distance without- approaching the building.-- **Mutation surface** — the city remains read-only; explicit restart, deploy, and log- actions still belong to the canonical app surfaces.-- **Geometry breadth** — the shared app-building grammar still carries much of the live- city; district-specific assets can continue replacing generic filler as the world grows.-- **High-frequency update budget** — noisy socket bursts should eventually be coalesced- before they trigger scene-wide reconciliation.--## Design Rules--OpenWorld is an **interactive systems map**.--Allowed:--- query state from PortOS APIs and reflect it visually-- offer click-to-navigate into deeper app surfaces-- offer **explicit user-initiated actions** that already exist elsewhere in- PortOS (restart app, deploy app, jump to logs, etc.) — the city is a- faster path, not a hidden side channel-- render symbolic / atmospheric interpretations of state--Not allowed:--- mutate user goals, tasks, notes, or memory directly (those flow through their- canonical pages with their own validation)-- trigger automations *implicitly* (no auto-restart on click, no batch actions- without explicit confirmation)-- act as an undocumented write surface — every action exposed in the city must- be discoverable elsewhere in PortOS too--In short: **interactive, but every action is intentional and user-initiated**.--## Semantic Layers--### 1. Infrastructure Layer-Maps operational state into city behavior.--- App health → district brightness, building façade, ember/spark intensity-- Active agents → tethered light to their assigned building, traffic density-- Alerts / review pressure → warning beacons, weather severity, red pulses-- Archived apps → cold-storage district-- Remote instances → distant skyline silhouettes on the horizon--### 2. Domain Layer-Maps PortOS domains into recognizable urban geography.--Districts:-- **Apps / operations** — main downtown, all PM2-managed buildings-- **CoS / agents** — agent bar + tether anchors-- **Review / alerts** — pressure landmarks-- **Memory / archive** — archived apps + memory crystal layer (future)-- **AI core** — central tower, all model activity radiates from here-- **Backup vault** — small monument tracking snapshot health-- **Federation horizon** — distant peer skyline-- **Void machine** — reserved zone for the remote primary instance--### 3. Interface Layer-Routes the user into the real app.--- click building → app detail (existing)-- click building façade health bar → live metrics page-- click review beacon → Review Hub-- click AI Core → AI runs page-- click backup vault → Backup page-- click distant peer city → instance management-- press `/` → search overlay → focus camera + jump--### 4. Atmosphere Layer-Personality without changing truth.--- ambient mood tied to system conditions (weather already does this)-- earned monuments / holograms from milestones-- chronotype-driven energy levels (peak hours = bright/fast, recovery = dim/slow)-- temporal events (night mode, storms, calm periods)-- ambient soundscape (future)--## Roadmap--The roadmap unifies operational legibility (the *useful* layer) with atmospheric-polish (the *delightful* layer). Phase 1 prioritizes legibility because that's-what makes CyberCity worth visiting daily; later phases add depth.--### Phase 1 — Operational Legibility (current focus)--Goal: a person walking into `/openworld` for the first time can immediately see-what's healthy, what's not, find a specific app, and take action.--| ID | Item | Effort |-|----|------|--------|-| **1.1** | **Per-building health glyph** — live CPU/MEM/uptime/restarts aggregated from `app.pm2Status` (`openWorldAppMetrics`) and shown on every building hologram when hovered/near/focused plus CPU/MEM/UPTIME blocks in the focus panel. Shipped 2026-08-26; the remaining slice is an always-visible façade strip readable at any distance. | M |-| **1.2** | **Stress smoke / sparks** — reuse `OpenWorldEmbers` per-building. Persistent CPU spike = smoke trail; recent crash = sparks. Brings global weather vocabulary down to the per-building level. | S |-| **1.3** | **Health card replaces cryptic weather glyph** — HUD shows plain `CPU 34% / MEM 71% / DISK 88%` with a sentinel dot. Atmospheric weather effect stays. | XS |-| **1.4** | **System Health as City Atmosphere** — pipe `/api/system/health/details` into existing weather/fog/ground texture so the sky reflects real state. | S |-| **1.5** | **Notification beacons** — extend `OpenWorldSignalBeacons` with notification backlog from `/api/notifications/counts`; brightness = unread count, color = type, click = navigate. | S |-| **1.6** | **Brain inbox pulse** — central spire glow tracks `/api/brain/inbox` depth; new captures pulse the spire. | S |-| **1.7** | **"Needs attention" pane** — replace the right-side `cos:log` stream with a structured list ranked by urgency: stopped/errored apps, high CPU/mem, pending reviews, stale backups, failed agent runs, federation sync failures, unread notifications. Every item clickable. Live log demoted to a tab. | S |-| **1.8** | **Building search overlay** — press `/` to filter buildings by name/tag/status; non-matches dim, matches stay lit, Enter focuses camera. Local substring match against name/id/tags in `client/src/utils/openWorldFilter.js`. | S |-| **1.9** | **Status filter chips in HUD** — All / Online / Stopped / Errored / Has-Agent / Has-Pending-Review pill row above legend. Persists per-session. | S |-| **1.10** | **Hover preview card with quick actions** — show status / uptime / CPU / MEM / err / recent log line, with **Logs / Restart / Deploy / Open** buttons. Restart and Deploy POST to existing endpoints with explicit confirmation. | M |-| **1.11** | **Clickable HUD stats** — every count routes somewhere: PENDING REVIEWS → `/review`, AGENTS → `/cos`, NODES → `/instances`, etc. | XS |-| **1.12** | **Richer billboards** — rotate today's briefing headline, top actionable insight, recent agent completion summary, goal progress. | S |-| **1.13** | **Agent → building tether** — visible light from `AgentEntity` to its assigned building; color = agent state. Plus window-pulse animation on the building. | M |-| **1.14** | **Mobile / touch support** — `pointer: coarse` detection, single-finger orbit, two-finger pinch zoom, tap-to-select. Below 640px collapse HUD into a bottom sheet with search + filters + needs-attention. WASD exploration disables. AGENTS.md mandate. | M |-| **1.15** | **Adaptive render budget** — the scene selects an internal detail tier from sustained frame time; player settings do not expose renderer knobs. | XS |--### Phase 2 — Holistic Coverage--Goal: every major system PortOS tracks has a place in the city.--| ID | Item | Effort |-|----|------|--------|-| **2.1** | **AI Core landmark + activity beams** — central tower; on `ai:status` events, shoot a beam to the building whose agent issued the call. Thickness = tokens/sec, color = model tier. Solves the biggest current blind spot. | M |-| **2.2** | **CoS task queue silhouette** — warehouse with stack height = pending CoS tasks. Boxes load on `tasks:cos:created`, unload on completion. | M |-| **2.3** | **Backup vault landmark** — pulses on `backup:started/completed`, label shows time-since-last-snapshot, goes red when stale. | S |-| **2.4** | **Voice agent district marker** — small area whose lighting mirrors voice-agent state (idle / dictating / error). | S |-| **2.5** | **Federation horizon** — peers as distant skyline silhouettes; opacity = reachability, bridge condition = sync state. Even with one instance the void zone stays visible. | M |-| **2.6** | **Productivity district** — throughput monument, activity heatmap ground tiles, task flow river. Driven by `/api/cos/productivity/*`. | L |-| **2.7** | **Goal monuments** — active goals as construction sites; completed goals as polished monuments; stalled goals dimmed. Driven by `/api/digital-twin/identity/goals`. | L |-| **2.8** | **Mini-map overlay** — top-down map in HUD corner with click-to-teleport. | M |-| **2.9** | **Health vitals tower** — biometric tower in a wellness district visualizing heart rate / steps / sleep / calories from `/api/meatspace/apple-health/metrics/latest`. | M |-| **2.10** | **Data flow streams between buildings** — visible light streams for actual API/socket/file traffic; thickness = volume, color = type. | M |-| **2.11** | **Character XP HUD** — floating level/XP badge with particle burst on XP gain; level-up triggers fireworks. | S |--### Phase 3 — Atmosphere & Polish--Goal: the city feels alive, distinctive, and earned.--| ID | Item | Effort |-|----|------|--------|-| **3.1** | **Chronotype energy overlay** — city brightens/quickens during peak focus hours, dims during recovery, driven by `/api/digital-twin/identity/chronotype/energy-schedule`. | M |-| **3.2** | **Memory / knowledge district** — categories as crystal clusters, graph edges as light bridges, brain inbox as a glowing well. Driven by `/api/memory/graph`. | L |-| **3.3** | **Photo mode / cinematic camera** — pause animations, cinematic presets, depth-of-field, vignette, high-res screenshots, "city postcard" with stats overlay. | M |-| **3.4** | **Ambient soundscape tied to data** — base key/tempo follows system health; agent activity adds rhythmic voices; completed tasks chime. Extends existing synth music. | L |-| **3.5** | **Earned artifacts & achievements** — milestone statues and easter eggs. | M |-| **3.6** | **Historical timeline scrubber** — scrub back to past city states; buildings appear/disappear via construction animations. Requires snapshot data. | L |-| **3.7** | **JIRA sprint district** — current sprint tickets as crates / under-construction / completed structures. | M |-| **3.8** | **Throttle expensive socket-driven repaints** — coalesce noisy event bursts into a 100ms tick. Becomes load-bearing once Phase 2's beams/vehicles ship. | S |--## Performance & Polish (cross-cutting)--- Default to lower quality on `pointer: coarse` and `hardwareConcurrency < 8`-- Coalesce socket events into a render tick to avoid bursty repaints-- Lazy-load heavy effects (volumetric lights, postprocessing, particle storms)- on the basis of the internally selected render tier-- Keep player-facing settings focused on world style, time, sound, and controls;- renderer detail adapts without a quality dial--## Fast travel (regions)--The world is navigated by **warping**, not only by panning. Every district on the master-town plan is a named **region** with a one-line pitch and a door into the 2D PortOS page it-visualizes — Memory Quarter → `/brain/inbox`, Sprint Yard → `/devtools/jira`, Data Harbor-→ `/data`, and so on.--- **Registry:** `client/src/utils/openWorldRegions.js`. Geography is *not* re-declared —- each region names a parcel in `openWorldPlan.js` and reads its anchor/footprint from there, so- moving a district on the plan moves its warp marker with it.-- **Route:** `/openworld/region/:regionId`. The URL is the single source of truth for- "where you warped to" — same contract as building focus — so a warp is shareable,- bookmarkable, and reachable from ⌘K and voice.-- **UI:** `M` (or the HUD's FAST TRAVEL button / the compact dock's navigation icon) opens- `OpenWorldFastTravel`, a searchable list beside a plate of the world with a marker per- region. Picking one flies the orbital camera via `computeRegionCamera`; if you're on foot- in exploration mode it also teleports the player rig to the region's arrival point.-- **Reachability guard:** `server/lib/navManifest.test.js` scrapes `OPEN_WORLD_REGIONS` and- fails in both directions — a region with no `/openworld/region/<id>` nav command, or a- command left behind by a deleted region.--## World style (art direction)--`settings.worldStyle` picks one of two looks; it is persisted with the rest of the city-settings and switchable from the Visual tab of the settings drawer.--| Style | Look | Time-of-day presets |-|-------|------|---------------------|-| `vibes` (default) | Bright low-poly open world — teal-to-warm sky, meadow ground, flat-shaded facades, warm sun | `vibesDay` / `vibesDusk` |-| `cyber` | The original neon-night Cyber City | `sunset` only |--The style is a single lever with three effects, all in `openWorldConstants.js`:--1. `resolveOpenWorldTimeOfDay` picks the preset pair. Open World follows the selected- day/night setting; Cyber City is always nocturnal. The result feeds `OpenWorldSky`,- `OpenWorldLights`, and `WorldGround` — and, through `daylightFactor`, every surface that already- lerps between its night and day form.-2. `deriveOpenWorldPalette` swaps the *decorative and structural* surfaces (accent spread,- building body, and surrounds). Status colors stay semantic in both.-3. `palette.neonLayers` gates the neon-only scene layers — galaxy spheremap, starfield, shooting- stars, data rain, embers, volumetric light cones, neon signage — so they don't mount at- all under `vibes` rather than being faded out per frame. `palette.lowPoly` turns on flat- shading for facades and terrain.--Keeping `cyber` as a real option isn't only nostalgia: it keeps the whole neon layer-exercised by the suite instead of bit-rotting behind a default nobody selects.--The style change keeps the operational geometry and live data mappings stable while changing-their material language. The Vibes pass now adds grounded nature patches, a varied plaza grove,-planter-framed warp pads, and a deterministic drifting cloud bank that scales with the adaptive-render tier; the shared app-building grammar remains intentionally recognizable across both-styles so a status means the same thing in either world.+> **OpenWorld** at `/openworld`; the `/city` routes redirect so existing bookmarks,+> pinned rows, palette history, and peer deep links keep working. Persisted nav-command+> ids remain unchanged.++## Vision++OpenWorld is a playable, spatial interpretation of PortOS: a small world whose places+are shaped by the systems, memories, goals, apps, and agents inside an install. It is+not a 3D dashboard with ornamental streets. The world should be enjoyable to cross even+before the player reads a number.++The design has four priorities, in this order:++1. **A memorable place.** Water, silhouettes, terrain color, and landmarks make each+ part of the world recognizable before labels do.+2. **A satisfying traversal loop.** Arrive through the village gate, follow curving+ lanes, recover Echo Shards, and stop at cottages that open real PortOS places.+3. **PortOS made physical.** Live app and system state changes structures and motion,+ but never replaces the authored geography.+4. **A useful route back into the product.** Buildings, destinations, search, and URL+ deep links remain direct paths into canonical PortOS surfaces.++## PortOS Village++Street-level OpenWorld is a compact, continuous valley rather than a systems diagram spread+across a flat plane. Its named neighborhoods remain useful for the map and deep links, but+the player experiences them as parts of one village:++- **The Common** — a circular gathering place around the kinetic AI Core.+- **Memory Wilds** — the Memory House and Backup Cottage among denser trees.+- **Maker Reach** — the Task Workshop, Goals Lodge, and Trophy House.+- **Data Pier** — the waterfront cottage for database tables and data domains.+- **Focus Gardens** — crops, productivity, quiet discoveries, and activity terrain.+- **Wellness Grove** — the Wellness Greenhouse and personal-health destinations.++`client/src/utils/openWorldPlan.js` is the geography contract. Its curved lanes, terrain+height function, cottage footprints, region anchors, and walkability rules are shared by+rendering, player grounding, collision, camera avoidance, suspension, and map views.++The valley uses a deterministic irregular outline, rolling low-poly terrain, dense instanced+broadleaf trees, grass, flowers, rocks, crops, benches, lanterns, a pond, and a harbor. The+sea remains one inexpensive procedural surface outside the village shelf.++Live PortOS state is woven into this authored setting rather than displayed as a detached+dashboard. Active managed apps occupy small status-lit market kiosks around the Common;+nearby app interaction opens the same focused app route used elsewhere in PortOS. Cottage+plaques show their place name and a compact live metric, while memories grow a grove, tasks+stack as workshop cargo, goals raise flags, and backup, health, voice, trophy, and data state+alter their corresponding landmarks. Archived apps remain summarized at Archive Lodge so+the active market stays legible.++## The Village Run++Street-level exploration is the game layer:++1. The utility rover enters through the authored PortOS Village gate. App count never+ moves the starting line or blocks the arrival view.+2. A broad heart loop and short destination lanes keep a cottage, garden, pond, or landmark+ entering the frame every few seconds without floating horizon labels.+3. Echo Shards reward exploring the whole valley. Collection has audiovisual feedback and+ session persistence.+4. Landmark proximity offers one clear action with `F`: visit the visible nearby cottage+ or place. Invisible street-level warp triggers are not used.+5. `M` opens the Village Map. A destination warp is shareable via+ `/openworld/region/:regionId`, and dropping back to street level lands at that region.++The exploration HUD deliberately removes dashboard noise and takes over the whole viewport.+It shows only the current place, Echo progress, speed, nearby interaction, and four compact+tools. Operational vitals, filters, agent bars, and attention panes return in orbital view.++Controls:++| Input | Action |+|---|---|+| `W` / `S` | accelerate / reverse |+| `A` / `D` | steer |+| `Shift` | boost |+| `Ctrl` or `X` | brake |+| `Space` | jump |+| `F` | use the nearby building, landmark, or gate |+| `V` | switch rover and first-person camera |+| `M` | open the Village Map |+| `Tab` | switch street-level and orbital view |+| `R` | return to the latest arrival point |++Touch uses a joystick plus only three verbs: boost, hop, and action.++## PortOS Places++The cozy places are authored; their destinations still tell the truth about the install.++- App state → Common market kiosks, status lamps, active-agent markers, and focused app routes.+- AI activity → the suspended seed and orbital rings at the AI Core, with targeted beams.+- CoS tasks → crates outside the Task Workshop.+- Backup state → the status lamp outside Backup Cottage.+- Memory graph and inbox → blossom clusters and the memory well at Memory House.+- Goals and artifacts → flags and earned displays around their cottages.+- Productivity and calendar history → terrain heat and task-flow motion.+- Health → the Wellness landmark.+- Database introspection → Data Harbor structures.+- Federated peers → distant silhouettes beyond the local islands.++These mappings are symbolic and read-only. OpenWorld may navigate to an existing action,+but it must not invent an implicit write path or trigger an automation merely because the+player approached something.++## Views and URL Contracts++- `/openworld` is the whole-world route.+- `/openworld/apps/:appId` focuses one live app borough.+- `/openworld/region/:regionId` focuses or warps to one named destination.+- `/openworld/settings` opens world settings.+- Legacy `/city` routes redirect to the equivalent OpenWorld route.++Selection remains in the URL. Building focus and region travel are bookmarkable,+back/forward safe, and reachable from the command palette and voice navigation.++Orbital view is an establishing shot of the complete archipelago, with pan/orbit/zoom,+search, operational filters, attention, history, and photo tools. Street-level view is+for movement and discovery. The two modes intentionally have different information+hierarchies.++## Art Direction++`settings.worldStyle` selects one of two material languages over the same world:++| Style | Look |+|---|---|+| `vibes` (default) | colorful low-poly valley, cottage destinations, dense trees, rolling lanes, drifting clouds |+| `cyber` | nocturnal orbital dashboard, galaxy and weather layers, emissive live-state accents |++The new direction follows current Three.js practice without making experimental renderer+features a runtime requirement:++- Procedural, data-driven terrain is authored as deterministic buffer geometry, inspired+ by Three.js’s+ [procedural terrain example](https://threejs.org/examples/webgpu_tsl_procedural_terrain).+- Repeated world detail is instanced and geometry is reused, following+ [React Three Fiber’s scaling guidance](https://r3f.docs.pmnd.rs/advanced/scaling-performance).+- Dense procedural city generation informed the decision to keep live structures modular,+ while making geography a stronger authored composition; see Three.js’s+ [city generator example](https://threejs.org/examples/webgpu_generator_city.html).++WebGPU/TSL is not required for OpenWorld. The current WebGL path supports the app’s browsers+and quality tiers, while the geometry/data separation leaves room for a future renderer+upgrade.++## Performance Contract++- No per-frame React state for camera, player, water, pulses, or instanced dressing.+- Geometry derived from static geography is memoized and explicitly disposed.+- Repeated terrain detail uses instancing; the village terrain and curved lane ribbons are memoized.+- Expensive atmosphere layers mount only for the appropriate style/tier.+- Adaptive quality remains internal. Player-facing settings describe mood, sound, and+ controls rather than renderer implementation.+- Photo-only postprocessing stays out of the always-on live canvas.+- Hidden tabs stop the live frame loop.## Critical Files-- `client/src/pages/OpenWorld.jsx` — page wrapper-- `client/src/utils/openWorldRegions.js` — fast-travel region registry (also the nav-guard source)-- `client/src/components/openworld/OpenWorldFastTravel.jsx` — the warp panel (M)-- `client/src/utils/openWorldFocusCamera.js` — framing math for a borough (`computeFocusCamera`) and a region (`computeRegionCamera`)-- `client/src/components/openworld/openWorldConstants.js` — world styles, time-of-day presets, palette derivation-- `client/src/components/openworld/OpenWorldScene.jsx` — Canvas, 3D containers, controls-- `client/src/components/openworld/OpenWorldHud.jsx` — overlay HUD (most Phase 1 UX changes)-- `client/src/components/openworld/Building.jsx`, `Borough.jsx` — façade work (1.1, 1.2, 1.13)-- `client/src/components/openworld/AgentEntity.jsx` — tether (1.13)-- `client/src/components/openworld/OpenWorldTraffic.jsx`, `OpenWorldDataStreams.jsx` — meaningful traffic (2.10)-- `client/src/components/openworld/OpenWorldSignalBeacons.jsx` — landmarks and warp pads-- `client/src/components/openworld/OpenWorldBillboards.jsx` — richer content (1.12)-- `client/src/hooks/useOpenWorldData.js` — data layer; extend with new endpoints-- `client/src/utils/openWorldFilter.js` — pure status/search filter logic (1.8, 1.9)-- `client/src/utils/formatters.js` — reuse formatters; do not duplicate--## Endpoints used / to use--| Endpoint | Phase | Purpose |-|----------|-------|---------|-| `/api/system/health/details` | 1.1, 1.3, 1.4 | CPU/MEM/DISK |-| `/api/notifications/counts` | 1.5 | beacon brightness/colors |-| `/api/brain/inbox` | 1.6 | spire pulse |-| `/api/cos/queue` (or `/api/cos`) | 1.7, 2.2 | task queue depth |-| `/api/instances/peers` | 1.7, 2.5 | sync failures, peer rendering |-| `/api/cos/briefings/latest` | 1.12 | billboard headline |-| `/api/cos/productivity/summary` | 1.12, 2.6 | throughput, pace |-| `/api/cos/productivity/trends` | 2.6 | activity heatmap |-| `/api/digital-twin/identity/goals` | 2.7 | goal monuments |-| `/api/digital-twin/identity/chronotype/energy-schedule` | 3.1 | energy overlay |-| `/api/meatspace/apple-health/metrics/latest` | 2.9 | health vitals tower |-| `/api/memory/graph` | 3.2 | memory district |-| `/api/character/` | 2.11 | XP HUD |-| `/api/backup/*` | 2.3 | vault state |--## Sockets used / to use--Existing events the city should hook into more deeply:--- `apps:changed` (already used)-- `cos:agent:spawned` / `updated` / `completed` (already used)-- `cos:status`, `cos:log` (already used)-- `tasks:cos:created` / `changed` / `completed` (Phase 2.2)-- `ai:status` (Phase 2.1)-- `app:deploy:start/step/complete/error` (Phase 1.10, 2.10)-- `backup:started` / `completed` (Phase 2.3)-- `voice:idle` / `dictation` / `error` (Phase 2.4)-- `system:critical-error` / `health:check` / `health:critical` (Phase 1.4, 1.7)-- `peer:online` / `peers:updated` (Phase 2.5)--## Verification per phase--**Phase 1 acceptance test:** open `/openworld`, confirm at a glance which apps-need attention, search for a specific app by name in <2s, click any HUD stat-and land on the relevant page, work the same flow on a phone via Tailscale.--**Phase 2 acceptance test:** every major system in PortOS has a visible spatial-representation; new socket events animate the city in real time; opening-`/openworld` instead of `/dashboard` is a viable daily workflow.--**Phase 3 acceptance test:** the city feels distinctive — soundscape and mood-shift with system state, milestones leave permanent visual artifacts, and-photo mode produces shareable postcards.+- `client/src/utils/openWorldPlan.js` — terrain height, lanes, cottage collision, parcels, and walkability+- `client/src/components/openworld/OpenWorldArchipelago.jsx` — village terrain, cottages, routes, and dressing+- `client/src/components/openworld/OpenWorldWater.jsx` — world sea+- `client/src/pages/OpenWorld.jsx` — route state and mode/game orchestration+- `client/src/components/openworld/OpenWorldScene.jsx` — Canvas and scene composition+- `client/src/components/openworld/PlayerController.jsx` — rover movement and interaction+- `client/src/utils/openWorldPlayerRig.js` — camera and vehicle math+- `client/src/utils/openWorldCollectibles.js` — Echo Shard placement and progress+- `client/src/utils/openWorldRegions.js` — region registry and arrival projection+- `client/src/utils/openWorldMiniMap.js` — shared world-map projection+- `client/src/components/openworld/OpenWorldFastTravel.jsx` — searchable Village Map+- `client/src/components/openworld/OpenWorldHud.jsx` — desktop mode hierarchy+- `client/src/components/openworld/OpenWorldHudCompact.jsx` — compact/touch hierarchy++## Verification++Before shipping a geography or traversal change:++1. Run the focused OpenWorld utility and component tests.+2. Run the client production build.+3. Inspect orbital view and confirm the full PortOS world remains readable and useful.+4. Drop into street level and confirm the rover enters at the village gate, the next bend and+ destination are visible, cottages are solid, suspension follows terrain, shards collect,+ and `F` exposes only a visible nearby place.+5. Open the Village Map and confirm its neighborhoods, player, cottages, and destinations+ match the 3D world.+6. Check at least one compact viewport and one desktop viewport.diff --git a/server/lib/navManifest.js b/server/lib/navManifest.jsindex 661c31230a..0fc2685d24 100644--- a/server/lib/navManifest.js+++ b/server/lib/navManifest.js@@ -29,20 +29,20 @@ import { PORTOS_APP_ID } from './appIdentity.js';// didn't just fail to resolve — the fallback tiers matched a substring against an unrelated// command, so "memory quarter" landed on /brain/memory and "voice beacon" on /settings/voice.const OPEN_WORLD_REGION_COMMANDS = [- ['downtown', 'Downtown', ['downtown', 'apps district', 'app towers']],- ['ai-core', 'AI Core Plaza', ['ai core', 'core plaza', 'the core', 'reactor']],- ['task-queue', 'Task Queue', ['task queue', 'queue', 'cos queue']],- ['wellness', 'Wellness Tower', ['wellness tower', 'health tower', 'vitals tower']],- ['archive', 'Archive District', ['archive district', 'warehouse', 'cold storage']],+ ['downtown', 'Village Green', ['downtown', 'apps district', 'app towers', 'village green']],+ ['ai-core', 'PortOS Common', ['ai core', 'core plaza', 'the core', 'reactor', 'common']],+ ['task-queue', 'Task Workshop', ['task queue', 'queue', 'cos queue', 'task workshop']],+ ['wellness', 'Wellness Greenhouse', ['wellness tower', 'health tower', 'vitals tower', 'greenhouse']],+ ['archive', 'Archive Lodge', ['archive district', 'warehouse', 'cold storage', 'archive lodge']],['quiet-corner', 'Quiet Corner', ['quiet corner', 'easter eggs']],- ['productivity', 'Productivity Terrace', ['productivity terrace', 'productivity', 'throughput district', 'streak district']],- ['backup-vault', 'Backup Vault', ['backup vault', 'the vault']],- ['memory', 'Memory Quarter', ['memory quarter', 'memory district', 'knowledge district']],- ['sprint-yard', 'Sprint Yard', ['sprint yard', 'jira yard', 'sprint district'], 'jira'],- ['voice', 'Voice Beacon', ['voice beacon', 'the beacon']],- ['goals', 'Goal Monuments', ['goal monuments', 'monuments', 'goals district']],- ['artifacts', 'Hall of Achievements', ['hall of achievements', 'artifact hall', 'achievements hall']],- ['data-harbor', 'Data Harbor', ['data harbor', 'the harbor', 'piers']],+ ['productivity', 'Focus Farm', ['productivity terrace', 'productivity', 'throughput district', 'streak district', 'focus farm']],+ ['backup-vault', 'Backup Cottage', ['backup vault', 'the vault', 'backup cottage']],+ ['memory', 'Memory House', ['memory quarter', 'memory district', 'knowledge district', 'memory house']],+ ['sprint-yard', 'Sprint Studio', ['sprint yard', 'jira yard', 'sprint district', 'sprint studio'], 'jira'],+ ['voice', 'Voice Radio', ['voice beacon', 'the beacon', 'voice radio']],+ ['goals', 'Goals Lodge', ['goal monuments', 'monuments', 'goals district', 'goals lodge']],+ ['artifacts', 'Trophy House', ['hall of achievements', 'artifact hall', 'achievements hall', 'trophy house']],+ ['data-harbor', 'Data Pier', ['data harbor', 'the harbor', 'piers', 'data pier']],].map(([id, label, aliases, feature]) => ({id: `nav.openworld.region.${id}`,path: `/openworld/region/${id}`,