Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat: complete OpenWorld interface roadmap

[._.]/ Adam Eivy5bc36c84c96d
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 17f91711ad..c89533d3de 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -195,10 +195,10 @@ const MEDIA_3D_PREFIX = /^\/media\/3d/;
// is what a bookmark, a typed URL, or a half-remembered path lands on — alias it
// rather than letting the catch-all swallow it (issue #3793).
const ANNOTATE_PREFIX = /^\/annotate/;
-// CyberCity became OpenWorld. Bookmarks, pinned sidebar entries, stored palette
+// The old city page became OpenWorld. Bookmarks, pinned sidebar entries, stored palette
// history, and peers' deep links all still say /city — alias the whole prefix
// (including /city/settings and /city/apps/:appId) rather than 404ing them.
-const CITY_PREFIX = /^\/city/;
+const LEGACY_CITY_PREFIX = /^\/city/;
// Normalize a tab-less /creative-director/:id URL to its overview tab while
// preserving any query string + hash. A bare `<Navigate to="overview">` would
@@ -350,8 +350,8 @@ export default function App() {
<Route path="openworld/settings" element={<OpenWorld />} />
<Route path="openworld/apps/:appId" element={<OpenWorld />} />
<Route path="openworld/region/:regionId" element={<OpenWorld />} />
- <Route path="city" element={<PrefixRedirect from={CITY_PREFIX} to="/openworld" />} />
- <Route path="city/*" element={<PrefixRedirect from={CITY_PREFIX} to="/openworld" />} />
+ <Route path="city" element={<PrefixRedirect from={LEGACY_CITY_PREFIX} to="/openworld" />} />
+ <Route path="city/*" element={<PrefixRedirect from={LEGACY_CITY_PREFIX} to="/openworld" />} />
<Route path="data" element={<DataManager />} />
<Route path="character" element={<CharacterSheet />} />
<Route path="ask" element={<Ask />} />
diff --git a/client/src/CLAUDE.md b/client/src/CLAUDE.md
index bad0236748..b949cabd13 100644
--- a/client/src/CLAUDE.md
+++ b/client/src/CLAUDE.md
@@ -9,9 +9,9 @@ These apply to React/Vite client code. Universal constraints (functional program
- **Mobile responsive** - all pages should be mobile responsive friendly
- **Above the fold** - keep actionable content and info above the fold and design pages for maximum information and access without scrolling
- **No hardcoded localhost** - use `window.location.hostname` for URLs; app accessed via Tailscale remotely
-- **Chrome floating over media uses `.port-media-overlay`** - a label, status bar, badge, or control panel sitting on top of an image, a video, or a 3D canvas takes its surface and ink from the theme (`.port-media-overlay`, or `.port-media-overlay-strong` for a small label directly on photography; `.port-media-overlay-item` for its buttons, `.port-media-overlay-divider` for its separators — all defined in `index.css`, which carries the mechanism and the rule for picking between this, `.always-dark`, and the City HUD remap). **Don't write `bg-black/NN` + `text-white`/`text-gray-N00` for this** — day mode remaps the text to the theme's dark ink while the black scrim stays black, so the label renders dark-on-black. Older overlays outside the 3D/Three.js pages still carry that idiom (migration tracked in #3796), so match the new convention rather than the nearest neighbor.
+- **Chrome floating over media uses `.port-media-overlay`** - a label, status bar, badge, or control panel sitting on top of an image, a video, or a 3D canvas takes its surface and ink from the theme (`.port-media-overlay`, or `.port-media-overlay-strong` for a small label directly on photography; `.port-media-overlay-item` for its buttons, `.port-media-overlay-divider` for its separators — all defined in `index.css`, which carries the mechanism and the rule for picking between this, `.always-dark`, and the OpenWorld HUD remap). **Don't write `bg-black/NN` + `text-white`/`text-gray-N00` for this** — day mode remaps the text to the theme's dark ink while the black scrim stays black, so the label renders dark-on-black. Older overlays outside the 3D/Three.js pages still carry that idiom (migration tracked in #3796), so match the new convention rather than the nearest neighbor.
- **Alphabetical navigation** - sidebar nav items in `Layout.jsx` are alphabetically ordered after the Dashboard+OpenWorld top section and separator; children within collapsible sections are also alphabetical
-- **OpenWorld's `city*` prefix is legacy, not a naming convention to follow.** The 3D world was renamed CyberCity → OpenWorld at the route/label level; the ~150 `city*` files (`components/city/`, `utils/city*.js`, `hooks/useCity*.js`) and the `.cybercity-themed` CSS scope did NOT move, and the `nav.cybercity` command ids are deliberately frozen (they're opaque and persisted in ⌘K history). **Name new files in that tree `openWorld*` / `OpenWorld*`** — matching the nearest neighbor would half-rename the directory by accretion, which is worse than either end state. The mechanical sweep is tracked in #4571.
+- **OpenWorld's internal names match the user-facing area.** The scene tree lives under `components/openworld/`, its pure helpers are `utils/openWorld*.js`, its hooks are `useOpenWorld*.js`, and its CSS scope is `.openworld-themed`. The legacy OpenWorld command ids remain deliberately frozen because they are opaque values persisted in ⌘K history. Keep the persisted `portos-city-settings` key unchanged when adding settings migrations.
- **Reactive UI updates** - after mutations (delete, create, update), update local state directly instead of refetching the entire list from the server. Use `setState(prev => prev.filter(...))` or similar patterns for immediate feedback
## API errors and save gating
@@ -37,7 +37,7 @@ For the full "adding a new page" checklist (nav manifest entry shape, palette ac
- **Mobile `<select>` fallback + `TabPills`.** The tab bar is `client/src/components/ui/TabPills.jsx` (`mobileDropdown` collapses it to a `<select>` under `sm`) — **reuse it, never roll a new tab bar.** The `Drawer tabs` layout wires TabPills for you; a surface hosted in *both* a drawer and a page (like `ImageGenTab`) renders its own internal `<TabPills variant="pills" mobileDropdown>` instead so the same grouping works in either host.
- **Deep-linkable active tab.** Drive `activeTab` from a URL search param via `useDrawerTab(paramName, defaultTab, tabIds)` (`client/src/hooks/useDrawerTab.js`) so the open section is shareable/bookmarkable/reload-safe — the same "URL is the source of truth for what's open" rule as routed views. The caller owns the param name (`appTab`, `mediaTab`, …) so a page can host more than one drawer; pass the id list so a stale deep link degrades to `defaultTab` instead of a blank panel.
- **Long-lived forms** opt out of accidental dismissal with `closeOnEsc={false}` / `closeOnBackdrop={false}` so an Esc keystroke mid-edit doesn't discard the form.
- - **The overlay is always portaled to `<body>` — never re-nest it.** The backdrop and panel are both `position:fixed`, and a `filter` / `backdrop-filter` / `transform` ancestor becomes their containing block; on the "glass" themes `index.css` gives every bordered/rounded `.bg-port-card` a `backdrop-filter`, so an inline drawer nested under a card was sized to the *card*, not the viewport (issue #4150). Portaling is unconditional rather than an opt-in flag, so no call site has to remember it — React still routes events and context through the React tree. The one thing the portal leaves behind is a **page-scoped CSS theming root written as descendant selectors** (`.cybercity-themed` in `index.css`): a caller inside one must pass that class as `portalClassName` (see `CitySettingsDrawer.jsx`). Same trap, same fix, for any new hand-rolled `fixed inset-0` overlay — portal it (`Modal`'s `usePortal`, `GalleryImagePicker.jsx`).
+ - **The overlay is always portaled to `<body>` — never re-nest it.** The backdrop and panel are both `position:fixed`, and a `filter` / `backdrop-filter` / `transform` ancestor becomes their containing block; on the "glass" themes `index.css` gives every bordered/rounded `.bg-port-card` a `backdrop-filter`, so an inline drawer nested under a card was sized to the *card*, not the viewport (issue #4150). Portaling is unconditional rather than an opt-in flag, so no call site has to remember it — React still routes events and context through the React tree. The one thing the portal leaves behind is a **page-scoped CSS theming root written as descendant selectors** (`.openworld-themed` in `index.css`): a caller inside one must pass that class as `portalClassName` (see `OpenWorldSettingsDrawer.jsx`). Same trap, same fix, for any new hand-rolled `fixed inset-0` overlay — portal it (`Modal`'s `usePortal`, `GalleryImagePicker.jsx`).
- **Worked examples:** `client/src/components/apps/EditAppDrawer.jsx` (built-in `tabs` layout, `size="lg"`, `useDrawerTab('appTab', …)`) and `client/src/components/settings/ImageGenTab.jsx` (internal `TabPills variant="pills"` sub-tabs, `useDrawerTab('mediaTab', …)`). The primitive is `Drawer.jsx`; the design record is `docs/plans/2026-07-01-drawer-ux-redesign.md`.
## Socket-driven UI
diff --git a/client/src/components/Drawer.jsx b/client/src/components/Drawer.jsx
index 68d0142dfa..9d5d83bb58 100644
--- a/client/src/components/Drawer.jsx
+++ b/client/src/components/Drawer.jsx
@@ -37,7 +37,7 @@ import TabPills from './ui/TabPills';
// site has to remember it; React still routes events and context through the
// React tree, so nesting a Drawer deep in a page keeps working unchanged.
// A caller sitting inside a page-scoped CSS theming root whose rules are written
-// as descendant selectors (e.g. `.cybercity-themed` in `index.css`) must pass
+// as descendant selectors (e.g. `.openworld-themed` in `index.css`) must pass
// that class as `portalClassName`, since the portal leaves that ancestor behind.
// Desktop width brackets. Mobile is always `w-full`. `lg`/`xl` intentionally use
diff --git a/client/src/components/Drawer.test.jsx b/client/src/components/Drawer.test.jsx
index 98b2663f7b..6e4734d116 100644
--- a/client/src/components/Drawer.test.jsx
+++ b/client/src/components/Drawer.test.jsx
@@ -188,13 +188,13 @@ describe('Drawer', () => {
});
it('re-applies a page-scoped theming class inside the portal via portalClassName', () => {
- // The City HUD palette remap in index.css is written as
- // `.cybercity-themed <utility>` descendant selectors, which the portal
+ // The OpenWorld HUD palette remap in index.css is written as
+ // `.openworld-themed <utility>` descendant selectors, which the portal
// would otherwise leave behind.
- renderInGlassCard({ portalClassName: 'cybercity-themed' });
+ renderInGlassCard({ portalClassName: 'openworld-themed' });
const wrapper = screen.getByRole('dialog').parentElement;
- expect(wrapper.className).toBe('cybercity-themed');
+ expect(wrapper.className).toBe('openworld-themed');
expect(wrapper.parentElement).toBe(document.body);
// The backdrop shares the themed wrapper so the scrim is remapped too.
expect(wrapper.contains(document.querySelector('[aria-hidden="true"]'))).toBe(true);
diff --git a/client/src/components/KeyboardHelp.jsx b/client/src/components/KeyboardHelp.jsx
index 87c8b9d3ca..ab6c5fcbe1 100644
--- a/client/src/components/KeyboardHelp.jsx
+++ b/client/src/components/KeyboardHelp.jsx
@@ -24,7 +24,7 @@ const SHORTCUT_SECTIONS = [
],
},
{
- title: 'City',
+ title: 'OpenWorld',
shortcuts: [
{ keys: ['W', 'A', 'S', 'D'], description: 'Move around' },
{ keys: ['Tab'], description: 'Toggle mode' },
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index 0dda228fa1..45bd28a1a7 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -410,7 +410,7 @@ function WorkingSetRow({ entry, pinned, onTogglePin, onNavigate, isActive }) {
);
}
-// A top-level *single* nav row (Dashboard / Review Hub / City / Goals). Unlike a
+// A top-level *single* nav row (Dashboard / Review Hub / OpenWorld / Goals). Unlike a
// section, it links straight to one destination — and unlike WorkingSetRow it
// carries the heavier top-level row weight plus the optional badge (Chief of
// Staff unread count) and the collapsed-rail layout (icon-only, centered, badge
diff --git a/client/src/components/city/CitySignalBeacons.jsx b/client/src/components/city/CitySignalBeacons.jsx
deleted file mode 100644
index 7d4c5f02c0..0000000000
--- a/client/src/components/city/CitySignalBeacons.jsx
+++ /dev/null
@@ -1,126 +0,0 @@
-import { useMemo, useRef } from 'react';
-import { useFrame } from '@react-three/fiber';
-import * as THREE from 'three';
-import { computeDistrictBounds } from '../../utils/cityMiniMap';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-
-function SignalBeacon({ position, color, label, sublabel, intensity = 1, dayMix = 0 }) {
- const { tintStructure } = useCityPalette();
- const groupRef = useRef();
- const glowRef = useRef();
- const beamRef = useRef();
-
- useFrame(({ clock }) => {
- const t = clock.getElapsedTime();
- const pulse = 0.7 + ((Math.sin(t * (1.5 + intensity)) + 1) / 2) * 0.8 * intensity;
-
- if (groupRef.current) {
- groupRef.current.position.y = position[1] + Math.sin(t * 0.6 + position[0]) * 0.1;
- }
- if (glowRef.current) {
- glowRef.current.material.opacity = 0.15 * pulse;
- glowRef.current.scale.setScalar(0.9 + pulse * 0.15);
- }
- if (beamRef.current) {
- beamRef.current.material.opacity = Math.min(0.35, 0.08 + pulse * 0.08);
- }
- });
-
- return (
- <group ref={groupRef} position={position}>
- <mesh ref={beamRef} position={[0, 2.8, 0]}>
- <cylinderGeometry args={[0.08, 0.45, 5.5, 12, 1, true]} />
- <meshBasicMaterial color={color} transparent opacity={0.18} side={THREE.DoubleSide} blending={THREE.AdditiveBlending} depthWrite={false} />
- </mesh>
-
- <mesh position={[0, 0.15, 0]}>
- <cylinderGeometry args={[0.35, 0.45, 0.3, 10]} />
- <meshStandardMaterial color={tintStructure('#0a0a18')} emissive={color} emissiveIntensity={0.35 * intensity} />
- </mesh>
-
- <mesh position={[0, 0.42, 0]}>
- <sphereGeometry args={[0.18, 16, 16]} />
- <meshBasicMaterial color={color} transparent opacity={0.95} />
- </mesh>
-
- <mesh ref={glowRef} position={[0, 0.42, 0]}>
- <sphereGeometry args={[0.5, 16, 16]} />
- <meshBasicMaterial color={color} transparent opacity={0.18} blending={THREE.AdditiveBlending} depthWrite={false} />
- </mesh>
-
- <CityLabel
- position={[0, 5.9, 0]}
- fontSize={0.32}
- color={color}
- dayMix={dayMix}
- anchorX="center"
- anchorY="middle"
- font={PIXEL_FONT_URL}
- >
- {label}
- </CityLabel>
- {sublabel && (
- <CityLabel
- position={[0, 5.45, 0]}
- fontSize={0.18}
- color="#cbd5e1"
- dayMix={dayMix}
- anchorX="center"
- anchorY="middle"
- font={PIXEL_FONT_URL}
- maxWidth={6}
- >
- {sublabel}
- </CityLabel>
- )}
- </group>
- );
-}
-
-export default function CitySignalBeacons({ positions, reviewCounts, instances, settings }) {
- const dayMix = cityDayMix(settings);
- const config = useMemo(() => {
- if (!positions || positions.size === 0) return [];
-
- const bounds = computeDistrictBounds(positions, 'downtown');
- if (!bounds) return [];
- const { minX, maxX, minZ, maxZ } = bounds;
-
- const pending = reviewCounts?.total || 0;
- const alerts = reviewCounts?.alert || 0;
- const peers = instances?.peers || [];
- const onlinePeers = peers.filter(peer => peer.status === 'online').length;
- const totalNodes = 1 + peers.length;
-
- return [
- {
- id: 'review-beacon',
- position: [minX - 6, 0, minZ - 6],
- color: alerts > 0 ? '#f97316' : '#06b6d4',
- label: alerts > 0 ? 'REVIEW PRESSURE' : 'REVIEW HUB',
- sublabel: pending > 0 ? `${pending} pending · ${alerts} alerts` : 'inbox clear',
- intensity: alerts > 0 ? 1.6 : pending > 0 ? 1.1 : 0.7,
- },
- {
- id: 'void-beacon',
- position: [maxX + 8, 0, maxZ + 8],
- color: onlinePeers > 0 ? '#8b5cf6' : '#64748b',
- label: 'INSTANCE MESH',
- sublabel: `${onlinePeers}/${totalNodes} nodes linked`,
- intensity: onlinePeers > 0 ? 1.2 : 0.65,
- }
- ];
- }, [positions, reviewCounts, instances]);
-
- if (config.length === 0) return null;
-
- return (
- <group>
- {config.map(beacon => (
- <SignalBeacon key={beacon.id} {...beacon} dayMix={dayMix} />
- ))}
- </group>
- );
-}
diff --git a/client/src/components/cos/MuseCoSAvatar.jsx b/client/src/components/cos/MuseCoSAvatar.jsx
index d7a1d5da1e..7e0314c497 100644
--- a/client/src/components/cos/MuseCoSAvatar.jsx
+++ b/client/src/components/cos/MuseCoSAvatar.jsx
@@ -56,7 +56,7 @@ function GLBAvatar({ state, speaking }) {
// Fit into a fixed height so different models render consistently. Centered
// vertically rather than resting its feet on the ground glow (the way the
- // mini-character and CyberCity player do): this is a fixed portrait frame,
+ // mini-character and OpenWorld player do): this is a fixed portrait frame,
// so the body reads best balanced on the camera's look-at point.
fitModelToHeight(scene, { targetHeight: TARGET_HEIGHT, yOffset: VERTICAL_LIFT });
}, [scene]);
diff --git a/client/src/components/micrographics/SchematicLabel.jsx b/client/src/components/micrographics/SchematicLabel.jsx
index ea1abe59a6..e4f899cd8d 100644
--- a/client/src/components/micrographics/SchematicLabel.jsx
+++ b/client/src/components/micrographics/SchematicLabel.jsx
@@ -16,7 +16,7 @@ const STATE_TO_TONE = {
// sticker sheet. Renders something like: "MODULE.04 // ACTIVE ●"
//
// Sits at the top edge of cards, above widget headers, on empty states.
-// Reuses GeistPixelSquare (already loaded for CyberCity) so no font cost.
+// Reuses GeistPixelSquare (already loaded for OpenWorld) so no font cost.
export default function SchematicLabel({
module,
prefix = 'MODULE',
diff --git a/client/src/components/city/AgentEntity.jsx b/client/src/components/openworld/AgentEntity.jsx
similarity index 98%
rename from client/src/components/city/AgentEntity.jsx
rename to client/src/components/openworld/AgentEntity.jsx
index 67e85ce05e..1511da6800 100644
--- a/client/src/components/city/AgentEntity.jsx
+++ b/client/src/components/openworld/AgentEntity.jsx
@@ -9,7 +9,7 @@ import {
computeAgentTrailPoints,
computeTrailColors,
resolveTrailSamples,
-} from '../../utils/cityAgentMotion';
+} from '../../utils/openWorldAgentMotion';
const DEFAULT_COLOR = '#06b6d4';
diff --git a/client/src/components/city/Borough.jsx b/client/src/components/openworld/Borough.jsx
similarity index 90%
rename from client/src/components/city/Borough.jsx
rename to client/src/components/openworld/Borough.jsx
index 2d933426ae..d6f2a3907a 100644
--- a/client/src/components/city/Borough.jsx
+++ b/client/src/components/openworld/Borough.jsx
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
-import { getBuildingHeight, BOROUGH_PARAMS, cityDayMix, cityShowDetail, cityShowInteriorWindows } from './cityConstants';
+import { getBuildingHeight, BOROUGH_PARAMS, openWorldDayMix, openWorldShowDetail, openWorldShowInteriorWindows } from './openWorldConstants';
import { hashString } from '../../utils/hashString';
import Building from './Building';
import AgentEntity from './AgentEntity';
@@ -19,7 +19,7 @@ export default function Borough({ app, position, agentMap, onBuildingClick, play
const pm2Status = app.pm2Status || {};
// 0 at night, 1 in full daylight — buildings lighten and shed their neon by day.
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
// Compute ring positions for process buildings
const processPositions = useMemo(() => {
@@ -46,8 +46,8 @@ export default function Borough({ app, position, agentMap, onBuildingClick, play
agentCount={agents.length}
onClick={() => onBuildingClick?.(app)}
playSfx={playSfx}
- rooftops={cityShowDetail(settings)}
- interiorWindows={cityShowInteriorWindows(settings)}
+ rooftops={openWorldShowDetail(settings)}
+ interiorWindows={openWorldShowInteriorWindows(settings)}
neonBrightness={neonBrightness}
isProximity={isProximity}
focused={focused}
diff --git a/client/src/components/city/Building.jsx b/client/src/components/openworld/Building.jsx
similarity index 87%
rename from client/src/components/city/Building.jsx
rename to client/src/components/openworld/Building.jsx
index a2c10cecc0..eec7ca13ac 100644
--- a/client/src/components/city/Building.jsx
+++ b/client/src/components/openworld/Building.jsx
@@ -1,14 +1,14 @@
import { useRef, useState, useMemo, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { getBuildingHeight, BUILDING_PARAMS, PIXEL_FONT_URL, mixHex, seededRand } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
+import { getBuildingHeight, BUILDING_PARAMS, PIXEL_FONT_URL, mixHex, seededRand } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
import HolographicPanel from './HolographicPanel';
import BuildingHologram from './BuildingHologram';
import BuildingWindows from './BuildingWindows';
-import { computeRooftopKit } from '../../utils/cityRooftops';
-import { buildingHasInteriorWindows } from '../../utils/cityInteriorWindows';
+import { computeRooftopKit } from '../../utils/openWorldRooftops';
+import { buildingHasInteriorWindows } from '../../utils/openWorldInteriorWindows';
// Rooftop fixture geometry/materials are module-scope singletons shared by every
// building — fixtures are tiny set dressing, so they keep fixed colors (the antenna
@@ -394,6 +394,50 @@ function FloorLightBands({ width, depth, height, color, accentColor, seed, dimMu
);
}
+// The Vibes facade is a small cluster of matte, faceted masses rather than one cyber-era
+// slab. The seed comes from the app name, so the silhouette is stable across live updates
+// and playback. The main mass keeps the existing status-driven height/color semantics while
+// the side volumes provide the low-poly roofline variation the bright world needs.
+function LowPolyFacade({ width, depth, height, bodyColor, edgeColor, dimMul, surface, seed, meshRef, onClick, onPointerEnter, onPointerLeave }) {
+ const variant = seed % 3;
+ const side = variant === 0 ? -1 : 1;
+ const shoulderWidth = width * (variant === 2 ? 0.34 : 0.24);
+ const shoulderHeight = height * (variant === 1 ? 0.58 : 0.72);
+ const shoulderDepth = depth * (variant === 0 ? 0.48 : 0.62);
+ const shoulderColor = mixHex(bodyColor, edgeColor, 0.14);
+
+ return (
+ <group onClick={onClick} onPointerEnter={onPointerEnter} onPointerLeave={onPointerLeave}>
+ <mesh ref={meshRef} position={[0, height / 2, 0]}>
+ <boxGeometry args={[width * 0.78, height, depth * 0.78]} />
+ <meshStandardMaterial
+ {...surface}
+ color={bodyColor}
+ emissive={edgeColor}
+ emissiveIntensity={0.14 * dimMul}
+ transparent
+ opacity={dimMul}
+ />
+ </mesh>
+ <mesh position={[side * width * 0.27, shoulderHeight / 2 + height * 0.16, 0]} rotation={[0, variant * 0.18, variant % 2 ? 0.08 : -0.08]}>
+ <boxGeometry args={[shoulderWidth, shoulderHeight, shoulderDepth]} />
+ <meshStandardMaterial
+ {...surface}
+ color={shoulderColor}
+ emissive={edgeColor}
+ emissiveIntensity={0.08 * dimMul}
+ transparent
+ opacity={0.94 * dimMul}
+ />
+ </mesh>
+ <mesh position={[-side * width * 0.24, height * 0.22, depth * 0.08]} rotation={[0, -variant * 0.14, -0.06]}>
+ <boxGeometry args={[width * 0.22, height * 0.44, depth * 0.42]} />
+ <meshStandardMaterial {...surface} color={mixHex(bodyColor, '#ffffff', 0.08)} roughness={0.98} />
+ </mesh>
+ </group>
+ );
+}
+
export default function Building({ app, position, agentCount, onClick, playSfx, neonBrightness = 1.2, isProximity = false, focused = false, dimmed = false, dayMix = 0, playback = false, transitionState = null, onExited, rooftops = true, interiorWindows = false }) {
const meshRef = useRef();
const glowRef = useRef();
@@ -418,7 +462,7 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
// `surface` carries the world style's finish (flat shading + matte under the low-poly
// style); spread last on the facade material so it wins over the cyber defaults.
- const { getBuildingColor, getAccentColor, tintStructure, surface } = useCityPalette();
+ const { getBuildingColor, getAccentColor, tintStructure, surface, lowPoly } = useOpenWorldPalette();
const height = getBuildingHeight(app);
const edgeColor = getBuildingColor(app.overallStatus, app.archived);
const accentColor = getAccentColor(app);
@@ -554,28 +598,46 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
return (
<group ref={groupRef} position={[position.x, 0, position.z]} scale={initialScale}>
- {/* Building body with window texture + pixel art icon */}
- <mesh
- ref={meshRef}
- position={[0, height / 2, 0]}
- onClick={() => { playSfx?.('buildingClick'); onClick?.(); }}
- onPointerEnter={() => { setHovered(true); playSfx?.('buildingHover'); }}
- onPointerLeave={() => setHovered(false)}
- >
- <boxGeometry args={[width, height, depth]} />
- <meshStandardMaterial
- color={daytime ? bodyColor : '#ffffff'}
- emissive={edgeColor}
- emissiveIntensity={0.7 * neonBrightness * dimMul * (1 - dayMix * 0.88)}
- map={windowTexture || undefined}
- emissiveMap={windowTexture || undefined}
- roughness={daytime ? 0.9 : 0.78}
- metalness={daytime ? 0.05 : 0.08}
- {...surface}
- transparent
- opacity={(app.archived ? 0.78 : 1) * dimMul}
+ {/* Building body with window texture + pixel art icon. Vibes replaces the flat slab
+ with a deterministic low-poly massing cluster; cyber keeps the established slab. */}
+ {lowPoly ? (
+ <LowPolyFacade
+ width={width}
+ depth={depth}
+ height={height}
+ bodyColor={bodyColor}
+ edgeColor={edgeColor}
+ dimMul={dimMul}
+ surface={surface}
+ seed={seed}
+ meshRef={meshRef}
+ onClick={() => { playSfx?.('buildingClick'); onClick?.(); }}
+ onPointerEnter={() => { setHovered(true); playSfx?.('buildingHover'); }}
+ onPointerLeave={() => setHovered(false)}
/>
- </mesh>
+ ) : (
+ <mesh
+ ref={meshRef}
+ position={[0, height / 2, 0]}
+ onClick={() => { playSfx?.('buildingClick'); onClick?.(); }}
+ onPointerEnter={() => { setHovered(true); playSfx?.('buildingHover'); }}
+ onPointerLeave={() => setHovered(false)}
+ >
+ <boxGeometry args={[width, height, depth]} />
+ <meshStandardMaterial
+ color="#ffffff"
+ emissive={edgeColor}
+ emissiveIntensity={0.7 * neonBrightness * dimMul * (1 - dayMix * 0.88)}
+ map={windowTexture || undefined}
+ emissiveMap={windowTexture || undefined}
+ roughness={0.78}
+ metalness={0.08}
+ {...surface}
+ transparent
+ opacity={(app.archived ? 0.78 : 1) * dimMul}
+ />
+ </mesh>
+ )}
{/* Interior-mapped window panes (InteriorMappingMaterial) — parallax fake-3D lit
rooms on selected online towers. Night-only (by day the tower reads as a
@@ -660,7 +722,7 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
)}
{/* Building name on front face - pixel font (dark ink + halo by day) */}
- <CityLabel
+ <OpenWorldLabel
position={[0, height * 0.88, depth / 2 + 0.02]}
fontSize={0.2}
color={edgeColor}
@@ -672,10 +734,10 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
maxWidth={width * 0.9}
>
{displayName}
- </CityLabel>
+ </OpenWorldLabel>
{/* Building name on back face */}
- <CityLabel
+ <OpenWorldLabel
position={[0, height * 0.88, -(depth / 2 + 0.02)]}
fontSize={0.2}
color={edgeColor}
@@ -688,10 +750,10 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
maxWidth={width * 0.9}
>
{displayName}
- </CityLabel>
+ </OpenWorldLabel>
{/* Name on left side */}
- <CityLabel
+ <OpenWorldLabel
position={[-(width / 2 + 0.02), height * 0.88, 0]}
fontSize={0.18}
color={accentColor}
@@ -704,7 +766,7 @@ export default function Building({ app, position, agentCount, onClick, playSfx,
maxWidth={depth * 0.85}
>
{displayName}
- </CityLabel>
+ </OpenWorldLabel>
{/* Focus selection ring (issue #2593) — a bright accent ring at the base marking the
URL-focused borough. Rendered day AND night (unlike the neon glow) so the selected
diff --git a/client/src/components/city/BuildingCluster.jsx b/client/src/components/openworld/BuildingCluster.jsx
similarity index 91%
rename from client/src/components/city/BuildingCluster.jsx
rename to client/src/components/openworld/BuildingCluster.jsx
index eba607e497..d9605a0319 100644
--- a/client/src/components/city/BuildingCluster.jsx
+++ b/client/src/components/openworld/BuildingCluster.jsx
@@ -1,12 +1,12 @@
import { useMemo, useEffect, useRef, useState, useCallback } from 'react';
-import { computeCityLayout } from './cityLayout';
-import { DISTRICT_PARAMS, PIXEL_FONT_URL, cityDayMix } from './cityConstants';
+import { computeOpenWorldLayout } from './openWorldLayout';
+import { DISTRICT_PARAMS, PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
import Borough from './Borough';
-import CityLabel from './CityLabel';
+import OpenWorldLabel from './OpenWorldLabel';
export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPositionsReady, playSfx, settings, proximityAppId, dimmedAppIds, focusedAppId, playback = false }) {
- const positions = useMemo(() => computeCityLayout(apps), [apps]);
- const dayMix = cityDayMix(settings);
+ const positions = useMemo(() => computeOpenWorldLayout(apps), [apps]);
+ const dayMix = openWorldDayMix(settings);
// Notify parent when positions change (for data streams, roads, traffic)
useEffect(() => {
@@ -104,7 +104,7 @@ export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPos
{/* Warehouse district label - pixel font (dark ink + halo by day) */}
{hasArchived && (
- <CityLabel
+ <OpenWorldLabel
position={[0, 1.5, warehouseMinZ - 2]}
fontSize={0.8}
color="#475569"
@@ -114,7 +114,7 @@ export default function BuildingCluster({ apps, agentMap, onBuildingClick, onPos
font={PIXEL_FONT_URL}
>
ARCHIVE DISTRICT
- </CityLabel>
+ </OpenWorldLabel>
)}
</group>
);
diff --git a/client/src/components/city/BuildingHologram.jsx b/client/src/components/openworld/BuildingHologram.jsx
similarity index 100%
rename from client/src/components/city/BuildingHologram.jsx
rename to client/src/components/openworld/BuildingHologram.jsx
diff --git a/client/src/components/city/BuildingWindows.jsx b/client/src/components/openworld/BuildingWindows.jsx
similarity index 97%
rename from client/src/components/city/BuildingWindows.jsx
rename to client/src/components/openworld/BuildingWindows.jsx
index ff3ad352f2..95d54413d6 100644
--- a/client/src/components/city/BuildingWindows.jsx
+++ b/client/src/components/openworld/BuildingWindows.jsx
@@ -1,8 +1,8 @@
import { useMemo, useEffect } from 'react';
import * as THREE from 'three';
import { InteriorMappingMaterial } from './InteriorMappingMaterial';
-import { computeWindowGrid, INTERIOR_WINDOW } from '../../utils/cityInteriorWindows';
-import { mixHex, seededRand } from './cityConstants';
+import { computeWindowGrid, INTERIOR_WINDOW } from '../../utils/openWorldInteriorWindows';
+import { mixHex, seededRand } from './openWorldConstants';
// Interior-mapped window panes for a building, using the in-tree
// InteriorMappingMaterial — a parallax shader that fakes furnished 3D rooms
@@ -11,7 +11,7 @@ import { mixHex, seededRand } from './cityConstants';
// camera moves, instead of the flat emissive window texture alone.
//
// Every pane of every building is ONE InstancedMesh draw call: the grid math
-// (cityInteriorWindows.computeWindowGrid) places each pane, and a deterministic
+// (openWorldInteriorWindows.computeWindowGrid) places each pane, and a deterministic
// per-pane `instanceWindowId` drives the shader's room-cell pick + lit/unlit and
// warm/cool variation entirely on the GPU. Night-only + high-quality-preset
// gated by the callers (Building / Borough), since the ray-march costs more than
diff --git a/client/src/components/city/CameraTransition.jsx b/client/src/components/openworld/CameraTransition.jsx
similarity index 100%
rename from client/src/components/city/CameraTransition.jsx
rename to client/src/components/openworld/CameraTransition.jsx
diff --git a/client/src/components/city/HolographicPanel.jsx b/client/src/components/openworld/HolographicPanel.jsx
similarity index 100%
rename from client/src/components/city/HolographicPanel.jsx
rename to client/src/components/openworld/HolographicPanel.jsx
diff --git a/client/src/components/city/InteriorMappingMaterial.js b/client/src/components/openworld/InteriorMappingMaterial.js
similarity index 100%
rename from client/src/components/city/InteriorMappingMaterial.js
rename to client/src/components/openworld/InteriorMappingMaterial.js
diff --git a/client/src/components/city/CityActivityHeatmap.jsx b/client/src/components/openworld/OpenWorldActivityHeatmap.jsx
similarity index 89%
rename from client/src/components/city/CityActivityHeatmap.jsx
rename to client/src/components/openworld/OpenWorldActivityHeatmap.jsx
index 3dba7cc91a..6241d78097 100644
--- a/client/src/components/city/CityActivityHeatmap.jsx
+++ b/client/src/components/openworld/OpenWorldActivityHeatmap.jsx
@@ -1,14 +1,14 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { computeActivityHeatmap } from '../../utils/cityActivityHeatmap';
+import { computeActivityHeatmap } from '../../utils/openWorldActivityHeatmap';
-// CyberCity productivity-district activity heatmap (issue #817): a GitHub-style contribution
+// OpenWorld productivity-district activity heatmap (issue #817): a GitHub-style contribution
// grid laid out as a field of thin ground tiles framing the streak monument. Each tile is one
// day; its glow scales with that day's completed-task count relative to the busiest day in the
// window. Today's tile reads accent-blue. Active tiles breathe on the highest quality presets;
// the static glow keeps the field legible when the pulse is dropped. Data comes from the
-// activity calendar (`GET /api/cos/productivity/calendar`). Mirrors CityProductivityDistrict.
-export default function CityActivityHeatmap({ calendarData, settings }) {
+// activity calendar (`GET /api/cos/productivity/calendar`). Mirrors OpenWorldProductivityDistrict.
+export default function OpenWorldActivityHeatmap({ calendarData, settings }) {
const heatmap = useMemo(() => computeActivityHeatmap(calendarData), [calendarData]);
const groupRef = useRef();
diff --git a/client/src/components/city/CityAdaptiveQuality.jsx b/client/src/components/openworld/OpenWorldAdaptiveQuality.jsx
similarity index 92%
rename from client/src/components/city/CityAdaptiveQuality.jsx
rename to client/src/components/openworld/OpenWorldAdaptiveQuality.jsx
index fbf255a4f4..536d540b90 100644
--- a/client/src/components/city/CityAdaptiveQuality.jsx
+++ b/client/src/components/openworld/OpenWorldAdaptiveQuality.jsx
@@ -6,21 +6,21 @@ import {
restartWarmup,
resetRenderBudget,
getEffectiveTier,
-} from '../../utils/cityRenderBudget.js';
+} from '../../utils/openWorldRenderBudget.js';
// In-Canvas driver for Auto quality mode (issue #2592). It samples per-frame delta
// times via useFrame, feeds them to the pure render-budget state machine, and lifts
-// tier changes + (throttled) diagnostics back up to CyberCity through callbacks.
+// tier changes + (throttled) diagnostics back up to OpenWorld through callbacks.
// It renders nothing. All impurity (timers, refs, frame loop) lives here so the
// state machine stays pure and unit-tested.
//
// - `enabled`: Auto mode is on. When off, the machine is left idle (Manual mode).
// - `startTier`: the tier to (re)start the budget at when Auto engages.
-// - `resumeToken`: bumped by CityScene when the frameloop resumes after the tab was
+// - `resumeToken`: bumped by OpenWorldScene when the frameloop resumes after the tab was
// hidden — re-arms the warm-up so post-resume jank doesn't drive a bogus decision.
// - `diagnosticsEnabled`: only push diagnostics upward while the settings panel is
// open, so the 0.5Hz readout doesn't re-render the scene when nobody's watching.
-export default function CityAdaptiveQuality({
+export default function OpenWorldAdaptiveQuality({
enabled,
startTier = 'high',
resumeToken = 0,
diff --git a/client/src/components/city/CityAgentBar.jsx b/client/src/components/openworld/OpenWorldAgentBar.jsx
similarity index 97%
rename from client/src/components/city/CityAgentBar.jsx
rename to client/src/components/openworld/OpenWorldAgentBar.jsx
index 289dca662a..ca04bd31cf 100644
--- a/client/src/components/city/CityAgentBar.jsx
+++ b/client/src/components/openworld/OpenWorldAgentBar.jsx
@@ -1,6 +1,6 @@
import { AGENT_STATES } from '../cos/constants';
-export default function CityAgentBar({ cosAgents, agentMap }) {
+export default function OpenWorldAgentBar({ cosAgents, agentMap }) {
const activeAgents = (cosAgents || []).filter(a =>
a.status === 'running' || a.state === 'coding' || a.state === 'thinking' || a.state === 'investigating'
);
diff --git a/client/src/components/city/CityAiCore.jsx b/client/src/components/openworld/OpenWorldAiCore.jsx
similarity index 93%
rename from client/src/components/city/CityAiCore.jsx
rename to client/src/components/openworld/OpenWorldAiCore.jsx
index 3250b5d380..5384fda555 100644
--- a/client/src/components/city/CityAiCore.jsx
+++ b/client/src/components/openworld/OpenWorldAiCore.jsx
@@ -1,17 +1,17 @@
import { useMemo, useRef } from 'react';
import * as THREE from 'three';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix, mixHex } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeAiCore, computeAiCoreBeams, AI_CORE } from '../../utils/cityAiCore';
+import { PIXEL_FONT_URL, openWorldDayMix, mixHex } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeAiCore, computeAiCoreBeams, AI_CORE } from '../../utils/openWorldAiCore';
-// CyberCity's AI Core landmark (roadmap 2.1): a slender central spire above downtown from
+// 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
// 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
-// `ai:status` ops threaded through useCityData.
+// `ai:status` ops threaded through useOpenWorldData.
//
// When a call originates from a managed app or CoS-agent workspace (its `ai:status` event
// carries `appId` / `workspacePath`), its beam aims at that building's world position and
@@ -100,8 +100,8 @@ function SpireLightRings({ height, color, dayMix }) {
);
}
-export default function CityAiCore({ aiActivity, positions, apps, settings }) {
- const { tintStructure } = useCityPalette();
+export default function OpenWorldAiCore({ aiActivity, positions, apps, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
const core = useMemo(
() => computeAiCore(aiActivity?.ops, aiActivity?.lastStartTs ?? 0),
[aiActivity],
@@ -110,7 +110,7 @@ export default function CityAiCore({ aiActivity, positions, apps, settings }) {
const apexGlowRef = useRef();
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
const { position, height, 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;
@@ -196,7 +196,7 @@ export default function CityAiCore({ aiActivity, positions, apps, settings }) {
))}
</group>
{/* Label above the apex */}
- <CityLabel
+ <OpenWorldLabel
position={[0, apexY + 4.25, 0]}
fontSize={1.15}
color={orbColor}
@@ -209,9 +209,9 @@ export default function CityAiCore({ aiActivity, positions, apps, settings }) {
material-depthTest={false}
>
AI CORE
- </CityLabel>
+ </OpenWorldLabel>
{core.busy && (
- <CityLabel
+ <OpenWorldLabel
position={[0, apexY + 3.15, 0]}
fontSize={0.75}
color="#94a3b8"
@@ -224,7 +224,7 @@ export default function CityAiCore({ aiActivity, positions, apps, settings }) {
material-depthTest={false}
>
{`${core.activeCount} ACTIVE`}
- </CityLabel>
+ </OpenWorldLabel>
)}
</group>
);
diff --git a/client/src/components/city/CityArtifacts.jsx b/client/src/components/openworld/OpenWorldArtifacts.jsx
similarity index 70%
rename from client/src/components/city/CityArtifacts.jsx
rename to client/src/components/openworld/OpenWorldArtifacts.jsx
index 3ca9dff873..2dee9cd972 100644
--- a/client/src/components/city/CityArtifacts.jsx
+++ b/client/src/components/openworld/OpenWorldArtifacts.jsx
@@ -1,18 +1,18 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeArtifacts, ARTIFACTS } from '../../utils/cityArtifacts';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeArtifacts, ARTIFACTS } from '../../utils/openWorldArtifacts';
-// CyberCity's earned artifacts (roadmap 3.5): a "Hall of Achievements" cluster of trophies
+// OpenWorld's earned artifacts (roadmap 3.5): a "Hall of Achievements" cluster of trophies
// that only appear once a milestone is earned (level-ups, completed-goal counts, best CoS
// streak). Each artifact is a dark pedestal topped by a glowing faceted emblem (an octahedron)
// — visually distinct from the goal monuments' tower/scaffold so milestones don't read as
// goals. The emblems shimmer in unison via a single per-frame ref mutation, gated on the
-// quality dial. Mirrors CityGoalMonuments / CityProductivityDistrict.
+// quality dial. Mirrors OpenWorldGoalMonuments / OpenWorldProductivityDistrict.
function Artifact({ artifact, dayMix = 0 }) {
- const { tintStructure } = useCityPalette();
+ const { tintStructure } = useOpenWorldPalette();
const { color, intensity, label, position } = artifact;
const { pedestalWidth: pw, pedestalHeight: ph, emblemSize } = ARTIFACTS;
const emblemY = ph + emblemSize * 0.6;
@@ -35,14 +35,14 @@ function Artifact({ artifact, dayMix = 0 }) {
<pointLight position={[0, emblemY, 0]} color={color} intensity={intensity * 1.5} distance={10} />
{/* Label below the pedestal */}
- <CityLabel position={[0, ph + emblemSize * 1.7, 0]} fontSize={0.5} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
+ <OpenWorldLabel position={[0, ph + emblemSize * 1.7, 0]} fontSize={0.5} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
{label}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
-export default function CityArtifacts({ character, goals, productivityData, settings }) {
+export default function OpenWorldArtifacts({ character, goals, productivityData, settings }) {
const hall = useMemo(
() => computeArtifacts({ character, goals, productivityData }),
[character, goals, productivityData],
@@ -55,7 +55,7 @@ export default function CityArtifacts({ character, goals, productivityData, sett
// Honor the quality dial: drop the shimmer on the lowest preset, but keep the static glow so
// earned artifacts stay legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !groupRef.current) return;
@@ -77,12 +77,12 @@ export default function CityArtifacts({ character, goals, productivityData, sett
</group>
{/* District title behind the cluster */}
- <CityLabel position={[base[0], 10, base[2] + 4]} fontSize={1.2} color="#f59e0b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
+ <OpenWorldLabel position={[base[0], 10, base[2] + 4]} fontSize={1.2} color="#f59e0b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
ACHIEVEMENTS
- </CityLabel>
- <CityLabel position={[base[0], 9, base[2] + 4]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[base[0], 9, base[2] + 4]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={24}>
{`${total} EARNED`}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityBackupVault.jsx b/client/src/components/openworld/OpenWorldBackupVault.jsx
similarity index 75%
rename from client/src/components/city/CityBackupVault.jsx
rename to client/src/components/openworld/OpenWorldBackupVault.jsx
index aa39e6db59..2e93c63858 100644
--- a/client/src/components/city/CityBackupVault.jsx
+++ b/client/src/components/openworld/OpenWorldBackupVault.jsx
@@ -1,25 +1,25 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeBackupVault } from '../../utils/cityBackupVault';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeBackupVault } from '../../utils/openWorldBackupVault';
import { timeAgo } from '../../utils/formatters';
-// CyberCity's backup-vault landmark (roadmap 2.3): a squat armored bunker west of
+// OpenWorld's backup-vault landmark (roadmap 2.3): a squat armored bunker west of
// downtown with a glowing circular seal on its face. The seal's color tracks backup
// health (green protected → amber aging → red stale/failed → blue while a backup
// runs), it pulses on `backup:started/completed`, and the label shows time-since the
// last snapshot — going red and reading "STALE" when a backup is overdue.
-export default function CityBackupVault({ backupStatus, settings }) {
- const { tintStructure } = useCityPalette();
+export default function OpenWorldBackupVault({ backupStatus, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
const vault = useMemo(() => computeBackupVault(backupStatus), [backupStatus]);
const sealRef = useRef();
// Honor the quality dial: drop the seal pulse on the lowest preset, but keep the
// static glow so the vault's health is still legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !sealRef.current) return;
@@ -59,12 +59,12 @@ export default function CityBackupVault({ backupStatus, settings }) {
<meshStandardMaterial color={color} emissive={color} emissiveIntensity={vault.intensity} toneMapped={false} />
</mesh>
{/* Label + status/time-since sublabel above the vault */}
- <CityLabel 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 + 1.7, 0]} fontSize={1.3} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
VAULT
- </CityLabel>
- <CityLabel position={[0, height + 0.85, 0]} fontSize={0.85} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
+ </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}>
{sublabel}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityBillboards.jsx b/client/src/components/openworld/OpenWorldBillboards.jsx
similarity index 96%
rename from client/src/components/city/CityBillboards.jsx
rename to client/src/components/openworld/OpenWorldBillboards.jsx
index debd97ba2b..8f0f13b8a7 100644
--- a/client/src/components/city/CityBillboards.jsx
+++ b/client/src/components/openworld/OpenWorldBillboards.jsx
@@ -2,9 +2,9 @@ import { useRef, useMemo, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import { Text } from '@react-three/drei';
import * as THREE from 'three';
-import { computeDistrictBounds } from '../../utils/cityMiniMap';
-import { PIXEL_FONT_URL } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
+import { computeDistrictBounds } from '../../utils/openWorldMiniMap';
+import { PIXEL_FONT_URL } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
// Holographic scan line shader for billboard overlay
const SCAN_VERT = `
@@ -216,8 +216,8 @@ function Billboard({ position, rotation, messages, color, width = 3.5, height =
);
}
-export default function CityBillboards({ positions, apps, cosStatus, reviewCounts, instances, productivityData }) {
- const { neonAccents } = useCityPalette();
+export default function OpenWorldBillboards({ positions, apps, cosStatus, reviewCounts, instances, productivityData }) {
+ const { neonAccents } = useOpenWorldPalette();
// Build billboard messages from real system data
const billboardConfig = useMemo(() => {
if (!positions || positions.size < 2) return [];
diff --git a/client/src/components/city/CityCelestial.jsx b/client/src/components/openworld/OpenWorldCelestial.jsx
similarity index 96%
rename from client/src/components/city/CityCelestial.jsx
rename to client/src/components/openworld/OpenWorldCelestial.jsx
index fdc5167d9a..d84036b26b 100644
--- a/client/src/components/city/CityCelestial.jsx
+++ b/client/src/components/openworld/OpenWorldCelestial.jsx
@@ -1,7 +1,7 @@
import { useRef, useMemo, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { CITY_COLORS, getTimeOfDayPreset } from './cityConstants';
+import { CITY_COLORS, getTimeOfDayPreset } from './openWorldConstants';
// Orbital ring line geometry
function OrbitalRing({ radius, tilt, color, opacity = 0.15, nightFactorRef }) {
@@ -63,7 +63,7 @@ function Moon({ position, size = 0.4, color = '#64748b', nightFactorRef }) {
);
}
-export default function CityCelestial({ settings }) {
+export default function OpenWorldCelestial({ settings }) {
const planetRef = useRef();
const ringGroupRef = useRef();
const ringMatRef = useRef();
diff --git a/client/src/components/city/CityDataHarbor.jsx b/client/src/components/openworld/OpenWorldDataHarbor.jsx
similarity index 80%
rename from client/src/components/city/CityDataHarbor.jsx
rename to client/src/components/openworld/OpenWorldDataHarbor.jsx
index d19b2624c8..c4a14205de 100644
--- a/client/src/components/city/CityDataHarbor.jsx
+++ b/client/src/components/openworld/OpenWorldDataHarbor.jsx
@@ -1,17 +1,17 @@
import { useMemo, useRef, useState, useCallback } from 'react';
import { useFrame } from '@react-three/fiber';
import { Html } from '@react-three/drei';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeDataHarbor, DATA_HARBOR } from '../../utils/cityDataHarbor';
-import { WORLD, AVENUE_WIDTH } from '../../utils/cityPlan';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeDataHarbor, DATA_HARBOR } from '../../utils/openWorldDataHarbor';
+import { WORLD, AVENUE_WIDTH } from '../../utils/openWorldPlan';
-// CyberCity's Data Harbor: a pier district over the bay (master plan, north shore) that
-// renders GET /api/city/introspection — the database quay (one disk-stack silo per Postgres
+// OpenWorld's Data Harbor: a pier district over the bay (master plan, north shore) that
+// renders GET /api/openworld/introspection — the database quay (one disk-stack silo per Postgres
// table, an orbiting ring on pgvector tables, a migration obelisk) beside the archive racks
// (one container rack per data/ domain, lit slats tracking disk usage). Clicking a silo or
-// rack opens a holographic detail card. Mirrors CityMemoryDistrict: the pure helper does
+// rack opens a holographic detail card. Mirrors OpenWorldMemoryDistrict: the pure helper does
// all topology, this component only renders + animates.
const DECK_COLOR = '#10182a';
@@ -86,12 +86,12 @@ function TableSilo({ silo, color, onSelect, registerRing, dayMix }) {
<meshBasicMaterial color={color} transparent opacity={0.7} toneMapped={false} />
</mesh>
)}
- <CityLabel position={[0, silo.height + 1.5, 0]} fontSize={0.42} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
+ <OpenWorldLabel position={[0, silo.height + 1.5, 0]} fontSize={0.42} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
{silo.label}
- </CityLabel>
- <CityLabel position={[0, silo.height + 1.05, 0]} fontSize={0.3} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[0, silo.height + 1.05, 0]} fontSize={0.3} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
{silo.sublabel}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
@@ -128,12 +128,12 @@ function DomainRack({ rack, accent, tintStructure, onSelect, dayMix }) {
);
})}
</group>
- <CityLabel position={[0, rack.height + 1.2, 0]} fontSize={0.42} color={accent} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
+ <OpenWorldLabel position={[0, rack.height + 1.2, 0]} fontSize={0.42} color={accent} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
{rack.label}
- </CityLabel>
- <CityLabel position={[0, rack.height + 0.75, 0]} fontSize={0.3} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[0, rack.height + 0.75, 0]} fontSize={0.3} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={7}>
{rack.sublabel}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
@@ -165,11 +165,11 @@ function PierDeck({ x, z, width, depth, tintStructure }) {
);
}
-export default function CityDataHarbor({ introspection, settings }) {
- const { accent, tintStructure, getAccentColor } = useCityPalette();
+export default function OpenWorldDataHarbor({ introspection, settings }) {
+ const { accent, tintStructure, getAccentColor } = useOpenWorldPalette();
const district = useMemo(() => computeDataHarbor(introspection), [introspection]);
const [selected, setSelected] = useState(null);
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
const animate = (settings?.particleDensity ?? 1) >= 0.5;
// All pgvector rings spin from one frame callback (single mutation site). Keyed by
@@ -228,9 +228,9 @@ export default function CityDataHarbor({ introspection, settings }) {
<octahedronGeometry args={[0.9, 0]} />
<meshStandardMaterial color={OFFLINE_COLOR} emissive={OFFLINE_COLOR} emissiveIntensity={0.8} toneMapped={false} />
</mesh>
- <CityLabel position={[0, 3.4, 0]} fontSize={0.7} color={OFFLINE_COLOR} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={10}>
+ <OpenWorldLabel position={[0, 3.4, 0]} fontSize={0.7} color={OFFLINE_COLOR} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={10}>
DB OFFLINE
- </CityLabel>
+ </OpenWorldLabel>
</group>
)}
@@ -256,25 +256,25 @@ export default function CityDataHarbor({ introspection, settings }) {
<octahedronGeometry args={[0.45, 0]} />
<meshStandardMaterial color={accent} emissive={accent} emissiveIntensity={0.7} toneMapped={false} />
</mesh>
- <CityLabel position={[0, 5, 0]} fontSize={0.42} color={accent} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={8}>
+ <OpenWorldLabel position={[0, 5, 0]} fontSize={0.42} color={accent} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={8}>
{`${obelisk.applied} MIGRATIONS`}
- </CityLabel>
+ </OpenWorldLabel>
</group>
)}
{/* District title + totals, tall enough to read from the shore. */}
- <CityLabel position={[bx, 11, bz - 2]} fontSize={1.4} color={accent} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <OpenWorldLabel position={[bx, 11, bz - 2]} fontSize={1.4} color={accent} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
DATA HARBOR
- </CityLabel>
- <CityLabel position={[bx, 9.9, bz - 2]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={34}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[bx, 9.9, bz - 2]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={34}>
{dbDown
? (totals.fsLabel ? `FILES ${totals.fsLabel}` : 'NO DATA')
: `${totals.tableCount} TABLES${totals.dbSizeLabel ? ` ${totals.dbSizeLabel}` : ''}${totals.fsLabel ? ` • FILES ${totals.fsLabel}` : ''}`}
- </CityLabel>
+ </OpenWorldLabel>
{(overflow.tables > 0 || overflow.domains > 0) && (
- <CityLabel position={[bx, 9.1, bz - 2]} fontSize={0.45} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <OpenWorldLabel position={[bx, 9.1, bz - 2]} fontSize={0.45} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
{`+${overflow.tables + overflow.domains} MORE`}
- </CityLabel>
+ </OpenWorldLabel>
)}
{selected && <HarborHoloCard selected={selected} />}
diff --git a/client/src/components/city/CityDataRain.jsx b/client/src/components/openworld/OpenWorldDataRain.jsx
similarity index 95%
rename from client/src/components/city/CityDataRain.jsx
rename to client/src/components/openworld/OpenWorldDataRain.jsx
index 509d252742..9f0a41e140 100644
--- a/client/src/components/city/CityDataRain.jsx
+++ b/client/src/components/openworld/OpenWorldDataRain.jsx
@@ -1,7 +1,7 @@
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { seededRand } from './cityConstants';
+import { seededRand } from './openWorldConstants';
// Matrix-style cascading data columns falling through the sky
@@ -54,10 +54,10 @@ const DATA_RAIN_FRAG = `
}
`;
-export default function CityDataRain({ settings }) {
+export default function OpenWorldDataRain({ settings }) {
const pointsRef = useRef();
const matRef = useRef();
- // Follow CityParticles' quality-dial pattern: scale column count down under the
+ // Follow OpenWorldParticles' quality-dial pattern: scale column count down under the
// adaptive-quality low tier instead of paying for a fixed 480-point system always.
const density = settings?.particleDensity ?? 1;
diff --git a/client/src/components/city/CityDataStreams.jsx b/client/src/components/openworld/OpenWorldDataStreams.jsx
similarity index 95%
rename from client/src/components/city/CityDataStreams.jsx
rename to client/src/components/openworld/OpenWorldDataStreams.jsx
index 9ef4e43380..f57f025743 100644
--- a/client/src/components/city/CityDataStreams.jsx
+++ b/client/src/components/openworld/OpenWorldDataStreams.jsx
@@ -1,7 +1,7 @@
import { useRef, useMemo, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { computeFlowConnections } from '../../utils/cityFlowLines';
+import { computeFlowConnections } from '../../utils/openWorldFlowLines';
// A single animated data packet traveling along a path
function DataPacket({ start, end, color, speed, offset, size = 0.08 }) {
@@ -60,7 +60,7 @@ function DataPacket({ start, end, color, speed, offset, size = 0.08 }) {
);
}
-export default function CityDataStreams({ positions, apps, agentMap }) {
+export default function OpenWorldDataStreams({ positions, apps, agentMap }) {
// Derive the real operational state the flow topology is built from: which
// buildings are online (flow sources) and which currently have running agents
// (hot links). The pure helper turns that into the connection set so this
diff --git a/client/src/components/city/CityDepthOfField.jsx b/client/src/components/openworld/OpenWorldDepthOfField.jsx
similarity index 92%
rename from client/src/components/city/CityDepthOfField.jsx
rename to client/src/components/openworld/OpenWorldDepthOfField.jsx
index 4254cede9a..0d78c0ea6d 100644
--- a/client/src/components/city/CityDepthOfField.jsx
+++ b/client/src/components/openworld/OpenWorldDepthOfField.jsx
@@ -4,16 +4,16 @@ import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
import { BokehPass } from 'three/addons/postprocessing/BokehPass.js';
-import { getDofParams } from '../../utils/cityPhotoMode';
+import { getDofParams } from '../../utils/openWorldPhotoMode';
-// Depth-of-field postprocessing for photo mode (roadmap 3.3). CyberCity ships NO postprocessing
+// Depth-of-field postprocessing for photo mode (roadmap 3.3). OpenWorld ships NO postprocessing
// library — the city's "bloom" is hand-tuned emissive/additive materials, not a composer pass —
// so DoF is the first composited effect. Rather than add a new npm dependency
// (`@react-three/postprocessing`) or hand-roll a circle-of-confusion shader, this uses the
// BokehPass + EffectComposer that already ship inside three's addons (`three/addons/*`), so it
// adds depth-of-field with zero new packages.
//
-// This component is mounted ONLY while photo mode is active (see CityScene), so the live dashboard
+// This component is mounted ONLY while photo mode is active (see OpenWorldScene), so the live dashboard
// frameloop never pays for the extra render targets. While mounted it takes over the render loop
// via a positive-priority useFrame (React Three Fiber then skips its own auto-render) and drives
// the scene through a RenderPass → BokehPass → OutputPass chain. The focal plane is derived per
@@ -23,7 +23,7 @@ import { getDofParams } from '../../utils/cityPhotoMode';
// `enabled` toggles only the BokehPass — the composer keeps driving the frame either way (with the
// pass off the image matches the plain RenderPass → OutputPass output), so flipping DoF on/off in
// photo mode never churns the render-loop ownership or strands a frozen demand-mode frame.
-export default function CityDepthOfField({ presetId, enabled = true, composerRef }) {
+export default function OpenWorldDepthOfField({ presetId, enabled = true, composerRef }) {
const { gl, scene, camera, size, invalidate } = useThree();
// Build the composer + passes once. BokehPass reads camera.near/far/aspect each render, so the
@@ -47,7 +47,7 @@ export default function CityDepthOfField({ presetId, enabled = true, composerRef
// effect below so changing it doesn't rebuild the whole composer.
}, [gl, scene, camera]);
- // Expose the composer so the capture path (CityPhotoCamera) renders the DoF frame too, instead
+ // Expose the composer so the capture path (OpenWorldPhotoCamera) renders the DoF frame too, instead
// of bypassing it with a plain gl.render. Cleared on unmount so capture falls back to direct
// rendering the moment photo mode (and this component) goes away.
useEffect(() => {
diff --git a/client/src/components/city/CityEasterEggs.jsx b/client/src/components/openworld/OpenWorldEasterEggs.jsx
similarity index 71%
rename from client/src/components/city/CityEasterEggs.jsx
rename to client/src/components/openworld/OpenWorldEasterEggs.jsx
index ac60004a2b..7aa545b40b 100644
--- a/client/src/components/city/CityEasterEggs.jsx
+++ b/client/src/components/openworld/OpenWorldEasterEggs.jsx
@@ -1,15 +1,15 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
import { useTimeTick } from '../../hooks/useTimeTick';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import CityLabel from './CityLabel';
-import { computeEasterEggs, EGGS } from '../../utils/cityEasterEggs';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeEasterEggs, EGGS } from '../../utils/openWorldEasterEggs';
-// CyberCity's easter eggs (roadmap 3.5 follow-up, #824): rare, hidden emblems that only appear
+// OpenWorld's easter eggs (roadmap 3.5 follow-up, #824): rare, hidden emblems that only appear
// when a special condition is met (a developer's date, a "leet" level, a palindrome streak, a
// clean-sweep goal board). Tucked in a quiet far corner so they read as a discovery, not a
// featured district. Each egg is a small glowing icosahedron with a tiny glyph label; they bob
-// (each on its own phase offset) gated on the quality dial (mirrors CityArtifacts).
+// (each on its own phase offset) gated on the quality dial (mirrors OpenWorldArtifacts).
function Egg({ egg, animate, dayMix = 0 }) {
const { color, label, hint, position, phase } = egg;
const s = EGGS.size;
@@ -35,23 +35,23 @@ function Egg({ egg, animate, dayMix = 0 }) {
<pointLight color={color} intensity={1.1} distance={8} />
{/* Tiny glyph so the egg hints at what it is without spelling it out. */}
- <CityLabel position={[0, s + 0.5, 0]} fontSize={0.45} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
+ <OpenWorldLabel position={[0, s + 0.5, 0]} fontSize={0.45} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={6}>
{label}
- </CityLabel>
+ </OpenWorldLabel>
{/* A muted hint sits below the glyph — the discovery payoff up close, kept small and dim
so eggs still read as "hidden" from across the city. */}
- <CityLabel position={[0, s - 0.4, 0]} fontSize={0.28} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={8}>
+ <OpenWorldLabel position={[0, s - 0.4, 0]} fontSize={0.28} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={8}>
{hint}
- </CityLabel>
+ </OpenWorldLabel>
</group>
</group>
);
}
-export default function CityEasterEggs({ date, character, goals, productivityData, settings }) {
+export default function OpenWorldEasterEggs({ date, character, goals, productivityData, settings }) {
// Re-resolve unlocked eggs as real time advances so calendar eggs (e.g. April 1) turn over at the
- // day boundary while CyberCity stays open — an hourly tick is plenty and battery-friendly (shared
+ // day boundary while OpenWorld stays open — an hourly tick is plenty and battery-friendly (shared
// singleton timer, paused while hidden). An explicit `date` prop still wins for callers/tests.
const tick = useTimeTick(3600000);
const cluster = useMemo(
@@ -61,7 +61,7 @@ export default function CityEasterEggs({ date, character, goals, productivityDat
// Honor the quality dial: drop the bob on the lowest preset, keep the static glow.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
if (!cluster.hasData) return null;
@@ -74,9 +74,9 @@ export default function CityEasterEggs({ date, character, goals, productivityDat
))}
{/* A faint marker so a found cluster has a label, kept small to preserve the "hidden" feel. */}
- <CityLabel position={[base[0], 6, base[2]]} fontSize={0.7} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <OpenWorldLabel position={[base[0], 6, base[2]]} fontSize={0.7} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
:)
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityEmbers.jsx b/client/src/components/openworld/OpenWorldEmbers.jsx
similarity index 93%
rename from client/src/components/city/CityEmbers.jsx
rename to client/src/components/openworld/OpenWorldEmbers.jsx
index a2690a5666..a10ad5e3e8 100644
--- a/client/src/components/city/CityEmbers.jsx
+++ b/client/src/components/openworld/OpenWorldEmbers.jsx
@@ -1,7 +1,7 @@
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { seededRand } from './cityConstants';
+import { seededRand } from './openWorldConstants';
// Rising ember/spark particles that float upward from the city streets
@@ -52,10 +52,10 @@ const EMBER_FRAG = `
}
`;
-export default function CityEmbers({ settings }) {
+export default function OpenWorldEmbers({ settings }) {
const pointsRef = useRef();
const matRef = useRef();
- // Follow CityParticles' quality-dial pattern: scale ember count down under the
+ // Follow OpenWorldParticles' quality-dial pattern: scale ember count down under the
// adaptive-quality low tier instead of paying for a fixed 120-point system always.
const density = settings?.particleDensity ?? 1;
@@ -75,7 +75,7 @@ export default function CityEmbers({ settings }) {
[0.4, 0.3, 1.0], // blue
];
- // Seeded, like CityDataRain: `density` is clamped for the first 1.2s of
+ // Seeded, like OpenWorldDataRain: `density` is clamped for the first 1.2s of
// every mount and every visibility resume, so this memo re-runs on a
// boundary the user is looking at. Bare Math.random() re-draws every
// position and color there — the whole ember field teleports rather than
diff --git a/client/src/components/city/CityEnergyOverlay.jsx b/client/src/components/openworld/OpenWorldEnergyOverlay.jsx
similarity index 82%
rename from client/src/components/city/CityEnergyOverlay.jsx
rename to client/src/components/openworld/OpenWorldEnergyOverlay.jsx
index bf386e37c0..b0c7ac5ce6 100644
--- a/client/src/components/city/CityEnergyOverlay.jsx
+++ b/client/src/components/openworld/OpenWorldEnergyOverlay.jsx
@@ -1,21 +1,21 @@
import { useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { computeChronotypeEnergy } from '../../utils/cityChronotype';
+import { computeChronotypeEnergy } from '../../utils/openWorldChronotype';
-// CyberCity's chronotype energy overlay (roadmap 3.1): a subtle ambient atmosphere
+// OpenWorld's chronotype energy overlay (roadmap 3.1): a subtle ambient atmosphere
// that brightens and warms the city during the user's peak focus hours and dims it
// during wind-down and recovery hours. It does NOT replace the scene lighting
-// (CityLights) — it composes on top with a single gentle, energy-tinted ambient
+// (OpenWorldLights) — it composes on top with a single gentle, energy-tinted ambient
// light so the user's circadian rhythm reads as the city's mood. No label; it's
// pure ambiance.
//
-// The pure helper (cityChronotype.js) takes the hour as a parameter for testability;
+// The pure helper (openWorldChronotype.js) takes the hour as a parameter for testability;
// the live hour is computed here in the component.
// Energy mid-point — at neutral energy the overlay contributes almost nothing.
const BASE_INTENSITY = 0.12;
-export default function CityEnergyOverlay({ chronotype, settings }) {
+export default function OpenWorldEnergyOverlay({ chronotype, settings }) {
const lightRef = useRef();
// Honor the quality dial: skip the per-frame energy lerp on the lowest preset, but
@@ -46,7 +46,7 @@ export default function CityEnergyOverlay({ chronotype, settings }) {
});
// A warm-tinted ambient fill — peak hours glow a touch warmer/brighter, recovery
- // hours fade it toward nothing. Faint by design so it layers over CityLights
+ // hours fade it toward nothing. Faint by design so it layers over OpenWorldLights
// without washing out the existing palette.
return <ambientLight ref={lightRef} intensity={BASE_INTENSITY} color="#ffd9a0" />;
}
diff --git a/client/src/components/city/OpenWorldFastTravel.jsx b/client/src/components/openworld/OpenWorldFastTravel.jsx
similarity index 79%
rename from client/src/components/city/OpenWorldFastTravel.jsx
rename to client/src/components/openworld/OpenWorldFastTravel.jsx
index f2a4b5d4cd..5749e4e3f5 100644
--- a/client/src/components/city/OpenWorldFastTravel.jsx
+++ b/client/src/components/openworld/OpenWorldFastTravel.jsx
@@ -1,8 +1,9 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import Modal from '../ui/Modal';
-import { MINI_MAP_PADDING, projectGeography, projectPoint } from '../../utils/cityMiniMap';
+import { MINI_MAP_PADDING, projectGeography, projectPoint, spreadProjectedPoints } from '../../utils/openWorldMiniMap';
import { listRegions, searchRegions } from '../../utils/openWorldRegions';
-import { WORLD } from '../../utils/cityPlan';
+import { WORLD } from '../../utils/openWorldPlan';
+import useOpenWorldViewport from '../../hooks/useOpenWorldViewport';
// OpenWorld's fast-travel panel — the thing that makes this an open world rather than one
// city you pan around. Every named region is a warp destination: pick one and the camera
@@ -15,9 +16,9 @@ import { WORLD } from '../../utils/cityPlan';
//
// The dialog chrome (backdrop, Esc, click-outside, focus trap, and the module-scope Esc
// stack that keeps layered dialogs from both closing on one keystroke) comes from the shared
-// <Modal> primitive — the same one CityPhotoOverlay's postcard uses. Portaled, which is safe
+// <Modal> primitive — the same one OpenWorldPhotoOverlay's postcard uses. Portaled, which is safe
// here because every class this panel wears (`port-media-overlay*`) is global rather than
-// scoped under `.cybercity-themed`.
+// 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.
@@ -35,10 +36,19 @@ const GEOGRAPHY = projectGeography(MAP_BOUNDS, MINI_MAP_PADDING);
export default function OpenWorldFastTravel({ open, onClose, onTravel, activeRegionId, onOpenPage, onLeaveRegion }) {
const [query, setQuery] = useState('');
const inputRef = useRef(null);
+ const { isCondensed } = useOpenWorldViewport();
const regions = useMemo(() => listRegions(), []);
const matches = useMemo(() => searchRegions(query), [query]);
const matchIds = useMemo(() => new Set(matches.map((r) => r.id)), [matches]);
+ const mapMarkers = useMemo(
+ () => spreadProjectedPoints(regions.map((region) => {
+ const { nx, ny } = projectPoint({ x: region.anchor[0], z: region.anchor[2] }, MAP_BOUNDS, MINI_MAP_PADDING);
+ return { id: region.id, nx, ny };
+ })),
+ [regions],
+ );
+ const markersById = useMemo(() => new Map(mapMarkers.map((marker) => [marker.id, marker])), [mapMarkers]);
// Reopening always starts from the full list — a stale filter from the last visit would
// read as "half my world is missing".
@@ -101,9 +111,13 @@ export default function OpenWorldFastTravel({ open, onClose, onTravel, activeReg
<div className="flex-1 min-h-0 grid grid-cols-1 md:grid-cols-[220px_1fr] gap-3 p-3 overflow-hidden">
{/* World plate — regions in their real plan positions, so the list and the map
- can't disagree about where a place is. Hidden on phones where it would be
- too small to aim at; the list below is the full-capability control. */}
- <div className="hidden md:block relative aspect-square rounded-lg border border-current/15 overflow-hidden">
+ can't disagree about where a place is. Compact viewports get a full-width
+ touch-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`}
+ role="region"
+ aria-label="World map"
+ >
<div className="absolute inset-0 bg-current/5" />
{GEOGRAPHY && (
<div
@@ -113,7 +127,7 @@ export default function OpenWorldFastTravel({ open, onClose, onTravel, activeReg
/>
)}
{regions.map((region) => {
- const { nx, ny } = projectPoint({ x: region.anchor[0], z: region.anchor[2] }, MAP_BOUNDS, MINI_MAP_PADDING);
+ const { nx, ny } = markersById.get(region.id);
const isActive = region.id === activeRegionId;
const isMatch = matchIds.has(region.id);
return (
@@ -123,15 +137,17 @@ export default function OpenWorldFastTravel({ open, onClose, onTravel, activeReg
title={region.label}
aria-label={`Travel to ${region.label}`}
onClick={() => travel(region)}
- className={`absolute -translate-x-1/2 -translate-y-1/2 rounded-full border transition-all ${
+ className={`absolute -translate-x-1/2 -translate-y-1/2 rounded-full border transition-all flex items-center justify-center ${
isActive
- ? 'w-3.5 h-3.5 border-current bg-current'
+ ? 'w-11 h-11 md:w-3.5 md:h-3.5 border-current bg-current'
: isMatch
- ? 'w-2.5 h-2.5 border-current/70 bg-current/50 hover:w-3.5 hover:h-3.5'
- : 'w-2 h-2 border-current/20 bg-current/10'
+ ? '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'
}`}
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" />
+ </button>
);
})}
</div>
diff --git a/client/src/components/city/OpenWorldFastTravel.test.jsx b/client/src/components/openworld/OpenWorldFastTravel.test.jsx
similarity index 100%
rename from client/src/components/city/OpenWorldFastTravel.test.jsx
rename to client/src/components/openworld/OpenWorldFastTravel.test.jsx
diff --git a/client/src/components/city/CityFederationHorizon.jsx b/client/src/components/openworld/OpenWorldFederationHorizon.jsx
similarity index 85%
rename from client/src/components/city/CityFederationHorizon.jsx
rename to client/src/components/openworld/OpenWorldFederationHorizon.jsx
index eeb1c6bd9d..a9c61abf1f 100644
--- a/client/src/components/city/CityFederationHorizon.jsx
+++ b/client/src/components/openworld/OpenWorldFederationHorizon.jsx
@@ -1,10 +1,10 @@
import { useMemo, useRef, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeFederationHorizon, FEDERATION } from '../../utils/cityFederation';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeFederationHorizon, FEDERATION } from '../../utils/openWorldFederation';
// The sync link reaching inward from a peer toward the city. Solid + bright when
// the peer is actively syncing, dashed when the link is broken (offline / failing),
@@ -49,7 +49,7 @@ function FederationBridge({ from, color, broken, intensity }) {
// A distant peer (or the void marker) rendered as a neon-trimmed silhouette.
function Monolith({ position, width, height, color, opacity, label, sublabel, online, animate, dayMix = 0 }) {
- const { tintStructure } = useCityPalette();
+ const { tintStructure } = useOpenWorldPalette();
const capRef = useRef();
useFrame(({ clock }) => {
@@ -78,20 +78,20 @@ function Monolith({ position, width, height, color, opacity, label, sublabel, on
<meshStandardMaterial color={color} emissive={color} emissiveIntensity={online ? 0.9 : 0.4} transparent opacity={Math.min(1, opacity + 0.4)} depthWrite={false} />
</mesh>
{label && (
- <CityLabel position={[0, height + 2.2, 0]} fontSize={1.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <OpenWorldLabel position={[0, height + 2.2, 0]} fontSize={1.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
{label}
- </CityLabel>
+ </OpenWorldLabel>
)}
{sublabel && (
- <CityLabel position={[0, height + 0.9, 0]} fontSize={1.0} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <OpenWorldLabel position={[0, height + 0.9, 0]} fontSize={1.0} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
{sublabel}
- </CityLabel>
+ </OpenWorldLabel>
)}
</group>
);
}
-export default function CityFederationHorizon({ instances, settings }) {
+export default function OpenWorldFederationHorizon({ instances, settings }) {
const { peers, voidMarker } = useMemo(
() => computeFederationHorizon(instances?.peers),
[instances],
@@ -100,7 +100,7 @@ export default function CityFederationHorizon({ instances, settings }) {
// The horizon is a handful of distant static meshes, but honor the quality
// dial: drop the gentle peer pulse on the lowest preset.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
return (
<group>
diff --git a/client/src/components/city/CityFilterBar.jsx b/client/src/components/openworld/OpenWorldFilterBar.jsx
similarity index 93%
rename from client/src/components/city/CityFilterBar.jsx
rename to client/src/components/openworld/OpenWorldFilterBar.jsx
index 2cf632c385..630cccbbcd 100644
--- a/client/src/components/city/CityFilterBar.jsx
+++ b/client/src/components/openworld/OpenWorldFilterBar.jsx
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react';
-import { STATUS_FILTERS } from '../../utils/cityFilter';
+import { STATUS_FILTERS } from '../../utils/openWorldFilter';
-export default function CityFilterBar({ filter, onChange, matchCount, onJumpToFirst, compact = false }) {
+export default function OpenWorldFilterBar({ filter, onChange, matchCount, onJumpToFirst, compact = false }) {
const inputRef = useRef(null);
const filterRef = useRef(filter);
const onChangeRef = useRef(onChange);
@@ -36,7 +36,7 @@ export default function CityFilterBar({ filter, onChange, matchCount, onJumpToFi
onJumpToFirst?.();
};
- // Compact/mobile context (rendered inside the CityHudCompact filter sheet) needs a real
+ // Compact/mobile context (rendered inside the OpenWorldHudCompact filter sheet) needs a real
// ≥44px touch target; the dense desktop bar keeps its small px-2 py-1 chips.
const chipBaseClass = compact
? 'font-pixel text-[10px] tracking-wider px-3 min-h-[44px] flex items-center rounded border transition-colors'
diff --git a/client/src/components/city/CityFilterBar.test.jsx b/client/src/components/openworld/OpenWorldFilterBar.test.jsx
similarity index 90%
rename from client/src/components/city/CityFilterBar.test.jsx
rename to client/src/components/openworld/OpenWorldFilterBar.test.jsx
index a11eab9f59..dfdc192760 100644
--- a/client/src/components/city/CityFilterBar.test.jsx
+++ b/client/src/components/openworld/OpenWorldFilterBar.test.jsx
@@ -1,12 +1,12 @@
import { describe, it, expect, vi } from 'vitest';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
-import CityFilterBar from './CityFilterBar';
+import OpenWorldFilterBar from './OpenWorldFilterBar';
const baseFilter = { status: 'all', search: '' };
const renderBar = (props = {}) =>
render(
- <CityFilterBar
+ <OpenWorldFilterBar
filter={baseFilter}
onChange={() => {}}
matchCount={0}
@@ -15,7 +15,7 @@ const renderBar = (props = {}) =>
/>
);
-describe('CityFilterBar', () => {
+describe('OpenWorldFilterBar', () => {
it('pressing / (not already typing) opens and focuses the search field', async () => {
renderBar();
// Closed by default: the search trigger button is shown, not the input.
@@ -42,7 +42,7 @@ describe('CityFilterBar', () => {
render(
<>
<input aria-label="Unrelated field" />
- <CityFilterBar filter={baseFilter} onChange={() => {}} matchCount={0} onJumpToFirst={() => {}} />
+ <OpenWorldFilterBar filter={baseFilter} onChange={() => {}} matchCount={0} onJumpToFirst={() => {}} />
</>
);
const otherInput = screen.getByLabelText('Unrelated field');
@@ -62,7 +62,7 @@ describe('CityFilterBar', () => {
expect(defaultChip.className).not.toContain('min-h-[44px]');
rerender(
- <CityFilterBar
+ <OpenWorldFilterBar
filter={baseFilter}
onChange={() => {}}
matchCount={0}
diff --git a/client/src/components/city/CityFocusCamera.jsx b/client/src/components/openworld/OpenWorldFocusCamera.jsx
similarity index 96%
rename from client/src/components/city/CityFocusCamera.jsx
rename to client/src/components/openworld/OpenWorldFocusCamera.jsx
index 745b476847..b302be6a9a 100644
--- a/client/src/components/city/CityFocusCamera.jsx
+++ b/client/src/components/openworld/OpenWorldFocusCamera.jsx
@@ -2,8 +2,8 @@ import { useRef, useEffect, useMemo } from 'react';
import { useThree, useFrame } from '@react-three/fiber';
import * as THREE from 'three';
import { smoothstep } from '../../utils/easing';
-import { computeFocusCamera, computeRegionCamera } from '../../utils/cityFocusCamera';
-import { computeDistrictBounds } from '../../utils/cityMiniMap';
+import { computeFocusCamera, computeRegionCamera } from '../../utils/openWorldFocusCamera';
+import { computeDistrictBounds } from '../../utils/openWorldMiniMap';
// In-canvas camera controller for OpenWorld's two URL-addressed camera targets: a single
// building (`/openworld/apps/:appId`, issue #2593) and a whole fast-travel region
@@ -31,7 +31,7 @@ const deriveLookAt = (camera) => {
return camera.position.clone().add(dir.multiplyScalar(10));
};
-export default function CityFocusCamera({ focusedAppId, focusedRegion, positions, orbitRef, active = true, hudSafe }) {
+export default function OpenWorldFocusCamera({ focusedAppId, focusedRegion, positions, orbitRef, active = true, hudSafe }) {
const { camera, size } = useThree();
// `null` = overview (no fly needed on a plain /openworld mount). A transition into/out of focus flips
// this and starts a fly.
diff --git a/client/src/components/city/CityFocusPanel.jsx b/client/src/components/openworld/OpenWorldFocusPanel.jsx
similarity index 97%
rename from client/src/components/city/CityFocusPanel.jsx
rename to client/src/components/openworld/OpenWorldFocusPanel.jsx
index a69c6ac416..47873186a8 100644
--- a/client/src/components/city/CityFocusPanel.jsx
+++ b/client/src/components/openworld/OpenWorldFocusPanel.jsx
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
// Building-detail panel shown while a borough is focused (issue #2593). It REPLACES the Intel pane
// (desktop) / renders as a bottom sheet (compact) — never overlapping it — and surfaces the app's
-// live state from data CyberCity already has: status, process summary + unhealthy processes, and the
+// live state from data OpenWorld already has: status, process summary + unhealthy processes, and the
// agents assigned to the app. Two explicit actions: Open app (routes to /apps/:id) and Close
// (returns to the /city overview). Also renders the stale/deleted-id "not found" fallback.
@@ -25,7 +25,7 @@ function StatBlock({ label, value, tone = 'text-cyan-300' }) {
);
}
-export default function CityFocusPanel({ app, notFound = false, agents = [], onClose, onOpenApp, isDesktop = true }) {
+export default function OpenWorldFocusPanel({ app, notFound = false, agents = [], onClose, onOpenApp, isDesktop = true }) {
// Desktop: occupy the Intel-pane slot. Compact: a bottom sheet above the dock.
const containerClass = isDesktop
? 'absolute top-16 right-3 bottom-20 w-72 pointer-events-auto'
diff --git a/client/src/components/city/CityFocusPanel.test.jsx b/client/src/components/openworld/OpenWorldFocusPanel.test.jsx
similarity index 83%
rename from client/src/components/city/CityFocusPanel.test.jsx
rename to client/src/components/openworld/OpenWorldFocusPanel.test.jsx
index e42f010826..0a5522f05e 100644
--- a/client/src/components/city/CityFocusPanel.test.jsx
+++ b/client/src/components/openworld/OpenWorldFocusPanel.test.jsx
@@ -1,6 +1,6 @@
import { describe, it, expect, vi } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
-import CityFocusPanel from './CityFocusPanel';
+import OpenWorldFocusPanel from './OpenWorldFocusPanel';
const app = {
id: 'alpha',
@@ -13,9 +13,9 @@ const app = {
},
};
-describe('CityFocusPanel', () => {
+describe('OpenWorldFocusPanel', () => {
it('renders app name, status, process summary and unhealthy processes', () => {
- render(<CityFocusPanel app={app} agents={[]} />);
+ render(<OpenWorldFocusPanel app={app} agents={[]} />);
expect(screen.getByText('Alpha Service')).toBeTruthy();
// Status pill reads ONLINE (unique — the process stat block uses RUNNING).
expect(screen.getByText('ONLINE')).toBeTruthy();
@@ -31,7 +31,7 @@ describe('CityFocusPanel', () => {
{ agentId: 'a2', status: 'completed', task: 'Old done task' },
{ agentId: 'a3', state: 'error', task: 'Broke the build' },
];
- render(<CityFocusPanel app={app} agents={agents} />);
+ render(<OpenWorldFocusPanel app={app} agents={agents} />);
expect(screen.getByText('Refactor module')).toBeTruthy();
// A failed agent whose only signal is state:'error' is still surfaced.
expect(screen.getByText('Broke the build')).toBeTruthy();
@@ -41,14 +41,14 @@ describe('CityFocusPanel', () => {
it('fires onOpenApp with the app id from the explicit Open app action', () => {
const onOpenApp = vi.fn();
- render(<CityFocusPanel app={app} agents={[]} onOpenApp={onOpenApp} />);
+ render(<OpenWorldFocusPanel app={app} agents={[]} onOpenApp={onOpenApp} />);
fireEvent.click(screen.getByTitle('Open the app detail page'));
expect(onOpenApp).toHaveBeenCalledWith('alpha');
});
it('fires onClose from the close and back actions', () => {
const onClose = vi.fn();
- render(<CityFocusPanel app={app} agents={[]} onClose={onClose} />);
+ render(<OpenWorldFocusPanel app={app} agents={[]} onClose={onClose} />);
fireEvent.click(screen.getByLabelText('Close focus and return to overview'));
fireEvent.click(screen.getByTitle('Return to the city overview'));
expect(onClose).toHaveBeenCalledTimes(2);
@@ -56,7 +56,7 @@ describe('CityFocusPanel', () => {
it('renders the not-found fallback with a return-to-overview action', () => {
const onClose = vi.fn();
- render(<CityFocusPanel app={null} notFound onClose={onClose} />);
+ render(<OpenWorldFocusPanel app={null} notFound onClose={onClose} />);
expect(screen.getByText('BUILDING NOT FOUND')).toBeTruthy();
fireEvent.click(screen.getByText(/RETURN TO OVERVIEW/));
expect(onClose).toHaveBeenCalledTimes(1);
diff --git a/client/src/components/city/CityGalaxySky.jsx b/client/src/components/openworld/OpenWorldGalaxySky.jsx
similarity index 89%
rename from client/src/components/city/CityGalaxySky.jsx
rename to client/src/components/openworld/OpenWorldGalaxySky.jsx
index 8c00b63315..c54df852cf 100644
--- a/client/src/components/city/CityGalaxySky.jsx
+++ b/client/src/components/openworld/OpenWorldGalaxySky.jsx
@@ -1,7 +1,7 @@
import { useEffect } from 'react';
import { useThree, useLoader } from '@react-three/fiber';
import * as THREE from 'three';
-import { cityDayMix } from './cityConstants';
+import { openWorldDayMix } from './openWorldConstants';
const GALAXY_TEXTURE_URL = '/sky/city-night-galaxy-8k.jpg';
// Artistic yaw so the brightest stretch of the Milky Way band sits behind the city
@@ -23,12 +23,12 @@ const ENVIRONMENT_INTENSITY = 1.3;
// materials). drei's <Environment files> can't load a .png panorama (its loader only
// recognises .hdr/.exr/cube), so we do the PMREM wiring directly — the canonical setup.
//
-// Mounted only at night (CityScene gates on !showGradientBackground), so the 2.8MB
+// Mounted only at night (OpenWorldScene gates on !showGradientBackground), so the 2.8MB
// panorama isn't fetched/decoded or PMREM-processed in daylight.
-export default function CityGalaxySky({ settings }) {
+export default function OpenWorldGalaxySky({ settings }) {
const { gl, scene } = useThree();
const texture = useLoader(THREE.TextureLoader, GALAXY_TEXTURE_URL);
- const nightOpacity = Math.max(0, Math.min(1, 1 - cityDayMix(settings)));
+ const nightOpacity = Math.max(0, Math.min(1, 1 - openWorldDayMix(settings)));
// Build the PMREM environment once per texture and bind it to the scene; restore the
// previous background/environment (and free the GPU targets) when night ends / unmounts.
@@ -51,7 +51,7 @@ export default function CityGalaxySky({ settings }) {
scene.background = prevBackground;
scene.environment = prevEnvironment;
// Reset the intensities to three's defaults so the daytime color background (set by
- // CityScene once this unmounts) isn't left dimmed by the last night value.
+ // OpenWorldScene once this unmounts) isn't left dimmed by the last night value.
scene.backgroundIntensity = 1;
scene.environmentIntensity = 1;
envTarget.dispose();
diff --git a/client/src/components/city/CityGoalMonuments.jsx b/client/src/components/openworld/OpenWorldGoalMonuments.jsx
similarity index 81%
rename from client/src/components/city/CityGoalMonuments.jsx
rename to client/src/components/openworld/OpenWorldGoalMonuments.jsx
index 93c6acbaa7..365559cc4c 100644
--- a/client/src/components/city/CityGoalMonuments.jsx
+++ b/client/src/components/openworld/OpenWorldGoalMonuments.jsx
@@ -1,12 +1,12 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import CityTubeLine from './CityTubeLine';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeGoalMonuments, computeGoalForest, MONUMENTS, FOREST } from '../../utils/cityGoalMonuments';
+import OpenWorldTubeLine from './OpenWorldTubeLine';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeGoalMonuments, computeGoalForest, MONUMENTS, FOREST } from '../../utils/openWorldGoalMonuments';
-// CyberCity's goal monuments (roadmap 2.7): each life goal is a structure in a
+// OpenWorld's goal monuments (roadmap 2.7): each life goal is a structure in a
// northeast monument district. Active goals are construction sites — a built base topped
// by a translucent scaffold cage whose fill tracks progress. Completed goals are polished,
// fully-built monuments that shimmer. Stalled (active-but-quiet) and abandoned goals read
@@ -15,13 +15,13 @@ import { computeGoalMonuments, computeGoalForest, MONUMENTS, FOREST } from '../.
// translucent scaffold rung = pending). When goals form a parent→child hierarchy, the
// district switches to a goal-tree layout: each root goal is a central spire with its
// children clustered in a ring and a link drawn up to the parent apex. Mirrors
-// CityBackupVault / CityHealthTower.
+// OpenWorldBackupVault / OpenWorldHealthTower.
// Render the body of a monument: either milestone floors (when the goal has milestones)
// or the plain built/scaffold split. `shimmerRef`/`isShimmer` wires the completed-monument
// pulse onto whichever mesh carries the topmost built portion.
function MonumentBody({ monument, shimmerRef, isShimmer }) {
- const { tintStructure } = useCityPalette();
+ const { tintStructure } = useOpenWorldPalette();
const { height, width, color, opacity, intensity, built, completeness, segments } = monument;
// Milestone floors: one box per milestone, solid+emissive when done, wireframe scaffold
@@ -88,7 +88,7 @@ function MonumentBody({ monument, shimmerRef, isShimmer }) {
}
function Monument({ monument, shimmerRef, isShimmer, dayMix = 0 }) {
- const { tintStructure } = useCityPalette();
+ const { tintStructure } = useOpenWorldPalette();
const { height, width, color, opacity, intensity, position, milestoneTotal, milestoneDone, isSpire } = monument;
return (
@@ -102,12 +102,12 @@ function Monument({ monument, shimmerRef, isShimmer, dayMix = 0 }) {
<MonumentBody monument={monument} shimmerRef={shimmerRef} isShimmer={isShimmer} />
{/* Title + progress label above the structure */}
- <CityLabel position={[0, height + 1.4, 0]} fontSize={isSpire ? 0.85 : 0.7} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
+ <OpenWorldLabel position={[0, height + 1.4, 0]} fontSize={isSpire ? 0.85 : 0.7} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
{monument.title}
- </CityLabel>
- <CityLabel position={[0, height + 0.7, 0]} fontSize={0.55} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[0, height + 0.7, 0]} fontSize={0.55} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9} fillOpacity={opacity}>
{monument.built ? 'COMPLETE' : milestoneTotal > 0 ? `${milestoneDone}/${milestoneTotal} STEPS` : `${Math.round(monument.progress)}%`}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
@@ -126,14 +126,14 @@ function GoalForest({ forest, shimmerRef, shimmerId, dayMix = 0 }) {
<group key={child.id}>
<Monument monument={child} shimmerRef={shimmerRef} isShimmer={child.id === shimmerId} dayMix={dayMix} />
{child.descendantCount > 0 && (
- <CityLabel position={[child.position[0], child.height + 1.9, child.position[2]]} fontSize={0.42} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <OpenWorldLabel position={[child.position[0], child.height + 1.9, child.position[2]]} fontSize={0.42} color="#64748b" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${child.descendantCount} UNDER`}
- </CityLabel>
+ </OpenWorldLabel>
)}
</group>
))}
{cluster.links.map((link) => (
- <CityTubeLine
+ <OpenWorldTubeLine
key={link.childId}
points={[link.from, link.to]}
color={cluster.spire.color}
@@ -142,16 +142,16 @@ function GoalForest({ forest, shimmerRef, shimmerId, dayMix = 0 }) {
/>
))}
{cluster.childOverflow > 0 && (
- <CityLabel position={[cluster.spire.position[0], cluster.spire.height + 2.1, cluster.spire.position[2]]} fontSize={0.5} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <OpenWorldLabel position={[cluster.spire.position[0], cluster.spire.height + 2.1, cluster.spire.position[2]]} fontSize={0.5} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${cluster.childOverflow} SUB-GOALS`}
- </CityLabel>
+ </OpenWorldLabel>
)}
</group>
))}
{/* Root overflow — top-level goal trees past the cap, mirroring the flat row's marker */}
{forest.rootOverflow > 0 && forest.clusters.length > 0 && (
- <CityLabel
+ <OpenWorldLabel
position={[
forest.clusters[forest.clusters.length - 1].spire.position[0] + FOREST.clusterSpacing / 2,
MONUMENTS.minHeight + 2,
@@ -166,14 +166,14 @@ function GoalForest({ forest, shimmerRef, shimmerId, dayMix = 0 }) {
maxWidth={12}
>
{`+${forest.rootOverflow} MORE GOALS`}
- </CityLabel>
+ </OpenWorldLabel>
)}
</group>
);
}
-export default function CityGoalMonuments({ goals, settings }) {
- const { tintStructure } = useCityPalette();
+export default function OpenWorldGoalMonuments({ goals, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
// The API returns `{ goals: [...] }`; accept either the wrapper or a bare array.
const list = Array.isArray(goals) ? goals : goals?.goals;
const district = useMemo(() => computeGoalMonuments(list), [list]);
@@ -188,7 +188,7 @@ export default function CityGoalMonuments({ goals, settings }) {
// Honor the quality dial: drop the completed-monument shimmer on the lowest preset,
// but keep the static glow so each goal's status stays legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
// Pick the first completed monument to carry the shimmer (one per-frame ref mutation).
// In forest mode, scan spires then children; in row mode, scan the row.
@@ -245,21 +245,21 @@ export default function CityGoalMonuments({ goals, settings }) {
<boxGeometry args={[MONUMENTS.baseWidth, MONUMENTS.minHeight, MONUMENTS.baseWidth]} />
<meshStandardMaterial color={tintStructure('#0c1424')} emissive="#64748b" emissiveIntensity={0.2} metalness={0.5} roughness={0.6} />
</mesh>
- <CityLabel position={[0, MONUMENTS.minHeight + 1, 0]} fontSize={0.6} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <OpenWorldLabel position={[0, MONUMENTS.minHeight + 1, 0]} fontSize={0.6} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${overflow.count} MORE`}
- </CityLabel>
+ </OpenWorldLabel>
</group>
)}
</>
)}
{/* District title behind the row */}
- <CityLabel position={[base[0], 16, base[2] - 3]} fontSize={1.4} color="#22c55e" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <OpenWorldLabel position={[base[0], 16, base[2] - 3]} fontSize={1.4} color="#22c55e" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
GOALS
- </CityLabel>
- <CityLabel position={[base[0], 15, base[2] - 3]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[base[0], 15, base[2] - 3]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
{`${completedCount}/${total} ACHIEVED`}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityHealthTower.jsx b/client/src/components/openworld/OpenWorldHealthTower.jsx
similarity index 75%
rename from client/src/components/city/CityHealthTower.jsx
rename to client/src/components/openworld/OpenWorldHealthTower.jsx
index 02aae9e418..c3d3552d60 100644
--- a/client/src/components/city/CityHealthTower.jsx
+++ b/client/src/components/openworld/OpenWorldHealthTower.jsx
@@ -1,18 +1,18 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeHealthTower } from '../../utils/cityHealthTower';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeHealthTower } from '../../utils/openWorldHealthTower';
-// CyberCity's biometric vitals tower (roadmap 2.9): a stacked cylindrical landmark in a
+// OpenWorld's biometric vitals tower (roadmap 2.9): a stacked cylindrical landmark in a
// far-southeast wellness district. Each tier is one Apple Health metric (heart rate, steps,
// active calories, sleep) whose height and glow track that metric's latest value normalized
// against a target. A metric with no data reads as a thin dim disc (absent) — distinct from
// a present-but-zero value, which keeps its lit color. The heart-rate tier pulses like a
-// heartbeat, faster as the rate climbs. Mirrors CityBackupVault / CityTaskQueue.
+// heartbeat, faster as the rate climbs. Mirrors OpenWorldBackupVault / OpenWorldTaskQueue.
function Segment({ segment, baseRadius, isHeart, heartRef }) {
- const { tintStructure } = useCityPalette();
+ const { tintStructure } = useOpenWorldPalette();
const { height, color, intensity } = segment;
return (
<mesh ref={isHeart ? heartRef : undefined} position={[0, segment.y, 0]}>
@@ -29,15 +29,15 @@ function Segment({ segment, baseRadius, isHeart, heartRef }) {
);
}
-export default function CityHealthTower({ healthMetrics, settings }) {
- const { tintStructure } = useCityPalette();
+export default function OpenWorldHealthTower({ healthMetrics, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
const tower = useMemo(() => computeHealthTower(healthMetrics), [healthMetrics]);
const heartRef = useRef();
// Honor the quality dial: drop the heartbeat pulse on the lowest preset, but keep the
// static glow so the vitals stay legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !heartRef.current || !tower.heartPresent) return;
@@ -72,7 +72,7 @@ export default function CityHealthTower({ healthMetrics, settings }) {
{/* Per-segment side labels so each tier is identifiable */}
{segments.map((segment) => (
- <CityLabel
+ <OpenWorldLabel
key={`label-${segment.key}`}
position={[baseRadius + 0.6, segment.y, 0]}
fontSize={0.55}
@@ -84,16 +84,16 @@ export default function CityHealthTower({ healthMetrics, settings }) {
maxWidth={14}
>
{segment.present ? `${segment.label} ${segment.value}${segment.unit ? ' ' + segment.unit : ''}` : `${segment.label} —`}
- </CityLabel>
+ </OpenWorldLabel>
))}
{/* Tower title + status above the stack */}
- <CityLabel position={[0, totalHeight + 1.6, 0]} fontSize={1.2} color="#22c55e" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
+ <OpenWorldLabel position={[0, totalHeight + 1.6, 0]} fontSize={1.2} color="#22c55e" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
VITALS
- </CityLabel>
- <CityLabel position={[0, totalHeight + 0.8, 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[0, totalHeight + 0.8, 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={18}>
{hasData ? `${tower.presentCount}/${segments.length} TRACKED` : 'NO HEALTH DATA'}
- </CityLabel>
+ </OpenWorldLabel>
</group>
</group>
);
diff --git a/client/src/components/city/CityHud.jsx b/client/src/components/openworld/OpenWorldHud.jsx
similarity index 91%
rename from client/src/components/city/CityHud.jsx
rename to client/src/components/openworld/OpenWorldHud.jsx
index f133675108..21b4b35cf5 100644
--- a/client/src/components/city/CityHud.jsx
+++ b/client/src/components/openworld/OpenWorldHud.jsx
@@ -1,15 +1,15 @@
import { useState, useEffect, useMemo, useRef } from 'react';
import { useNavigate, useLocation } from 'react-router';
-import CityIntelPane from './CityIntelPane';
-import CityFocusPanel from './CityFocusPanel';
-import CityAgentBar from './CityAgentBar';
-import CityFilterBar from './CityFilterBar';
-import CityXpBadge from './CityXpBadge';
-import CityMiniMap from './CityMiniMap';
-import CityVitalsList from './CityVitalsList';
-import CityHudCompact from './CityHudCompact';
-import { HudCorner, HealthBar, getHealthSentinel } from './cityHudBits';
-import useCityViewport from '../../hooks/useCityViewport';
+import OpenWorldIntelPane from './OpenWorldIntelPane';
+import OpenWorldFocusPanel from './OpenWorldFocusPanel';
+import OpenWorldAgentBar from './OpenWorldAgentBar';
+import OpenWorldFilterBar from './OpenWorldFilterBar';
+import OpenWorldXpBadge from './OpenWorldXpBadge';
+import OpenWorldMiniMap from './OpenWorldMiniMap';
+import OpenWorldVitalsList from './OpenWorldVitalsList';
+import OpenWorldHudCompact from './OpenWorldHudCompact';
+import { HudCorner, HealthBar, getHealthSentinel } from './openWorldHudBits';
+import useOpenWorldViewport from '../../hooks/useOpenWorldViewport';
import { formatClockTime } from '../../utils/formatters';
// WASD controls hint shown briefly on first exploration entry
@@ -70,11 +70,11 @@ function Crosshair() {
);
}
-export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, connected, apps, reviewCounts, instances, productivityData, systemHealth, notificationCounts, character, filter, onFilterChange, onJumpToFirst, matchCount, onToggleExploration, explorationMode, onSelectApp, onEnterPhotoMode, onEnterPlayback, focusedAppId, focusedApp, focusNotFound, focusAgents, onCloseFocus, onOpenApp, onOpenFastTravel, activeRegion }) {
+export default function OpenWorldHud({ cosStatus, cosAgents, agentMap, eventLogs, connected, apps, reviewCounts, instances, productivityData, systemHealth, notificationCounts, character, filter, onFilterChange, onJumpToFirst, matchCount, onToggleExploration, explorationMode, onSelectApp, onEnterPhotoMode, onEnterPlayback, focusedAppId, focusedApp, focusNotFound, focusAgents, onCloseFocus, onOpenApp, onOpenFastTravel, activeRegion }) {
const isFocused = Boolean(focusedApp || focusNotFound);
const navigate = useNavigate();
const location = useLocation();
- const { isDesktop } = useCityViewport();
+ const { isDesktop } = useOpenWorldViewport();
const [time, setTime] = useState(new Date());
const [uptimeSeconds, setUptimeSeconds] = useState(0);
useEffect(() => {
@@ -115,7 +115,7 @@ export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, con
).length;
// The shared vitals payload — backs both the desktop cockpit's vitals panel and
- // the compact/phone `vitals` disclosure surface (via <CityVitalsList>).
+ // the compact/phone `vitals` disclosure surface (via <OpenWorldVitalsList>).
const vitals = {
uptimeSeconds,
sentinel,
@@ -137,7 +137,7 @@ export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, con
};
return (
- // z-20 keeps the HUD above the CityScanlines CRT overlay (z-10) so the vignette
+ // z-20 keeps the HUD above the OpenWorldScanlines CRT overlay (z-10) so the vignette
// + scanline-multiply + chromatic-aberration glow stay on the 3D scene and don't
// haze the (now theme-colored) HUD panels.
<div className="absolute inset-0 pointer-events-none overflow-hidden z-20">
@@ -174,13 +174,13 @@ export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, con
{/* Animated scan line (CSS-only, no React re-renders) */}
<div className="absolute left-0 right-0 h-px bg-cyan-400/15 pointer-events-none animate-scanline" />
- <CityVitalsList {...vitals} />
+ <OpenWorldVitalsList {...vitals} />
</div>
</div>
{filter && onFilterChange && (
<div className="absolute top-3 left-1/2 -translate-x-1/2">
- <CityFilterBar
+ <OpenWorldFilterBar
filter={filter}
onChange={onFilterChange}
onJumpToFirst={onJumpToFirst}
@@ -216,7 +216,7 @@ export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, con
{/* Right side: focus detail panel while a borough is focused (issue #2593),
otherwise the Intel pane. The focus panel REPLACES the intel pane — never overlaps. */}
{isFocused ? (
- <CityFocusPanel
+ <OpenWorldFocusPanel
app={focusedApp}
notFound={focusNotFound}
agents={focusAgents}
@@ -225,7 +225,7 @@ export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, con
isDesktop
/>
) : (
- <CityIntelPane
+ <OpenWorldIntelPane
apps={apps}
cosAgents={cosAgents}
reviewCounts={reviewCounts}
@@ -237,15 +237,15 @@ export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, con
)}
{/* Bottom: Agent status bar */}
- <CityAgentBar cosAgents={cosAgents} agentMap={agentMap} />
+ <OpenWorldAgentBar cosAgents={cosAgents} agentMap={agentMap} />
{/* Bottom-right: character level / XP HUD badge (roadmap 2.11) */}
- <CityXpBadge character={character} />
+ <OpenWorldXpBadge character={character} />
{/* Bottom-left: mini-map + Settings gear + legend + corner decoration */}
<div className="absolute bottom-16 left-3">
{/* Top-down mini-map of every building (roadmap 2.8) */}
- <CityMiniMap apps={apps} onSelectApp={onSelectApp} selectedAppId={focusedAppId} />
+ <OpenWorldMiniMap apps={apps} onSelectApp={onSelectApp} selectedAppId={focusedAppId} />
{/* Status legend */}
<div className="pointer-events-none mb-2 bg-black/70 backdrop-blur-sm border border-cyan-500/15 rounded-lg px-2.5 py-2 space-y-1">
@@ -360,7 +360,7 @@ export default function CityHud({ cosStatus, cosAgents, agentMap, eventLogs, con
</div>
</>
) : (
- <CityHudCompact
+ <OpenWorldHudCompact
time={time}
vitals={vitals}
connected={connected}
diff --git a/client/src/components/city/CityHudCompact.jsx b/client/src/components/openworld/OpenWorldHudCompact.jsx
similarity index 91%
rename from client/src/components/city/CityHudCompact.jsx
rename to client/src/components/openworld/OpenWorldHudCompact.jsx
index f5b4136188..db59a71b35 100644
--- a/client/src/components/city/CityHudCompact.jsx
+++ b/client/src/components/openworld/OpenWorldHudCompact.jsx
@@ -2,12 +2,12 @@ import { useMemo } from 'react';
import { useNavigate, useLocation } from 'react-router';
import { Gauge, Bell, Clock, Activity, Map as MapIcon, Filter, Palette, Compass, Camera, History, Settings, Navigation, X } from 'lucide-react';
import useDrawerTab from '../../hooks/useDrawerTab';
-import { buildAttentionItems, CityIntelContent } from './CityIntelPane';
-import CityVitalsList from './CityVitalsList';
-import CityMiniMap from './CityMiniMap';
-import CityFilterBar from './CityFilterBar';
-import CityFocusPanel from './CityFocusPanel';
-import { CITY_PANE_IDS, CITY_INTEL_PANE_IDS, CITY_PANE_LABELS } from './cityPanes';
+import { buildAttentionItems, OpenWorldIntelContent } from './OpenWorldIntelPane';
+import OpenWorldVitalsList from './OpenWorldVitalsList';
+import OpenWorldMiniMap from './OpenWorldMiniMap';
+import OpenWorldFilterBar from './OpenWorldFilterBar';
+import OpenWorldFocusPanel from './OpenWorldFocusPanel';
+import { CITY_PANE_IDS, CITY_INTEL_PANE_IDS, CITY_PANE_LABELS } from './openWorldPanes';
import { birthDateCta } from '../../utils/characterXp';
import { formatClockTime } from '../../utils/formatters';
@@ -59,10 +59,10 @@ const LEGEND_ROWS = [
// Compact / phone HUD. Keeps the 3D scene the focus: by default only a small clock
// chip, a status chip and a bottom dock are shown (well under 30% coverage). Every
// secondary surface (vitals, attention, timeline, activity, map, filter, legend) is
-// a single mutually-exclusive disclosure sheet driven by the `cityPane` URL param —
+// a single mutually-exclusive disclosure sheet driven by the `openWorldPane` URL param —
// so only one can be open, the open one is deep-linkable, and clearing it returns to
// the unobstructed scene.
-export default function CityHudCompact({
+export default function OpenWorldHudCompact({
time,
vitals,
connected,
@@ -94,7 +94,7 @@ export default function CityHudCompact({
}) {
const navigate = useNavigate();
const location = useLocation();
- const [activePane, setActivePane] = useDrawerTab('cityPane', null, CITY_PANE_IDS);
+ const [activePane, setActivePane] = useDrawerTab('openWorldPane', null, CITY_PANE_IDS);
const togglePane = (id) => setActivePane(activePane === id ? null : id);
const isFocused = Boolean(focusedApp || focusNotFound);
@@ -114,20 +114,20 @@ export default function CityHudCompact({
const renderPaneBody = () => {
if (CITY_INTEL_PANE_IDS.includes(activePane)) {
- return <CityIntelContent tab={activePane} items={items} eventLogs={eventLogs} />;
+ return <OpenWorldIntelContent tab={activePane} items={items} eventLogs={eventLogs} />;
}
if (activePane === 'vitals') {
- return <div className="p-3"><CityVitalsList {...vitals} /></div>;
+ return <div className="p-3"><OpenWorldVitalsList {...vitals} /></div>;
}
if (activePane === 'map') {
return hasApps
- ? <div className="p-3 flex justify-center"><CityMiniMap apps={apps} onSelectApp={onSelectApp} selectedAppId={focusedAppId} alwaysShow /></div>
+ ? <div className="p-3 flex justify-center"><OpenWorldMiniMap apps={apps} onSelectApp={onSelectApp} selectedAppId={focusedAppId} alwaysShow /></div>
: <div className="p-6 text-center font-pixel text-[9px] text-cyan-500/40 tracking-wide">No buildings to map</div>;
}
if (activePane === 'filter') {
return (
<div className="p-3">
- <CityFilterBar filter={filter} onChange={onFilterChange} onJumpToFirst={onJumpToFirst} matchCount={matchCount} compact />
+ <OpenWorldFilterBar filter={filter} onChange={onFilterChange} onJumpToFirst={onJumpToFirst} matchCount={matchCount} compact />
</div>
);
}
@@ -212,7 +212,7 @@ export default function CityHudCompact({
{/* Focused building detail sheet (issue #2593) — replaces the disclosure sheet while a
borough is focused so the two never overlap. */}
{isFocused && (
- <CityFocusPanel
+ <OpenWorldFocusPanel
app={focusedApp}
notFound={focusNotFound}
agents={focusAgents}
@@ -252,7 +252,7 @@ export default function CityHudCompact({
<div
className="flex items-center gap-1.5 bg-black/85 backdrop-blur-sm border border-cyan-500/30 rounded-lg px-1.5 py-1.5 overflow-x-auto scrollbar-hide touch-pan-x"
role="toolbar"
- aria-label="City controls"
+ aria-label="OpenWorld controls"
>
<DockButton icon={Gauge} label="System vitals" active={activePane === 'vitals'} onClick={() => togglePane('vitals')} />
<DockButton icon={Bell} label="Attention" active={activePane === 'attention'} badge={items.length} badgeCritical={criticalCount > 0} onClick={() => togglePane('attention')} />
diff --git a/client/src/components/city/CityHudCompact.test.jsx b/client/src/components/openworld/OpenWorldHudCompact.test.jsx
similarity index 90%
rename from client/src/components/city/CityHudCompact.test.jsx
rename to client/src/components/openworld/OpenWorldHudCompact.test.jsx
index 6c216ee376..52a8cf1f32 100644
--- a/client/src/components/city/CityHudCompact.test.jsx
+++ b/client/src/components/openworld/OpenWorldHudCompact.test.jsx
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
import { MemoryRouter, useLocation } from 'react-router';
-import CityHudCompact from './CityHudCompact';
+import OpenWorldHudCompact from './OpenWorldHudCompact';
function Loc() {
const l = useLocation();
@@ -55,12 +55,12 @@ const baseProps = {
const renderCompact = (search = '', props = {}) =>
render(
<MemoryRouter initialEntries={[`/openworld${search}`]}>
- <CityHudCompact {...baseProps} {...props} />
+ <OpenWorldHudCompact {...baseProps} {...props} />
<Loc />
</MemoryRouter>,
);
-describe('CityHudCompact', () => {
+describe('OpenWorldHudCompact', () => {
it('shows no secondary surface by default (scene stays unobscured)', () => {
renderCompact();
// Dock controls present…
@@ -74,35 +74,35 @@ describe('CityHudCompact', () => {
it('opens a pane from the dock and reflects it in the URL', () => {
renderCompact();
fireEvent.click(screen.getByLabelText('Attention'));
- expect(screen.getByTestId('loc').textContent).toContain('cityPane=attention');
+ expect(screen.getByTestId('loc').textContent).toContain('openWorldPane=attention');
// The sheet header for the opened pane appears.
expect(screen.getByText('ATTENTION')).toBeInTheDocument();
});
it('restores the open pane from the URL on load', () => {
- renderCompact('?cityPane=vitals');
+ renderCompact('?openWorldPane=vitals');
expect(screen.getByText('SYSTEM VITALS')).toBeInTheDocument();
});
it('keeps only one surface open at a time (mutual exclusivity)', () => {
- renderCompact('?cityPane=vitals');
+ renderCompact('?openWorldPane=vitals');
expect(screen.getByText('SYSTEM VITALS')).toBeInTheDocument();
fireEvent.click(screen.getByLabelText('Attention'));
// Switching panes closes the previous one.
expect(screen.queryByText('SYSTEM VITALS')).not.toBeInTheDocument();
expect(screen.getByText('ATTENTION')).toBeInTheDocument();
- expect(screen.getByTestId('loc').textContent).toContain('cityPane=attention');
+ expect(screen.getByTestId('loc').textContent).toContain('openWorldPane=attention');
});
it('toggling the active dock launcher closes the pane', () => {
- renderCompact('?cityPane=vitals');
+ renderCompact('?openWorldPane=vitals');
fireEvent.click(screen.getByLabelText('System vitals'));
expect(screen.queryByText('SYSTEM VITALS')).not.toBeInTheDocument();
expect(screen.getByTestId('loc').textContent).toBe('');
});
it('the close button clears the surface and the URL param', () => {
- renderCompact('?cityPane=attention');
+ renderCompact('?openWorldPane=attention');
expect(screen.getByText('ATTENTION')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: 'Close panel' }));
expect(screen.queryByText('ATTENTION')).not.toBeInTheDocument();
diff --git a/client/src/components/city/CityIntelPane.jsx b/client/src/components/openworld/OpenWorldIntelPane.jsx
similarity index 96%
rename from client/src/components/city/CityIntelPane.jsx
rename to client/src/components/openworld/OpenWorldIntelPane.jsx
index 4dea0663ef..1fec8b77de 100644
--- a/client/src/components/city/CityIntelPane.jsx
+++ b/client/src/components/openworld/OpenWorldIntelPane.jsx
@@ -1,9 +1,9 @@
import { useMemo, useRef, useEffect, useState } from 'react';
import { useNavigate } from 'react-router';
import { formatClockTime } from '../../utils/formatters';
-import { computeActivityDensity, buildTimelineBuckets } from '../../utils/cityTimeline';
+import { computeActivityDensity, buildTimelineBuckets } from '../../utils/openWorldTimeline';
import useDrawerTab from '../../hooks/useDrawerTab';
-import { CITY_PANE_IDS, CITY_INTEL_PANE_IDS } from './cityPanes';
+import { CITY_PANE_IDS, CITY_INTEL_PANE_IDS } from './openWorldPanes';
const SEVERITY_RANK = { critical: 0, warning: 1, info: 2 };
const SEVERITY_COLORS = {
@@ -336,7 +336,7 @@ function TimelineView({ logs }) {
}
// Intel-pane tabs. `attention`/`timeline`/`activity` line up with the same-named
-// `cityPane` values so the desktop tab and the compact disclosure sheet address the
+// `openWorldPane` values so the desktop tab and the compact disclosure sheet address the
// same surface through one URL param.
export const CITY_INTEL_TABS = [
{ id: 'attention', label: 'ATTENTION', hint: 'Things needing your attention' },
@@ -347,18 +347,18 @@ export const CITY_INTEL_TABS = [
// Renders just the body for a given intel tab — reused by the desktop cockpit pane
// and the compact/phone disclosure sheet so both show identical content. The parent
// must be a bounded `flex flex-col` container (the lists are `flex-1`).
-export function CityIntelContent({ tab, items, eventLogs }) {
+export function OpenWorldIntelContent({ tab, items, eventLogs }) {
if (tab === 'timeline') return <TimelineView logs={eventLogs} />;
if (tab === 'activity') return <ActivityLogList logs={eventLogs} />;
return <AttentionList items={items} />;
}
-export default function CityIntelPane({ apps, cosAgents, reviewCounts, instances, systemHealth, notificationCounts, eventLogs }) {
- // The active tab is URL-addressable via `cityPane` (shared with the compact
+export default function OpenWorldIntelPane({ apps, cosAgents, reviewCounts, instances, systemHealth, notificationCounts, eventLogs }) {
+ // The active tab is URL-addressable via `openWorldPane` (shared with the compact
// layout), so a reload / back-forward restores it and a deep link opens it.
// `vitals`/`map`/etc. aren't intel tabs, so anything outside the intel subset
// falls back to `attention`.
- const [activePane, setActivePane] = useDrawerTab('cityPane', null, CITY_PANE_IDS);
+ const [activePane, setActivePane] = useDrawerTab('openWorldPane', null, CITY_PANE_IDS);
const tab = CITY_INTEL_PANE_IDS.includes(activePane) ? activePane : 'attention';
const [collapsed, setCollapsed] = useState(false);
@@ -398,7 +398,7 @@ export default function CityIntelPane({ apps, cosAgents, reviewCounts, instances
<div className={`absolute top-16 right-3 ${collapsed ? '' : 'bottom-20'} w-72 pointer-events-auto`}>
<div className={`${collapsed ? '' : 'h-full'} bg-black/85 backdrop-blur-sm border border-cyan-500/30 rounded-lg overflow-hidden flex flex-col`}>
<div className="flex items-stretch border-b border-cyan-500/20">
- {/* Deliberately NOT `ui/TabPills`: this bar wears the immersive CyberCity
+ {/* Deliberately NOT `ui/TabPills`: this bar wears the immersive OpenWorld
HUD skin (cyan-on-black, `font-pixel` micro-caps, per-tab severity-tinted
count chips) that the shared component hardcodes as port-accent, and it
can only be expressed there by adding a one-off variant that no other
@@ -464,7 +464,7 @@ export default function CityIntelPane({ apps, cosAgents, reviewCounts, instances
tabIndex={0}
className="flex-1 min-h-0 flex flex-col focus:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60"
>
- <CityIntelContent tab={tab} items={items} eventLogs={eventLogs} />
+ <OpenWorldIntelContent tab={tab} items={items} eventLogs={eventLogs} />
</div>
)}
</div>
diff --git a/client/src/components/city/CityIntelPane.test.jsx b/client/src/components/openworld/OpenWorldIntelPane.test.jsx
similarity index 94%
rename from client/src/components/city/CityIntelPane.test.jsx
rename to client/src/components/openworld/OpenWorldIntelPane.test.jsx
index e0bd143bde..dbace3403f 100644
--- a/client/src/components/city/CityIntelPane.test.jsx
+++ b/client/src/components/openworld/OpenWorldIntelPane.test.jsx
@@ -1,17 +1,17 @@
import { describe, it, expect } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
import { MemoryRouter } from 'react-router';
-import CityIntelPane from './CityIntelPane';
+import OpenWorldIntelPane from './OpenWorldIntelPane';
function renderPane(props = {}) {
return render(
<MemoryRouter>
- <CityIntelPane apps={[]} cosAgents={[]} instances={[]} eventLogs={[]} {...props} />
+ <OpenWorldIntelPane apps={[]} cosAgents={[]} instances={[]} eventLogs={[]} {...props} />
</MemoryRouter>
);
}
-describe('CityIntelPane tab bar', () => {
+describe('OpenWorldIntelPane tab bar', () => {
it('exposes exactly the three intel tabs in a labelled tablist', () => {
renderPane();
const list = screen.getByRole('tablist', { name: 'Intel' });
diff --git a/client/src/components/city/CityJiraDistrict.jsx b/client/src/components/openworld/OpenWorldJiraDistrict.jsx
similarity index 77%
rename from client/src/components/city/CityJiraDistrict.jsx
rename to client/src/components/openworld/OpenWorldJiraDistrict.jsx
index 458d8dc9ad..df9ca39d7f 100644
--- a/client/src/components/city/CityJiraDistrict.jsx
+++ b/client/src/components/openworld/OpenWorldJiraDistrict.jsx
@@ -1,20 +1,20 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeJiraDistrict, JIRA_DISTRICT } from '../../utils/cityJiraDistrict';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeJiraDistrict, JIRA_DISTRICT } from '../../utils/openWorldJiraDistrict';
-// CyberCity's JIRA sprint district (roadmap 3.7): the current sprint's tickets become a small
+// OpenWorld's JIRA sprint district (roadmap 3.7): the current sprint's tickets become a small
// construction yard. To-Do tickets are stacked crates (unbuilt), In-Progress tickets are
// under-construction wireframe frames (scaffold), and Done tickets are finished, lit buildings.
// Tickets are gathered across every JIRA-enabled app and deduped by key in the pure helper; this
-// component only renders + animates. Mirrors CityTaskQueue / CityGoalMonuments.
+// component only renders + animates. Mirrors OpenWorldTaskQueue / OpenWorldGoalMonuments.
// One ticket structure. The mesh form is chosen by workflow state so the yard reads as work
// progressing from crates → scaffolds → finished buildings.
function SprintStructure({ structure, pulseRef, isPulse }) {
- const { tintStructure } = useCityPalette();
+ const { tintStructure } = useOpenWorldPalette();
const { position, color, height, state } = structure;
const size = JIRA_DISTRICT.crateSize;
@@ -64,12 +64,12 @@ function SprintStructure({ structure, pulseRef, isPulse }) {
);
}
-export default function CityJiraDistrict({ jiraTickets, settings }) {
+export default function OpenWorldJiraDistrict({ jiraTickets, settings }) {
const district = useMemo(() => computeJiraDistrict(jiraTickets), [jiraTickets]);
const pulseRef = useRef();
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
// The first in-progress structure carries a breathing scaffold glow (one ref mutation/frame).
const pulseKey = useMemo(
@@ -101,18 +101,18 @@ export default function CityJiraDistrict({ jiraTickets, settings }) {
{/* Overflow marker — tickets past the render cap */}
{overflow > 0 && overflowPosition && (
- <CityLabel position={[overflowPosition[0], 1.4, overflowPosition[2]]} fontSize={0.5} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <OpenWorldLabel position={[overflowPosition[0], 1.4, overflowPosition[2]]} fontSize={0.5} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`+${overflow} MORE`}
- </CityLabel>
+ </OpenWorldLabel>
)}
{/* District title + sprint progress */}
- <CityLabel position={[base[0], 12, base[2] - 2]} fontSize={1.2} color="#3b82f6" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <OpenWorldLabel position={[base[0], 12, base[2] - 2]} fontSize={1.2} color="#3b82f6" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
SPRINT
- </CityLabel>
- <CityLabel position={[base[0], 11.1, base[2] - 2]} fontSize={0.72} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[base[0], 11.1, base[2] - 2]} fontSize={0.72} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
{`${counts.done}/${total} DONE · ${counts.inProgress} IN PROGRESS`}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityLabel.jsx b/client/src/components/openworld/OpenWorldLabel.jsx
similarity index 72%
rename from client/src/components/city/CityLabel.jsx
rename to client/src/components/openworld/OpenWorldLabel.jsx
index 5b599b31d5..8c1d66f620 100644
--- a/client/src/components/city/CityLabel.jsx
+++ b/client/src/components/openworld/OpenWorldLabel.jsx
@@ -1,6 +1,6 @@
import { forwardRef } from 'react';
import { Text } from '@react-three/drei';
-import { cityLabelColors } from './cityConstants';
+import { openWorldLabelColors } from './openWorldConstants';
// A drei <Text> for an informational in-world label (app/process names, district
// readouts) that stays legible day AND night. Pass the night/neon `color` plus the
@@ -10,10 +10,10 @@ import { cityLabelColors } from './cityConstants';
// through. A caller may still override `outlineColor` explicitly.
//
// Use this for content the user needs to READ in daytime. Decorative neon signage
-// (CityNeonSigns, ambient billboards) intentionally does NOT use it — neon should
+// (OpenWorldNeonSigns, ambient billboards) intentionally does NOT use it — neon should
// dim in daylight like the real thing.
-const CityLabel = forwardRef(function CityLabel({ color, dayMix = 0, outlineColor, ...props }, ref) {
- const themed = cityLabelColors(color, dayMix);
+const OpenWorldLabel = forwardRef(function OpenWorldLabel({ color, dayMix = 0, outlineColor, ...props }, ref) {
+ const themed = openWorldLabelColors(color, dayMix);
return (
<Text
ref={ref}
@@ -26,4 +26,4 @@ const CityLabel = forwardRef(function CityLabel({ color, dayMix = 0, outlineColo
);
});
-export default CityLabel;
+export default OpenWorldLabel;
diff --git a/client/src/components/city/CityLandscape.jsx b/client/src/components/openworld/OpenWorldLandscape.jsx
similarity index 89%
rename from client/src/components/city/CityLandscape.jsx
rename to client/src/components/openworld/OpenWorldLandscape.jsx
index 331af2caf1..0f73e0a14b 100644
--- a/client/src/components/city/CityLandscape.jsx
+++ b/client/src/components/openworld/OpenWorldLandscape.jsx
@@ -1,8 +1,8 @@
import { useEffect, useMemo } from 'react';
import * as THREE from 'three';
-import { cityDayMix, mixHex, seededRand, smoothstepRange } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import { WORLD } from '../../utils/cityPlan';
+import { openWorldDayMix, mixHex, seededRand, smoothstepRange } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import { WORLD } from '../../utils/openWorldPlan';
const TERRAIN_SIZE = 2400;
const MOUNTAIN_INNER_RADIUS = 560;
@@ -55,8 +55,8 @@ const TERRAIN_FRAG = `
color += (largeN - 0.5) * mix(0.025, 0.045, uDayMix);
// Keep a faint themed tech trace near the city, but let nature dominate outside.
- float cityTrace = (1.0 - meadowMix) * 0.08 * (1.0 - uDayMix * 0.65);
- color = mix(color, uAccent, cityTrace);
+ float openWorldTrace = (1.0 - meadowMix) * 0.08 * (1.0 - uDayMix * 0.65);
+ color = mix(color, uAccent, openWorldTrace);
gl_FragColor = vec4(color, 1.0);
}
@@ -68,7 +68,7 @@ function TerrainPlane({ dayMix, accent, terrain }) {
fragmentShader: TERRAIN_FRAG,
uniforms: {
// Night bands are shared; the daytime bands come from the active world style's
- // terrain trio (WORLD_STYLE_DEFS in cityConstants), so retuning a style's ground
+ // terrain trio (WORLD_STYLE_DEFS in openWorldConstants), so retuning a style's ground
// doesn't mean grepping raw hexes across two files.
uInner: { value: new THREE.Color(mixHex('#202426', terrain.inner, dayMix)) },
uMeadow: { value: new THREE.Color(mixHex('#172719', terrain.meadow, dayMix)) },
@@ -80,7 +80,7 @@ function TerrainPlane({ dayMix, accent, terrain }) {
depthWrite: true,
// accent intentionally NOT a dep — a theme switch updates the uniform in
// place (effect below) rather than recompiling the GLSL program. Matches the
- // imperative-uniform pattern in CitySky / CityBillboards / CityVolumetricLights.
+ // imperative-uniform pattern in OpenWorldSky / OpenWorldBillboards / OpenWorldVolumetricLights.
}), [dayMix, terrain]);
// Push the accent into the existing material on theme change — no rebuild.
@@ -146,9 +146,9 @@ function Mountain({ mountain, dayMix, surface }) {
);
}
-export default function CityLandscape({ settings }) {
- const { accent, terrain, surface } = useCityPalette();
- const dayMix = cityDayMix(settings);
+export default function OpenWorldLandscape({ settings }) {
+ const { accent, terrain, surface } = useOpenWorldPalette();
+ const dayMix = openWorldDayMix(settings);
const mountains = useMemo(() => {
const result = [];
diff --git a/client/src/components/city/CityLights.jsx b/client/src/components/openworld/OpenWorldLights.jsx
similarity index 94%
rename from client/src/components/city/CityLights.jsx
rename to client/src/components/openworld/OpenWorldLights.jsx
index 97beaf97b4..05cfbde09f 100644
--- a/client/src/components/city/CityLights.jsx
+++ b/client/src/components/openworld/OpenWorldLights.jsx
@@ -1,8 +1,8 @@
import { useRef } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { cityShowDetail, getTimeOfDayPreset } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
+import { openWorldShowDetail, getTimeOfDayPreset } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
// Animated accent light that slowly shifts color, with reactive brightness
function AnimatedLight({ position, baseColor, baseIntensity, distance, shiftRange = 0.1, speed = 0.5, brightnessRef, neonScaleRef }) {
@@ -80,8 +80,8 @@ function ReactivePointLight({ position, baseIntensity, color, distance, brightne
);
}
-export default function CityLights({ settings, lightingTier }) {
- const { ground } = useCityPalette();
+export default function OpenWorldLights({ settings, lightingTier }) {
+ const { ground } = useOpenWorldPalette();
const brightnessRef = useRef(settings?.ambientBrightness ?? 1.2);
brightnessRef.current = settings?.ambientBrightness ?? 1.2;
@@ -94,12 +94,12 @@ export default function CityLights({ settings, lightingTier }) {
// low tier sheds light count along with the props those lights were there to accent.
//
// Gated on the SETTLED tier, not the render tier the rest of the set dressing
- // reads. CityScene pins `effectiveTier: 'low'` for the first 1.2s of every mount
+ // reads. OpenWorldScene pins `effectiveTier: 'low'` for the first 1.2s of every mount
// and visibility resume, and light count is part of three.js's program cache key
// — so reading the clamped tier here would recompile every MeshStandardMaterial
// in the scene at the warm-up boundary, a stall at exactly the moment the warm-up
// exists to avoid one. Falls back to `settings` when the prop is absent.
- const showAccentLights = cityShowDetail(lightingTier ? { effectiveTier: lightingTier } : settings);
+ const showAccentLights = openWorldShowDetail(lightingTier ? { effectiveTier: lightingTier } : settings);
// Neon scale: dim neon point lights during daytime (30% at noon, 100% at night)
const neonScaleRef = useRef(1);
diff --git a/client/src/components/city/CityLights.test.jsx b/client/src/components/openworld/OpenWorldLights.test.jsx
similarity index 82%
rename from client/src/components/city/CityLights.test.jsx
rename to client/src/components/openworld/OpenWorldLights.test.jsx
index f259fc8365..ec6e7f941b 100644
--- a/client/src/components/city/CityLights.test.jsx
+++ b/client/src/components/openworld/OpenWorldLights.test.jsx
@@ -7,16 +7,16 @@ import { render } from '@testing-library/react';
// (<pointLight>, <ambientLight>, …) render as unknown DOM elements, which is exactly what
// makes them countable by tag name.
vi.mock('@react-three/fiber', () => ({ useFrame: () => {} }));
-vi.mock('./CityPaletteContext', () => ({ useCityPalette: () => ({ ground: '#22d3ee' }) }));
+vi.mock('./OpenWorldPaletteContext', () => ({ useOpenWorldPalette: () => ({ ground: '#22d3ee' }) }));
-import CityLights from './CityLights';
+import OpenWorldLights from './OpenWorldLights';
const pointLightCount = (settings) => {
- const { container } = render(<CityLights settings={settings} />);
+ const { container } = render(<OpenWorldLights settings={settings} />);
return container.getElementsByTagName('pointLight').length;
};
-describe('CityLights quality-tier culling', () => {
+describe('OpenWorldLights quality-tier culling', () => {
// Zero-intensity lights still cost a per-fragment iteration in every
// MeshStandardMaterial's lighting loop, so the low tier has to shed the light
// by unmounting it — dimming it saves nothing.
@@ -32,7 +32,7 @@ describe('CityLights quality-tier culling', () => {
});
it('keeps every light when no settings are supplied', () => {
- // Legacy/absent payloads fall through cityShowDetail's particleDensity default of 1,
+ // Legacy/absent payloads fall through openWorldShowDetail's particleDensity default of 1,
// so an install that never set effectiveTier keeps the established look.
expect(pointLightCount(undefined)).toBe(pointLightCount({ effectiveTier: 'high' }));
});
@@ -41,7 +41,7 @@ describe('CityLights quality-tier culling', () => {
// The cull is scoped to the two dimmest small-radius accents — the overhead key/fill
// pair, the broad night glow, the animated side accents and the ambient/hemisphere
// fill all stay, so the low tier is dimmer in one street corner, not gutted.
- const { container } = render(<CityLights settings={{ effectiveTier: 'low' }} />);
+ const { container } = render(<OpenWorldLights settings={{ effectiveTier: 'low' }} />);
expect(container.getElementsByTagName('pointLight').length).toBe(9);
expect(container.getElementsByTagName('ambientLight').length).toBe(1);
expect(container.getElementsByTagName('hemisphereLight').length).toBe(1);
diff --git a/client/src/components/city/CityMemoryDistrict.jsx b/client/src/components/openworld/OpenWorldMemoryDistrict.jsx
similarity index 77%
rename from client/src/components/city/CityMemoryDistrict.jsx
rename to client/src/components/openworld/OpenWorldMemoryDistrict.jsx
index 44295a4e0f..c4318fa822 100644
--- a/client/src/components/city/CityMemoryDistrict.jsx
+++ b/client/src/components/openworld/OpenWorldMemoryDistrict.jsx
@@ -1,17 +1,17 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import CityTubeLine from './CityTubeLine';
-import { computeMemoryDistrict, MEMORY_DISTRICT } from '../../utils/cityMemoryDistrict';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import OpenWorldTubeLine from './OpenWorldTubeLine';
+import { computeMemoryDistrict, MEMORY_DISTRICT } from '../../utils/openWorldMemoryDistrict';
-// CyberCity's memory / knowledge district (roadmap 3.2): the user's long-term memory graph
+// OpenWorld's memory / knowledge district (roadmap 3.2): the user's long-term memory graph
// crystallizes into a quiet northwest quarter. Each memory *category* is a cluster of glowing
// octahedral crystals — taller and brighter the more (and more important) the memories — and
// edges that connect different categories arc between clusters as light bridges. A central
// "well" glows with the brain-inbox backlog: brighter and pulsing when captures are waiting to
-// be classified, calm when the inbox is clear. Mirrors CityGoalMonuments / CityBackupVault:
+// be classified, calm when the inbox is clear. Mirrors OpenWorldGoalMonuments / OpenWorldBackupVault:
// pure helper does all topology, this component only renders + animates.
// One category's crystal cluster: a small ring of octahedra of varying height around the
@@ -60,24 +60,24 @@ function CrystalCluster({ cluster, glowRef, isGlow, dayMix = 0 }) {
/>
</mesh>
))}
- <CityLabel position={[0, height + 1.3, 0]} fontSize={0.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <OpenWorldLabel position={[0, height + 1.3, 0]} fontSize={0.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{label}
- </CityLabel>
- <CityLabel position={[0, height + 0.7, 0]} fontSize={0.42} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[0, height + 0.7, 0]} fontSize={0.42} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{count}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
-export default function CityMemoryDistrict({ memoryGraph, inboxDepth = 0, settings }) {
- const { tintStructure } = useCityPalette();
+export default function OpenWorldMemoryDistrict({ memoryGraph, inboxDepth = 0, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
const district = useMemo(() => computeMemoryDistrict(memoryGraph), [memoryGraph]);
const glowRef = useRef();
const wellRef = useRef();
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
// The brightest (most important) cluster carries the breathing glow.
const glowCategory = useMemo(() => {
@@ -129,7 +129,7 @@ export default function CityMemoryDistrict({ memoryGraph, inboxDepth = 0, settin
// Arc the midpoint up so bridges read as light arcs, not flat lines.
const mid = [(from[0] + to[0]) / 2, MEMORY_DISTRICT.bridgeY + 2 + Math.min(bridge.weight, 6) * 0.3, (from[2] + to[2]) / 2];
return (
- <CityTubeLine
+ <OpenWorldTubeLine
key={i}
points={[from, mid, to]}
color="#67e8f9"
@@ -146,19 +146,19 @@ export default function CityMemoryDistrict({ memoryGraph, inboxDepth = 0, settin
<meshStandardMaterial color={wellColor} emissive={wellColor} emissiveIntensity={0.4} side={2} toneMapped={false} transparent opacity={0.85} />
</mesh>
{inboxActive && (
- <CityLabel position={[0, 1.2, 0]} fontSize={0.5} color="#06b6d4" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
+ <OpenWorldLabel position={[0, 1.2, 0]} fontSize={0.5} color="#06b6d4" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={9}>
{`${inboxDepth} TO SORT`}
- </CityLabel>
+ </OpenWorldLabel>
)}
</group>
{/* District title */}
- <CityLabel position={[base[0], 14, base[2] - 3]} fontSize={1.3} color="#8b5cf6" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ <OpenWorldLabel position={[base[0], 14, base[2] - 3]} fontSize={1.3} color="#8b5cf6" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
MEMORY
- </CityLabel>
- <CityLabel position={[base[0], 13, base[2] - 3]} fontSize={0.75} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[base[0], 13, base[2] - 3]} fontSize={0.75} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={30}>
{`${totalMemories} MEMORIES`}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityMiniMap.jsx b/client/src/components/openworld/OpenWorldMiniMap.jsx
similarity index 84%
rename from client/src/components/city/CityMiniMap.jsx
rename to client/src/components/openworld/OpenWorldMiniMap.jsx
index 898cdaf7b0..708d9d841e 100644
--- a/client/src/components/city/CityMiniMap.jsx
+++ b/client/src/components/openworld/OpenWorldMiniMap.jsx
@@ -1,31 +1,31 @@
import { useMemo } from 'react';
-import { computeCityLayout } from './cityLayout';
-import { useCityPalette } from './CityPaletteContext';
-import { computeMiniMap } from '../../utils/cityMiniMap';
+import { computeOpenWorldLayout } from './openWorldLayout';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import { computeMiniMap } from '../../utils/openWorldMiniMap';
-// CyberCity mini-map overlay (roadmap 2.8). A compact top-down map in a HUD corner showing
+// 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
-// from `computeCityLayout(apps)` — the same function CityScene uses to place buildings — so
+// 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.
//
// Click-to-select reuses the existing building-click plumbing: `onSelectApp(app)` is the same
-// callback CityScene fires on a building click (CyberCity navigates to /apps/:id). When no
+// callback OpenWorldScene fires on a building click (OpenWorld navigates to /apps/:id). When no
// callback is supplied the map is purely informational.
//
-// Hidden on very small screens (per CityHud conventions — the right-side intel pane and
+// Hidden on very small screens (per OpenWorldHud conventions — the right-side intel pane and
// bottom agent bar already crowd a phone viewport). It's flow-positioned (no absolute) so it
-// stacks cleanly at the top of CityHud's bottom-left rail above the status legend.
+// stacks cleanly at the top of OpenWorldHud's bottom-left rail above the status legend.
// Map box size in px. Fixed so the projection has a stable target on desktop.
const MAP_SIZE = 132;
-export default function CityMiniMap({ apps, onSelectApp, selectedAppId = null, alwaysShow = false }) {
+export default function OpenWorldMiniMap({ apps, onSelectApp, selectedAppId = null, alwaysShow = false }) {
// Status colors track the theme accent for 'online' (the rest stay semantic), so a
// dot matches its building exactly. Read from the palette the city page provides.
- const { getBuildingColor } = useCityPalette();
+ const { getBuildingColor } = useOpenWorldPalette();
const view = useMemo(() => {
- const positions = computeCityLayout(Array.isArray(apps) ? apps : []);
+ const positions = computeOpenWorldLayout(Array.isArray(apps) ? apps : []);
return computeMiniMap(apps, positions, { geography: true });
}, [apps]);
diff --git a/client/src/components/city/CityNeonSigns.jsx b/client/src/components/openworld/OpenWorldNeonSigns.jsx
similarity index 95%
rename from client/src/components/city/CityNeonSigns.jsx
rename to client/src/components/openworld/OpenWorldNeonSigns.jsx
index f03102e9f2..2bca18d57d 100644
--- a/client/src/components/city/CityNeonSigns.jsx
+++ b/client/src/components/openworld/OpenWorldNeonSigns.jsx
@@ -2,9 +2,9 @@ import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import { Text } from '@react-three/drei';
import * as THREE from 'three';
-import { computeDistrictBounds } from '../../utils/cityMiniMap';
-import { PIXEL_FONT_URL } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
+import { computeDistrictBounds } from '../../utils/openWorldMiniMap';
+import { PIXEL_FONT_URL } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
// Floating neon street-level signs with animated glow
@@ -106,8 +106,8 @@ function NeonBar({ position, rotation, color, height = 2 }) {
);
}
-export default function CityNeonSigns({ positions }) {
- const { neonAccents } = useCityPalette();
+export default function OpenWorldNeonSigns({ positions }) {
+ const { neonAccents } = useOpenWorldPalette();
const signs = useMemo(() => {
if (!positions || positions.size < 2) return [];
diff --git a/client/src/components/city/CityPaletteContext.jsx b/client/src/components/openworld/OpenWorldPaletteContext.jsx
similarity index 52%
rename from client/src/components/city/CityPaletteContext.jsx
rename to client/src/components/openworld/OpenWorldPaletteContext.jsx
index 383d4342a5..0946f650fb 100644
--- a/client/src/components/city/CityPaletteContext.jsx
+++ b/client/src/components/openworld/OpenWorldPaletteContext.jsx
@@ -1,9 +1,9 @@
import { createContext, useContext } from 'react';
-import { deriveCityPalette } from './cityConstants';
+import { deriveOpenWorldPalette } from './openWorldConstants';
-// CyberCity's "brand" surfaces (ground grid, particles, online buildings, the lead
+// OpenWorld's "brand" surfaces (ground grid, particles, online buildings, the lead
// neon accent, the dark structural bases) track the active PortOS theme accent. The
-// palette is derived once per theme (see deriveCityPalette) and handed down through
+// palette is derived once per theme (see deriveOpenWorldPalette) and handed down through
// this context instead of mutating a shared module-level singleton during render —
// the old approach fired a side-effect mid-render that was fragile under React
// StrictMode's double-invoke and concurrent rendering.
@@ -11,23 +11,23 @@ import { deriveCityPalette } from './cityConstants';
// IMPORTANT: react-three-fiber's <Canvas> runs its own reconciler, so React context
// does NOT cross that boundary automatically (the same reason `settings` is prop-
// threaded into every scene component). The palette is therefore provided TWICE: once
-// by CyberCityInner for the DOM-side HUD/minimap, and again inside <Canvas> by
-// CityScene for the 3D scene. Both providers share the same derived palette object.
+// by OpenWorldInner for the DOM-side HUD/minimap, and again inside <Canvas> by
+// OpenWorldScene for the 3D scene. Both providers share the same derived palette object.
// Default to the cyan-era baseline so a consumer rendered outside a provider (or in a
// test) still gets a valid, fully-formed palette rather than crashing on undefined.
-const DEFAULT_CITY_PALETTE = deriveCityPalette(undefined);
+const DEFAULT_OPEN_WORLD_PALETTE = deriveOpenWorldPalette(undefined);
-const CityPaletteContext = createContext(DEFAULT_CITY_PALETTE);
+const OpenWorldPaletteContext = createContext(DEFAULT_OPEN_WORLD_PALETTE);
-export function CityPaletteProvider({ palette, children }) {
+export function OpenWorldPaletteProvider({ palette, children }) {
return (
- <CityPaletteContext.Provider value={palette || DEFAULT_CITY_PALETTE}>
+ <OpenWorldPaletteContext.Provider value={palette || DEFAULT_OPEN_WORLD_PALETTE}>
{children}
- </CityPaletteContext.Provider>
+ </OpenWorldPaletteContext.Provider>
);
}
-export function useCityPalette() {
- return useContext(CityPaletteContext);
+export function useOpenWorldPalette() {
+ return useContext(OpenWorldPaletteContext);
}
diff --git a/client/src/components/city/CityParticles.jsx b/client/src/components/openworld/OpenWorldParticles.jsx
similarity index 84%
rename from client/src/components/city/CityParticles.jsx
rename to client/src/components/openworld/OpenWorldParticles.jsx
index 439009e365..8642d9fd2a 100644
--- a/client/src/components/city/CityParticles.jsx
+++ b/client/src/components/openworld/OpenWorldParticles.jsx
@@ -1,13 +1,13 @@
import { Sparkles } from '@react-three/drei';
-import { cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
+import { openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
-export default function CityParticles({ settings }) {
- const { particles } = useCityPalette();
+export default function OpenWorldParticles({ settings }) {
+ const { particles } = useOpenWorldPalette();
const density = settings?.particleDensity ?? 1.0;
const scale = (base) => Math.max(1, Math.round(base * density));
// Neon atmosphere dust is a night look — fade it out in daylight.
- const dayFade = 1 - cityDayMix(settings);
+ const dayFade = 1 - openWorldDayMix(settings);
return (
<>
diff --git a/client/src/components/city/CityPhotoCamera.jsx b/client/src/components/openworld/OpenWorldPhotoCamera.jsx
similarity index 95%
rename from client/src/components/city/CityPhotoCamera.jsx
rename to client/src/components/openworld/OpenWorldPhotoCamera.jsx
index 92ef7b26e6..4e450ea8c5 100644
--- a/client/src/components/city/CityPhotoCamera.jsx
+++ b/client/src/components/openworld/OpenWorldPhotoCamera.jsx
@@ -1,7 +1,7 @@
import { useRef, useEffect } from 'react';
import { useThree, useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { getPreset, stepFly } from '../../utils/cityPhotoMode';
+import { getPreset, stepFly } from '../../utils/openWorldPhotoMode';
// Photo-mode camera driver (roadmap 3.3 / 3.6). When photo mode is active this flies the camera
// to the selected cinematic preset with a smooth ease, and registers a capture function with the
@@ -15,7 +15,7 @@ import { getPreset, stepFly } from '../../utils/cityPhotoMode';
// once when a fly begins (activation / preset change) and again every frame until the fly
// settles. After that nothing invalidates, so the scene holds frozen until the next fly.
-export default function CityPhotoCamera({ active, presetId, onReady, composerRef }) {
+export default function OpenWorldPhotoCamera({ active, presetId, onReady, composerRef }) {
const { camera, gl, scene, invalidate } = useThree();
const progressRef = useRef(1);
const startPosRef = useRef(new THREE.Vector3());
diff --git a/client/src/components/city/CityPhotoOverlay.jsx b/client/src/components/openworld/OpenWorldPhotoOverlay.jsx
similarity index 92%
rename from client/src/components/city/CityPhotoOverlay.jsx
rename to client/src/components/openworld/OpenWorldPhotoOverlay.jsx
index cb5ab82750..04d4b2e32b 100644
--- a/client/src/components/city/CityPhotoOverlay.jsx
+++ b/client/src/components/openworld/OpenWorldPhotoOverlay.jsx
@@ -1,15 +1,15 @@
import { useState, useCallback } from 'react';
import Modal from '../ui/Modal.jsx';
-import { PHOTO_PRESETS, getPreset, cyclePreset, buildPostcardStats, screenshotFilename } from '../../utils/cityPhotoMode';
+import { PHOTO_PRESETS, getPreset, cyclePreset, buildPostcardStats, screenshotFilename } from '../../utils/openWorldPhotoMode';
// Photo-mode HUD overlay (roadmap 3.3). When photo mode is active it dims the rest of the HUD,
// draws cinematic letterbox bars, and offers preset framing controls + a capture button. Capture
// composites the live WebGL frame (grabbed via the page's `captureFn`) onto a postcard with a
// stats caption baked in, then offers it as a PNG download and an in-overlay preview. All the
-// non-visual logic (presets, caption lines, filename) lives in the pure cityPhotoMode helper.
+// non-visual logic (presets, caption lines, filename) lives in the pure openWorldPhotoMode helper.
// Composite the raw screenshot data URL onto a postcard: the city image with a subtle vignette,
-// a CYBERCITY title, and the stats caption along the bottom. Returns a PNG data URL. Runs on a
+// an OPENWORLD title, and the stats caption along the bottom. Returns a PNG data URL. Runs on a
// 2D canvas so it's independent of the WebGL renderer. Resolves null if the image fails to load.
function composePostcard(dataUrl, statLines) {
return new Promise((resolve) => {
@@ -36,7 +36,7 @@ function composePostcard(dataUrl, statLines) {
// Title
ctx.fillStyle = '#06b6d4';
ctx.font = `bold ${Math.round(img.height * 0.045)}px monospace`;
- ctx.fillText('CYBERCITY', pad, img.height - pad - Math.round(img.height * 0.04));
+ ctx.fillText('OPENWORLD', pad, img.height - pad - Math.round(img.height * 0.04));
// Stats caption — one line, separated by middots, right under the title.
ctx.fillStyle = '#cbd5e1';
@@ -73,7 +73,7 @@ function PresetControls({ presetId, onCycle }) {
);
}
-export default function CityPhotoOverlay({ active, presetId, onPresetChange, onExit, captureFnRef, statsSnapshot, dofEnabled = true, onToggleDof }) {
+export default function OpenWorldPhotoOverlay({ active, presetId, onPresetChange, onExit, captureFnRef, statsSnapshot, dofEnabled = true, onToggleDof }) {
const [postcard, setPostcard] = useState(null);
const [busy, setBusy] = useState(false);
@@ -166,10 +166,10 @@ export default function CityPhotoOverlay({ active, presetId, onPresetChange, onE
onClose={() => setPostcard(null)}
size="none"
usePortal
- ariaLabel="City postcard preview"
+ ariaLabel="OpenWorld postcard preview"
panelClassName="max-w-[80vw] max-h-[80vh] flex flex-col items-center gap-3"
>
- <img src={postcard} alt="City postcard" className="max-w-full max-h-[68vh] rounded-lg border border-cyan-500/40 shadow-[0_0_30px_rgba(6,182,212,0.3)]" />
+ <img src={postcard} alt="OpenWorld postcard" className="max-w-full max-h-[68vh] rounded-lg border border-cyan-500/40 shadow-[0_0_30px_rgba(6,182,212,0.3)]" />
<div className="flex gap-3">
<button
type="button"
diff --git a/client/src/components/city/CityPlaybackOverlay.jsx b/client/src/components/openworld/OpenWorldPlaybackOverlay.jsx
similarity index 95%
rename from client/src/components/city/CityPlaybackOverlay.jsx
rename to client/src/components/openworld/OpenWorldPlaybackOverlay.jsx
index 816a74f74c..0d3d69e82a 100644
--- a/client/src/components/city/CityPlaybackOverlay.jsx
+++ b/client/src/components/openworld/OpenWorldPlaybackOverlay.jsx
@@ -4,8 +4,8 @@ import { formatDateTime, timeAgo } from '../../utils/formatters';
// active it draws a bottom transport bar: play/pause, speed, a draggable timeline
// slider, frame-step buttons, the current frame's timestamp, and a note that the
// landmarks the snapshot can't replay are showing LIVE data (frozen during scrub).
-// Mirrors CityPhotoOverlay's bottom-bar styling. All transport logic lives in the
-// useCityPlayback hook; this is presentation only.
+// Mirrors OpenWorldPhotoOverlay's bottom-bar styling. All transport logic lives in the
+// useOpenWorldPlayback hook; this is presentation only.
// One historical stat chip; renders a null value as "—" so an unavailable
// capture reads distinctly from a real zero.
@@ -18,7 +18,7 @@ function Stat({ label, value, suffix = '' }) {
);
}
-export default function CityPlaybackOverlay({
+export default function OpenWorldPlaybackOverlay({
active,
loading,
error,
@@ -41,7 +41,7 @@ export default function CityPlaybackOverlay({
const ts = currentFrame?.ts;
return (
- <div className="absolute inset-0 z-30 pointer-events-none cybercity-themed">
+ <div className="absolute inset-0 z-30 pointer-events-none openworld-themed">
{/* Top-right: title + exit */}
<div className="absolute top-0 left-0 right-0 flex items-center justify-between px-6 py-4">
<div className="font-pixel text-[11px] text-cyan-400 tracking-widest" style={{ textShadow: '0 0 10px rgba(6,182,212,0.5)' }}>
diff --git a/client/src/components/city/CityProductivityDistrict.jsx b/client/src/components/openworld/OpenWorldProductivityDistrict.jsx
similarity index 72%
rename from client/src/components/city/CityProductivityDistrict.jsx
rename to client/src/components/openworld/OpenWorldProductivityDistrict.jsx
index 59c4b5a1d2..d33dc45e9c 100644
--- a/client/src/components/city/CityProductivityDistrict.jsx
+++ b/client/src/components/openworld/OpenWorldProductivityDistrict.jsx
@@ -1,25 +1,25 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeProductivityMonument } from '../../utils/cityProductivity';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeProductivityMonument } from '../../utils/openWorldProductivity';
-// CyberCity's productivity district (roadmap 2.6): a tapered streak monument (an obelisk on
+// OpenWorld's productivity district (roadmap 2.6): a tapered streak monument (an obelisk on
// a stepped plinth) in a southwest district. Its height and glow scale with the user's
// current CoS completion streak; its color tiers by recent velocity (green surging → blue
// steady → amber slowing → red idle). No productivity data reads dim slate ("NO DATA"),
// distinct from a real zero-day streak. The capstone pulses brighter the longer the streak,
-// faster while velocity is surging. Mirrors CityBackupVault / CityHealthTower.
-export default function CityProductivityDistrict({ productivityData, settings }) {
- const { tintStructure } = useCityPalette();
+// faster while velocity is surging. Mirrors OpenWorldBackupVault / OpenWorldHealthTower.
+export default function OpenWorldProductivityDistrict({ productivityData, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
const monument = useMemo(() => computeProductivityMonument(productivityData), [productivityData]);
const capRef = useRef();
// Honor the quality dial: drop the capstone pulse on the lowest preset, but keep the
// static glow so the streak is still legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !capRef.current) return;
@@ -67,18 +67,18 @@ export default function CityProductivityDistrict({ productivityData, settings })
</mesh>
{/* District title + streak above the monument */}
- <CityLabel position={[0, shaftTop + 2.6, 0]} fontSize={1.3} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
+ <OpenWorldLabel position={[0, shaftTop + 2.6, 0]} fontSize={1.3} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
{monument.streakLabel}
- </CityLabel>
- <CityLabel position={[0, shaftTop + 1.7, 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[0, shaftTop + 1.7, 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
{sublabel}
- </CityLabel>
+ </OpenWorldLabel>
</group>
{/* Ground readout of today's throughput */}
- <CityLabel position={[0, 0.05, baseWidth * 1.1]} rotation={[-Math.PI / 2, 0, 0]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
+ <OpenWorldLabel position={[0, 0.05, baseWidth * 1.1]} rotation={[-Math.PI / 2, 0, 0]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={22}>
{monument.completedToday !== null ? `TODAY ${monument.completedToday} DONE` : 'PRODUCTIVITY'}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityScanlines.jsx b/client/src/components/openworld/OpenWorldScanlines.jsx
similarity index 95%
rename from client/src/components/city/CityScanlines.jsx
rename to client/src/components/openworld/OpenWorldScanlines.jsx
index 29e9edf028..238a34437d 100644
--- a/client/src/components/city/CityScanlines.jsx
+++ b/client/src/components/openworld/OpenWorldScanlines.jsx
@@ -2,11 +2,11 @@ import { useState, useEffect } from 'react';
// CSS CRT overlay (scanlines + neon edge-glow + vignette) for the city scene.
// Each piece is opted in per theme via the `crt` profile (see deriveCrtProfile in
-// cityConstants) — scanlines and neon glow are cyber/terminal affectations, not
+// openWorldConstants) — scanlines and neon glow are cyber/terminal affectations, not
// universal, so clean themes (e.g. glass) get little or nothing. Glow color comes
// from the live --port-accent var so it tracks the active theme. All layers sit
// at z-10, below the HUD (z-20), so they only treat the 3D scene, not the panels.
-export default function CityScanlines({ settings, crt }) {
+export default function OpenWorldScanlines({ settings, crt }) {
const profile = crt || { scanlines: true, glow: true, vignette: true };
// The user toggle can only switch scanlines OFF for a theme that supports them;
// it can't force them onto a non-terminal theme (they'd be off-style there).
diff --git a/client/src/components/city/CityScene.jsx b/client/src/components/openworld/OpenWorldScene.jsx
similarity index 63%
rename from client/src/components/city/CityScene.jsx
rename to client/src/components/openworld/OpenWorldScene.jsx
index edcdf35d28..f9d9c817c4 100644
--- a/client/src/components/city/CityScene.jsx
+++ b/client/src/components/openworld/OpenWorldScene.jsx
@@ -2,68 +2,69 @@ import { useState, useCallback, useRef, useEffect, useMemo, Suspense } from 'rea
import * as THREE from 'three';
import { Canvas } from '@react-three/fiber';
import { OrbitControls } from '@react-three/drei';
-import CityGround from './CityGround';
-import CityLights from './CityLights';
-import CityParticles from './CityParticles';
-import CityStarfield from './CityStarfield';
-import CityCelestial from './CityCelestial';
+import WorldGround from './WorldGround';
+import OpenWorldLights from './OpenWorldLights';
+import OpenWorldParticles from './OpenWorldParticles';
+import OpenWorldStarfield from './OpenWorldStarfield';
+import OpenWorldCelestial from './OpenWorldCelestial';
import BuildingCluster from './BuildingCluster';
-import CityDataStreams from './CityDataStreams';
-import CityTraffic from './CityTraffic';
-import CityWeather from './CityWeather';
-import CityBillboards from './CityBillboards';
-import CityShootingStars from './CityShootingStars';
-import CityVolumetricLights from './CityVolumetricLights';
-import CitySkyline from './CitySkyline';
-import CityFederationHorizon from './CityFederationHorizon';
-import CityBackupVault from './CityBackupVault';
-import CityTaskQueue from './CityTaskQueue';
-import CityHealthTower from './CityHealthTower';
-import CityProductivityDistrict from './CityProductivityDistrict';
-import CityActivityHeatmap from './CityActivityHeatmap';
-import CityTaskFlowRiver from './CityTaskFlowRiver';
-import CityGoalMonuments from './CityGoalMonuments';
-import CityArtifacts from './CityArtifacts';
-import CitySeasonalDecor from './CitySeasonalDecor';
-import CityEasterEggs from './CityEasterEggs';
-import CityVoiceMarker from './CityVoiceMarker';
-import CityMemoryDistrict from './CityMemoryDistrict';
-import CityDataHarbor from './CityDataHarbor';
-import CityJiraDistrict from './CityJiraDistrict';
-import CityAiCore from './CityAiCore';
-import CityDataRain from './CityDataRain';
-import CityNeonSigns from './CityNeonSigns';
-import CityEmbers from './CityEmbers';
-import CitySignalBeacons from './CitySignalBeacons';
-import CitySky from './CitySky';
-import CityGalaxySky from './CityGalaxySky';
-import CityLandscape from './CityLandscape';
-import CityWater from './CityWater';
-import CityStreets from './CityStreets';
-import CityStreetProps from './CityStreetProps';
-import CityTransitLoop from './CityTransitLoop';
-import CityEnergyOverlay from './CityEnergyOverlay';
+import OpenWorldDataStreams from './OpenWorldDataStreams';
+import OpenWorldTraffic from './OpenWorldTraffic';
+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';
+import OpenWorldHealthTower from './OpenWorldHealthTower';
+import OpenWorldProductivityDistrict from './OpenWorldProductivityDistrict';
+import OpenWorldActivityHeatmap from './OpenWorldActivityHeatmap';
+import OpenWorldTaskFlowRiver from './OpenWorldTaskFlowRiver';
+import OpenWorldGoalMonuments from './OpenWorldGoalMonuments';
+import OpenWorldArtifacts from './OpenWorldArtifacts';
+import OpenWorldSeasonalDecor from './OpenWorldSeasonalDecor';
+import OpenWorldEasterEggs from './OpenWorldEasterEggs';
+import OpenWorldVoiceMarker from './OpenWorldVoiceMarker';
+import OpenWorldMemoryDistrict from './OpenWorldMemoryDistrict';
+import OpenWorldDataHarbor from './OpenWorldDataHarbor';
+import OpenWorldJiraDistrict from './OpenWorldJiraDistrict';
+import OpenWorldAiCore from './OpenWorldAiCore';
+import OpenWorldDataRain from './OpenWorldDataRain';
+import OpenWorldNeonSigns from './OpenWorldNeonSigns';
+import OpenWorldEmbers from './OpenWorldEmbers';
+import OpenWorldSignalBeacons from './OpenWorldSignalBeacons';
+import OpenWorldSky from './OpenWorldSky';
+import OpenWorldGalaxySky from './OpenWorldGalaxySky';
+import OpenWorldLandscape from './OpenWorldLandscape';
+import OpenWorldWater from './OpenWorldWater';
+import OpenWorldStreets from './OpenWorldStreets';
+import OpenWorldStreetProps from './OpenWorldStreetProps';
+import OpenWorldTransitLoop from './OpenWorldTransitLoop';
+import OpenWorldEnergyOverlay from './OpenWorldEnergyOverlay';
import PlayerController from './PlayerController';
import CameraTransition from './CameraTransition';
-import CityFocusCamera from './CityFocusCamera';
-import CityPhotoCamera from './CityPhotoCamera';
-import CityDepthOfField from './CityDepthOfField';
-import CityAdaptiveQuality from './CityAdaptiveQuality';
-import { cityDayMix, getTimeOfDayPreset } from './cityConstants';
-import { CITY_MAX_ORBIT_DISTANCE } from '../../utils/cityFocusCamera';
-import { CityPaletteProvider } from './CityPaletteContext';
+import OpenWorldFocusCamera from './OpenWorldFocusCamera';
+import OpenWorldPhotoCamera from './OpenWorldPhotoCamera';
+import OpenWorldDepthOfField from './OpenWorldDepthOfField';
+import OpenWorldAdaptiveQuality from './OpenWorldAdaptiveQuality';
+import { openWorldDayMix, getTimeOfDayPreset } from './openWorldConstants';
+import { CITY_MAX_ORBIT_DISTANCE } from '../../utils/openWorldFocusCamera';
+import { listRegions } from '../../utils/openWorldRegions';
+import { OpenWorldPaletteProvider } from './OpenWorldPaletteContext';
import ErrorBoundary from '../ErrorBoundary';
import { useVisibilityEvent } from '../../hooks/useVisibilityEvent';
const STARTUP_PARTICLE_DENSITY = 0.49;
-export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCameraView, cosStatus, reviewCounts, instances, backupStatus, cosTasks, healthMetrics, voiceState, aiActivity, productivityData, activityCalendar, goals, character, chronotype, memoryGraph, inboxDepth, jiraTickets, introspection, playback = false, photoMode, photoPresetId, photoDof, onPhotoCaptureReady, settings, playSfx, keysRef, dimmedAppIds, focusedAppId, focusedRegion, playerTeleport, hudSafe, background, palette, autoQuality = false, autoStartTier = 'high', autoResetToken = 0, diagnosticsEnabled = false, onAutoTierChange, onAutoDiagnostics }) {
+export default function OpenWorldScene({ apps, agentMap, onBuildingClick, onToggleCameraView, cosStatus, reviewCounts, instances, backupStatus, cosTasks, healthMetrics, voiceState, aiActivity, productivityData, activityCalendar, goals, character, chronotype, memoryGraph, inboxDepth, jiraTickets, introspection, playback = false, photoMode, photoPresetId, photoDof, onPhotoCaptureReady, settings, playSfx, keysRef, dimmedAppIds, focusedAppId, focusedRegion, playerTeleport, hudSafe, background, palette, onTravelToRegion, autoQuality = false, autoStartTier = 'high', autoResetToken = 0, diagnosticsEnabled = false, onAutoTierChange, onAutoDiagnostics }) {
const [positions, setPositions] = useState(null);
const [proximityApp, setProximityApp] = useState(null);
const [transitioning, setTransitioning] = useState(false);
const [webglLost, setWebglLost] = useState(false);
const [startupSettled, setStartupSettled] = useState(false);
- // Visibility-aware frameloop (issue #2592): pause the live City render loop while the
+ // Visibility-aware frameloop (issue #2592): pause the live OpenWorld render loop while the
// tab is hidden, resume (with a fresh warm-up) when it's shown again. `resumeToken`
// bumps on each show so the warm-up effect re-runs and the adaptive budget re-arms.
const [documentHidden, setDocumentHidden] = useState(
@@ -84,19 +85,20 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
const contextCleanupRef = useRef(null);
const contextLostTimerRef = useRef(null);
const activeCanvasRef = useRef(null);
- // Shared between CityDepthOfField (which owns the EffectComposer while photo mode is on) and
- // CityPhotoCamera (whose capture path renders through that composer so the postcard matches the
+ // Shared between OpenWorldDepthOfField (which owns the EffectComposer while photo mode is on) and
+ // OpenWorldPhotoCamera (whose capture path renders through that composer so the postcard matches the
// DoF preview). Null whenever DoF isn't mounted — capture then falls back to a plain render.
const photoComposerRef = useRef(null);
const explorationMode = settings?.explorationMode || false;
// Art direction gate, read off the palette every other themed surface already consumes
- // (Building, ProcessBuilding, CityLandscape) rather than re-resolving the style from
+ // (Building, ProcessBuilding, OpenWorldLandscape) rather than re-resolving the style from
// settings — one bit, one channel. The neon-night layers below (galaxy spheremap,
// starfield/shooting stars, data rain, embers, volumetric light cones, neon signage)
- // belong to the CyberCity style; over the Vibes world's sunlit low-poly landscape they
+ // belong to the OpenWorld style; over the Vibes world's sunlit low-poly landscape they
// read as haze and grain, so they don't mount at all rather than fading per-frame.
const neonLayers = Boolean(palette?.neonLayers);
+ const warpRegions = useMemo(() => listRegions(), []);
useEffect(() => {
if (photoMode) {
@@ -114,7 +116,7 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
if (photoMode || startupSettled) return settings;
// During the startup (and post-visibility-resume) warm-up, drop to the cheapest
// render path. `effectiveTier: 'low'` also suppresses set dressing + the ray-marched
- // interior-window shader via cityShowDetail/cityShowInteriorWindows — previously the
+ // interior-window shader via openWorldShowDetail/openWorldShowInteriorWindows — previously the
// clamped particleDensity (0.49) did that implicitly; the explicit tier now owns it.
return {
...settings,
@@ -180,9 +182,9 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
const rawDpr = renderSettings?.dpr || [1, 1.25];
const dprLimit = photoMode ? 1.5 : 1.25;
const dpr = rawDpr.map(value => Math.min(value, dprLimit));
- const showGradientBackground = cityDayMix(renderSettings) > 0.5;
+ const showGradientBackground = openWorldDayMix(renderSettings) > 0.5;
const sceneClearColor = background || '#030308';
- // The pre-canvas / WebGL-lost backdrop. Under CyberCity's daylight it's the blue sky
+ // The pre-canvas / WebGL-lost backdrop. Under OpenWorld's daylight it's the blue sky
// gradient; under the Vibes style the sky is warm at the horizon, so it takes its bands
// from the resolved scene color rather than the hardcoded cyber gradient.
const skyPreset = getTimeOfDayPreset(renderSettings?.timeOfDay ?? 'sunset');
@@ -233,7 +235,7 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
shadows={false}
// 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. CityPhotoCamera pumps invalidate() during the fly; capture renders
+ // deliberate shot. OpenWorldPhotoCamera pumps invalidate() during the fly; capture renders
// directly via gl.render(). Live mode keeps the always-on loop the dashboard relies on —
// except while the tab is hidden, where "never" halts rendering entirely (issue #2592).
// Photo mode always keeps its own demand loop so capture still works in a hidden tab.
@@ -246,9 +248,9 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
gl={{ antialias: true, preserveDrawingBuffer: Boolean(photoMode), alpha: false, powerPreference: 'high-performance' }}
>
{/* Re-provide the themed palette INSIDE the Canvas — react-three-fiber runs its
- own reconciler, so the provider in CyberCityInner doesn't reach these scene
+ own reconciler, so the provider in OpenWorldInner doesn't reach these scene
components. Plain React Context.Provider works across the r3f tree. */}
- <CityPaletteProvider palette={palette}>
+ <OpenWorldPaletteProvider palette={palette}>
{/* Exactly one owner for scene.background, written as a ternary so the invariant is
structural rather than two conditions a reader has to De Morgan: the galaxy
Environment (the equirectangular spheremap) and a solid <color attach="background">
@@ -261,45 +263,45 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
{neonLayers && !showGradientBackground ? (
<ErrorBoundary fallback={null}>
<Suspense fallback={null}>
- <CityGalaxySky settings={renderSettings} />
+ <OpenWorldGalaxySky settings={renderSettings} />
</Suspense>
</ErrorBoundary>
) : (
<color attach="background" args={[sceneClearColor]} />
)}
- <CitySky settings={renderSettings} />
+ <OpenWorldSky settings={renderSettings} />
{/* `lightingTier` is the SETTLED tier, deliberately not the warm-up-clamped
one: the accent-light gate changes the scene's light COUNT, which is part
of three.js's shader program cache key, so letting the clamp toggle it
would recompile every lit material 1.2s into each load. */}
- <CityLights settings={renderSettings} lightingTier={settings?.effectiveTier} />
- <CityLandscape settings={renderSettings} />
- <CityWater settings={renderSettings} />
- <CityEnergyOverlay chronotype={chronotype} settings={renderSettings} />
- {neonLayers && <CityStarfield settings={renderSettings} />}
- {neonLayers && <CityShootingStars playSfx={playSfx} settings={renderSettings} />}
- {!explorationMode && <CityCelestial settings={renderSettings} />}
- <CitySkyline settings={renderSettings} />
- <CityFederationHorizon instances={instances} settings={renderSettings} />
- <CityBackupVault backupStatus={backupStatus} settings={renderSettings} />
- <CityTaskQueue cosTasks={cosTasks} settings={renderSettings} />
- <CityHealthTower healthMetrics={healthMetrics} settings={renderSettings} />
- <CityProductivityDistrict productivityData={productivityData} settings={renderSettings} />
- <CityActivityHeatmap calendarData={activityCalendar} settings={renderSettings} />
- <CityTaskFlowRiver cosTasks={cosTasks} productivityData={productivityData} calendarData={activityCalendar} settings={renderSettings} />
- <CityGoalMonuments goals={goals} settings={renderSettings} />
- <CityArtifacts character={character} goals={goals} productivityData={productivityData} settings={renderSettings} />
- <CitySeasonalDecor settings={renderSettings} />
- <CityEasterEggs character={character} goals={goals} productivityData={productivityData} settings={renderSettings} />
- <CityVoiceMarker voiceState={voiceState} settings={renderSettings} />
- <CityMemoryDistrict memoryGraph={memoryGraph} inboxDepth={inboxDepth} settings={renderSettings} />
- <CityDataHarbor introspection={introspection} settings={renderSettings} />
- <CityJiraDistrict jiraTickets={jiraTickets} settings={renderSettings} />
- <CityAiCore aiActivity={aiActivity} positions={positions} apps={apps} settings={renderSettings} />
- <CityGround settings={renderSettings} />
- <CityStreets settings={renderSettings} />
- <CityStreetProps settings={renderSettings} />
- <CityTransitLoop settings={renderSettings} />
+ <OpenWorldLights settings={renderSettings} lightingTier={settings?.effectiveTier} />
+ <OpenWorldLandscape settings={renderSettings} />
+ <OpenWorldWater settings={renderSettings} />
+ <OpenWorldEnergyOverlay chronotype={chronotype} settings={renderSettings} />
+ {neonLayers && <OpenWorldStarfield settings={renderSettings} />}
+ {neonLayers && <OpenWorldShootingStars playSfx={playSfx} settings={renderSettings} />}
+ {!explorationMode && <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} productivityData={productivityData} settings={renderSettings} />
+ <OpenWorldSeasonalDecor settings={renderSettings} />
+ <OpenWorldEasterEggs character={character} goals={goals} productivityData={productivityData} settings={renderSettings} />
+ <OpenWorldVoiceMarker voiceState={voiceState} settings={renderSettings} />
+ <OpenWorldMemoryDistrict memoryGraph={memoryGraph} inboxDepth={inboxDepth} settings={renderSettings} />
+ <OpenWorldDataHarbor introspection={introspection} settings={renderSettings} />
+ <OpenWorldJiraDistrict jiraTickets={jiraTickets} settings={renderSettings} />
+ <OpenWorldAiCore aiActivity={aiActivity} positions={positions} apps={apps} settings={renderSettings} />
+ <WorldGround settings={renderSettings} />
+ <OpenWorldStreets settings={renderSettings} />
+ <OpenWorldStreetProps settings={renderSettings} />
+ <OpenWorldTransitLoop settings={renderSettings} />
<BuildingCluster
apps={apps}
@@ -313,9 +315,9 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
focusedAppId={focusedAppId}
playback={playback}
/>
- <CityDataStreams positions={positions} apps={apps} agentMap={agentMap} />
- <CityTraffic positions={positions} />
- <CityBillboards
+ <OpenWorldDataStreams positions={positions} apps={apps} agentMap={agentMap} />
+ <OpenWorldTraffic positions={positions} />
+ <OpenWorldBillboards
positions={positions}
apps={apps}
cosStatus={cosStatus}
@@ -323,13 +325,20 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
instances={instances}
productivityData={productivityData}
/>
- <CitySignalBeacons positions={positions} reviewCounts={reviewCounts} instances={instances} settings={renderSettings} />
- {neonLayers && <CityVolumetricLights positions={positions} settings={renderSettings} />}
- {neonLayers && <CityNeonSigns positions={positions} />}
- <CityWeather stoppedCount={stoppedCount} totalCount={totalCount} playSfx={playSfx} />
- {neonLayers && <CityDataRain settings={renderSettings} />}
- {neonLayers && <CityEmbers settings={renderSettings} />}
- <CityParticles settings={renderSettings} />
+ <OpenWorldSignalBeacons
+ positions={positions}
+ reviewCounts={reviewCounts}
+ instances={instances}
+ settings={renderSettings}
+ activeRegionId={focusedRegion?.id}
+ onTravelToRegion={onTravelToRegion}
+ />
+ {neonLayers && <OpenWorldVolumetricLights positions={positions} settings={renderSettings} />}
+ {neonLayers && <OpenWorldNeonSigns positions={positions} />}
+ <OpenWorldWeather stoppedCount={stoppedCount} totalCount={totalCount} playSfx={playSfx} />
+ {neonLayers && <OpenWorldDataRain settings={renderSettings} />}
+ {neonLayers && <OpenWorldEmbers settings={renderSettings} />}
+ <OpenWorldParticles settings={renderSettings} />
{explorationMode && (
<PlayerController
keysRef={keysRef}
@@ -342,6 +351,8 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
transitioning={transitioning}
cameraView={settings?.cameraView ?? 'third'}
teleport={playerTeleport}
+ warpPads={warpRegions}
+ onWarpPadInteract={onTravelToRegion}
/>
)}
{!explorationMode && !transitioning && !photoMode && (
@@ -371,7 +382,7 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
changes back up to the page. Never mounted in photo mode (its demand loop
isn't a steady-state signal). Renders nothing. */}
{!photoMode && (
- <CityAdaptiveQuality
+ <OpenWorldAdaptiveQuality
enabled={autoQuality}
startTier={autoStartTier}
resumeToken={budgetRearmToken}
@@ -389,7 +400,7 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
exploration/photo, which own the camera). Placed AFTER CameraTransition so its per-frame
camera write wins during any brief overlap on load. */}
{!explorationMode && !photoMode && (
- <CityFocusCamera
+ <OpenWorldFocusCamera
focusedAppId={focusedAppId}
focusedRegion={focusedRegion}
positions={positions}
@@ -398,14 +409,14 @@ export default function CityScene({ apps, agentMap, onBuildingClick, onToggleCam
hudSafe={hudSafe}
/>
)}
- <CityPhotoCamera active={photoMode} presetId={photoPresetId} onReady={onPhotoCaptureReady} composerRef={photoComposerRef} />
+ <OpenWorldPhotoCamera active={photoMode} presetId={photoPresetId} onReady={onPhotoCaptureReady} composerRef={photoComposerRef} />
{/* Depth-of-field is photo-mode-only: mounting it here (never in the live dashboard) keeps the
extra composer render targets off the always-on frameloop. It stays mounted for the whole
photo session and toggles only the bokeh pass via `enabled` — mounting/unmounting per
toggle would churn render-loop ownership and could strand a blurred frozen frame on screen
when DoF flips off mid-freeze. */}
- {photoMode && <CityDepthOfField presetId={photoPresetId} enabled={photoDof} composerRef={photoComposerRef} />}
- </CityPaletteProvider>
+ {photoMode && <OpenWorldDepthOfField presetId={photoPresetId} enabled={photoDof} composerRef={photoComposerRef} />}
+ </OpenWorldPaletteProvider>
</Canvas>
</div>
);
diff --git a/client/src/components/city/CitySeasonalDecor.jsx b/client/src/components/openworld/OpenWorldSeasonalDecor.jsx
similarity index 81%
rename from client/src/components/city/CitySeasonalDecor.jsx
rename to client/src/components/openworld/OpenWorldSeasonalDecor.jsx
index 521d2814c4..09c981c627 100644
--- a/client/src/components/city/CitySeasonalDecor.jsx
+++ b/client/src/components/openworld/OpenWorldSeasonalDecor.jsx
@@ -1,15 +1,15 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
import { useTimeTick } from '../../hooks/useTimeTick';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import CityLabel from './CityLabel';
-import { computeSeasonalDecor, SEASONAL_DECOR } from '../../utils/citySeasonalDecor';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeSeasonalDecor, SEASONAL_DECOR } from '../../utils/openWorldSeasonalDecor';
-// CyberCity's seasonal decorations (roadmap 3.5 follow-up, #824): date-driven city dressing
+// OpenWorld's seasonal decorations (roadmap 3.5 follow-up, #824): date-driven city dressing
// that layers the active season's (or holiday's) palette onto a loose ring of glowing accent
// props around the city's edge. The theme is resolved from a date — a holiday window
// (New Year, Halloween, …) overrides the broad season. Props bob/shimmer (each on its own
-// phase offset) gated on the quality dial (mirrors CityArtifacts / CityGoalMonuments).
+// phase offset) gated on the quality dial (mirrors OpenWorldArtifacts / OpenWorldGoalMonuments).
function Decoration({ decoration, color, accent, animate }) {
const { position, phase } = decoration;
const s = SEASONAL_DECOR.propSize;
@@ -45,9 +45,9 @@ function Decoration({ decoration, color, accent, animate }) {
);
}
-export default function CitySeasonalDecor({ date, settings }) {
+export default function OpenWorldSeasonalDecor({ date, settings }) {
// Re-resolve the theme as real time advances so the dressing turns over at midnight / a holiday
- // boundary while CyberCity stays open — an hourly tick is plenty for a calendar-day theme and is
+ // boundary while OpenWorld stays open — an hourly tick is plenty for a calendar-day theme and is
// battery-friendly (shared singleton timer, paused while the tab is hidden). An explicit `date`
// prop still wins for callers/tests; the pure helper is what the unit tests exercise directly.
const tick = useTimeTick(3600000);
@@ -58,7 +58,7 @@ export default function CitySeasonalDecor({ date, settings }) {
// Honor the quality dial: drop the bob/shimmer on the lowest preset, keep the static glow.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
if (!decor.hasData) return null;
@@ -71,9 +71,9 @@ export default function CitySeasonalDecor({ date, settings }) {
))}
{/* Season/holiday banner high above the city center so it reads as ambient context. */}
- <CityLabel position={[base[0], 34, base[2]]} fontSize={1.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={40}>
+ <OpenWorldLabel position={[base[0], 34, base[2]]} fontSize={1.6} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={40}>
{label}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CitySettingsContext.jsx b/client/src/components/openworld/OpenWorldSettingsContext.jsx
similarity index 52%
rename from client/src/components/city/CitySettingsContext.jsx
rename to client/src/components/openworld/OpenWorldSettingsContext.jsx
index 394b6c7349..9abf983140 100644
--- a/client/src/components/city/CitySettingsContext.jsx
+++ b/client/src/components/openworld/OpenWorldSettingsContext.jsx
@@ -1,10 +1,10 @@
import { createContext, useContext, useMemo } from 'react';
-import useCitySettings from '../../hooks/useCitySettings';
+import useOpenWorldSettings from '../../hooks/useOpenWorldSettings';
-const CitySettingsContext = createContext(null);
+const OpenWorldSettingsContext = createContext(null);
-export function CitySettingsProvider({ children }) {
- const [settings, updateSetting, resetSettings, resetNonce] = useCitySettings();
+export function OpenWorldSettingsProvider({ children }) {
+ const [settings, updateSetting, resetSettings, resetNonce] = useOpenWorldSettings();
const value = useMemo(
() => ({ settings, updateSetting, resetSettings, resetNonce }),
@@ -12,14 +12,14 @@ export function CitySettingsProvider({ children }) {
);
return (
- <CitySettingsContext.Provider value={value}>
+ <OpenWorldSettingsContext.Provider value={value}>
{children}
- </CitySettingsContext.Provider>
+ </OpenWorldSettingsContext.Provider>
);
}
-export function useCitySettingsContext() {
- const ctx = useContext(CitySettingsContext);
+export function useOpenWorldSettingsContext() {
+ const ctx = useContext(OpenWorldSettingsContext);
if (!ctx) return { settings: null, updateSetting: () => {}, resetSettings: () => {}, resetNonce: 0 };
return ctx;
}
diff --git a/client/src/components/city/CitySettingsDrawer.jsx b/client/src/components/openworld/OpenWorldSettingsDrawer.jsx
similarity index 93%
rename from client/src/components/city/CitySettingsDrawer.jsx
rename to client/src/components/openworld/OpenWorldSettingsDrawer.jsx
index 6ac188cc8b..c61a11eeb6 100644
--- a/client/src/components/city/CitySettingsDrawer.jsx
+++ b/client/src/components/openworld/OpenWorldSettingsDrawer.jsx
@@ -1,9 +1,9 @@
import Drawer from '../Drawer';
import useDrawerTab from '../../hooks/useDrawerTab';
-import { useCitySettingsContext } from './CitySettingsContext';
-import { QUALITY_PRESETS } from '../../hooks/useCitySettings';
-import { SOUNDSCAPE_MOODS, isSoundscapeMood } from '../../utils/citySoundscape';
-import { WORLD_STYLE_DEFS, WORLD_STYLES, resolveWorldStyle } from './cityConstants';
+import { useOpenWorldSettingsContext } from './OpenWorldSettingsContext';
+import { QUALITY_PRESETS } from '../../hooks/useOpenWorldSettings';
+import { SOUNDSCAPE_MOODS, isSoundscapeMood } from '../../utils/openWorldSoundscape';
+import { WORLD_STYLE_DEFS, WORLD_STYLES, resolveWorldStyle } from './openWorldConstants';
// Derived from the style table, so registering a style makes it pickable — no second list.
const WORLD_STYLE_OPTIONS = WORLD_STYLES.map((key) => ({ key, label: WORLD_STYLE_DEFS[key].label }));
@@ -17,11 +17,11 @@ const SOUNDSCAPE_OPTIONS = [
...SOUNDSCAPE_MOODS.map(mood => ({ value: mood, label: mood.toUpperCase() })),
];
-// City settings migrated onto the shared tabbed <Drawer> (issue #2591) — replaces
+// OpenWorld settings migrated onto the shared tabbed <Drawer> (issue #2591) — replaces
// the old bespoke bottom-right 19rem page-length scroller. Grouped into
// Performance / Audio / Visual / Explore so no single tab is a long scroll, with the
-// active tab deep-linked through the `cityTab` URL param (useDrawerTab). All mutable
-// state lives in CitySettingsContext ABOVE this remounting body, so switching tabs
+// active tab deep-linked through the `openWorldTab` URL param (useDrawerTab). All mutable
+// state lives in OpenWorldSettingsContext ABOVE this remounting body, so switching tabs
// (which remounts the body) never drops an edit.
function SettingToggle({ id, label, value, onChange, description, disabled = false }) {
@@ -147,14 +147,14 @@ function fmt(value, digits = 0) {
return typeof value === 'number' && Number.isFinite(value) ? value.toFixed(digits) : '—';
}
-export default function CitySettingsDrawer({ open, onClose, qualityMode = 'manual', effectiveTier = 'high', diagnostics = null }) {
- const { settings, updateSetting, resetSettings } = useCitySettingsContext();
- const [activeTab, setActiveTab] = useDrawerTab('cityTab', 'performance', TAB_IDS);
+export default function OpenWorldSettingsDrawer({ open, onClose, qualityMode = 'manual', effectiveTier = 'high', diagnostics = null }) {
+ const { settings, updateSetting, resetSettings } = useOpenWorldSettingsContext();
+ const [activeTab, setActiveTab] = useDrawerTab('openWorldTab', 'performance', TAB_IDS);
if (!open || !settings) return null;
// Auto quality mode (#2592). 'auto' engages the adaptive render budget; picking a named
- // preset pins Manual (handled in useCitySettings). In Auto the scene derives reflections +
+ // preset pins Manual (handled in useOpenWorldSettings). In Auto the scene derives reflections +
// particle density from the effective tier, so those (disabled) controls display the
// effective preset's values and follow live tier changes rather than a stale manual value.
const isAuto = qualityMode === 'auto';
@@ -170,17 +170,17 @@ export default function CitySettingsDrawer({ open, onClose, qualityMode = 'manua
<Drawer
open={open}
onClose={onClose}
- title="City Settings"
+ title="OpenWorld Settings"
size="sm"
tabs={CITY_SETTINGS_TABS}
activeTab={activeTab}
onTabChange={setActiveTab}
closeLabel="Close city settings"
- // Drawer portals to <body>, which leaves the page's `.cybercity-themed`
- // root behind — and the City HUD palette remap in index.css is written as
- // `.cybercity-themed <utility>` descendant selectors. Re-apply the class
+ // Drawer portals to <body>, which leaves the page's `.openworld-themed`
+ // root behind — and the OpenWorld HUD palette remap in index.css is written as
+ // `.openworld-themed <utility>` descendant selectors. Re-apply the class
// inside the portal so the panel keeps its themed ink/surfaces.
- portalClassName="cybercity-themed"
+ portalClassName="openworld-themed"
>
{activeTab === 'performance' && (
<div className="space-y-5">
diff --git a/client/src/components/city/CitySettingsDrawer.test.jsx b/client/src/components/openworld/OpenWorldSettingsDrawer.test.jsx
similarity index 82%
rename from client/src/components/city/CitySettingsDrawer.test.jsx
rename to client/src/components/openworld/OpenWorldSettingsDrawer.test.jsx
index d16ab7fb29..9849d924b3 100644
--- a/client/src/components/city/CitySettingsDrawer.test.jsx
+++ b/client/src/components/openworld/OpenWorldSettingsDrawer.test.jsx
@@ -1,8 +1,8 @@
import { describe, it, expect, vi } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
import { MemoryRouter, useLocation } from 'react-router';
-import CitySettingsDrawer from './CitySettingsDrawer';
-import { CitySettingsProvider } from './CitySettingsContext';
+import OpenWorldSettingsDrawer from './OpenWorldSettingsDrawer';
+import { OpenWorldSettingsProvider } from './OpenWorldSettingsContext';
function Loc() {
const l = useLocation();
@@ -12,17 +12,17 @@ function Loc() {
const renderDrawer = (search = '', onClose = () => {}) =>
render(
<MemoryRouter initialEntries={[`/openworld/settings${search}`]}>
- <CitySettingsProvider>
- <CitySettingsDrawer open onClose={onClose} />
- </CitySettingsProvider>
+ <OpenWorldSettingsProvider>
+ <OpenWorldSettingsDrawer open onClose={onClose} />
+ </OpenWorldSettingsProvider>
<Loc />
</MemoryRouter>,
);
-describe('CitySettingsDrawer', () => {
+describe('OpenWorldSettingsDrawer', () => {
it('renders the shared Drawer with the four grouped tabs', () => {
renderDrawer();
- expect(screen.getByRole('dialog', { name: 'City Settings' })).toBeInTheDocument();
+ expect(screen.getByRole('dialog', { name: 'OpenWorld Settings' })).toBeInTheDocument();
['Performance', 'Audio', 'Visual', 'Explore'].forEach(label => {
expect(screen.getByRole('tab', { name: label })).toBeInTheDocument();
});
@@ -35,21 +35,21 @@ describe('CitySettingsDrawer', () => {
fireEvent.click(screen.getByRole('tab', { name: 'Audio' }));
expect(screen.getByText('MUSIC')).toBeInTheDocument();
expect(screen.queryByText('QUALITY')).not.toBeInTheDocument();
- expect(screen.getByTestId('loc').textContent).toContain('cityTab=audio');
+ expect(screen.getByTestId('loc').textContent).toContain('openWorldTab=audio');
});
it('shows the Auto effective-tier label and local diagnostics when in Auto mode', () => {
render(
<MemoryRouter initialEntries={['/openworld/settings']}>
- <CitySettingsProvider>
- <CitySettingsDrawer
+ <OpenWorldSettingsProvider>
+ <OpenWorldSettingsDrawer
open
onClose={() => {}}
qualityMode="auto"
effectiveTier="medium"
diagnostics={{ fps: 58, p75: 16.2 }}
/>
- </CitySettingsProvider>
+ </OpenWorldSettingsProvider>
</MemoryRouter>,
);
// AUTO button reflects the effective tier, and the local diagnostics readout renders.
@@ -61,7 +61,7 @@ describe('CitySettingsDrawer', () => {
});
it('deep-links the active tab from the URL param', () => {
- renderDrawer('?cityTab=visual');
+ renderDrawer('?openWorldTab=visual');
expect(screen.getByText('VISUAL FX')).toBeInTheDocument();
expect(screen.getByRole('tab', { name: 'Visual', selected: true })).toBeInTheDocument();
});
@@ -75,7 +75,7 @@ describe('CitySettingsDrawer', () => {
it('offers a soundscape override with Auto plus every mood, and persists the choice', () => {
window.localStorage.clear();
- renderDrawer('?cityTab=audio');
+ renderDrawer('?openWorldTab=audio');
// The override rides with the music controls, so it appears once music is on.
expect(screen.queryByLabelText('SOUNDSCAPE')).toBeNull();
fireEvent.click(screen.getByRole('switch', { name: 'SYNTHWAVE' }));
@@ -98,9 +98,9 @@ describe('CitySettingsDrawer', () => {
it('renders nothing when closed', () => {
const { container } = render(
<MemoryRouter initialEntries={['/openworld']}>
- <CitySettingsProvider>
- <CitySettingsDrawer open={false} onClose={() => {}} />
- </CitySettingsProvider>
+ <OpenWorldSettingsProvider>
+ <OpenWorldSettingsDrawer open={false} onClose={() => {}} />
+ </OpenWorldSettingsProvider>
</MemoryRouter>,
);
expect(container.querySelector('[role="dialog"]')).toBeNull();
diff --git a/client/src/components/city/CityShootingStars.jsx b/client/src/components/openworld/OpenWorldShootingStars.jsx
similarity index 98%
rename from client/src/components/city/CityShootingStars.jsx
rename to client/src/components/openworld/OpenWorldShootingStars.jsx
index c520cbdf8b..3aaec07ae5 100644
--- a/client/src/components/city/CityShootingStars.jsx
+++ b/client/src/components/openworld/OpenWorldShootingStars.jsx
@@ -1,7 +1,7 @@
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { getTimeOfDayPreset } from './cityConstants';
+import { getTimeOfDayPreset } from './openWorldConstants';
// Vertex shader for shooting star trail
const TRAIL_VERT = `
@@ -190,7 +190,7 @@ function ShootingStar({ index, playSfx, daylightRef }) {
);
}
-export default function CityShootingStars({ playSfx, settings }) {
+export default function OpenWorldShootingStars({ playSfx, settings }) {
const daylightRef = useRef(0);
const timeOfDay = settings?.timeOfDay ?? 'sunset';
const skyTheme = settings?.skyTheme ?? 'cyberpunk';
diff --git a/client/src/components/openworld/OpenWorldSignalBeacons.jsx b/client/src/components/openworld/OpenWorldSignalBeacons.jsx
new file mode 100644
index 0000000000..284c53605f
--- /dev/null
+++ b/client/src/components/openworld/OpenWorldSignalBeacons.jsx
@@ -0,0 +1,214 @@
+import { useMemo, useRef } from 'react';
+import { useFrame } from '@react-three/fiber';
+import * as THREE from 'three';
+import { computeDistrictBounds } from '../../utils/openWorldMiniMap';
+import { listRegions, regionWarpPadPosition } from '../../utils/openWorldRegions';
+import { PIXEL_FONT_URL, openWorldDayMix, openWorldShowDetail } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+
+function SignalBeacon({ position, color, label, sublabel, intensity = 1, dayMix = 0 }) {
+ const { tintStructure } = useOpenWorldPalette();
+ const groupRef = useRef();
+ const glowRef = useRef();
+ const beamRef = useRef();
+
+ useFrame(({ clock }) => {
+ const t = clock.getElapsedTime();
+ const pulse = 0.7 + ((Math.sin(t * (1.5 + intensity)) + 1) / 2) * 0.8 * intensity;
+
+ if (groupRef.current) {
+ groupRef.current.position.y = position[1] + Math.sin(t * 0.6 + position[0]) * 0.1;
+ }
+ if (glowRef.current) {
+ glowRef.current.material.opacity = 0.15 * pulse;
+ glowRef.current.scale.setScalar(0.9 + pulse * 0.15);
+ }
+ if (beamRef.current) {
+ beamRef.current.material.opacity = Math.min(0.35, 0.08 + pulse * 0.08);
+ }
+ });
+
+ return (
+ <group ref={groupRef} position={position}>
+ <mesh ref={beamRef} position={[0, 2.8, 0]}>
+ <cylinderGeometry args={[0.08, 0.45, 5.5, 12, 1, true]} />
+ <meshBasicMaterial color={color} transparent opacity={0.18} side={THREE.DoubleSide} blending={THREE.AdditiveBlending} depthWrite={false} />
+ </mesh>
+
+ <mesh position={[0, 0.15, 0]}>
+ <cylinderGeometry args={[0.35, 0.45, 0.3, 10]} />
+ <meshStandardMaterial color={tintStructure('#0a0a18')} emissive={color} emissiveIntensity={0.35 * intensity} />
+ </mesh>
+
+ <mesh position={[0, 0.42, 0]}>
+ <sphereGeometry args={[0.18, 16, 16]} />
+ <meshBasicMaterial color={color} transparent opacity={0.95} />
+ </mesh>
+
+ <mesh ref={glowRef} position={[0, 0.42, 0]}>
+ <sphereGeometry args={[0.5, 16, 16]} />
+ <meshBasicMaterial color={color} transparent opacity={0.18} blending={THREE.AdditiveBlending} depthWrite={false} />
+ </mesh>
+
+ <OpenWorldLabel
+ position={[0, 5.9, 0]}
+ fontSize={0.32}
+ color={color}
+ dayMix={dayMix}
+ anchorX="center"
+ anchorY="middle"
+ font={PIXEL_FONT_URL}
+ >
+ {label}
+ </OpenWorldLabel>
+ {sublabel && (
+ <OpenWorldLabel
+ position={[0, 5.45, 0]}
+ fontSize={0.18}
+ color="#cbd5e1"
+ dayMix={dayMix}
+ anchorX="center"
+ anchorY="middle"
+ font={PIXEL_FONT_URL}
+ maxWidth={6}
+ >
+ {sublabel}
+ </OpenWorldLabel>
+ )}
+ </group>
+ );
+}
+
+function WarpPad({ region, active, detailed, dayMix, onTravel }) {
+ const { accent, tintStructure } = useOpenWorldPalette();
+ const groupRef = useRef();
+ const ringRef = useRef();
+ const beamRef = useRef();
+ const color = active ? '#fff4d6' : accent;
+ const position = regionWarpPadPosition(region);
+
+ useFrame(({ clock }) => {
+ if (!position) return;
+ const t = clock.getElapsedTime();
+ const pulse = 0.72 + (Math.sin(t * 2.2 + region.id.length) + 1) * 0.14;
+ if (groupRef.current) groupRef.current.position.y = position[1] + Math.sin(t * 0.8 + region.id.length) * 0.025;
+ if (ringRef.current) {
+ ringRef.current.rotation.z = t * 0.35;
+ ringRef.current.material.opacity = 0.35 + pulse * 0.25;
+ }
+ if (beamRef.current) beamRef.current.material.opacity = detailed ? 0.05 + pulse * 0.07 : 0;
+ });
+
+ if (!position) return null;
+
+ return (
+ <group
+ ref={groupRef}
+ position={position}
+ onClick={(event) => {
+ event.stopPropagation();
+ onTravel?.(region);
+ }}
+ >
+ {/* The pad is always present, including the low tier, because it is an interaction
+ surface rather than decoration. Its hit area is intentionally larger than the disc. */}
+ <mesh position={[0, 0, 0]}>
+ <cylinderGeometry args={[2.2, 2.2, 0.16, 24]} />
+ <meshStandardMaterial color={tintStructure('#13212a')} emissive={color} emissiveIntensity={active ? 1.1 : 0.5} roughness={0.8} metalness={0} />
+ </mesh>
+ <mesh ref={ringRef} position={[0, 0.1, 0]} rotation={[0, 0, Math.PI / 4]}>
+ <torusGeometry args={[1.45, 0.08, 8, 4]} />
+ <meshBasicMaterial color={color} transparent opacity={0.5} blending={THREE.AdditiveBlending} depthWrite={false} />
+ </mesh>
+ {detailed && (
+ <mesh ref={beamRef} position={[0, 3.2, 0]}>
+ <cylinderGeometry args={[0.08, 0.72, 6.2, 12, 1, true]} />
+ <meshBasicMaterial color={color} transparent opacity={0.1} blending={THREE.AdditiveBlending} depthWrite={false} side={THREE.DoubleSide} />
+ </mesh>
+ )}
+ <OpenWorldLabel
+ position={[0, detailed ? 6.45 : 2, 0]}
+ fontSize={detailed ? 0.3 : 0.22}
+ color={color}
+ dayMix={dayMix}
+ anchorX="center"
+ anchorY="middle"
+ font={PIXEL_FONT_URL}
+ >
+ {region.label}
+ </OpenWorldLabel>
+ {detailed && (
+ <OpenWorldLabel
+ position={[0, 5.98, 0]}
+ fontSize={0.16}
+ color="#d8e5ea"
+ dayMix={dayMix}
+ anchorX="center"
+ anchorY="middle"
+ font={PIXEL_FONT_URL}
+ >
+ F TO WARP
+ </OpenWorldLabel>
+ )}
+ </group>
+ );
+}
+
+export default function OpenWorldSignalBeacons({ positions, reviewCounts, instances, settings, activeRegionId, onTravelToRegion }) {
+ const dayMix = openWorldDayMix(settings);
+ const regions = useMemo(() => listRegions(), []);
+ const showDetail = openWorldShowDetail(settings);
+ const config = useMemo(() => {
+ if (!positions || positions.size === 0) return [];
+
+ const bounds = computeDistrictBounds(positions, 'downtown');
+ if (!bounds) return [];
+ const { minX, maxX, minZ, maxZ } = bounds;
+
+ const pending = reviewCounts?.total || 0;
+ const alerts = reviewCounts?.alert || 0;
+ const peers = instances?.peers || [];
+ const onlinePeers = peers.filter(peer => peer.status === 'online').length;
+ const totalNodes = 1 + peers.length;
+
+ return [
+ {
+ id: 'review-beacon',
+ position: [minX - 6, 0, minZ - 6],
+ color: alerts > 0 ? '#f97316' : '#06b6d4',
+ label: alerts > 0 ? 'REVIEW PRESSURE' : 'REVIEW HUB',
+ sublabel: pending > 0 ? `${pending} pending · ${alerts} alerts` : 'inbox clear',
+ intensity: alerts > 0 ? 1.6 : pending > 0 ? 1.1 : 0.7,
+ },
+ {
+ id: 'void-beacon',
+ position: [maxX + 8, 0, maxZ + 8],
+ color: onlinePeers > 0 ? '#8b5cf6' : '#64748b',
+ label: 'INSTANCE MESH',
+ sublabel: `${onlinePeers}/${totalNodes} nodes linked`,
+ intensity: onlinePeers > 0 ? 1.2 : 0.65,
+ }
+ ];
+ }, [positions, reviewCounts, instances]);
+
+ if (config.length === 0 && regions.length === 0) return null;
+
+ return (
+ <group>
+ {config.map(beacon => (
+ <SignalBeacon key={beacon.id} {...beacon} dayMix={dayMix} />
+ ))}
+ {regions.map((region) => (
+ <WarpPad
+ key={`warp-pad-${region.id}`}
+ region={region}
+ active={region.id === activeRegionId}
+ detailed={showDetail}
+ dayMix={dayMix}
+ onTravel={onTravelToRegion}
+ />
+ ))}
+ </group>
+ );
+}
diff --git a/client/src/components/city/CitySky.jsx b/client/src/components/openworld/OpenWorldSky.jsx
similarity index 97%
rename from client/src/components/city/CitySky.jsx
rename to client/src/components/openworld/OpenWorldSky.jsx
index a20fc035fa..e4879bbf1d 100644
--- a/client/src/components/city/CitySky.jsx
+++ b/client/src/components/openworld/OpenWorldSky.jsx
@@ -1,8 +1,8 @@
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { getTimeOfDayPreset, tintTowardAccent } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
+import { getTimeOfDayPreset, tintTowardAccent } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
const SUN_RADIUS = 100;
@@ -185,10 +185,10 @@ function CelestialBody({ groupRef }) {
);
}
-export default function CitySky({ settings }) {
+export default function OpenWorldSky({ settings }) {
// The upper sky bands are tinted toward the theme accent. Mirror it into a ref so
// the useFrame loop reads the current accent without re-subscribing each frame.
- const { accent } = useCityPalette();
+ const { accent } = useOpenWorldPalette();
const accentRef = useRef(accent);
accentRef.current = accent;
@@ -325,7 +325,7 @@ export default function CitySky({ settings }) {
return (
<group>
- {/* Dome radius must exceed the CityLandscape mountain ring (~1210 max extent)
+ {/* Dome radius must exceed the OpenWorldLandscape mountain ring (~1210 max extent)
so the horizon mountains sit INSIDE the dome and aren't occluded by the
opaque daytime sky. Kept under the camera far plane (2000). */}
<mesh material={skyMaterial} renderOrder={-1000}>
diff --git a/client/src/components/city/CitySkyline.jsx b/client/src/components/openworld/OpenWorldSkyline.jsx
similarity index 94%
rename from client/src/components/city/CitySkyline.jsx
rename to client/src/components/openworld/OpenWorldSkyline.jsx
index 0c108fb11d..8aa969c3f8 100644
--- a/client/src/components/city/CitySkyline.jsx
+++ b/client/src/components/openworld/OpenWorldSkyline.jsx
@@ -1,7 +1,7 @@
import { useMemo } from 'react';
import * as THREE from 'three';
-import { cityDayMix, seededRand } from './cityConstants';
-import { isInWater } from '../../utils/cityPlan';
+import { openWorldDayMix, seededRand } from './openWorldConstants';
+import { isInWater } from '../../utils/openWorldPlan';
// Distant cyberpunk skyline silhouettes with neon trim
// Creates a ring of faint skyscraper outlines around the city perimeter
@@ -84,8 +84,8 @@ function DistantBuilding({ position, width, height, color, accent, dayMix }) {
);
}
-export default function CitySkyline({ settings }) {
- const dayMix = cityDayMix(settings);
+export default function OpenWorldSkyline({ settings }) {
+ const dayMix = openWorldDayMix(settings);
const buildings = useMemo(() => {
const result = [];
const colors = ['#06b6d4', '#ec4899', '#8b5cf6', '#3b82f6', '#22c55e', '#f97316'];
diff --git a/client/src/components/city/CityStarfield.jsx b/client/src/components/openworld/OpenWorldStarfield.jsx
similarity index 97%
rename from client/src/components/city/CityStarfield.jsx
rename to client/src/components/openworld/OpenWorldStarfield.jsx
index c01063d382..bb82a16587 100644
--- a/client/src/components/city/CityStarfield.jsx
+++ b/client/src/components/openworld/OpenWorldStarfield.jsx
@@ -1,7 +1,7 @@
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { getTimeOfDayPreset } from './cityConstants';
+import { getTimeOfDayPreset } from './openWorldConstants';
const STAR_VERT = `
attribute float size;
@@ -37,7 +37,7 @@ const STAR_FRAG = `
}
`;
-export default function CityStarfield({ settings }) {
+export default function OpenWorldStarfield({ settings }) {
const pointsRef = useRef();
const matRef = useRef();
const daylightRef = useRef(0);
diff --git a/client/src/components/city/CityStreetProps.jsx b/client/src/components/openworld/OpenWorldStreetProps.jsx
similarity index 76%
rename from client/src/components/city/CityStreetProps.jsx
rename to client/src/components/openworld/OpenWorldStreetProps.jsx
index 9856cecb58..99984239f1 100644
--- a/client/src/components/city/CityStreetProps.jsx
+++ b/client/src/components/openworld/OpenWorldStreetProps.jsx
@@ -1,8 +1,8 @@
import { useMemo, useLayoutEffect, useRef } from 'react';
import * as THREE from 'three';
-import { cityDayMix, cityShowDetail, mixHex } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import { computeStreets, computeStreetProps } from '../../utils/cityPlan';
+import { openWorldDayMix, openWorldShowDetail, mixHex } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import { computeStreets, computeStreetProps } from '../../utils/openWorldPlan';
// Street furniture from the master plan: lamp posts pooling light along every street and
// holo-trees ringing the AI Core plaza. Everything is instanced — five draw calls cover
@@ -47,9 +47,9 @@ function Instances({ placements, geometry, geometryArgs, position, flat = false,
);
}
-export default function CityStreetProps({ settings }) {
- const { accent, tintStructure } = useCityPalette();
- const dayMix = cityDayMix(settings);
+export default function OpenWorldStreetProps({ settings }) {
+ const { accent, tintStructure, lowPoly, surface } = useOpenWorldPalette();
+ const dayMix = openWorldDayMix(settings);
const density = settings?.particleDensity ?? 1;
const props = useMemo(() => {
@@ -58,7 +58,7 @@ export default function CityStreetProps({ settings }) {
}, [density]);
// Low preset: streets only, no furniture.
- if (!cityShowDetail(settings) || (props.lamps.length === 0 && props.trees.length === 0)) return null;
+ if (!openWorldShowDetail(settings) || (props.lamps.length === 0 && props.trees.length === 0)) return null;
const lampGlow = mixHex(accent, '#fff7d6', 0.35);
const headOpacity = 0.95 * (1 - dayMix) + 0.4 * dayMix; // lamps rest by day
@@ -68,7 +68,7 @@ export default function CityStreetProps({ settings }) {
<group>
{/* Lamp poles */}
<Instances placements={props.lamps} geometry="cylinder" geometryArgs={[0.05, 0.08, 3.4, 6]} position={POLE_POS}>
- <meshStandardMaterial color={tintStructure('#141b2c')} roughness={0.7} metalness={0.45} />
+ <meshStandardMaterial {...surface} color={tintStructure('#141b2c')} roughness={0.7} metalness={lowPoly ? 0 : 0.45} />
</Instances>
{/* Lamp heads — emissive spheres standing in for point lights */}
<Instances placements={props.lamps} geometry="sphere" geometryArgs={[0.16, 10, 10]} position={HEAD_POS}>
@@ -88,17 +88,21 @@ export default function CityStreetProps({ settings }) {
)}
{/* Holo-tree trunks around the plaza */}
<Instances placements={props.trees} geometry="cylinder" geometryArgs={[0.07, 0.1, 1.1, 5]} position={TRUNK_POS}>
- <meshStandardMaterial color={tintStructure('#101626')} roughness={0.8} />
+ <meshStandardMaterial {...surface} color={tintStructure('#101626')} roughness={0.8} />
</Instances>
- {/* Holo-tree canopies — wireframe polyhedra, the city's "digital foliage" */}
+ {/* Vibes uses solid faceted foliage; cyber keeps the established wireframe holo-trees. */}
<Instances placements={props.trees} geometry="icosahedron" geometryArgs={[0.8, 1]} position={CANOPY_POS}>
- <meshBasicMaterial
- color={mixHex(accent, '#22c55e', 0.45)}
- wireframe
- transparent
- opacity={0.5 * (1 - dayMix) + 0.3 * dayMix}
- toneMapped={false}
- />
+ {lowPoly ? (
+ <meshStandardMaterial {...surface} color={mixHex(accent, '#5d916e', 0.55)} roughness={0.98} transparent opacity={0.9} />
+ ) : (
+ <meshBasicMaterial
+ color={mixHex(accent, '#22c55e', 0.45)}
+ wireframe
+ transparent
+ opacity={0.5 * (1 - dayMix) + 0.3 * dayMix}
+ toneMapped={false}
+ />
+ )}
</Instances>
</group>
);
diff --git a/client/src/components/city/CityStreets.jsx b/client/src/components/openworld/OpenWorldStreets.jsx
similarity index 90%
rename from client/src/components/city/CityStreets.jsx
rename to client/src/components/openworld/OpenWorldStreets.jsx
index 64d22fb3d8..84f4adb806 100644
--- a/client/src/components/city/CityStreets.jsx
+++ b/client/src/components/openworld/OpenWorldStreets.jsx
@@ -1,11 +1,11 @@
import { useMemo, useEffect } from 'react';
import * as THREE from 'three';
import { mergeGeometries } from 'three/addons/utils/BufferGeometryUtils.js';
-import { cityDayMix, mixHex, getAccentColor } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import { computeStreets, PARCELS } from '../../utils/cityPlan';
+import { openWorldDayMix, mixHex, getAccentColor } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import { computeStreets, PARCELS } from '../../utils/openWorldPlan';
-// The street network from the master plan (cityPlan.js): an octagonal ring road around
+// The street network from the master plan (openWorldPlan.js): an octagonal ring road around
// downtown, spokes out to every district, the grand avenue to the harbor, a plaza
// sidewalk ring, crosswalk bands, and a faint tinted ground pad under each district.
// Everything merges into THREE draw calls total (asphalt / neon edge strips / paint),
@@ -23,9 +23,9 @@ const flatRect = (x, z, length, width, angle, y) => {
return geom;
};
-export default function CityStreets({ settings }) {
- const { accent, neonAccents } = useCityPalette();
- const dayMix = cityDayMix(settings);
+export default function OpenWorldStreets({ settings }) {
+ const { accent, neonAccents } = useOpenWorldPalette();
+ const dayMix = openWorldDayMix(settings);
const streets = useMemo(() => computeStreets(), []);
diff --git a/client/src/components/city/CityTaskFlowRiver.jsx b/client/src/components/openworld/OpenWorldTaskFlowRiver.jsx
similarity index 92%
rename from client/src/components/city/CityTaskFlowRiver.jsx
rename to client/src/components/openworld/OpenWorldTaskFlowRiver.jsx
index a86e8e84cb..cc4e98fb80 100644
--- a/client/src/components/city/CityTaskFlowRiver.jsx
+++ b/client/src/components/openworld/OpenWorldTaskFlowRiver.jsx
@@ -1,16 +1,16 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { computeTaskQueue } from '../../utils/cityTaskQueue';
-import { computeTaskFlowRiver, recentCalendarThroughput } from '../../utils/cityTaskFlowRiver';
+import { computeTaskQueue } from '../../utils/openWorldTaskQueue';
+import { computeTaskFlowRiver, recentCalendarThroughput } from '../../utils/openWorldTaskFlowRiver';
-// CyberCity task-flow river (issue #817): an animated channel running from the task-queue
+// OpenWorld task-flow river (issue #817): an animated channel running from the task-queue
// warehouse to the productivity district, tying queued work to completed throughput. The
// channel WIDTH tracks the live backlog (more pending/in-progress/blocked work → broader) and
// the flow SPEED tracks recent throughput / queue drain. Flow nodes travel warehouse→monument
// along the channel; they animate only on the higher quality presets, while the channel bed
// itself stays drawn so the link between the two districts is always legible. Mirrors
-// CityProductivityDistrict / CityTaskQueue.
-export default function CityTaskFlowRiver({ cosTasks, productivityData, calendarData, settings }) {
+// OpenWorldProductivityDistrict / OpenWorldTaskQueue.
+export default function OpenWorldTaskFlowRiver({ cosTasks, productivityData, calendarData, settings }) {
const river = useMemo(() => {
const queue = computeTaskQueue(cosTasks);
// Recent throughput drives the current speed. Prefer today's completed count from the
diff --git a/client/src/components/city/CityTaskQueue.jsx b/client/src/components/openworld/OpenWorldTaskQueue.jsx
similarity index 79%
rename from client/src/components/city/CityTaskQueue.jsx
rename to client/src/components/openworld/OpenWorldTaskQueue.jsx
index 6b751b0493..cf8864a08d 100644
--- a/client/src/components/city/CityTaskQueue.jsx
+++ b/client/src/components/openworld/OpenWorldTaskQueue.jsx
@@ -1,11 +1,11 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeTaskQueue, TASK_QUEUE } from '../../utils/cityTaskQueue';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeTaskQueue, TASK_QUEUE } from '../../utils/openWorldTaskQueue';
-// CyberCity's CoS task-queue silhouette (roadmap 2.2): a warehouse east of downtown with
+// OpenWorld's CoS task-queue silhouette (roadmap 2.2): a warehouse east of downtown with
// a stack of crates whose height tracks the depth of the Chief-of-Staff task backlog.
// Crates pile up as tasks queue and clear as they complete; the warehouse roof light
// glows green while an agent is working a task and amber when a task is blocked. An
@@ -26,15 +26,15 @@ function Crate({ y, size, color, topGlow }) {
);
}
-export default function CityTaskQueue({ cosTasks, settings }) {
- const { tintStructure } = useCityPalette();
+export default function OpenWorldTaskQueue({ cosTasks, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
const queue = useMemo(() => computeTaskQueue(cosTasks), [cosTasks]);
const roofRef = useRef();
// Honor the quality dial: drop the roof-light pulse on the lowest preset, but keep the
// static glow so the queue state stays legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !roofRef.current) return;
@@ -90,12 +90,12 @@ export default function CityTaskQueue({ cosTasks, settings }) {
)}
{/* Label + count sublabel above the stack */}
- <CityLabel position={[0, stackTop + crateSize * (overflow ? 1.2 : 0.9), 0]} fontSize={1.1} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ <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
- </CityLabel>
- <CityLabel position={[0, stackTop + crateSize * (overflow ? 0.6 : 0.3), 0]} fontSize={0.8} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={20}>
+ </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}>
{sublabel}
- </CityLabel>
+ </OpenWorldLabel>
</group>
</group>
);
diff --git a/client/src/components/city/CityTraffic.jsx b/client/src/components/openworld/OpenWorldTraffic.jsx
similarity index 94%
rename from client/src/components/city/CityTraffic.jsx
rename to client/src/components/openworld/OpenWorldTraffic.jsx
index c6b60bc034..f7f73b8606 100644
--- a/client/src/components/city/CityTraffic.jsx
+++ b/client/src/components/openworld/OpenWorldTraffic.jsx
@@ -1,7 +1,7 @@
import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
-import { computeDistrictBounds } from '../../utils/cityMiniMap';
-import { useCityPalette } from './CityPaletteContext';
+import { computeDistrictBounds } from '../../utils/openWorldMiniMap';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
// A single flying hover vehicle
function HoverVehicle({ path, color, speed, offset, altitude }) {
@@ -70,8 +70,8 @@ function HoverVehicle({ path, color, speed, offset, altitude }) {
);
}
-export default function CityTraffic({ positions }) {
- const { neonAccents } = useCityPalette();
+export default function OpenWorldTraffic({ positions }) {
+ const { neonAccents } = useOpenWorldPalette();
// Generate traffic lanes based on building layout
const vehicles = useMemo(() => {
if (!positions || positions.size < 2) return [];
diff --git a/client/src/components/city/CityTransitLoop.jsx b/client/src/components/openworld/OpenWorldTransitLoop.jsx
similarity index 87%
rename from client/src/components/city/CityTransitLoop.jsx
rename to client/src/components/openworld/OpenWorldTransitLoop.jsx
index 86f4b4e259..88a25c6026 100644
--- a/client/src/components/city/CityTransitLoop.jsx
+++ b/client/src/components/openworld/OpenWorldTransitLoop.jsx
@@ -1,9 +1,9 @@
import { useMemo, useRef, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { cityDayMix, cityShowDetail, mixHex } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import { TRANSIT } from '../../utils/cityPlan';
+import { openWorldDayMix, openWorldShowDetail, mixHex } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import { TRANSIT } from '../../utils/openWorldPlan';
// The elevated transit loop from the master plan: a closed glowing track linking every
// quarter, with a few trams orbiting it — the city's "alive" motion layer. Native
@@ -12,10 +12,10 @@ import { TRANSIT } from '../../utils/cityPlan';
const TRAM_SIZE = [0.9, 0.5, 0.42];
-export default function CityTransitLoop({ settings }) {
- const { accent, tintStructure } = useCityPalette();
- const dayMix = cityDayMix(settings);
- const showTrams = cityShowDetail(settings);
+export default function OpenWorldTransitLoop({ settings }) {
+ const { accent, tintStructure } = useOpenWorldPalette();
+ const dayMix = openWorldDayMix(settings);
+ const showTrams = openWorldShowDetail(settings);
const curve = useMemo(() => {
const points = TRANSIT.stops.map((s) => new THREE.Vector3(...s.point));
diff --git a/client/src/components/city/CityTubeLine.jsx b/client/src/components/openworld/OpenWorldTubeLine.jsx
similarity index 88%
rename from client/src/components/city/CityTubeLine.jsx
rename to client/src/components/openworld/OpenWorldTubeLine.jsx
index bd536afaed..83c4e3baf3 100644
--- a/client/src/components/city/CityTubeLine.jsx
+++ b/client/src/components/openworld/OpenWorldTubeLine.jsx
@@ -2,13 +2,13 @@ import { useMemo, useEffect } from 'react';
import * as THREE from 'three';
// A thin glowing connector rendered as a native-three tube along a curve through `points`.
-// Used for CyberCity's light bridges (memory district) and goal-tree links. We deliberately do
+// Used for OpenWorld's light bridges (memory district) and goal-tree links. We deliberately do
// NOT use drei's <Line>: it builds a three-stdlib Line2 whose fat-line geometry needs
// `computeLineDistances`, and the bundled three-stdlib instance mismatches the app's three
// (0.182), so that method is missing on the reconciled object and the whole Canvas crashes
// ("m.computeLineDistances is not a function"). A TubeGeometry needs none of that, gives real
// width (native LineBasicMaterial ignores linewidth anyway), and reads better as a glow.
-export default function CityTubeLine({ points, color, radius = 0.08, opacity = 0.5, segments = 24 }) {
+export default function OpenWorldTubeLine({ points, color, radius = 0.08, opacity = 0.5, segments = 24 }) {
const geometry = useMemo(() => {
const pts = (points || []).filter(Boolean).map((p) => new THREE.Vector3(p[0], p[1], p[2]));
if (pts.length < 2) return null;
diff --git a/client/src/components/city/CityVitalsList.jsx b/client/src/components/openworld/OpenWorldVitalsList.jsx
similarity index 98%
rename from client/src/components/city/CityVitalsList.jsx
rename to client/src/components/openworld/OpenWorldVitalsList.jsx
index ec53daca4e..168a2ea8f2 100644
--- a/client/src/components/city/CityVitalsList.jsx
+++ b/client/src/components/openworld/OpenWorldVitalsList.jsx
@@ -1,12 +1,12 @@
import { useNavigate } from 'react-router';
import { formatDurationMs, formatMonthDay } from '../../utils/formatters';
-import { StatButton, metricColor } from './cityHudBits';
+import { StatButton, metricColor } from './openWorldHudBits';
// The System Vitals rows (uptime, health CPU/MEM/DISK, agents, stopped, archived,
// review, nodes, notifs, tasks, streak + the SYS.OK footer). Extracted from the
// desktop clock-rail so the SAME rows back both the desktop cockpit's vitals panel
// AND the compact/phone `vitals` disclosure surface — no divergent copies.
-export default function CityVitalsList({
+export default function OpenWorldVitalsList({
uptimeSeconds,
sentinel,
cpuPct,
diff --git a/client/src/components/city/CityVoiceMarker.jsx b/client/src/components/openworld/OpenWorldVoiceMarker.jsx
similarity index 73%
rename from client/src/components/city/CityVoiceMarker.jsx
rename to client/src/components/openworld/OpenWorldVoiceMarker.jsx
index 992e931dfd..27e2d18a13 100644
--- a/client/src/components/city/CityVoiceMarker.jsx
+++ b/client/src/components/openworld/OpenWorldVoiceMarker.jsx
@@ -1,24 +1,24 @@
import { useMemo, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
-import { PIXEL_FONT_URL, cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
-import { computeVoiceMarker } from '../../utils/cityVoiceMarker';
+import { PIXEL_FONT_URL, openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
+import { computeVoiceMarker } from '../../utils/openWorldVoiceMarker';
-// CyberCity's voice-agent district marker (roadmap 2.4): a modest ground-level beacon
+// OpenWorld's voice-agent district marker (roadmap 2.4): a modest ground-level beacon
// north of downtown — a low disc with a short pole and a glowing orb on top. The orb's
// color and pulse mirror the voice agent's live state: calm slate on standby, accent blue
// while listening, green while dictating, red on error, and barely-lit when voice mode is
// off. Keeps to a small footprint so it reads as a district marker, not a landmark.
-export default function CityVoiceMarker({ voiceState, settings }) {
- const { tintStructure } = useCityPalette();
+export default function OpenWorldVoiceMarker({ voiceState, settings }) {
+ const { tintStructure } = useOpenWorldPalette();
const marker = useMemo(() => computeVoiceMarker(voiceState), [voiceState]);
const orbRef = useRef();
// Honor the quality dial: drop the beacon pulse on the lowest preset, but keep the
// static glow so the voice state stays legible.
const animate = (settings?.particleDensity ?? 1) >= 0.5;
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
useFrame(({ clock }) => {
if (!animate || !orbRef.current) return;
@@ -53,12 +53,12 @@ export default function CityVoiceMarker({ voiceState, settings }) {
<meshStandardMaterial color={color} emissive={color} emissiveIntensity={marker.intensity} toneMapped={false} />
</mesh>
{/* Label + live-state sublabel above the beacon */}
- <CityLabel position={[0, poleHeight + beaconRadius * 0.6 + 1.6, 0]} fontSize={1} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
+ <OpenWorldLabel position={[0, poleHeight + beaconRadius * 0.6 + 1.6, 0]} fontSize={1} color={color} dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
VOICE
- </CityLabel>
- <CityLabel position={[0, poleHeight + beaconRadius * 0.6 + 0.9, 0]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
+ </OpenWorldLabel>
+ <OpenWorldLabel position={[0, poleHeight + beaconRadius * 0.6 + 0.9, 0]} fontSize={0.7} color="#94a3b8" dayMix={dayMix} anchorX="center" anchorY="middle" font={PIXEL_FONT_URL} maxWidth={16}>
{label}
- </CityLabel>
+ </OpenWorldLabel>
</group>
);
}
diff --git a/client/src/components/city/CityVolumetricLights.jsx b/client/src/components/openworld/OpenWorldVolumetricLights.jsx
similarity index 94%
rename from client/src/components/city/CityVolumetricLights.jsx
rename to client/src/components/openworld/OpenWorldVolumetricLights.jsx
index 6b87939498..a5fa1df7e0 100644
--- a/client/src/components/city/CityVolumetricLights.jsx
+++ b/client/src/components/openworld/OpenWorldVolumetricLights.jsx
@@ -1,9 +1,9 @@
import { useRef, useMemo, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { computeDistrictBounds } from '../../utils/cityMiniMap';
-import { cityDayMix } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
+import { computeDistrictBounds } from '../../utils/openWorldMiniMap';
+import { openWorldDayMix } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
// Volumetric light cone shader
const CONE_VERT = `
@@ -143,9 +143,9 @@ function ScanBeam({ start, end, color, speed = 0.2, delay = 0, intensityScale =
);
}
-export default function CityVolumetricLights({ positions, settings }) {
- const { neonAccents } = useCityPalette();
- const nightFade = 1 - cityDayMix(settings);
+export default function OpenWorldVolumetricLights({ positions, settings }) {
+ const { neonAccents } = useOpenWorldPalette();
+ const nightFade = 1 - openWorldDayMix(settings);
const beams = useMemo(() => {
if (!positions || positions.size < 2) return { lights: [], scans: [] };
diff --git a/client/src/components/city/CityWater.jsx b/client/src/components/openworld/OpenWorldWater.jsx
similarity index 86%
rename from client/src/components/city/CityWater.jsx
rename to client/src/components/openworld/OpenWorldWater.jsx
index 838d7664b1..ab6211273d 100644
--- a/client/src/components/city/CityWater.jsx
+++ b/client/src/components/openworld/OpenWorldWater.jsx
@@ -1,15 +1,15 @@
import { useMemo, useEffect, useRef } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { cityDayMix, mixHex } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import { WORLD } from '../../utils/cityPlan';
+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 cityPlan.js — the Data Harbor's piers stand over it, the federation peers
+// (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 cityDayMix like every surface.
+// city's no-postprocessing rule. Day/night follows openWorldDayMix like every surface.
const NIGHT_WATER = '#050d1c'; // near-black ink so neon reflections read
const DAY_WATER = '#2e4f6e'; // steel-blue daytime bay
@@ -43,9 +43,9 @@ const makeWaveTexture = () => {
return tex;
};
-export default function CityWater({ settings }) {
- const { accent } = useCityPalette();
- const dayMix = cityDayMix(settings);
+export default function OpenWorldWater({ settings }) {
+ const { accent } = useOpenWorldPalette();
+ const dayMix = openWorldDayMix(settings);
const waveTex = useMemo(() => makeWaveTexture(), []);
useEffect(() => () => waveTex.dispose(), [waveTex]);
diff --git a/client/src/components/city/CityWeather.jsx b/client/src/components/openworld/OpenWorldWeather.jsx
similarity index 98%
rename from client/src/components/city/CityWeather.jsx
rename to client/src/components/openworld/OpenWorldWeather.jsx
index cb196fb1ca..80903cb1f1 100644
--- a/client/src/components/city/CityWeather.jsx
+++ b/client/src/components/openworld/OpenWorldWeather.jsx
@@ -82,7 +82,7 @@ function LightningFlash({ active, playSfx }) {
);
}
-export default function CityWeather({ stoppedCount = 0, totalCount = 1, playSfx }) {
+export default function OpenWorldWeather({ stoppedCount = 0, totalCount = 1, playSfx }) {
const pointsRef = useRef();
const matRef = useRef();
diff --git a/client/src/components/city/CityXpBadge.jsx b/client/src/components/openworld/OpenWorldXpBadge.jsx
similarity index 95%
rename from client/src/components/city/CityXpBadge.jsx
rename to client/src/components/openworld/OpenWorldXpBadge.jsx
index bc8980b720..cccb2533c3 100644
--- a/client/src/components/city/CityXpBadge.jsx
+++ b/client/src/components/openworld/OpenWorldXpBadge.jsx
@@ -2,16 +2,16 @@ import { useState, useEffect, useRef, useMemo } from 'react';
import { useNavigate } from 'react-router';
import { computeAgeView, diffXp, birthDateCta } from '../../utils/characterXp';
-// CyberCity character HUD badge (roadmap 2.11; reframed in #2673). A compact floating panel
+// OpenWorld character HUD badge (roadmap 2.11; reframed in #2673). A compact floating panel
// showing the current **age-based level** (life experience = age) and a progress bar =
// fractional part of the current year of life (progress toward the next birthday), plus HP
-// when known. useCityData polls the character on an interval; this component still diffs
+// when known. useOpenWorldData polls the character on an interval; this component still diffs
// successive snapshots and fires a transient flash on XP gain (xp survives as a cumulative
// stat) — a louder, longer celebratory flash when the level ticks up (a birthday).
//
// Animations are self-contained (transient state + inline transition) so the component
// stays standalone and doesn't depend on global keyframes.
-export default function CityXpBadge({ character }) {
+export default function OpenWorldXpBadge({ character }) {
const navigate = useNavigate();
const view = useMemo(() => computeAgeView(character), [character]);
@@ -57,7 +57,7 @@ export default function CityXpBadge({ character }) {
// birthDateCta returns null for 'ok' (a real level exists). It's non-null whenever hasBirthDate
// is false under the server's status⟺level invariant, but read every cta.* through `?.`/`??`
// anyway so a hypothetical invariant break degrades to the SET prompt instead of crashing the
- // whole HUD — the same defensive gate CharacterSheet and CityHudCompact use (#2757, claude review).
+ // whole HUD — the same defensive gate CharacterSheet and OpenWorldHudCompact use (#2757, claude review).
const cta = view.hasBirthDate ? null : birthDateCta(view.birthDateStatus);
const levelLabel = view.hasBirthDate ? `LV ${view.level}` : (cta?.badgeLabel ?? 'LV —');
const target = view.hasBirthDate ? '/character' : (cta?.path ?? '/meatspace/age');
diff --git a/client/src/components/city/CityXpBadge.test.jsx b/client/src/components/openworld/OpenWorldXpBadge.test.jsx
similarity index 92%
rename from client/src/components/city/CityXpBadge.test.jsx
rename to client/src/components/openworld/OpenWorldXpBadge.test.jsx
index 3e19820a9a..801426f8ba 100644
--- a/client/src/components/city/CityXpBadge.test.jsx
+++ b/client/src/components/openworld/OpenWorldXpBadge.test.jsx
@@ -1,16 +1,16 @@
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import { MemoryRouter } from 'react-router';
-import CityXpBadge from './CityXpBadge';
+import OpenWorldXpBadge from './OpenWorldXpBadge';
const renderBadge = (character) =>
render(
<MemoryRouter initialEntries={['/openworld']}>
- <CityXpBadge character={character} />
+ <OpenWorldXpBadge character={character} />
</MemoryRouter>,
);
-describe('CityXpBadge birth-date CTA (#2757)', () => {
+describe('OpenWorldXpBadge birth-date CTA (#2757)', () => {
it('shows the numeric level and % caption when a level exists', () => {
renderBadge({ level: 7, ageYears: 7.5, birthDateStatus: 'ok' });
expect(screen.getByText('LV 7')).toBeInTheDocument();
diff --git a/client/src/components/city/PlayerAvatar.jsx b/client/src/components/openworld/PlayerAvatar.jsx
similarity index 97%
rename from client/src/components/city/PlayerAvatar.jsx
rename to client/src/components/openworld/PlayerAvatar.jsx
index ab9552ecf3..61d990a8e0 100644
--- a/client/src/components/city/PlayerAvatar.jsx
+++ b/client/src/components/openworld/PlayerAvatar.jsx
@@ -2,8 +2,8 @@ import { useRef, useMemo, useEffect, useCallback } from 'react';
import { useFrame } from '@react-three/fiber';
import { useGLTF } from '@react-three/drei';
import * as THREE from 'three';
-import { useCityPalette } from './CityPaletteContext';
-import { dampFactor, EYE_HEIGHT } from '../../utils/cityPlayerRig';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import { dampFactor, EYE_HEIGHT } from '../../utils/openWorldPlayerRig';
import { withInPlaceClips, inPlaceClipName } from '../../utils/animationClips';
import { fitModelToHeight } from '../../utils/modelFit';
import useClonedGltf, { GltfPrimitive } from '../../hooks/useClonedGltf';
@@ -50,7 +50,7 @@ const STATE_CLIP = {
};
export default function PlayerAvatar({ rigRef }) {
- const { accent } = useCityPalette();
+ const { accent } = useOpenWorldPalette();
// Append neutralized in-place variants of the root-motion clips so walk/run
// cycles the legs without translating the model off the rig-driven position.
const { scene, actions, names } = useClonedGltf(MODEL_URL, buildPlayerAnimations);
diff --git a/client/src/components/city/PlayerController.jsx b/client/src/components/openworld/PlayerController.jsx
similarity index 93%
rename from client/src/components/city/PlayerController.jsx
rename to client/src/components/openworld/PlayerController.jsx
index 0e7af305b1..2933d7e19b 100644
--- a/client/src/components/city/PlayerController.jsx
+++ b/client/src/components/openworld/PlayerController.jsx
@@ -7,8 +7,9 @@ import {
THIRD_PERSON, EYE_HEIGHT, BUILDING_COLLISION_RADIUS,
thirdPersonCamera, resolveBoom,
dampFactor, dampAngle, moveFacing, avatarState, bankAngle,
-} from '../../utils/cityPlayerRig';
-import { isWalkable, WORLD } from '../../utils/cityPlan';
+} from '../../utils/openWorldPlayerRig';
+import { isWalkable, WORLD } from '../../utils/openWorldPlan';
+import { regionWarpPadPosition } from '../../utils/openWorldRegions';
const WALK_SPEED = 10;
const SPRINT_SPEED = 20;
@@ -35,11 +36,11 @@ const _lookTarget = new THREE.Vector3();
// the player's pose; both camera modes (and the third-person avatar) read from it:
// - 'first' (V to toggle): the classic invisible first-person camera.
// - 'third' (default): a damped follow camera behind a visible cyber-runner, with
-// building-aware boom shortening (cityPlayerRig.js owns all the math).
+// building-aware boom shortening (openWorldPlayerRig.js owns all the math).
// All original behavior is preserved: WASD/arrows, shift sprint, E/Q vertical, F interact,
// pointer-lock mouselook, per-building cylinder collision below flyover height, world
// bounds, spawn persistence. New: ground movement can't walk into the bay (the harbor
-// piers stay walkable — see isWalkable in cityPlan.js).
+// piers stay walkable — see isWalkable in openWorldPlan.js).
export default function PlayerController({
keysRef,
positions,
@@ -51,6 +52,8 @@ export default function PlayerController({
transitioning = false,
cameraView = 'third',
teleport = null,
+ warpPads = [],
+ onWarpPadInteract,
}) {
const { camera, gl } = useThree();
const rigRef = useRef({
@@ -66,9 +69,14 @@ 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 warpPadList = useMemo(
+ () => warpPads.map((region) => ({ region, position: regionWarpPadPosition(region) })).filter((entry) => entry.position),
+ [warpPads],
+ );
const lastSpawnRef = useRef(null);
const pointerLockedRef = useRef(false);
const proximityAppRef = useRef(null);
+ const proximityWarpPadRef = useRef(null);
// Damped third-person aim point — lags the true lookAt so the aim stays smooth.
const lookRef = useRef(new THREE.Vector3());
const lookInitRef = useRef(false);
@@ -169,7 +177,9 @@ export default function PlayerController({
if (!active) return;
const handleKeyDown = (e) => {
const key = e.key.toLowerCase();
- if (key === 'f' && proximityAppRef.current) {
+ if (key === 'f' && proximityWarpPadRef.current) {
+ onWarpPadInteract?.(proximityWarpPadRef.current);
+ } else if (key === 'f' && proximityAppRef.current) {
onBuildingClick?.(proximityAppRef.current);
} else if (key === 'v') {
onToggleCameraView?.();
@@ -350,6 +360,21 @@ export default function PlayerController({
onBuildingProximity?.(nearestApp);
}
+ let nearestWarpPad = null;
+ let nearestWarpDistance = 3.6;
+ for (const { region, position } of warpPadList) {
+ const [x, y, z] = position;
+ const dx = rig.position.x - x;
+ const dy = rig.position.y - y;
+ const dz = rig.position.z - z;
+ const distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
+ if (distance < nearestWarpDistance) {
+ nearestWarpDistance = distance;
+ nearestWarpPad = region;
+ }
+ }
+ proximityWarpPadRef.current = nearestWarpPad;
+
// Camera application. While CameraTransition flies the camera (exploration toggle),
// it is the sole camera writer — explicit gate instead of relying on mount order.
if (transitioning) return;
diff --git a/client/src/components/city/ProcessBuilding.jsx b/client/src/components/openworld/ProcessBuilding.jsx
similarity index 95%
rename from client/src/components/city/ProcessBuilding.jsx
rename to client/src/components/openworld/ProcessBuilding.jsx
index 2af5e76f9f..801d34929f 100644
--- a/client/src/components/city/ProcessBuilding.jsx
+++ b/client/src/components/openworld/ProcessBuilding.jsx
@@ -1,9 +1,9 @@
import { useRef, useMemo, useEffect } from 'react';
import { useFrame } from '@react-three/fiber';
import * as THREE from 'three';
-import { PROCESS_BUILDING_PARAMS, PIXEL_FONT_URL, mixHex } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import CityLabel from './CityLabel';
+import { PROCESS_BUILDING_PARAMS, PIXEL_FONT_URL, mixHex } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import OpenWorldLabel from './OpenWorldLabel';
// Process status → color, unified with the themed building map (so 'online' follows
// the active theme accent and the semantic colors match a stopped/missing *app*):
@@ -22,7 +22,7 @@ const getProcessColor = (status, building) => {
};
export default function ProcessBuilding({ process, pm2Status, position, seed, dimmed = false, dayMix = 0 }) {
- const { building, buildingBody, surface } = useCityPalette();
+ const { building, buildingBody, surface } = useOpenWorldPalette();
const blinkRef = useRef();
const glowRef = useRef();
@@ -105,7 +105,7 @@ export default function ProcessBuilding({ process, pm2Status, position, seed, di
</mesh>
{/* Process name on front face (dark ink + halo by day) */}
- <CityLabel
+ <OpenWorldLabel
position={[0, height * 0.7, depth / 2 + 0.02]}
fontSize={0.1}
color={color}
@@ -117,7 +117,7 @@ export default function ProcessBuilding({ process, pm2Status, position, seed, di
maxWidth={width * 0.85}
>
{displayName}
- </CityLabel>
+ </OpenWorldLabel>
{/* Blinking tip light */}
<mesh ref={blinkRef} position={[0, height + 0.12, 0]}>
diff --git a/client/src/components/city/CityGround.jsx b/client/src/components/openworld/WorldGround.jsx
similarity index 91%
rename from client/src/components/city/CityGround.jsx
rename to client/src/components/openworld/WorldGround.jsx
index 0dfe02ecfa..6b8d5d7236 100644
--- a/client/src/components/city/CityGround.jsx
+++ b/client/src/components/openworld/WorldGround.jsx
@@ -2,12 +2,12 @@ import { useRef, useMemo } from 'react';
import { useFrame } from '@react-three/fiber';
import { Grid } from '@react-three/drei';
import * as THREE from 'three';
-import { getTimeOfDayPreset, cityDayMix, mixHex, seededRand } from './cityConstants';
-import { useCityPalette } from './CityPaletteContext';
-import { WORLD } from '../../utils/cityPlan';
+import { getTimeOfDayPreset, openWorldDayMix, mixHex, seededRand } from './openWorldConstants';
+import { useOpenWorldPalette } from './OpenWorldPaletteContext';
+import { WORLD } from '../../utils/openWorldPlan';
// The city ground stops at the master plan's shoreline (z = WORLD.shorelineZ) — the bay
-// (CityWater) owns everything north of it. Both the pavement plane and the neon grid are
+// (OpenWorldWater) owns everything north of it. Both the pavement plane and the neon grid are
// sized/offset to end exactly at the water's edge.
const GROUND_HALF = WORLD.landHalf;
const GROUND_DEPTH = GROUND_HALF - WORLD.shorelineZ; // shoreline → +landHalf
@@ -41,7 +41,7 @@ function WetPatch({ position, size, color, dayMix = 0 }) {
// Rolling fog layer with animated opacity
function RollingFog({ dayMix = 0 }) {
const ref = useRef();
- const { ground } = useCityPalette();
+ const { ground } = useOpenWorldPalette();
useFrame(({ clock }) => {
if (!ref.current) return;
@@ -64,15 +64,15 @@ function RollingFog({ dayMix = 0 }) {
);
}
-export default function CityGround({ settings }) {
- const { ground, neonAccents } = useCityPalette();
+export default function WorldGround({ settings }) {
+ const { ground, neonAccents } = useOpenWorldPalette();
const reflectionsEnabled = settings?.reflectionsEnabled ?? true;
const groundMatRef = useRef();
const timeOfDay = settings?.timeOfDay ?? 'sunset';
const skyTheme = settings?.skyTheme ?? 'cyberpunk';
const preset = getTimeOfDayPreset(timeOfDay, skyTheme);
- const dayMix = cityDayMix(settings);
+ const dayMix = openWorldDayMix(settings);
const groundColorTarget = useRef(new THREE.Color(preset.groundColor ?? '#0a0a20'));
groundColorTarget.current.set(preset.groundColor ?? '#0a0a20');
const targetRoughness = preset.groundRoughness ?? 0.7;
diff --git a/client/src/components/city/audio/cityAudioEngine.js b/client/src/components/openworld/audio/openWorldAudioEngine.js
similarity index 100%
rename from client/src/components/city/audio/cityAudioEngine.js
rename to client/src/components/openworld/audio/openWorldAudioEngine.js
diff --git a/client/src/components/city/audio/citySoundEffects.js b/client/src/components/openworld/audio/openWorldSoundEffects.js
similarity index 98%
rename from client/src/components/city/audio/citySoundEffects.js
rename to client/src/components/openworld/audio/openWorldSoundEffects.js
index a8395c7a9f..40272bce89 100644
--- a/client/src/components/city/audio/citySoundEffects.js
+++ b/client/src/components/openworld/audio/openWorldSoundEffects.js
@@ -1,5 +1,5 @@
// Procedural sound effects using Web Audio API -- each SFX is a pure function
-import { getAudioContext, getSfxGain } from './cityAudioEngine';
+import { getAudioContext, getSfxGain } from './openWorldAudioEngine';
// Helper: create white noise buffer
const createNoiseBuffer = (ctx, duration) => {
diff --git a/client/src/components/city/audio/citySynthMusic.js b/client/src/components/openworld/audio/openWorldSynthMusic.js
similarity index 96%
rename from client/src/components/city/audio/citySynthMusic.js
rename to client/src/components/openworld/audio/openWorldSynthMusic.js
index 044eb6059b..201afd9d30 100644
--- a/client/src/components/city/audio/citySynthMusic.js
+++ b/client/src/components/openworld/audio/openWorldSynthMusic.js
@@ -10,14 +10,14 @@
//
// It does NOT reuse createLookaheadTransport, deliberately: that transport reads
// its clock from the shared lib/audioContext.js singleton with no injection
-// point, while cityAudioEngine is a documented holdout that owns its own
+// point, while openWorldAudioEngine is a documented holdout that owns its own
// AudioContext (and close()s it on unmount). Driving this graph from the shared
// context's currentTime would mean scheduling against a clock the graph doesn't
// run on. The transport also models a finite piece (total length, pause/seek/
// position, per-note node teardown) — none of which an endless drone built from
// long-lived oscillators has. What IS shared is the timing feel: SYNTH_TIMING.
-import { getAudioContext, getMusicGain } from './cityAudioEngine';
-import { CHORD_SETS } from '../../../utils/citySoundscape';
+import { getAudioContext, getMusicGain } from './openWorldAudioEngine';
+import { CHORD_SETS } from '../../../utils/openWorldSoundscape';
import { SYNTH_TIMING } from '../../../lib/lookaheadTransport';
const { LOOKAHEAD_MS, SCHEDULE_AHEAD } = SYNTH_TIMING;
@@ -270,12 +270,12 @@ const STOP_SETTLE = 0.08;
// Stops the running music graph. Ramps each audible layer to silence first — an
// abrupt osc.stop() while a waveform is mid-cycle truncates it at a non-zero
-// sample, which reads as an audible click/pop on mute toggle or CyberCity unmount.
-// Mirrors citySoundEffects.js's envelope-before-stop pattern (setTargetAtTime /
+// sample, which reads as an audible click/pop on mute toggle or OpenWorld unmount.
+// Mirrors openWorldSoundEffects.js's envelope-before-stop pattern (setTargetAtTime /
// exponentialRampToValueAtTime before every osc.stop() there).
//
// Returns the settle time in milliseconds so a caller that needs to tear down the
-// AudioContext right after (useCityAudio's unmount cleanup) can delay the close
+// AudioContext right after (useOpenWorldAudio's unmount cleanup) can delay the close
// until the ramp has actually finished, instead of cutting it off immediately.
export const stopMusic = () => {
if (!isPlaying) return 0;
diff --git a/client/src/components/city/audio/citySynthMusic.test.js b/client/src/components/openworld/audio/openWorldSynthMusic.test.js
similarity index 95%
rename from client/src/components/city/audio/citySynthMusic.test.js
rename to client/src/components/openworld/audio/openWorldSynthMusic.test.js
index 07cdb25612..ac5523fc99 100644
--- a/client/src/components/city/audio/citySynthMusic.test.js
+++ b/client/src/components/openworld/audio/openWorldSynthMusic.test.js
@@ -1,9 +1,9 @@
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
-import { CHORD_SETS } from '../../../utils/citySoundscape';
+import { CHORD_SETS } from '../../../utils/openWorldSoundscape';
import { SYNTH_TIMING } from '../../../lib/lookaheadTransport';
-// Minimal fake Web Audio graph for citySynthMusic.js. The module pulls its
-// context/output gain from cityAudioEngine's getAudioContext()/getMusicGain()
+// Minimal fake Web Audio graph for openWorldSynthMusic.js. The module pulls its
+// context/output gain from openWorldAudioEngine's getAudioContext()/getMusicGain()
// (module-level singleton getters, not a constructor call or a param it
// receives) and drives: a convolver reverb, a feedback delay, a lowpass bass
// filter, a bandpass arp filter, and several gain-ramped oscillators.
@@ -71,7 +71,7 @@ const makeFakeContext = () => {
return ctx;
};
-// Constants read straight from citySynthMusic.js (not exported, so pinned
+// Constants read straight from openWorldSynthMusic.js (not exported, so pinned
// here as literals): STOP_RAMP_TC = 0.02 (gain fade time constant),
// STOP_SETTLE = 0.08 (delay before the hard oscillator stop).
const STOP_RAMP_TC = 0.02;
@@ -120,7 +120,7 @@ const runAudioJanky = (seconds) => {
let fakeCtx;
let fakeOutput;
-vi.mock('./cityAudioEngine', () => ({
+vi.mock('./openWorldAudioEngine', () => ({
getAudioContext: () => fakeCtx,
getMusicGain: () => fakeOutput,
}));
@@ -131,18 +131,18 @@ beforeEach(async () => {
vi.resetModules();
fakeCtx = makeFakeContext();
fakeOutput = { ...connectable() };
- synth = await import('./citySynthMusic.js');
+ synth = await import('./openWorldSynthMusic.js');
});
afterEach(() => {
- // citySynthMusic schedules real setInterval timers on startMusic(); stop
+ // openWorldSynthMusic schedules real setInterval timers on startMusic(); stop
// whatever's running so a test that never called stopMusic doesn't leak
// intervals into later tests. stopMusic() is a documented no-op when
// already stopped, so this is always safe to call.
synth.stopMusic();
});
-describe('citySynthMusic', () => {
+describe('openWorldSynthMusic', () => {
it('startMusic is a no-op when already playing', () => {
synth.startMusic();
const oscCount = fakeCtx.oscillators.length;
diff --git a/client/src/components/city/cityConstants.js b/client/src/components/openworld/openWorldConstants.js
similarity index 94%
rename from client/src/components/city/cityConstants.js
rename to client/src/components/openworld/openWorldConstants.js
index fa457785ed..df171292cd 100644
--- a/client/src/components/city/cityConstants.js
+++ b/client/src/components/openworld/openWorldConstants.js
@@ -25,10 +25,10 @@ export const CITY_COLORS = {
// Celestial colors
planet: '#3b82f6',
orbit: '#1e3a5f',
- // Time-of-day presets (used by CitySky + CityLights)
+ // Time-of-day presets (used by OpenWorldSky + OpenWorldLights)
// hour: 0-24 mapped to sun arc. Sun traces east(6h) → overhead(12h) → west(18h) → below(0h)
// daylightFactor: multiplier for scene ambient/point lights (bright day, dim night)
- // NOTE: the city UI now selects only day/night (→ 'noon'/'sunset' via resolveCityTimeOfDay).
+ // NOTE: the city UI now selects only day/night (→ 'noon'/'sunset' via resolveOpenWorldTimeOfDay).
// 'sunrise' and 'midnight' are retained for legacy stored reads and possible future use,
// but are no longer reachable from the settings picker.
timeOfDay: {
@@ -179,7 +179,7 @@ export const CITY_COLORS = {
ambientIntensity: 0.45,
},
},
- // The City uses one canonical cyber sky. Legacy stored skyTheme values are
+ // The OpenWorld uses one canonical cyber sky. Legacy stored skyTheme values are
// ignored by the scene and fall back to these presets.
skyThemes: {},
};
@@ -262,7 +262,7 @@ export const getTimeOfDayPreset = (timeOfDay, skyTheme) => {
// night-cyberpunk surfaces (post-fx grade, building albedo/neon, ground grid/fog)
// lerp toward a bright daytime look by this factor. The ramp starts at 0.35 so the
// established night look (sunset's daylightFactor 0.2) stays fully at 0/unchanged.
-export const cityDayMix = (settings) => {
+export const openWorldDayMix = (settings) => {
const preset = getTimeOfDayPreset(settings?.timeOfDay ?? 'sunset', settings?.skyTheme ?? 'cyberpunk');
return smoothstepRange(0.35, 1, preset?.daylightFactor ?? 0);
};
@@ -276,7 +276,7 @@ const DETAIL_TIER_RANK = { low: 0, medium: 1, high: 2, ultra: 3 };
// True at medium tier and above — the shared gate for optional set dressing (rooftop
// kits, street furniture, transit trams). The low tier renders structure only.
-export const cityShowDetail = (settings) => (
+export const openWorldShowDetail = (settings) => (
settings?.effectiveTier
? (DETAIL_TIER_RANK[settings.effectiveTier] ?? DETAIL_TIER_RANK.high) >= DETAIL_TIER_RANK.medium
: (settings?.particleDensity ?? 1) > 0.5
@@ -284,9 +284,9 @@ export const cityShowDetail = (settings) => (
// True at high tier and above — the gate for the heavier InteriorMappingMaterial
// window panes, which ray-march a fake interior per pane and so cost more than the
-// flat window texture. Held one tier above cityShowDetail so medium-tier machines
+// flat window texture. Held one tier above openWorldShowDetail so medium-tier machines
// keep the rest of the set dressing but skip the per-pane interior shader.
-export const cityShowInteriorWindows = (settings) => (
+export const openWorldShowInteriorWindows = (settings) => (
settings?.effectiveTier
? (DETAIL_TIER_RANK[settings.effectiveTier] ?? DETAIL_TIER_RANK.high) >= DETAIL_TIER_RANK.high
: (settings?.particleDensity ?? 1) >= 1
@@ -302,7 +302,7 @@ export const cityShowInteriorWindows = (settings) => (
// Continuous in dayMix so it degrades gracefully if an intermediate time-of-day is
// ever re-enabled (today dayMix is strictly 0 or 1). Decorative neon signage is NOT
// a caller — it is meant to dim in daylight like real neon.
-export const cityLabelColors = (neonColor, dayMix = 0) => {
+export const openWorldLabelColors = (neonColor, dayMix = 0) => {
const d = Math.max(0, Math.min(1, dayMix || 0));
const darkInk = mixHex('#0d1422', neonColor, 0.22);
return {
@@ -324,9 +324,9 @@ export const getAccentColor = (app, neonAccents = CITY_COLORS.neonAccents) => {
};
// --- Theme integration -------------------------------------------------------
-// CyberCity's "brand" surfaces (ground grid, particles, online buildings, the
+// OpenWorld's "brand" surfaces (ground grid, particles, online buildings, the
// lead neon accent, the dark structural bases) default to cyan. When the user picks
-// a PortOS theme, deriveCityPalette recolors those surfaces toward the theme accent
+// a PortOS theme, deriveOpenWorldPalette recolors those surfaces toward the theme accent
// so the 3D scene tracks the rest of the UI; status colors (stopped=red, etc.) stay
// semantic. The palette is a fresh immutable object per theme — every brand surface
// is recomputed from the theme accent (never from a previous theme), so repeated
@@ -394,7 +394,7 @@ export const tintTowardAccent = (hex, amount = 0.2, accentHex = CITY_COLORS.grou
// Convenience for the dark structural bases (building bodies, district plinths,
// monument footings) — a slightly stronger tint than the default. The accent defaults
-// to the static brand; pass a themed accent (from useCityPalette().accent) to theme.
+// to the static brand; pass a themed accent (from useOpenWorldPalette().accent) to theme.
export const tintStructure = (hex, accentHex = CITY_COLORS.ground) => tintTowardAccent(hex, 0.22, accentHex);
// GLSL-style smoothstep with an edge remap (distinct from the plain Hermite
@@ -422,8 +422,8 @@ export const seededRand = (seed) => {
// asking "is this cyber?". Adding a third style means adding a row here, not editing the
// sky resolver, the palette, the layer gates, and the settings picker.
//
-// - presets the time-of-day pair fed to CitySky / CityLights / CityGround. Through
-// each preset's daylightFactor → cityDayMix, this alone carries most of the
+// - presets the time-of-day pair fed to OpenWorldSky / OpenWorldLights / OpenWorldGround. Through
+// each preset's daylightFactor → openWorldDayMix, this alone carries most of the
// look: every surface that already lerped night→day follows it for free.
// - lowPoly flat-shaded, matte structural surfaces (see the palette's `surface`).
// - neonLayers whether the neon-night scene layers (galaxy spheremap, starfield, shooting
@@ -436,7 +436,7 @@ export const seededRand = (seed) => {
// - accents the decorative spread for windows/props. The lead slot is always replaced
// by the live theme accent, so the world follows the UI in either style.
// - buildingBody the structural body color, re-tinted toward the theme accent.
-// - terrain the daytime bands CityLandscape's terrain shader mixes between.
+// - terrain the daytime bands OpenWorldLandscape's terrain shader mixes between.
//
// 'cyber' is kept as a real option, not nostalgia: it keeps the whole neon layer exercised
// by the suite instead of bit-rotting behind a default nobody selects.
@@ -486,7 +486,7 @@ export const getWorldStyle = (style) => WORLD_STYLE_DEFS[resolveWorldStyle(style
// installs pick up theme coupling without a migration. Returns the daytime flag plus
// the concrete preset key the sky/lights/ground consume, taken from the world style's
// own pair — so picking 'cyber' restores the established noon/moonlit-night look exactly.
-export const resolveCityTimeOfDay = (setting, themeIsDay, worldStyle) => {
+export const resolveOpenWorldTimeOfDay = (setting, themeIsDay, worldStyle) => {
const daytime = setting === 'day' ? true
: setting === 'night' ? false
: !!themeIsDay;
@@ -494,7 +494,7 @@ export const resolveCityTimeOfDay = (setting, themeIsDay, worldStyle) => {
return { daytime, presetKey: daytime ? presets.day : presets.night };
};
-// The CRT overlay (scanlines / neon edge-glow / vignette in CityScanlines) is a
+// The CRT overlay (scanlines / neon edge-glow / vignette in OpenWorldScanlines) is a
// cyber-terminal affectation, not a universal effect — so each piece is opted in
// per theme family. Scanlines are the most style-specific (terminal only); the
// neon edge glow suits the cyber-leaning families (terminal + the classic
@@ -509,7 +509,7 @@ const deriveCrtProfile = (family) => ({
// Derive the OpenWorld palette from a PortOS theme object (a THEMES entry) and the
// active world style. Pure. The style swaps the decorative/structural brand surfaces
// (nothing semantic): status colors stay semantic in both worlds.
-export const deriveCityPalette = (theme, worldStyle) => {
+export const deriveOpenWorldPalette = (theme, worldStyle) => {
const style = getWorldStyle(worldStyle);
const { lowPoly } = style;
const accent = tripletToHex(theme?.colors?.['--port-accent']) || ORIGINAL_GROUND;
@@ -518,7 +518,7 @@ export const deriveCityPalette = (theme, worldStyle) => {
// materials need darkness or they blow out. Day backdrop: a bright, accent-tinted
// sky (the daytime preset dims the neon, so a light surround is safe and reads as
// actual daytime). The scene picks one based on the resolved time of day; the HUD
- // panels follow the light/dark theme independently (see .cybercity-themed CSS).
+ // panels follow the light/dark theme independently (see .openworld-themed CSS).
// In the Vibes world there is no neon to protect, and "night" is a golden dusk — so
// both surrounds are bright sky rather than a near-black void.
const nightBackground = lowPoly
@@ -566,7 +566,7 @@ export const deriveCityPalette = (theme, worldStyle) => {
crt: style.themeCrt
? deriveCrtProfile(theme?.family)
: { scanlines: false, glow: false, vignette: false },
- // Brand surfaces the 3D scene reads via useCityPalette() instead of the old
+ // Brand surfaces the 3D scene reads via useOpenWorldPalette() instead of the old
// mutated singleton. `ground`/`particles` are the accent; `building`/`buildingBody`/
// `neonAccents` carry the themed maps.
ground: accent,
diff --git a/client/src/components/city/cityHudBits.jsx b/client/src/components/openworld/openWorldHudBits.jsx
similarity index 97%
rename from client/src/components/city/cityHudBits.jsx
rename to client/src/components/openworld/openWorldHudBits.jsx
index ecb2065bd1..e88c73d62e 100644
--- a/client/src/components/city/cityHudBits.jsx
+++ b/client/src/components/openworld/openWorldHudBits.jsx
@@ -1,4 +1,4 @@
-// Small presentational bits shared by the City HUD panels (desktop cockpit +
+// Small presentational bits shared by the OpenWorld HUD panels (desktop cockpit +
// compact/phone disclosure surfaces). Extracted so the vitals rows, health
// sentinel and corner chrome render identically in both layouts instead of being
// copy-pasted per host.
diff --git a/client/src/components/city/cityLayout.js b/client/src/components/openworld/openWorldLayout.js
similarity index 96%
rename from client/src/components/city/cityLayout.js
rename to client/src/components/openworld/openWorldLayout.js
index a6dab2e70a..cf3b49faf4 100644
--- a/client/src/components/city/cityLayout.js
+++ b/client/src/components/openworld/openWorldLayout.js
@@ -1,5 +1,5 @@
-import { BUILDING_PARAMS, DISTRICT_PARAMS, getBuildingHeight } from './cityConstants';
-import { autoColumns, gridIndexToPosition } from '../../utils/cityDistrictLayout';
+import { BUILDING_PARAMS, DISTRICT_PARAMS, getBuildingHeight } from './openWorldConstants';
+import { autoColumns, gridIndexToPosition } from '../../utils/openWorldDistrictLayout';
const STATUS_ORDER = { online: 0, stopped: 1, not_started: 2, not_found: 3 };
@@ -33,7 +33,7 @@ const placeOnPlazaRing = (x, z, occupied) => {
return onRing(baseAngle);
};
-export const computeCityLayout = (apps) => {
+export const computeOpenWorldLayout = (apps) => {
const active = [];
const archived = [];
diff --git a/client/src/components/city/cityLayout.test.js b/client/src/components/openworld/openWorldLayout.test.js
similarity index 89%
rename from client/src/components/city/cityLayout.test.js
rename to client/src/components/openworld/openWorldLayout.test.js
index 9dd1ea6bd8..fe28b16df9 100644
--- a/client/src/components/city/cityLayout.test.js
+++ b/client/src/components/openworld/openWorldLayout.test.js
@@ -1,12 +1,12 @@
import { describe, it, expect } from 'vitest';
-import { computeCityLayout } from './cityLayout';
+import { computeOpenWorldLayout } from './openWorldLayout';
-// spacing = BUILDING_PARAMS.spacing = 12, DISTRICT_PARAMS.gap = 4 (see cityConstants.js)
+// spacing = BUILDING_PARAMS.spacing = 12, DISTRICT_PARAMS.gap = 4 (see openWorldConstants.js)
const online = (id) => ({ id, overallStatus: 'online', archived: false });
-describe('computeCityLayout', () => {
+describe('computeOpenWorldLayout', () => {
it('lays active apps around a reserved AI Core plaza', () => {
- const pos = computeCityLayout([online('a'), online('b'), online('c'), online('d')]);
+ const pos = computeOpenWorldLayout([online('a'), online('b'), online('c'), online('d')]);
// 4 apps → 2 cols, 2 rows at ±6; each cell falls inside the 12-unit core plaza,
// so clearCorePlaza pushes it radially out to the plaza edge (12/√2 ≈ 8.4853).
expect(pos.get('a').district).toBe('downtown');
@@ -25,14 +25,14 @@ describe('computeCityLayout', () => {
});
it('pushes a lone centered app to the front edge of the core plaza', () => {
- const pos = computeCityLayout([online('solo')]);
+ const pos = computeOpenWorldLayout([online('solo')]);
// A single app grids to the origin, which has no push direction → front (-Z) edge.
expect(pos.get('solo')).toMatchObject({ x: 0, z: -12, district: 'downtown' });
expect(typeof pos.get('solo').height).toBe('number');
});
it('offsets archived apps into a warehouse grid clear of the core plaza on sparse installs', () => {
- const pos = computeCityLayout([
+ const pos = computeOpenWorldLayout([
online('a'),
{ id: 'x', overallStatus: 'online', archived: true },
{ id: 'y', overallStatus: 'online', archived: true },
@@ -46,7 +46,7 @@ describe('computeCityLayout', () => {
});
it('keeps the warehouse off the core on an all-archived install (no active apps)', () => {
- const pos = computeCityLayout([
+ const pos = computeOpenWorldLayout([
{ id: 'x', overallStatus: 'online', archived: true },
{ id: 'y', overallStatus: 'online', archived: true },
]);
@@ -58,7 +58,7 @@ describe('computeCityLayout', () => {
});
it('leaves the warehouse offset untouched for normal installs (3+ active apps)', () => {
- const pos = computeCityLayout([
+ const pos = computeOpenWorldLayout([
online('a'), online('b'), online('c'),
{ id: 'x', overallStatus: 'online', archived: true },
]);
@@ -71,7 +71,7 @@ describe('computeCityLayout', () => {
// 9 apps → 3×3 grid: the centre cell sits on the core and must move, but the
// front-edge slot is already taken, so it must dodge to a free ring slot rather
// than stack. Assert every resolved position is unique.
- const pos = computeCityLayout(Array.from({ length: 9 }, (_, i) => online(String(i))));
+ const pos = computeOpenWorldLayout(Array.from({ length: 9 }, (_, i) => online(String(i))));
const seen = new Set();
for (const p of pos.values()) {
const key = `${Math.round(p.x)},${Math.round(p.z)}`;
@@ -82,7 +82,7 @@ describe('computeCityLayout', () => {
});
it('sorts active apps online-first so status drives grid order', () => {
- const pos = computeCityLayout([
+ const pos = computeOpenWorldLayout([
{ id: 'stopped', overallStatus: 'stopped', archived: false },
{ id: 'live', overallStatus: 'online', archived: false },
]);
diff --git a/client/src/components/city/cityPanes.js b/client/src/components/openworld/openWorldPanes.js
similarity index 92%
rename from client/src/components/city/cityPanes.js
rename to client/src/components/openworld/openWorldPanes.js
index 82d3852405..c87e4d2c4e 100644
--- a/client/src/components/city/cityPanes.js
+++ b/client/src/components/openworld/openWorldPanes.js
@@ -1,4 +1,4 @@
-// Secondary-HUD disclosure surfaces, driven by the `cityPane` URL search param so
+// Secondary-HUD disclosure surfaces, driven by the `openWorldPane` URL search param so
// the open surface is deep-linkable, reload-safe, and restored by browser
// back/forward — the same "URL is the source of truth for what's open" convention
// the rest of the app follows. A single param means only ONE surface can be open at
diff --git a/client/src/components/city/cityTheme.test.js b/client/src/components/openworld/openWorldTheme.test.js
similarity index 70%
rename from client/src/components/city/cityTheme.test.js
rename to client/src/components/openworld/openWorldTheme.test.js
index 9cdcac0125..dfa72ef934 100644
--- a/client/src/components/city/cityTheme.test.js
+++ b/client/src/components/openworld/openWorldTheme.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { deriveCityPalette, resolveCityTimeOfDay, cityLabelColors, tintTowardAccent, tintStructure, CITY_COLORS, getBuildingColor, getAccentColor, seededRand, smoothstepRange, cityDayMix, getTimeOfDayPreset, cityShowDetail, cityShowInteriorWindows, resolveWorldStyle, getWorldStyle, WORLD_STYLE_DEFS, WORLD_STYLES, DEFAULT_WORLD_STYLE } from './cityConstants';
+import { deriveOpenWorldPalette, resolveOpenWorldTimeOfDay, openWorldLabelColors, tintTowardAccent, tintStructure, CITY_COLORS, getBuildingColor, getAccentColor, seededRand, smoothstepRange, openWorldDayMix, getTimeOfDayPreset, openWorldShowDetail, openWorldShowInteriorWindows, resolveWorldStyle, getWorldStyle, WORLD_STYLE_DEFS, WORLD_STYLES, DEFAULT_WORLD_STYLE } from './openWorldConstants';
const hexLum = (hex) => {
const n = parseInt(hex.slice(1), 16);
@@ -12,10 +12,10 @@ const hexChannels = (hex) => {
};
import { getTheme, THEMES } from '../../themes/portosThemes';
-describe('deriveCityPalette', () => {
+describe('deriveOpenWorldPalette', () => {
it('derives the accent hex from a theme --port-accent triplet', () => {
const phosphor = getTheme('black-ice-terminal-day');
- const p = deriveCityPalette(phosphor);
+ const p = deriveOpenWorldPalette(phosphor);
expect(p.accent).toBe('#0a7a4a'); // 10 122 74
expect(p.themeId).toBe('black-ice-terminal-day');
expect(p.isDay).toBe(true);
@@ -23,7 +23,7 @@ describe('deriveCityPalette', () => {
it('exposes a dark night void and a bright day sky, both accent-tinted', () => {
const phosphor = getTheme('black-ice-terminal-day'); // accent #0a7a4a
- const p = deriveCityPalette(phosphor, 'cyber');
+ const p = deriveOpenWorldPalette(phosphor, 'cyber');
expect(p.nightBackground).toBe('#010c07'); // #0a7a4a * 0.1
expect(p.dayBackground).toBe('#badacc'); // #0a7a4a lightened 0.72 toward white
// A day theme's default surround (loading screen) is the bright day sky.
@@ -33,14 +33,14 @@ describe('deriveCityPalette', () => {
it('defaults a night theme surround to the dark void', () => {
const midnight = getTheme('classic-midnight'); // accent #3b82f6
- const p = deriveCityPalette(midnight, 'cyber');
+ const p = deriveOpenWorldPalette(midnight, 'cyber');
expect(p.isDay).toBe(false);
expect(p.background).toBe('#060d19'); // nightBackground = #3b82f6 * 0.1
expect(p.dayBackground).toBe('#c8dcfc');
});
it('falls back to defaults for a missing/invalid theme', () => {
- const p = deriveCityPalette(undefined, 'cyber');
+ const p = deriveOpenWorldPalette(undefined, 'cyber');
expect(p.themeId).toBe('classic-midnight');
expect(p.accent).toBe('#06b6d4'); // original cyan brand
expect(p.background).toBe('#011215'); // night theme default -> #06b6d4 * 0.1
@@ -48,24 +48,24 @@ describe('deriveCityPalette', () => {
it('resolves time of day, following theme mode for auto/legacy and honoring explicit overrides', () => {
// auto follows the theme mode
- expect(resolveCityTimeOfDay('auto', true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
- expect(resolveCityTimeOfDay('auto', false, 'cyber')).toEqual({ daytime: false, presetKey: 'sunset' });
- expect(resolveCityTimeOfDay(undefined, true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
+ expect(resolveOpenWorldTimeOfDay('auto', true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
+ expect(resolveOpenWorldTimeOfDay('auto', false, 'cyber')).toEqual({ daytime: false, presetKey: 'sunset' });
+ expect(resolveOpenWorldTimeOfDay(undefined, true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
// legacy stored presets are treated as auto (follow the theme)
- expect(resolveCityTimeOfDay('sunset', true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
- expect(resolveCityTimeOfDay('midnight', true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
+ expect(resolveOpenWorldTimeOfDay('sunset', true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
+ expect(resolveOpenWorldTimeOfDay('midnight', true, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
// explicit overrides win regardless of theme mode
- expect(resolveCityTimeOfDay('day', false, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
- expect(resolveCityTimeOfDay('night', true, 'cyber')).toEqual({ daytime: false, presetKey: 'sunset' });
+ expect(resolveOpenWorldTimeOfDay('day', false, 'cyber')).toEqual({ daytime: true, presetKey: 'noon' });
+ expect(resolveOpenWorldTimeOfDay('night', true, 'cyber')).toEqual({ daytime: false, presetKey: 'sunset' });
});
it('picks the Vibes preset pair by default, and for any unrecognized style', () => {
// The default world style is 'vibes' — an absent, legacy, or misspelled value must
// resolve there rather than falling through to an undefined preset key.
- expect(resolveCityTimeOfDay('auto', true)).toEqual({ daytime: true, presetKey: 'vibesDay' });
- expect(resolveCityTimeOfDay('auto', false)).toEqual({ daytime: false, presetKey: 'vibesDusk' });
- expect(resolveCityTimeOfDay('day', false, 'nonsense')).toEqual({ daytime: true, presetKey: 'vibesDay' });
- expect(resolveCityTimeOfDay('night', true, undefined)).toEqual({ daytime: false, presetKey: 'vibesDusk' });
+ expect(resolveOpenWorldTimeOfDay('auto', true)).toEqual({ daytime: true, presetKey: 'vibesDay' });
+ expect(resolveOpenWorldTimeOfDay('auto', false)).toEqual({ daytime: false, presetKey: 'vibesDusk' });
+ expect(resolveOpenWorldTimeOfDay('day', false, 'nonsense')).toEqual({ daytime: true, presetKey: 'vibesDay' });
+ expect(resolveOpenWorldTimeOfDay('night', true, undefined)).toEqual({ daytime: false, presetKey: 'vibesDusk' });
});
it('keeps both Vibes presets bright, so neither reads as the neon-night look', () => {
@@ -76,7 +76,7 @@ describe('deriveCityPalette', () => {
const preset = getTimeOfDayPreset(key);
expect(preset.daylightFactor).toBeGreaterThan(0.8);
expect(preset.isMoon).toBe(false);
- expect(cityDayMix({ timeOfDay: key })).toBeGreaterThan(0.9);
+ expect(openWorldDayMix({ timeOfDay: key })).toBeGreaterThan(0.9);
}
});
@@ -84,12 +84,12 @@ describe('deriveCityPalette', () => {
const themes = Object.values(THEMES);
const day = themes.filter((t) => t.mode === 'day');
const night = themes.filter((t) => t.mode === 'night');
- // The City must support all 8 PortOS themes — 4 day, 4 night.
+ // The OpenWorld must support all 8 PortOS themes — 4 day, 4 night.
expect(day).toHaveLength(4);
expect(night).toHaveLength(4);
for (const theme of themes) {
- const p = deriveCityPalette(theme, 'cyber');
+ const p = deriveOpenWorldPalette(theme, 'cyber');
expect(p.themeId).toBe(theme.id);
expect(p.isDay).toBe(theme.mode === 'day');
// Accent is parsed to a concrete hex (never left as a raw triplet/empty).
@@ -105,16 +105,16 @@ describe('deriveCityPalette', () => {
it('opts CRT effects in per theme family under the cyber style', () => {
// terminal (Phosphor) — full CRT
- expect(deriveCityPalette(getTheme('black-ice-terminal-day'), 'cyber').crt)
+ expect(deriveOpenWorldPalette(getTheme('black-ice-terminal-day'), 'cyber').crt)
.toEqual({ scanlines: true, glow: true, vignette: true });
// classic — cyber glow + vignette, but no scanlines
- expect(deriveCityPalette(getTheme('classic-midnight'), 'cyber').crt)
+ expect(deriveOpenWorldPalette(getTheme('classic-midnight'), 'cyber').crt)
.toEqual({ scanlines: false, glow: true, vignette: true });
// blueprint — vignette only
- expect(deriveCityPalette(getTheme('blueprint-ops'), 'cyber').crt)
+ expect(deriveOpenWorldPalette(getTheme('blueprint-ops'), 'cyber').crt)
.toEqual({ scanlines: false, glow: false, vignette: true });
// glass — fully clean, no CRT
- expect(deriveCityPalette(getTheme('lumen-glass'), 'cyber').crt)
+ expect(deriveOpenWorldPalette(getTheme('lumen-glass'), 'cyber').crt)
.toEqual({ scanlines: false, glow: false, vignette: false });
});
@@ -122,7 +122,7 @@ describe('deriveCityPalette', () => {
// Scanlines/glow/vignette are cyber-terminal affectations; over a sunlit low-poly
// landscape they read as a dirty screen, so no theme family opts them back in.
for (const id of ['black-ice-terminal-day', 'classic-midnight', 'blueprint-ops', 'lumen-glass']) {
- expect(deriveCityPalette(getTheme(id), 'vibes').crt)
+ expect(deriveOpenWorldPalette(getTheme(id), 'vibes').crt)
.toEqual({ scanlines: false, glow: false, vignette: false });
}
});
@@ -148,16 +148,16 @@ describe('city sky visibility', () => {
});
});
-describe('cityLabelColors', () => {
+describe('openWorldLabelColors', () => {
it('keeps the neon fill and adds no outline at night (dayMix 0)', () => {
- const c = cityLabelColors('#06b6d4', 0);
+ const c = openWorldLabelColors('#06b6d4', 0);
expect(c.color).toBe('#06b6d4'); // untouched neon
expect(c.outlineWidth).toBe('0.00%'); // drei reads a 0% outline as none
expect(c.outlineOpacity).toBe(0);
});
it('darkens the fill toward ink and fades in a light outline by day (dayMix 1)', () => {
- const c = cityLabelColors('#06b6d4', 1);
+ const c = openWorldLabelColors('#06b6d4', 1);
// Fill lands on the dark ink (a near-black tinted 22% toward the label hue),
// i.e. clearly darker than the original neon so it reads on a bright sky.
expect(c.color).not.toBe('#06b6d4');
@@ -169,9 +169,9 @@ describe('cityLabelColors', () => {
});
it('clamps out-of-range / missing dayMix', () => {
- expect(cityLabelColors('#06b6d4', 2).outlineOpacity).toBeCloseTo(0.85);
- expect(cityLabelColors('#06b6d4', -1).outlineWidth).toBe('0.00%');
- expect(cityLabelColors('#06b6d4').color).toBe('#06b6d4'); // undefined → night
+ expect(openWorldLabelColors('#06b6d4', 2).outlineOpacity).toBeCloseTo(0.85);
+ expect(openWorldLabelColors('#06b6d4', -1).outlineWidth).toBe('0.00%');
+ expect(openWorldLabelColors('#06b6d4').color).toBe('#06b6d4'); // undefined → night
});
});
@@ -208,34 +208,34 @@ describe('tintTowardAccent / tintStructure', () => {
});
});
-describe('deriveCityPalette — world style', () => {
+describe('deriveOpenWorldPalette — world style', () => {
it('reports the resolved style and its low-poly flag', () => {
- expect(deriveCityPalette(getTheme('classic-midnight'), 'cyber')).toMatchObject({ worldStyle: 'cyber', lowPoly: false });
- expect(deriveCityPalette(getTheme('classic-midnight'), 'vibes')).toMatchObject({ worldStyle: 'vibes', lowPoly: true });
+ expect(deriveOpenWorldPalette(getTheme('classic-midnight'), 'cyber')).toMatchObject({ worldStyle: 'cyber', lowPoly: false });
+ expect(deriveOpenWorldPalette(getTheme('classic-midnight'), 'vibes')).toMatchObject({ worldStyle: 'vibes', lowPoly: true });
// Absent / unrecognized falls back to the default rather than an undefined style.
- expect(deriveCityPalette(getTheme('classic-midnight'))).toMatchObject({ worldStyle: 'vibes', lowPoly: true });
- expect(deriveCityPalette(getTheme('classic-midnight'), 'neon-noir')).toMatchObject({ worldStyle: 'vibes', lowPoly: true });
+ expect(deriveOpenWorldPalette(getTheme('classic-midnight'))).toMatchObject({ worldStyle: 'vibes', lowPoly: true });
+ expect(deriveOpenWorldPalette(getTheme('classic-midnight'), 'neon-noir')).toMatchObject({ worldStyle: 'vibes', lowPoly: true });
});
it('gives the Vibes world a bright surround at BOTH times of day', () => {
// The cyber world needs darkness for its additive neon; the Vibes world has none, and
// its "night" is a golden dusk — so neither surround may be a near-black void.
- const p = deriveCityPalette(getTheme('classic-midnight'), 'vibes');
+ const p = deriveOpenWorldPalette(getTheme('classic-midnight'), 'vibes');
expect(hexLum(p.nightBackground)).toBeGreaterThan(80);
expect(hexLum(p.dayBackground)).toBeGreaterThan(80);
});
it('lightens the structural body relative to the cyber world', () => {
const theme = getTheme('classic-midnight');
- const cyber = deriveCityPalette(theme, 'cyber');
- const vibes = deriveCityPalette(theme, 'vibes');
+ const cyber = deriveOpenWorldPalette(theme, 'cyber');
+ const vibes = deriveOpenWorldPalette(theme, 'vibes');
expect(hexLum(vibes.buildingBody)).toBeGreaterThan(hexLum(cyber.buildingBody));
});
it('swaps the decorative spread but keeps the theme accent leading, in both styles', () => {
const theme = getTheme('classic-midnight');
- const cyber = deriveCityPalette(theme, 'cyber');
- const vibes = deriveCityPalette(theme, 'vibes');
+ const cyber = deriveOpenWorldPalette(theme, 'cyber');
+ const vibes = deriveOpenWorldPalette(theme, 'vibes');
expect(vibes.neonAccents[0]).toBe(vibes.accent);
expect(cyber.neonAccents[0]).toBe(cyber.accent);
expect(vibes.neonAccents.slice(1)).not.toEqual(cyber.neonAccents.slice(1));
@@ -245,16 +245,16 @@ describe('deriveCityPalette — world style', () => {
it('keeps status colors semantic in both styles', () => {
const theme = getTheme('classic-midnight');
for (const style of ['cyber', 'vibes']) {
- const p = deriveCityPalette(theme, style);
+ const p = deriveOpenWorldPalette(theme, style);
expect(p.getBuildingColor('stopped')).toBe(CITY_COLORS.building.stopped);
expect(p.getBuildingColor('online', true)).toBe(CITY_COLORS.building.archived);
}
});
});
-describe('deriveCityPalette brand surfaces', () => {
+describe('deriveOpenWorldPalette brand surfaces', () => {
it('carries themed brand surfaces derived from the accent', () => {
- const p = deriveCityPalette(getTheme('black-ice-terminal-day'));
+ const p = deriveOpenWorldPalette(getTheme('black-ice-terminal-day'));
expect(p.ground).toBe('#0a7a4a');
expect(p.particles).toBe('#0a7a4a');
expect(p.building.online).toBe('#0a7a4a');
@@ -264,7 +264,7 @@ describe('deriveCityPalette brand surfaces', () => {
});
it('leaves status colors untouched', () => {
- const p = deriveCityPalette(getTheme('black-ice-terminal-day'));
+ const p = deriveOpenWorldPalette(getTheme('black-ice-terminal-day'));
expect(p.building.stopped).toBe('#ef4444');
expect(p.getBuildingColor('stopped')).toBe('#ef4444');
// not_found stays the canonical purple — the value ProcessBuilding now unifies to.
@@ -273,13 +273,13 @@ describe('deriveCityPalette brand surfaces', () => {
it('re-tints the building body toward the accent, preserving its darkness', () => {
const ORIGINAL_BODY = '#0c0c24';
- const p = deriveCityPalette(getTheme('black-ice-terminal-day'), 'cyber'); // green accent
+ const p = deriveOpenWorldPalette(getTheme('black-ice-terminal-day'), 'cyber'); // green accent
expect(p.buildingBody).not.toBe(ORIGINAL_BODY); // picked up the theme
expect(hexLum(p.buildingBody)).toBeCloseTo(hexLum(ORIGINAL_BODY), 0); // still a dark body
});
it('is pure — never mutates the shared CITY_COLORS singleton', () => {
- deriveCityPalette(getTheme('black-ice-terminal-day'));
+ deriveOpenWorldPalette(getTheme('black-ice-terminal-day'));
// The static table keeps its cyan baseline; only the returned palette is themed.
expect(CITY_COLORS.ground).toBe('#06b6d4');
expect(CITY_COLORS.building.online).toBe('#06b6d4');
@@ -290,18 +290,18 @@ describe('deriveCityPalette brand surfaces', () => {
});
it('does not compound across repeated derivations — each is recomputed from the accent', () => {
- const green = deriveCityPalette(getTheme('black-ice-terminal-day'));
- deriveCityPalette(getTheme('classic-midnight'));
- const greenAgain = deriveCityPalette(getTheme('black-ice-terminal-day'));
+ const green = deriveOpenWorldPalette(getTheme('black-ice-terminal-day'));
+ deriveOpenWorldPalette(getTheme('classic-midnight'));
+ const greenAgain = deriveOpenWorldPalette(getTheme('black-ice-terminal-day'));
// classic-midnight accent is 59 130 246 -> #3b82f6, never a blend of green+blue.
- expect(deriveCityPalette(getTheme('classic-midnight')).ground).toBe('#3b82f6');
+ expect(deriveOpenWorldPalette(getTheme('classic-midnight')).ground).toBe('#3b82f6');
// Re-deriving the green theme yields an identical body — proof it's recomputed
// from ORIGINAL_BUILDING_BODY, not from a previously-tinted value.
expect(greenAgain.buildingBody).toBe(green.buildingBody);
});
it('binds getAccentColor to the themed neon list', () => {
- const p = deriveCityPalette(getTheme('black-ice-terminal-day'));
+ const p = deriveOpenWorldPalette(getTheme('black-ice-terminal-day'));
// The lead neon accent tracks the theme, so an app hashing to index 0 gets it.
expect(p.neonAccents[0]).toBe('#0a7a4a');
// Bound helper picks from the palette's list; the bare helper picks from the
@@ -362,42 +362,42 @@ describe('smoothstepRange', () => {
});
});
-describe('cityDayMix', () => {
+describe('openWorldDayMix', () => {
it('is 1 in full daylight and 0 at night', () => {
- expect(cityDayMix({ timeOfDay: 'noon' })).toBe(1);
- expect(cityDayMix({ timeOfDay: 'sunset' })).toBe(0);
+ expect(openWorldDayMix({ timeOfDay: 'noon' })).toBe(1);
+ expect(openWorldDayMix({ timeOfDay: 'sunset' })).toBe(0);
});
it('defaults to the night preset when unset', () => {
- expect(cityDayMix(undefined)).toBe(0);
+ expect(openWorldDayMix(undefined)).toBe(0);
});
});
describe('quality-preset gates', () => {
// Preset densities: low 0.5, medium 0.75, high 1.0, ultra 1.5.
- it('cityShowDetail turns on above the low preset', () => {
- expect(cityShowDetail({ particleDensity: 0.5 })).toBe(false);
- expect(cityShowDetail({ particleDensity: 0.75 })).toBe(true);
- expect(cityShowDetail(undefined)).toBe(true); // defaults to 1
+ it('openWorldShowDetail turns on above the low preset', () => {
+ expect(openWorldShowDetail({ particleDensity: 0.5 })).toBe(false);
+ expect(openWorldShowDetail({ particleDensity: 0.75 })).toBe(true);
+ expect(openWorldShowDetail(undefined)).toBe(true); // defaults to 1
});
- it('cityShowInteriorWindows holds one tier above detail (high+)', () => {
- expect(cityShowInteriorWindows({ particleDensity: 0.5 })).toBe(false);
- expect(cityShowInteriorWindows({ particleDensity: 0.75 })).toBe(false);
- expect(cityShowInteriorWindows({ particleDensity: 1.0 })).toBe(true);
- expect(cityShowInteriorWindows({ particleDensity: 1.5 })).toBe(true);
- expect(cityShowInteriorWindows(undefined)).toBe(true); // defaults to 1
+ it('openWorldShowInteriorWindows holds one tier above detail (high+)', () => {
+ expect(openWorldShowInteriorWindows({ particleDensity: 0.5 })).toBe(false);
+ expect(openWorldShowInteriorWindows({ particleDensity: 0.75 })).toBe(false);
+ expect(openWorldShowInteriorWindows({ particleDensity: 1.0 })).toBe(true);
+ expect(openWorldShowInteriorWindows({ particleDensity: 1.5 })).toBe(true);
+ expect(openWorldShowInteriorWindows(undefined)).toBe(true); // defaults to 1
});
it('detail gates prefer the explicit effectiveTier over particleDensity', () => {
// effectiveTier is authoritative when present — particleDensity is ignored. The
// warm-up path expresses its detail suppression by setting effectiveTier:'low'
- // (see CityScene.renderSettings), not by clamping particleDensity.
- expect(cityShowDetail({ effectiveTier: 'low', particleDensity: 2 })).toBe(false);
- expect(cityShowDetail({ effectiveTier: 'medium', particleDensity: 0.1 })).toBe(true);
- expect(cityShowInteriorWindows({ effectiveTier: 'medium', particleDensity: 2 })).toBe(false);
- expect(cityShowInteriorWindows({ effectiveTier: 'high', particleDensity: 0.1 })).toBe(true);
- expect(cityShowInteriorWindows({ effectiveTier: 'ultra' })).toBe(true);
+ // (see OpenWorldScene.renderSettings), not by clamping particleDensity.
+ expect(openWorldShowDetail({ effectiveTier: 'low', particleDensity: 2 })).toBe(false);
+ expect(openWorldShowDetail({ effectiveTier: 'medium', particleDensity: 0.1 })).toBe(true);
+ expect(openWorldShowInteriorWindows({ effectiveTier: 'medium', particleDensity: 2 })).toBe(false);
+ expect(openWorldShowInteriorWindows({ effectiveTier: 'high', particleDensity: 0.1 })).toBe(true);
+ expect(openWorldShowInteriorWindows({ effectiveTier: 'ultra' })).toBe(true);
});
});
// @vitest-environment node
@@ -420,13 +420,13 @@ describe('resolveWorldStyle / getWorldStyle', () => {
});
it('gates the neon-only scene layers on the cyber style alone', () => {
- // CityScene mounts the galaxy spheremap, starfield, data rain, embers, volumetric
+ // OpenWorldScene mounts the galaxy spheremap, starfield, data rain, embers, volumetric
// cones, and neon signage on palette.neonLayers. An absent style must NOT read as
// cyber — that would haze the default bright world.
- expect(deriveCityPalette(undefined, 'cyber').neonLayers).toBe(true);
- expect(deriveCityPalette(undefined, 'vibes').neonLayers).toBe(false);
- expect(deriveCityPalette(undefined).neonLayers).toBe(false);
- expect(deriveCityPalette(undefined, 'nonsense').neonLayers).toBe(false);
+ expect(deriveOpenWorldPalette(undefined, 'cyber').neonLayers).toBe(true);
+ expect(deriveOpenWorldPalette(undefined, 'vibes').neonLayers).toBe(false);
+ expect(deriveOpenWorldPalette(undefined).neonLayers).toBe(false);
+ expect(deriveOpenWorldPalette(undefined, 'nonsense').neonLayers).toBe(false);
});
it('every style definition is complete, so a new row cannot half-register', () => {
@@ -452,13 +452,13 @@ describe('resolveWorldStyle / getWorldStyle', () => {
it('carries a style-appropriate material surface for structural meshes', () => {
// flatShading is part of three.js's shader program cache key, so this must be a
// concrete boolean on both styles rather than absent on one of them.
- expect(deriveCityPalette(undefined, 'vibes').surface)
+ expect(deriveOpenWorldPalette(undefined, 'vibes').surface)
.toEqual({ flatShading: true, roughness: 0.95, metalness: 0 });
- expect(deriveCityPalette(undefined, 'cyber').surface).toEqual({ flatShading: false });
+ expect(deriveOpenWorldPalette(undefined, 'cyber').surface).toEqual({ flatShading: false });
});
it('exposes the style terrain bands so components do not hardcode hexes', () => {
- expect(deriveCityPalette(undefined, 'vibes').terrain).toEqual(WORLD_STYLE_DEFS.vibes.terrain);
- expect(deriveCityPalette(undefined, 'cyber').terrain).toEqual(WORLD_STYLE_DEFS.cyber.terrain);
+ expect(deriveOpenWorldPalette(undefined, 'vibes').terrain).toEqual(WORLD_STYLE_DEFS.vibes.terrain);
+ expect(deriveOpenWorldPalette(undefined, 'cyber').terrain).toEqual(WORLD_STYLE_DEFS.cyber.terrain);
});
});
diff --git a/client/src/components/threejsModels/ThreejsModelPreview.jsx b/client/src/components/threejsModels/ThreejsModelPreview.jsx
index d9532594bf..b1ab8b23bb 100644
--- a/client/src/components/threejsModels/ThreejsModelPreview.jsx
+++ b/client/src/components/threejsModels/ThreejsModelPreview.jsx
@@ -20,7 +20,7 @@ import {
getEffectiveTier,
recordFrame,
resetRenderBudget,
-} from '../../utils/cityRenderBudget';
+} from '../../utils/openWorldRenderBudget';
const radians = (degrees = 0) => THREE.MathUtils.degToRad(degrees);
const rotation = (degrees = [0, 0, 0]) => degrees.map(radians);
@@ -239,8 +239,8 @@ function SceneRefit({ growth, clipId }) {
}
// The preview owns only the R3F sampling boundary; the quality decisions stay in
-// cityRenderBudget so its warm-up, hysteresis, cooldown, and gap handling remain
-// deterministic and shared with CyberCity.
+// openWorldRenderBudget so its warm-up, hysteresis, cooldown, and gap handling remain
+// deterministic and shared with OpenWorld.
function PreviewAdaptiveQuality({ enabled, resetToken, onTierChange }) {
const stateRef = useRef(null);
if (stateRef.current === null) stateRef.current = createRenderBudget('high', 0);
diff --git a/client/src/hooks/README.md b/client/src/hooks/README.md
index fcdbc6a128..f7e84b6578 100644
--- a/client/src/hooks/README.md
+++ b/client/src/hooks/README.md
@@ -107,7 +107,7 @@ grep -i "what you want to do" client/src/hooks/README.md
| `useStoryImportIntake` | Story Builder "Import a finished work" intake: the form fields plus the analyze → commit → create-session workflow, in one `{ ...state, patch, analyze, retryIssues, importAndBuild }` bag. | Call from the always-mounted Story Builder index and pass down as `intake` — holding this in the panel loses the manuscript and analysis on an intake tab flip (#3904). |
| `useRowDraft` | Multi-column row draft (analogue of `useFieldDraft`). | Multi-column row that commits as a unit. |
| `usePendingListRows` | List-of-rows where a new row is held client-side until a required column fills, then promoted to `onChange`. | Editable list whose nameless rows would otherwise be dropped by the server sanitizer (WardrobeSection, CharacterDetailEditor list sections). |
-| `useKeyboardControls` | Keyboard binding for CyberCity mode toggle. | CyberCity-specific. |
+| `useKeyboardControls` | Keyboard binding for OpenWorld mode toggle. | OpenWorld-specific. |
| `useFirstTouchHint` | `{ visible, showOnFirstTouch }` — reveals a brief one-time touch gesture hint, then auto-hides it. | 3D canvases whose primary one-finger gesture needs an initial explanation. |
| `useKeyboardShortcuts` | `useKeyboardShortcuts(active, bindings, opts?)` — fire a `{ key: handler }` map while `active`; ignores events from editable fields (`isEditableTarget` also exported), ⌘/Ctrl/Alt chords, OS key auto-repeat (`{ ignoreRepeat: false }` to opt back in), and any keystroke while an `aria-modal` dialog is open (`{ enabledInDialog: true }` for a modal-owned shortcut); a falsy handler disables that key. | Single-surface action shortcuts (editorial comment card prev/next + accept/dismiss/generate, #1603). Not for held-key/game input (that's `useKeyboardControls`). |
| `useHfTokenStatus` | Reads the central HuggingFace token status (`GET /image-gen/setup/hf-token-status` → `server/lib/hfToken.js`: stored → env → `hf auth login`). Returns `{ present, source, refresh }` where `present` is TRI-state — `null` means "unknown/failed", not "absent" — so a slow fetch can't flash a token nag at a user who has one. `{ enabled }` gates the fetch (false resets to unknown, so a modal re-checks per open); `{ errorAs: 'absent' }` opts a surface into offering the paste form when the status call fails. | Any gated-HuggingFace surface (3D page, MIDI gated modal, Image Gen banners) — use this instead of re-rolling the fetch, or the same blip renders differently per page. |
@@ -155,11 +155,11 @@ grep -i "what you want to do" client/src/hooks/README.md
| `useAppOverrideActions` | Per-app scheduled-task override mutations (`{ handleUpdateOverride, handleBulkToggleOverride }`) with shared toast copy + silent flag; pass the tab's `refetch`. | Any surface hosting `PerAppOverrideList` (Schedule tab, Timeline tab) — don't re-copy the write-plus-toast-plus-refetch handlers. |
| `useTaskModelPins` | Provider/model/effort pins for one CoS scheduled task: optimistic write per change (`'' → null` clears; picking a provider clears model+effort, picking a model clears the effort only when that model has no tiers at all), rollback when `onUpdate` resolves falsy, a `saving` flag to gate "Run Now", plus the derived `availableModels` (Antigravity base models, stale pin kept selectable), `effectiveProviderId` and `defaultProviderLabel` a `ProviderModelSelector` needs. | Any surface that retargets a scheduled task's model (schedule card quick controls, config drawer Global defaults) — don't re-roll the select/PUT/rollback trio. |
| `useCanonPatch` | Optimistic canon-entry patch: rebuild the kind list with one entry mutated, apply locally, PATCH the universe, re-apply the server copy. Targets + staleness-guards on the loaded record's `universe.id` so a mid-flight universe swap can't cross-PATCH or resurrect stale state. `apply` is `setUniverse` or `onUniverseChange`. | Inline canon-field edits on a universe (UniverseCanonSection, NounsStage). Don't re-roll the optimistic-then-confirm dance. |
-| `useCityAudio` | CyberCity ambient audio. | CyberCity only. |
-| `useCityData` | CyberCity environment data + physics. | CyberCity only. |
-| `useCityPlayback` | Timeline-scrubber transport: loads the snapshot series, steps a frame index, play/pause/speed. | CyberCity playback (history) mode only. |
-| `useCityViewport` | Classifies the window width into `phone` / `compact` / `desktop` brackets (mirrors Tailwind `sm`/`lg`) so the City HUD can branch between the desktop cockpit and the compact/phone disclosure layout in JS (only one tree mounts). Returns `{ mode, isPhone, isCompact, isDesktop, isCondensed }`. | CyberCity HUD responsive layout only. |
-| `useCitySettings` | CyberCity quality presets + persistence. | CyberCity only. |
+| `useOpenWorldAudio` | OpenWorld ambient audio. | OpenWorld only. |
+| `useOpenWorldData` | OpenWorld environment data + physics. | OpenWorld only. |
+| `useOpenWorldPlayback` | Timeline-scrubber transport: loads the snapshot series, steps a frame index, play/pause/speed. | OpenWorld playback (history) mode only. |
+| `useOpenWorldViewport` | Classifies the window width into `phone` / `compact` / `desktop` brackets (mirrors Tailwind `sm`/`lg`) so the OpenWorld HUD can branch between the desktop cockpit and the compact/phone disclosure layout in JS (only one tree mounts). Returns `{ mode, isPhone, isCompact, isDesktop, isCondensed }`. | OpenWorld HUD responsive layout only. |
+| `useOpenWorldSettings` | OpenWorld quality presets + persistence. | OpenWorld only. |
| `useColorMatch` | Drives a song color-match run: counts the singer in with the metronome, walks the notated score in tempo, grades each note against the live mic pitch (#1022 tracker + colorMatch lib), and exposes `{ running, countingIn, noteColors, summary, activeIndex, start, stop }` for the `<ScoreSheet>` + an accuracy readout. Taps the passed recording stream (no second mic); tears down on stop/unmount. | The Song editor's color-match panel. Don't re-wire the metronome + tracker + grading loop by hand. |
| `useCodeReviewDefaults` | Global Code Review Defaults (Review Loop reviewer chain + every per-reviewer `<reviewer>Model` / `<reviewer>Effort` pin scalar) via a small Provider/hook pair. | TaskAddForm, ScheduleTab, anywhere a default reviewer picker is shown. |
| `useCatalogTypes` | Catalog ingredient type registry (system + user-defined) merged with the static fallback via a Provider/hook pair; synchronous fallback to the built-in six so first render never blanks. | Catalog list/picker/editor; anywhere the catalog type list/lookup is needed. |
diff --git a/client/src/hooks/index.js b/client/src/hooks/index.js
index dc27a2c3bb..2cc5088d14 100644
--- a/client/src/hooks/index.js
+++ b/client/src/hooks/index.js
@@ -13,7 +13,7 @@ export { default as useAudioSessionClaim } from './useAudioSessionClaim.js';
export { default as useAsyncCaptureGuard } from './useAsyncCaptureGuard.js';
export { default as useAssignableInstances } from './useAssignableInstances.js';
export { default as useAutoscroll } from './useAutoscroll.js';
-export { default as useCityAudio } from './useCityAudio.js';
+export { default as useOpenWorldAudio } from './useOpenWorldAudio.js';
export { default as useClonedGltf } from './useClonedGltf.jsx';
export * from './useClonedGltf.jsx';
export { default as useAutoSizeTextarea } from './useAutoSizeTextarea.js';
@@ -99,8 +99,8 @@ export { default as useTokenPopover } from './useTokenPopover.js';
// === Mixed (both default and named) — surface both ===
export { default as useAsyncAction } from './useAsyncAction.js';
export * from './useAsyncAction.js';
-export { default as useCitySettings } from './useCitySettings.js';
-export * from './useCitySettings.js';
+export { default as useOpenWorldSettings } from './useOpenWorldSettings.js';
+export * from './useOpenWorldSettings.js';
// === Notifications & toasts ===
export * from './useAIStatusNotifications.js';
@@ -178,16 +178,16 @@ export * from './useSidebarApps.js';
export * from './useSidebarSeries.js';
export * from './useSidebarUniverses.js';
-// === Domain: City / Voice / Mortality / Universe / Apps / Sessions ===
+// === Domain: OpenWorld / Voice / Mortality / Universe / Apps / Sessions ===
export * from './useAppDeploy.js';
export * from './useAppOperation.js';
export * from './useAppOverrideActions.js';
export * from './useTaskModelPins.js';
export * from './useCanonPatch.js';
-export * from './useCityData.js';
-export * from './useCityPlayback.js';
-export { default as useCityViewport } from './useCityViewport.js';
-export * from './useCityViewport.js';
+export * from './useOpenWorldData.js';
+export * from './useOpenWorldPlayback.js';
+export { default as useOpenWorldViewport } from './useOpenWorldViewport.js';
+export * from './useOpenWorldViewport.js';
export * from './useDeathClock.js';
export * from './useGoalDetail.js';
export * from './usePostSession.js';
diff --git a/client/src/hooks/useAutoRefetch.js b/client/src/hooks/useAutoRefetch.js
index 1af7dfa91e..b6ebb274a2 100644
--- a/client/src/hooks/useAutoRefetch.js
+++ b/client/src/hooks/useAutoRefetch.js
@@ -27,7 +27,7 @@ import { useVisibilityEvent } from './useVisibilityEvent.js';
* @param {boolean} [options.enabled=true] - when false, no interval and no fetch.
* @param {boolean} [options.immediate=true] - when false, skip the on-mount
* fetch and wait `intervalMs` before the first fetch. Use when the caller
- * already performs a one-shot fetch via another path (e.g. `useCityData.fetchAll`).
+ * already performs a one-shot fetch via another path (e.g. `useOpenWorldData.fetchAll`).
* @param {(prev:any, next:any)=>boolean} [options.compare] - when provided,
* each fetch keeps the previous reference (skipping the re-render) if
* `compare(prev, next)` returns true. Only invoked when both `prev` and
diff --git a/client/src/hooks/useCooldownTick.js b/client/src/hooks/useCooldownTick.js
index 815828cc37..7ee69743bc 100644
--- a/client/src/hooks/useCooldownTick.js
+++ b/client/src/hooks/useCooldownTick.js
@@ -22,7 +22,7 @@ export function useCooldownTick(options = {}) {
// is always visible to the interval tick — a useEffect-driven ref update
// can lag one render behind and, if `onAllExpired` changes right before
// the expiry tick, the interval would fire the previous closure once.
- // Pattern mirrored from usePostSession.js / useCityAudio.js.
+ // Pattern mirrored from usePostSession.js / useOpenWorldAudio.js.
const callbackRef = useRef(onAllExpired);
callbackRef.current = onAllExpired;
diff --git a/client/src/hooks/useNavWorkingSet.test.jsx b/client/src/hooks/useNavWorkingSet.test.jsx
index 2ae19ad142..d33ad6f3fb 100644
--- a/client/src/hooks/useNavWorkingSet.test.jsx
+++ b/client/src/hooks/useNavWorkingSet.test.jsx
@@ -53,7 +53,7 @@ describe('useNavWorkingSet', () => {
it('migrates the whole legacy /city subtree to /openworld', () => {
// The 3D world moved from /city to /openworld. App.jsx redirects the browser URL, but
// the STORED path is what pinned/recent resolve against — without a migration a pinned
- // "City" row stops matching the manifest and silently vanishes on upgrade.
+ // "OpenWorld" row stops matching the manifest and silently vanishes on upgrade.
localStorage.setItem(PINNED_KEY, JSON.stringify(['/city', '/city/settings', '/city/apps/portos']));
const { result } = renderHook(() => useNavWorkingSet(resolveNavEntry), { wrapper });
diff --git a/client/src/hooks/useNotifications.js b/client/src/hooks/useNotifications.js
index 65aa120ea0..0e868846d1 100644
--- a/client/src/hooks/useNotifications.js
+++ b/client/src/hooks/useNotifications.js
@@ -69,9 +69,9 @@ export function useNotifications() {
socket.on('notifications:count', handleCount);
socket.on('notifications:cleared', handleCleared);
- // notifications:* is a shared namespace; CyberCity's useCityData also
+ // notifications:* is a shared namespace; OpenWorld's useOpenWorldData also
// subscribes. The server keeps a per-socket Set with no ref count, so
- // emitting notifications:unsubscribe here would also remove CyberCity's
+ // emitting notifications:unsubscribe here would also remove OpenWorld's
// events. Just drop the listeners; disconnect cleans up Set membership.
return () => {
socket.off('notifications:added', handleAdded);
diff --git a/client/src/hooks/useCityAudio.js b/client/src/hooks/useOpenWorldAudio.js
similarity index 92%
rename from client/src/hooks/useCityAudio.js
rename to client/src/hooks/useOpenWorldAudio.js
index b7f77f428f..c641e5750f 100644
--- a/client/src/hooks/useCityAudio.js
+++ b/client/src/hooks/useOpenWorldAudio.js
@@ -1,12 +1,12 @@
import { useState, useEffect, useCallback, useRef } from 'react';
-import { initAudio, setMusicVolume, setSfxVolume, scheduleCleanup as scheduleAudioCleanup } from '../components/city/audio/cityAudioEngine';
-import { startMusic, stopMusic, setSoundscape } from '../components/city/audio/citySynthMusic';
-import { playSfx as playSfxFn } from '../components/city/audio/citySoundEffects';
-import { applyMoodOverride } from '../utils/citySoundscape';
+import { initAudio, setMusicVolume, setSfxVolume, scheduleCleanup as scheduleAudioCleanup } from '../components/openworld/audio/openWorldAudioEngine';
+import { startMusic, stopMusic, setSoundscape } from '../components/openworld/audio/openWorldSynthMusic';
+import { playSfx as playSfxFn } from '../components/openworld/audio/openWorldSoundEffects';
+import { applyMoodOverride } from '../utils/openWorldSoundscape';
// `soundscape` is the computeSoundscape() view-model (roadmap 3.4): the live mood/energy the
// ambient music should reflect. Optional — when omitted the music plays its default progression.
-export default function useCityAudio(settings, soundscape) {
+export default function useOpenWorldAudio(settings, soundscape) {
const [isAudioReady, setIsAudioReady] = useState(false);
const initedRef = useRef(false);
const settingsRef = useRef(settings);
diff --git a/client/src/hooks/useCityAudio.test.jsx b/client/src/hooks/useOpenWorldAudio.test.jsx
similarity index 79%
rename from client/src/hooks/useCityAudio.test.jsx
rename to client/src/hooks/useOpenWorldAudio.test.jsx
index 63b888772b..68c22c5a1b 100644
--- a/client/src/hooks/useCityAudio.test.jsx
+++ b/client/src/hooks/useOpenWorldAudio.test.jsx
@@ -1,24 +1,24 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { renderHook, act } from '@testing-library/react';
-vi.mock('../components/city/audio/cityAudioEngine', () => ({
+vi.mock('../components/openworld/audio/openWorldAudioEngine', () => ({
initAudio: vi.fn(() => ({})),
setMusicVolume: vi.fn(),
setSfxVolume: vi.fn(),
scheduleCleanup: vi.fn(),
}));
-vi.mock('../components/city/audio/citySynthMusic', () => ({
+vi.mock('../components/openworld/audio/openWorldSynthMusic', () => ({
startMusic: vi.fn(),
stopMusic: vi.fn(() => 0),
setSoundscape: vi.fn(),
}));
-vi.mock('../components/city/audio/citySoundEffects', () => ({
+vi.mock('../components/openworld/audio/openWorldSoundEffects', () => ({
playSfx: vi.fn(),
}));
-import useCityAudio from './useCityAudio.js';
-import { setSoundscape } from '../components/city/audio/citySynthMusic';
-import { computeSoundscape } from '../utils/citySoundscape';
+import useOpenWorldAudio from './useOpenWorldAudio.js';
+import { setSoundscape } from '../components/openworld/audio/openWorldSynthMusic';
+import { computeSoundscape } from '../utils/openWorldSoundscape';
// A healthy, moderately busy city — the live mood is `bright`, so a `tense` override is an
// observable change and clearing it back to auto is observable in the other direction.
@@ -41,16 +41,16 @@ beforeEach(() => {
vi.clearAllMocks();
});
-describe('useCityAudio soundscape override', () => {
+describe('useOpenWorldAudio soundscape override', () => {
it('applies the live soundscape when no override is set', () => {
- renderHook(() => useCityAudio(baseSettings, LIVE));
+ renderHook(() => useOpenWorldAudio(baseSettings, LIVE));
primeAudio();
expect(lastSoundscape()).toMatchObject({ mood: 'bright', chordSet: 'bright' });
});
it('applies the forced chord set while the override is set', () => {
const { rerender } = renderHook(
- ({ settings }) => useCityAudio(settings, LIVE),
+ ({ settings }) => useOpenWorldAudio(settings, LIVE),
{ initialProps: { settings: baseSettings } },
);
primeAudio();
@@ -62,7 +62,7 @@ describe('useCityAudio soundscape override', () => {
it('keeps the forced mood when live system state changes underneath it', () => {
const { rerender } = renderHook(
- ({ settings, soundscape }) => useCityAudio(settings, soundscape),
+ ({ settings, soundscape }) => useOpenWorldAudio(settings, soundscape),
{ initialProps: { settings: { ...baseSettings, soundscapeOverride: 'bright' }, soundscape: LIVE } },
);
primeAudio();
@@ -76,7 +76,7 @@ describe('useCityAudio soundscape override', () => {
it('resumes live computation immediately when the override is cleared to Auto', () => {
const { rerender } = renderHook(
- ({ settings }) => useCityAudio(settings, LIVE),
+ ({ settings }) => useOpenWorldAudio(settings, LIVE),
{ initialProps: { settings: { ...baseSettings, soundscapeOverride: 'tense' } } },
);
primeAudio();
@@ -88,14 +88,14 @@ describe('useCityAudio soundscape override', () => {
});
it('ignores an unknown stored override value and stays on live state', () => {
- renderHook(() => useCityAudio({ ...baseSettings, soundscapeOverride: 'stale-mood' }, LIVE));
+ renderHook(() => useOpenWorldAudio({ ...baseSettings, soundscapeOverride: 'stale-mood' }, LIVE));
primeAudio();
expect(lastSoundscape()).toMatchObject({ mood: LIVE.mood, chordSet: LIVE.chordSet });
});
it('does not re-apply when a poll recomputes an identical soundscape', () => {
const { rerender } = renderHook(
- ({ soundscape }) => useCityAudio(baseSettings, soundscape),
+ ({ soundscape }) => useOpenWorldAudio(baseSettings, soundscape),
{ initialProps: { soundscape: LIVE } },
);
primeAudio();
diff --git a/client/src/hooks/useCityData.js b/client/src/hooks/useOpenWorldData.js
similarity index 99%
rename from client/src/hooks/useCityData.js
rename to client/src/hooks/useOpenWorldData.js
index 76a2cc48cc..e853ebd328 100644
--- a/client/src/hooks/useCityData.js
+++ b/client/src/hooks/useOpenWorldData.js
@@ -2,8 +2,8 @@ import { useState, useEffect, useCallback, useMemo, useRef } from 'react';
import * as api from '../services/api';
import socket from '../services/socket';
import { useAutoRefetch } from './useAutoRefetch';
-import { METRICS as HEALTH_TOWER_METRICS } from '../utils/cityHealthTower';
-import { applyAiStatusEvent, pruneAiOps, AI_CORE } from '../utils/cityAiCore';
+import { METRICS as HEALTH_TOWER_METRICS } from '../utils/openWorldHealthTower';
+import { applyAiStatusEvent, pruneAiOps, AI_CORE } from '../utils/openWorldAiCore';
import { coalesce } from '../utils/coalesce';
// Metric keys the vitals-tower landmark renders — fetched as the latest-value snapshot.
@@ -14,7 +14,7 @@ const healthSignature = (h) => {
return `${h?.overallHealth}|${h?.system?.cpu?.usagePercent}|${h?.system?.memory?.usagePercent}|${h?.system?.disk?.usagePercent}|${warnings}`;
};
-export const useCityData = () => {
+export const useOpenWorldData = () => {
const [apps, setApps] = useState([]);
const [cosAgents, setCosAgents] = useState([]);
const [cosStatus, setCosStatus] = useState({ running: false });
diff --git a/client/src/hooks/useCityPlayback.js b/client/src/hooks/useOpenWorldPlayback.js
similarity index 90%
rename from client/src/hooks/useCityPlayback.js
rename to client/src/hooks/useOpenWorldPlayback.js
index 7445bde9be..9901a4fb0f 100644
--- a/client/src/hooks/useCityPlayback.js
+++ b/client/src/hooks/useOpenWorldPlayback.js
@@ -1,17 +1,17 @@
import { useState, useCallback, useEffect, useMemo } from 'react';
import useMounted from './useMounted';
-import { getCitySnapshots } from '../services/apiCity.js';
-import { isPlayableFrame, buildPlaybackStats } from '../lib/cityPlaybackFrame.js';
+import { getOpenWorldSnapshots } from '../services/apiOpenWorld.js';
+import { isPlayableFrame, buildPlaybackStats } from '../lib/openWorldPlaybackFrame.js';
-// Transport state for the CyberCity timeline scrubber (issue #967). Owns the
-// snapshot series, the current frame index, and play/pause/speed so CyberCity.jsx
+// Transport state for the OpenWorld timeline scrubber (issue #967). Owns the
+// snapshot series, the current frame index, and play/pause/speed so OpenWorld.jsx
// stays lean. Pure-UI: it reads the snapshot API and steps an index; the page
-// turns the current frame into scene props via lib/cityPlaybackFrame.js.
+// turns the current frame into scene props via lib/openWorldPlaybackFrame.js.
export const PLAYBACK_SPEEDS = [1, 2, 4]; // × frames/sec
const BASE_INTERVAL_MS = 1000; // 1×: advance one frame per second
-export function useCityPlayback() {
+export function useOpenWorldPlayback() {
const [active, setActive] = useState(false);
const [snapshots, setSnapshots] = useState([]);
const [frameIndex, setFrameIndex] = useState(0);
@@ -34,7 +34,7 @@ export function useCityPlayback() {
setError(false);
// Sentinel: catch → null marks a failed fetch, distinct from a fetched-empty
// history. Validate the payload is actually an array before trusting it.
- const res = await getCitySnapshots({ silent: true }).catch(() => null);
+ const res = await getOpenWorldSnapshots({ silent: true }).catch(() => null);
if (!mountedRef.current) return;
if (!res || !Array.isArray(res.snapshots)) {
setError(true);
diff --git a/client/src/hooks/useCityPlayback.test.jsx b/client/src/hooks/useOpenWorldPlayback.test.jsx
similarity index 76%
rename from client/src/hooks/useCityPlayback.test.jsx
rename to client/src/hooks/useOpenWorldPlayback.test.jsx
index 5c9d55301f..bfac10746a 100644
--- a/client/src/hooks/useCityPlayback.test.jsx
+++ b/client/src/hooks/useOpenWorldPlayback.test.jsx
@@ -1,12 +1,12 @@
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { renderHook, act } from '@testing-library/react';
-const getCitySnapshots = vi.fn();
-vi.mock('../services/apiCity.js', () => ({
- getCitySnapshots: (...a) => getCitySnapshots(...a),
+const getOpenWorldSnapshots = vi.fn();
+vi.mock('../services/apiOpenWorld.js', () => ({
+ getOpenWorldSnapshots: (...a) => getOpenWorldSnapshots(...a),
}));
-import { useCityPlayback, PLAYBACK_SPEEDS } from './useCityPlayback.js';
+import { useOpenWorldPlayback, PLAYBACK_SPEEDS } from './useOpenWorldPlayback.js';
const mkFrames = (n) => Array.from({ length: n }, (_, i) => ({
ts: `2026-06-05T0${i}:00:00.000Z`,
@@ -15,14 +15,14 @@ const mkFrames = (n) => Array.from({ length: n }, (_, i) => ({
counts: {},
}));
-describe('useCityPlayback', () => {
+describe('useOpenWorldPlayback', () => {
beforeEach(() => {
vi.clearAllMocks();
- getCitySnapshots.mockResolvedValue({ total: 3, snapshots: mkFrames(3) });
+ getOpenWorldSnapshots.mockResolvedValue({ total: 3, snapshots: mkFrames(3) });
});
it('loads the series on enter and starts at the most recent frame', async () => {
- const { result } = renderHook(() => useCityPlayback());
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
expect(result.current.active).toBe(true);
expect(result.current.frameCount).toBe(3);
@@ -31,32 +31,32 @@ describe('useCityPlayback', () => {
});
it('flags an error (distinct from empty) when the fetch fails', async () => {
- getCitySnapshots.mockRejectedValue(new Error('network down'));
- const { result } = renderHook(() => useCityPlayback());
+ getOpenWorldSnapshots.mockRejectedValue(new Error('network down'));
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
expect(result.current.error).toBe(true);
expect(result.current.frameCount).toBe(0);
});
it('a real empty history is not an error', async () => {
- getCitySnapshots.mockResolvedValue({ total: 0, snapshots: [] });
- const { result } = renderHook(() => useCityPlayback());
+ getOpenWorldSnapshots.mockResolvedValue({ total: 0, snapshots: [] });
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
expect(result.current.error).toBe(false);
expect(result.current.frameCount).toBe(0);
});
it('filters out frames with an unsupported schemaVersion', async () => {
- getCitySnapshots.mockResolvedValue({
+ getOpenWorldSnapshots.mockResolvedValue({
snapshots: [...mkFrames(2), { ts: 'x', schemaVersion: 99, apps: [] }],
});
- const { result } = renderHook(() => useCityPlayback());
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
expect(result.current.frameCount).toBe(2);
});
it('step clamps at both ends and pauses', async () => {
- const { result } = renderHook(() => useCityPlayback());
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
act(() => result.current.step(1)); // already at last → clamps
expect(result.current.frameIndex).toBe(2);
@@ -66,7 +66,7 @@ describe('useCityPlayback', () => {
});
it('cycleSpeed walks the speed presets', async () => {
- const { result } = renderHook(() => useCityPlayback());
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
expect(result.current.speed).toBe(PLAYBACK_SPEEDS[0]);
act(() => result.current.cycleSpeed());
@@ -74,7 +74,7 @@ describe('useCityPlayback', () => {
});
it('exit clears active + playing', async () => {
- const { result } = renderHook(() => useCityPlayback());
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
act(() => result.current.exit());
expect(result.current.active).toBe(false);
@@ -86,7 +86,7 @@ describe('useCityPlayback', () => {
afterEach(() => vi.useRealTimers());
it('advances frames while playing and stops at the end', async () => {
- const { result } = renderHook(() => useCityPlayback());
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
// seek to start, then play
act(() => result.current.seek(0));
@@ -104,7 +104,7 @@ describe('useCityPlayback', () => {
});
it('does not advance after exit (timer torn down)', async () => {
- const { result } = renderHook(() => useCityPlayback());
+ const { result } = renderHook(() => useOpenWorldPlayback());
await act(async () => { await result.current.enter(); });
act(() => result.current.seek(0));
act(() => result.current.togglePlay());
diff --git a/client/src/hooks/useCitySettings.js b/client/src/hooks/useOpenWorldSettings.js
similarity index 96%
rename from client/src/hooks/useCitySettings.js
rename to client/src/hooks/useOpenWorldSettings.js
index 83f45f6ebd..cd039e2fe5 100644
--- a/client/src/hooks/useCitySettings.js
+++ b/client/src/hooks/useOpenWorldSettings.js
@@ -46,12 +46,12 @@ const DEFAULT_SETTINGS = {
// mood follows live system state. A mood name from SOUNDSCAPE_MOODS pins it instead.
soundscapeOverride: null,
// Auto quality (issue #2592): new installs adapt at runtime, always beginning at High
- // (see CyberCity's autoStartTier). `qualityPreset` names the *Manual* preset only.
+ // (see OpenWorld's autoStartTier). `qualityPreset` names the *Manual* preset only.
qualityMode: 'auto', // 'auto' = adaptive render budget; 'manual' = fixed preset
qualityPreset: 'high',
timeOfDay: 'auto', // 'auto' follows the active theme's day/night mode; 'day'/'night' force it
// Art direction: 'vibes' is the low-poly bright open world (default); 'cyber' restores
- // the original neon-night CyberCity look. Existing installs have no stored value and so
+ // the original neon-night OpenWorld look. Existing installs have no stored value and so
// land on the new default — deliberate, this IS the world's new look — and the picker in
// the Visual tab switches back with no migration.
worldStyle: 'vibes',
@@ -83,7 +83,7 @@ const loadSettings = () => {
export { QUALITY_PRESETS };
-export default function useCitySettings() {
+export default function useOpenWorldSettings() {
const [settings, setSettings] = useState(loadSettings);
// Monotonic counter bumped on every reset. The runtime render budget (Auto mode) lives
// outside `settings`, so a "RESET DEFAULTS" that leaves qualityMode/preset unchanged
diff --git a/client/src/hooks/useCitySettings.test.jsx b/client/src/hooks/useOpenWorldSettings.test.jsx
similarity index 83%
rename from client/src/hooks/useCitySettings.test.jsx
rename to client/src/hooks/useOpenWorldSettings.test.jsx
index 23aa731742..0445a6a197 100644
--- a/client/src/hooks/useCitySettings.test.jsx
+++ b/client/src/hooks/useOpenWorldSettings.test.jsx
@@ -1,6 +1,6 @@
import { describe, it, expect, afterEach, vi } from 'vitest';
import { renderHook, act } from '@testing-library/react';
-import useCitySettings, { TIME_OF_DAY_AUTO_EVENT } from './useCitySettings.js';
+import useOpenWorldSettings, { TIME_OF_DAY_AUTO_EVENT } from './useOpenWorldSettings.js';
const STORAGE_KEY = 'portos-city-settings';
@@ -9,7 +9,7 @@ afterEach(() => {
window.localStorage.clear();
});
-describe('useCitySettings localStorage resilience', () => {
+describe('useOpenWorldSettings localStorage resilience', () => {
it('initializes to defaults when reads throw (blocked storage)', () => {
vi.spyOn(window.localStorage, 'getItem').mockImplementation(() => {
throw new DOMException('The operation is insecure.', 'SecurityError');
@@ -17,7 +17,7 @@ describe('useCitySettings localStorage resilience', () => {
let result;
expect(() => {
- ({ result } = renderHook(() => useCitySettings()));
+ ({ result } = renderHook(() => useOpenWorldSettings()));
}).not.toThrow();
const [settings] = result.current;
@@ -27,7 +27,7 @@ describe('useCitySettings localStorage resilience', () => {
it('initializes to defaults when stored JSON is corrupt', () => {
window.localStorage.setItem(STORAGE_KEY, '{ not valid json');
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
const [settings] = result.current;
expect(settings.qualityPreset).toBe('high');
});
@@ -37,7 +37,7 @@ describe('useCitySettings localStorage resilience', () => {
throw new DOMException('QuotaExceededError', 'QuotaExceededError');
});
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
expect(() => {
act(() => {
@@ -51,7 +51,7 @@ describe('useCitySettings localStorage resilience', () => {
});
it('defaults a fresh install to Auto quality beginning at High', () => {
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
const [settings] = result.current;
expect(settings.qualityMode).toBe('auto');
expect(settings.qualityPreset).toBe('high');
@@ -60,7 +60,7 @@ describe('useCitySettings localStorage resilience', () => {
it('loads an existing pre-Auto payload as Manual, keeping its preset', () => {
// A stored payload from before Auto mode has no `qualityMode` key.
window.localStorage.setItem(STORAGE_KEY, JSON.stringify({ qualityPreset: 'ultra' }));
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
const [settings] = result.current;
expect(settings.qualityMode).toBe('manual');
expect(settings.qualityPreset).toBe('ultra');
@@ -68,13 +68,13 @@ describe('useCitySettings localStorage resilience', () => {
it('preserves a stored qualityMode of auto (present-but-set, not absent)', () => {
window.localStorage.setItem(STORAGE_KEY, JSON.stringify({ qualityMode: 'auto', qualityPreset: 'medium' }));
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
const [settings] = result.current;
expect(settings.qualityMode).toBe('auto');
});
it('picking a manual preset pins Manual mode', () => {
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
act(() => {
const [, updateSetting] = result.current;
updateSetting('qualityPreset', 'low');
@@ -86,7 +86,7 @@ describe('useCitySettings localStorage resilience', () => {
});
it('bumps resetNonce on reset so the runtime budget can re-arm', () => {
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
const before = result.current[3];
act(() => {
const resetSettings = result.current[2];
@@ -105,7 +105,7 @@ describe('useCitySettings localStorage resilience', () => {
throw new DOMException('QuotaExceededError', 'QuotaExceededError');
});
- const { result } = renderHook(() => useCitySettings());
+ const { result } = renderHook(() => useOpenWorldSettings());
expect(() => {
act(() => {
diff --git a/client/src/hooks/useCityViewport.js b/client/src/hooks/useOpenWorldViewport.js
similarity index 82%
rename from client/src/hooks/useCityViewport.js
rename to client/src/hooks/useOpenWorldViewport.js
index d4ff118399..abeb369d2c 100644
--- a/client/src/hooks/useCityViewport.js
+++ b/client/src/hooks/useOpenWorldViewport.js
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
-// Coordinated responsive breakpoints for the CyberCity HUD. The HUD is a fixed
+// Coordinated responsive breakpoints for the OpenWorld HUD. The HUD is a fixed
// overlay on top of a full-bleed 3D scene, so it can't rely on the page's normal
// flow/scroll to reflow — it needs to KNOW the viewport bracket to swap between the
// desktop cockpit and the compact/phone disclosure layout (rendering both trees at
@@ -19,20 +19,20 @@ export const CITY_PHONE_MAX = 639;
export const CITY_COMPACT_MAX = 1023;
export const CITY_DESKTOP_MIN_HEIGHT = 900;
-export function classifyCityViewport(width, height = Infinity) {
+export function classifyOpenWorldViewport(width, height = Infinity) {
if (width <= CITY_PHONE_MAX) return 'phone';
if (width <= CITY_COMPACT_MAX) return 'compact';
if (height < CITY_DESKTOP_MIN_HEIGHT) return 'compact';
return 'desktop';
}
-export default function useCityViewport() {
+export default function useOpenWorldViewport() {
const [mode, setMode] = useState(() =>
- typeof window === 'undefined' ? 'desktop' : classifyCityViewport(window.innerWidth, window.innerHeight),
+ typeof window === 'undefined' ? 'desktop' : classifyOpenWorldViewport(window.innerWidth, window.innerHeight),
);
useEffect(() => {
- const onResize = () => setMode(classifyCityViewport(window.innerWidth, window.innerHeight));
+ const onResize = () => setMode(classifyOpenWorldViewport(window.innerWidth, window.innerHeight));
onResize(); // sync once in case width changed before the listener attached
window.addEventListener('resize', onResize);
return () => window.removeEventListener('resize', onResize);
diff --git a/client/src/hooks/useCityViewport.test.jsx b/client/src/hooks/useOpenWorldViewport.test.jsx
similarity index 63%
rename from client/src/hooks/useCityViewport.test.jsx
rename to client/src/hooks/useOpenWorldViewport.test.jsx
index 0176ba58b7..53cb2a963a 100644
--- a/client/src/hooks/useCityViewport.test.jsx
+++ b/client/src/hooks/useOpenWorldViewport.test.jsx
@@ -1,6 +1,6 @@
import { describe, it, expect, afterEach } from 'vitest';
import { renderHook, act } from '@testing-library/react';
-import useCityViewport, { classifyCityViewport } from './useCityViewport.js';
+import useOpenWorldViewport, { classifyOpenWorldViewport } from './useOpenWorldViewport.js';
const setViewport = (width, height = 1080) => {
window.innerWidth = width;
@@ -9,26 +9,26 @@ const setViewport = (width, height = 1080) => {
afterEach(() => setViewport(1024));
-describe('classifyCityViewport', () => {
+describe('classifyOpenWorldViewport', () => {
it('classifies phone / compact / desktop at the sm+lg breakpoints', () => {
- expect(classifyCityViewport(390)).toBe('phone');
- expect(classifyCityViewport(639)).toBe('phone');
- expect(classifyCityViewport(640)).toBe('compact');
- expect(classifyCityViewport(1023)).toBe('compact');
- expect(classifyCityViewport(1024)).toBe('desktop');
- expect(classifyCityViewport(1440)).toBe('desktop');
+ expect(classifyOpenWorldViewport(390)).toBe('phone');
+ expect(classifyOpenWorldViewport(639)).toBe('phone');
+ expect(classifyOpenWorldViewport(640)).toBe('compact');
+ expect(classifyOpenWorldViewport(1023)).toBe('compact');
+ expect(classifyOpenWorldViewport(1024)).toBe('desktop');
+ expect(classifyOpenWorldViewport(1440)).toBe('desktop');
});
it('uses the compact HUD when a desktop-width viewport is too short for both HUD rails', () => {
- expect(classifyCityViewport(1440, 899)).toBe('compact');
- expect(classifyCityViewport(1440, 900)).toBe('desktop');
+ expect(classifyOpenWorldViewport(1440, 899)).toBe('compact');
+ expect(classifyOpenWorldViewport(1440, 900)).toBe('desktop');
});
});
-describe('useCityViewport', () => {
+describe('useOpenWorldViewport', () => {
it('reports the initial bracket from the current width', () => {
setViewport(390);
- const { result } = renderHook(() => useCityViewport());
+ const { result } = renderHook(() => useOpenWorldViewport());
expect(result.current.mode).toBe('phone');
expect(result.current.isPhone).toBe(true);
expect(result.current.isCondensed).toBe(true);
@@ -37,7 +37,7 @@ describe('useCityViewport', () => {
it('updates on resize across width and height brackets', () => {
setViewport(1440);
- const { result } = renderHook(() => useCityViewport());
+ const { result } = renderHook(() => useOpenWorldViewport());
expect(result.current.isDesktop).toBe(true);
act(() => { setViewport(1440, 899); window.dispatchEvent(new Event('resize')); });
diff --git a/client/src/hooks/useTheme.js b/client/src/hooks/useTheme.js
index 2728c962b6..def5a62c8a 100644
--- a/client/src/hooks/useTheme.js
+++ b/client/src/hooks/useTheme.js
@@ -7,9 +7,9 @@ import {
normalizeThemeId,
} from '../themes/portosThemes';
import {
- STORAGE_KEY as CITY_SETTINGS_KEY,
- TIME_OF_DAY_AUTO_EVENT as CITY_TIME_OF_DAY_AUTO_EVENT,
-} from './useCitySettings';
+ STORAGE_KEY as OPEN_WORLD_SETTINGS_KEY,
+ TIME_OF_DAY_AUTO_EVENT as OPEN_WORLD_TIME_OF_DAY_AUTO_EVENT,
+} from './useOpenWorldSettings';
import { safeReadStorage, safeWriteStorage } from '../lib/safeStorage.js';
import { getSettings, updateSettings } from '../services/apiSystem.js';
@@ -37,19 +37,19 @@ const loadTheme = () => {
return normalized;
};
-const resetCityTimeOfDayOverride = () => {
- const raw = safeReadStorage(CITY_SETTINGS_KEY);
- let citySettings = {};
+const resetOpenWorldTimeOfDayOverride = () => {
+ const raw = safeReadStorage(OPEN_WORLD_SETTINGS_KEY);
+ let openWorldSettings = {};
if (raw) {
try {
const parsed = JSON.parse(raw);
- if (parsed && typeof parsed === 'object') citySettings = parsed;
+ if (parsed && typeof parsed === 'object') openWorldSettings = parsed;
} catch {
- // Corrupt city settings — start from an empty object rather than bail.
+ // Corrupt OpenWorld settings — start from an empty object rather than bail.
}
}
- safeWriteStorage(CITY_SETTINGS_KEY, JSON.stringify({ ...citySettings, timeOfDay: 'auto' }));
- window.dispatchEvent(new Event(CITY_TIME_OF_DAY_AUTO_EVENT));
+ safeWriteStorage(OPEN_WORLD_SETTINGS_KEY, JSON.stringify({ ...openWorldSettings, timeOfDay: 'auto' }));
+ window.dispatchEvent(new Event(OPEN_WORLD_TIME_OF_DAY_AUTO_EVENT));
};
export default function useTheme() {
@@ -75,7 +75,7 @@ export default function useTheme() {
applyTheme(serverTheme);
setThemeId(serverTheme);
safeWriteStorage(STORAGE_KEY, serverTheme);
- resetCityTimeOfDayOverride();
+ resetOpenWorldTimeOfDayOverride();
}
})
.catch((err) => {
@@ -97,7 +97,7 @@ export default function useTheme() {
applyTheme(normalized);
setThemeId(normalized);
safeWriteStorage(STORAGE_KEY, normalized);
- resetCityTimeOfDayOverride();
+ resetOpenWorldTimeOfDayOverride();
// Silent — the theme is already applied locally; a failed sync only warrants
// a console warning, not a toast on every theme switch.
updateSettings({ theme: normalized }, { silent: true })
diff --git a/client/src/index.css b/client/src/index.css
index dca2bc31f0..7a5965fe5d 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -186,7 +186,7 @@
font-display: swap;
}
-/* Geist Pixel font for CyberCity */
+/* Geist Pixel font for OpenWorld */
@font-face {
font-family: 'GeistPixelSquare';
src: url('/fonts/GeistPixel-Square.woff2') format('woff2');
@@ -948,8 +948,8 @@ html[data-port-theme-mode="day"] .always-dark [class~="hover:text-slate-100"]:ho
- `.always-dark` (above) — only when the surface underneath is genuinely
fixed-dark regardless of theme: video-player chrome, a terminal, a
full-screen lightbox.
- - `.cybercity-themed` (below) — a page-scoped `!important` remap of the
- City HUD's fixed cyberpunk palette. Legacy shape, kept because that HUD is
+ - `.openworld-themed` (below) — a page-scoped `!important` remap of the
+ OpenWorld HUD's fixed cyberpunk palette. Legacy shape, kept because that HUD is
authored against a fixed palette on purpose; don't add a second one. */
.port-media-overlay {
background-color: rgb(var(--port-card) / 0.9);
@@ -1006,10 +1006,9 @@ html[data-port-theme-mode="day"] .always-dark [class~="hover:text-slate-100"]:ho
background-color: rgb(var(--port-text) / 0.2);
}
-/* === City (formerly CyberCity) HUD theming ===
- Class/id names keep the `cybercity` slug as a stable internal contract; the
- feature is branded "City" in the UI.
- The CyberCity overlay (clock, vitals, intel pane, agent bar, mini-map, filter
+/* === OpenWorld HUD theming ===
+ The page-scoped `.openworld-themed` root keeps this remap isolated from the
+ rest of the application. The OpenWorld overlay (clock, vitals, intel pane, agent bar, mini-map, filter
bar, settings panel, photo overlay, holographic panels) was authored in a fixed
cyberpunk palette: near-black panels (`bg-black/85`), cyan accent text/borders
(`text-cyan-400`, `border-cyan-500/40`), and many very-low-opacity tokens
@@ -1017,7 +1016,7 @@ html[data-port-theme-mode="day"] .always-dark [class~="hover:text-slate-100"]:ho
like Phosphor Paper that reads as dim teal on near-black floating over a cream
page — low contrast and off-theme. Rather than edit every component, we remap
those exact utility tokens to the active theme's `--port-*` vars, scoped to the
- `.cybercity-themed` page root so nothing else is affected. Status colors
+ `.openworld-themed` page root so nothing else is affected. Status colors
(red/amber/emerald/violet/...) are intentionally left to the global day-mode
remap above so they keep their semantic meaning. The low-opacity variants are
given a higher legibility floor than their original alpha.
@@ -1028,75 +1027,75 @@ html[data-port-theme-mode="day"] .always-dark [class~="hover:text-slate-100"]:ho
them never bleeds through and hurts text legibility. A two-tier split keeps
nested elements distinct: the main panels take the card color, inner fills
(agent items, list rows) take the slightly-different page bg color. */
-html[data-port-theme] .cybercity-themed [class~="bg-black/95"],
-html[data-port-theme] .cybercity-themed [class~="bg-black/92"],
-html[data-port-theme] .cybercity-themed [class~="bg-black/90"],
-html[data-port-theme] .cybercity-themed [class~="bg-black/85"],
-html[data-port-theme] .cybercity-themed [class~="bg-black/80"],
-html[data-port-theme] .cybercity-themed [class~="bg-black/70"] { background-color: rgb(var(--port-card)) !important; }
-html[data-port-theme] .cybercity-themed [class~="bg-black/60"],
-html[data-port-theme] .cybercity-themed [class~="bg-black/50"],
-html[data-port-theme] .cybercity-themed [class~="bg-black/40"] { background-color: rgb(var(--port-bg)) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-black/95"],
+html[data-port-theme] .openworld-themed [class~="bg-black/92"],
+html[data-port-theme] .openworld-themed [class~="bg-black/90"],
+html[data-port-theme] .openworld-themed [class~="bg-black/85"],
+html[data-port-theme] .openworld-themed [class~="bg-black/80"],
+html[data-port-theme] .openworld-themed [class~="bg-black/70"] { background-color: rgb(var(--port-card)) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-black/60"],
+html[data-port-theme] .openworld-themed [class~="bg-black/50"],
+html[data-port-theme] .openworld-themed [class~="bg-black/40"] { background-color: rgb(var(--port-bg)) !important; }
/* Accent text — cyan family → theme accent, tiered so emphasis survives. */
-html[data-port-theme] .cybercity-themed [class~="text-cyan-400"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-300"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500"] { color: rgb(var(--port-accent)) !important; }
-html[data-port-theme] .cybercity-themed [class~="text-cyan-400/80"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-400/70"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500/70"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500/60"] { color: rgb(var(--port-accent) / 0.82) !important; }
-html[data-port-theme] .cybercity-themed [class~="text-cyan-400/60"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-400/50"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500/50"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500/40"] { color: rgb(var(--port-accent) / 0.7) !important; }
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500/30"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500/25"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-500/20"],
-html[data-port-theme] .cybercity-themed [class~="text-cyan-400/20"] { color: rgb(var(--port-accent) / 0.55) !important; }
-html[data-port-theme] .cybercity-themed [class~="hover:text-cyan-400"]:hover,
-html[data-port-theme] .cybercity-themed [class~="hover:text-cyan-300"]:hover { color: rgb(var(--port-accent)) !important; }
+html[data-port-theme] .openworld-themed [class~="text-cyan-400"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-300"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-500"] { color: rgb(var(--port-accent)) !important; }
+html[data-port-theme] .openworld-themed [class~="text-cyan-400/80"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-400/70"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-500/70"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-500/60"] { color: rgb(var(--port-accent) / 0.82) !important; }
+html[data-port-theme] .openworld-themed [class~="text-cyan-400/60"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-400/50"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-500/50"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-500/40"] { color: rgb(var(--port-accent) / 0.7) !important; }
+html[data-port-theme] .openworld-themed [class~="text-cyan-500/30"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-500/25"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-500/20"],
+html[data-port-theme] .openworld-themed [class~="text-cyan-400/20"] { color: rgb(var(--port-accent) / 0.55) !important; }
+html[data-port-theme] .openworld-themed [class~="hover:text-cyan-400"]:hover,
+html[data-port-theme] .openworld-themed [class~="hover:text-cyan-300"]:hover { color: rgb(var(--port-accent)) !important; }
/* Neutral / muted text — gray tokens follow the theme text colors so faint
labels stay legible on both dark and paper panels (gray-600 on near-black was
the worst offender). */
-html[data-port-theme] .cybercity-themed [class~="text-gray-300"] { color: rgb(var(--port-text) / 0.92) !important; }
-html[data-port-theme] .cybercity-themed [class~="text-gray-400"],
-html[data-port-theme] .cybercity-themed [class~="text-gray-500"],
-html[data-port-theme] .cybercity-themed [class~="text-gray-600"] { color: rgb(var(--port-text-muted)) !important; }
+html[data-port-theme] .openworld-themed [class~="text-gray-300"] { color: rgb(var(--port-text) / 0.92) !important; }
+html[data-port-theme] .openworld-themed [class~="text-gray-400"],
+html[data-port-theme] .openworld-themed [class~="text-gray-500"],
+html[data-port-theme] .openworld-themed [class~="text-gray-600"] { color: rgb(var(--port-text-muted)) !important; }
/* Borders — cyan accent borders → theme accent, with a visibility floor so the
hairline panel frames don't vanish on a light background. */
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/60"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/50"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/40"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-400/70"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-400/60"] { border-color: rgb(var(--port-accent) / 0.55) !important; }
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/35"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/30"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/25"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-400/50"] { border-color: rgb(var(--port-accent) / 0.42) !important; }
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/20"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/15"],
-html[data-port-theme] .cybercity-themed [class~="border-cyan-500/10"] { border-color: rgb(var(--port-accent) / 0.3) !important; }
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/60"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/50"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/40"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-400/70"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-400/60"] { border-color: rgb(var(--port-accent) / 0.55) !important; }
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/35"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/30"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/25"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-400/50"] { border-color: rgb(var(--port-accent) / 0.42) !important; }
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/20"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/15"],
+html[data-port-theme] .openworld-themed [class~="border-cyan-500/10"] { border-color: rgb(var(--port-accent) / 0.3) !important; }
/* Accent fills — solid swatches (status dots, knobs, capture button) take the
full accent; the alpha variants (dividers, active chips, mini-map grid, hover
washes) scale down to match their original weight. */
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-400"],
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-500"] { background-color: rgb(var(--port-accent)) !important; }
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-400/60"] { background-color: rgb(var(--port-accent) / 0.6) !important; }
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-400/40"],
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-500/40"] { background-color: rgb(var(--port-accent) / 0.4) !important; }
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-500/25"],
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-500/20"] { background-color: rgb(var(--port-accent) / 0.2) !important; }
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-500/15"],
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-400/15"] { background-color: rgb(var(--port-accent) / 0.16) !important; }
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-500/10"] { background-color: rgb(var(--port-accent) / 0.12) !important; }
-html[data-port-theme] .cybercity-themed [class~="bg-cyan-500/[0.03]"] { background-color: rgb(var(--port-accent) / 0.05) !important; }
-html[data-port-theme] .cybercity-themed [class~="hover:bg-cyan-300"]:hover { background-color: rgb(var(--port-accent) / 0.9) !important; }
-html[data-port-theme] .cybercity-themed [class~="hover:bg-cyan-500/10"]:hover { background-color: rgb(var(--port-accent) / 0.12) !important; }
-html[data-port-theme] .cybercity-themed [class~="hover:bg-cyan-500/5"]:hover { background-color: rgb(var(--port-accent) / 0.08) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-cyan-400"],
+html[data-port-theme] .openworld-themed [class~="bg-cyan-500"] { background-color: rgb(var(--port-accent)) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-cyan-400/60"] { background-color: rgb(var(--port-accent) / 0.6) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-cyan-400/40"],
+html[data-port-theme] .openworld-themed [class~="bg-cyan-500/40"] { background-color: rgb(var(--port-accent) / 0.4) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-cyan-500/25"],
+html[data-port-theme] .openworld-themed [class~="bg-cyan-500/20"] { background-color: rgb(var(--port-accent) / 0.2) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-cyan-500/15"],
+html[data-port-theme] .openworld-themed [class~="bg-cyan-400/15"] { background-color: rgb(var(--port-accent) / 0.16) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-cyan-500/10"] { background-color: rgb(var(--port-accent) / 0.12) !important; }
+html[data-port-theme] .openworld-themed [class~="bg-cyan-500/[0.03]"] { background-color: rgb(var(--port-accent) / 0.05) !important; }
+html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-300"]:hover { background-color: rgb(var(--port-accent) / 0.9) !important; }
+html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-500/10"]:hover { background-color: rgb(var(--port-accent) / 0.12) !important; }
+html[data-port-theme] .openworld-themed [class~="hover:bg-cyan-500/5"]:hover { background-color: rgb(var(--port-accent) / 0.08) !important; }
/* === Lumen Glass Day === */
/* Same card set as the base elevation rule above — every fill opacity, not just
diff --git a/client/src/lib/README.md b/client/src/lib/README.md
index 97623f6b34..6065fa4ed5 100644
--- a/client/src/lib/README.md
+++ b/client/src/lib/README.md
@@ -78,7 +78,7 @@ grep -i "what you want to do" client/src/lib/README.md
|---|---|
| `brainGraphFocus.js` | Pure focus-trail (breadcrumb) transitions for BrainGraph re-focus navigation. |
| `graphPicking.js` | Screen-space touch picking for the 3D brain graph (#4114). `projectToScreen(point, viewProjection, width, height)` projects a world point to canvas-local pixels (y down, `null` when the point sits on or behind the camera plane); `pickNearestNodeByScreenDistance({ nodes, viewProjection, width, height, point, threshold })` returns the node whose projected centre is nearest the tap within `TOUCH_PICK_THRESHOLD_PX` (44px — a max-importance sphere only projects to ~38px at `OrbitControls minDistance`, so a tap anywhere inside a node still lands), tie-broken by depth then array order; `isTapGesture(start, end, slop)` separates a tap from an orbit drag (`TAP_SLOP_PX`). Takes the 16 flattened column-major `THREE.Matrix4` elements rather than a camera, so it stays three.js-free and unit-testable — jsdom has no WebGL context and therefore no raycast to exercise. |
-| `graphSimulation.js` | 3D force simulation parameters for BrainGraph / CyberCity. |
+| `graphSimulation.js` | 3D force simulation parameters for BrainGraph / OpenWorld. |
| `goalFeatureMap.js` | Deterministic goal `category` → PortOS feature-area deep-link map (Daily Driver). `getGoalFeatureAreas(goal)` honors the per-goal `featureAreas` override, else the category default. Mirrored byte-for-byte from `server/lib/`. |
## Generic UI / collection utilities
@@ -120,7 +120,7 @@ grep -i "what you want to do" client/src/lib/README.md
| `morsePractice.js` | Pure deterministic adaptive Morse sampler — `selectMorsePrompt` combines bounded weak-character/confusion weighting with a non-zero exploration floor and only emits material valid for the active Koch pool; `canAdvanceMorseLevel` guards level advancement on sample count, accuracy, and effective speed. |
| `moodBoardItemSrc.js` | `moodBoardItemSrc(item)` resolves a mood-board item to a display image/poster src (`imageUrl` → served `image:<file>` bytes → derived video thumbnail → null); `moodBoardItemVideoSrc(item)` resolves a `type:'video'` item's playback URL; `moodBoardItemAnalysisSource(item)` resolves an item to a prompt-from-media source (null when not a local gallery asset). Shared by MoodBoardDetail + MoodBoardReferenceStrip. |
| `registerServiceWorker.js` | `registerServiceWorker()` / `unregisterServiceWorkers()` — wires up the offline app-shell + low-bandwidth asset-caching service worker (`public/sw.js`). Registers only in a production secure context (HTTPS or localhost); no-ops over plain-HTTP Tailnet and tears down any stale SW in dev. Called once from `main.jsx`. |
-| `safeStorage.js` | `safeReadStorage` / `safeReadJsonStorage` / `safeWriteStorage` / `safeWriteJsonStorage` / `safeRemoveStorage` — guarded `localStorage` access that swallows throws (Safari private mode, blocked storage), with fallback-safe JSON parsing for structured entries. Use instead of touching `localStorage` inline so a storage failure never crashes init or a write path (#2387). Consumed by `useTheme`, `useCitySettings`, `useNavWorkingSet`, and the command palette. Also `safeReadJsonSession` / `safeWriteJsonSession` / `safeRemoveSession` — the same guarantees over `sessionStorage`, for tab-scoped crash-recovery buffers of edits the server has not accepted yet (QuotaBurn's unsaved-patch stash). |
+| `safeStorage.js` | `safeReadStorage` / `safeReadJsonStorage` / `safeWriteStorage` / `safeWriteJsonStorage` / `safeRemoveStorage` — guarded `localStorage` access that swallows throws (Safari private mode, blocked storage), with fallback-safe JSON parsing for structured entries. Use instead of touching `localStorage` inline so a storage failure never crashes init or a write path (#2387). Consumed by `useTheme`, `useOpenWorldSettings`, `useNavWorkingSet`, and the command palette. Also `safeReadJsonSession` / `safeWriteJsonSession` / `safeRemoveSession` — the same guarantees over `sessionStorage`, for tab-scoped crash-recovery buffers of edits the server has not accepted yet (QuotaBurn's unsaved-patch stash). |
| `sameJsonShape.js` | `sameJsonShape(prev, next)` — JSON.stringify-based equality for `useAutoRefetch`'s `compare` option on small, deterministically-shaped poll payloads. |
| `sketchCanvas.js` | Pure stroke model + 2D-context renderer for the media annotation canvas (`createStroke`, `appendPoint`, `undoStrokes`, `drawStrokes`, `clampSize`). Points stored in natural-pixel space; erase strokes use `destination-out`. Used by `AnnotationCanvas.jsx` / `MediaAnnotate.jsx` (#2036). |
| `unsorted.js` | Synthetic "Unsorted" collection from media not filed in any real collection. |
@@ -134,7 +134,7 @@ grep -i "what you want to do" client/src/lib/README.md
| Module | Purpose |
|---|---|
| `audioContext.js` | `getAudioContext()` + `resumeAudioContext(c)` + `acquireAudioSession(type)` + `getNoiseBuffer(c)` (the app-wide 1s white-noise buffer every noise voice loops over — chiptune drums, the drum kit's snare/hats/cymbals; don't grow a third copy) — the ONE app-wide lazy Web Audio `AudioContext` singleton every playback feature shares (`songPlayback`, `scorePlayback`, `metronome`, `midiPlayback`). Browsers cap live contexts and one context = one sample clock, so simultaneous features stay aligned. **Every playback entry point resumes via `resumeAudioContext(c)`, never by hand** (it takes any context, so per-mount ones use it too) — it gates on `state !== 'running'`, not `state === 'suspended'`, because iOS Safari also parks a context in the non-standard `'interrupted'` (a call/Siri/screen lock) which a suspended-only check walks past into silent "playback". **`acquireAudioSession(type)` ARBITRATES `navigator.audioSession.type`, which is document-wide, and returns an idempotent release** — `playback` keeps the hardware ring/silent switch from muting a pure-synth page but REFUSES capture, and the VoiceWidget is mounted on every page, so a last-writer-wins assignment trades one platform's silence for a dead mic. Each feature claims for exactly as long as it needs (`play-and-record` while a `getUserMedia` stream is open, `playback` while a player sounds) and the arbiter declares the union — capture always wins, since `play-and-record` also ignores the silent switch. Output-only players don't call it directly: pass `audioSession: 'playback'` to `createLookaheadTransport`, which claims on play and releases on teardown; a React surface owning its own context/stream uses `hooks/useAudioSessionClaim.js`, which adds the release-on-unmount backstop. Constructor resolved lazily (`window` → `globalThis`) so node-env test runs import cleanly; tests inject a fake via `vi.stubGlobal('AudioContext', …)` before first call. |
-| `cityPlaybackFrame.js` | Map a recorded CyberCity snapshot frame onto the prop shape CityScene/CityHud consume for the timeline scrubber (`mergeFrameIntoCityProps`, `buildPlaybackApps`, `buildPlaybackAgentMap`, `isPlayableFrame`). Honors `schemaVersion` and the capture-side null sentinels; returns only snapshot-backed props so unfed landmarks stay live. |
+| `openWorldPlaybackFrame.js` | Map a recorded OpenWorld snapshot frame onto the prop shape OpenWorldScene/OpenWorldHud consume for the timeline scrubber (`mergeFrameIntoOpenWorldProps`, `buildPlaybackApps`, `buildPlaybackAgentMap`, `isPlayableFrame`). Honors `schemaVersion` and the capture-side null sentinels; returns only snapshot-backed props so unfed landmarks stay live. |
| `chordPlayback.js` | Chord-sheet play-along for the SongBook `tab`/`chordpro` formats (#4104) — the chord-sheet sibling of `drumPlayback.js` and the fourth consumer of `lookaheadTransport.js`. `sheetChordOccurrences(lines)` flattens `parseTabSheet(text).lines` into the ordered chord tokens, each addressed `{ lineIndex, chordIndex }` so `<TabSheetView>` can light exactly the token that is sounding; `chordMidiNotes(name)` voices one chord (bass note + chord tones, via `chordShapes.chordTones`); `buildChordSchedule(lines, { bpm, beatsPerBar, countInBars })` is the PURE chord→`[{ index, name, lineIndex, chordIndex, midis, startSec, durSec, rest }]` mapping (a chord sheet writes no rhythm, so ONE chord token = ONE bar, and a dash-joined "Am-Am7" splits its bar between its segments) plus the count-in clicks; `resolveChordPlayhead(schedule, posSec)` converts an audio-clock position to `{ countIn, index, beat }`; `createChordPlayer(lines, …)` strums it through `scorePlayback`'s `scheduleTone` with a live metronome toggle. |
| `chordShapes.js` | Chord-name → per-instrument voicing derivation for the SongBook viewer's instrument-view toggle (#2656). `getChordVoicing(name, instrument)` → guitar `{ frets: [6 × (-1/0/n)], baseFret, bass }`, ukulele (4-string GCEA, exact lowest-position search), or piano `{ notes: ['A','C','E'], bass }` with letter-accurate degree spelling (the 3rd of E is G#, never Ab); guitar shapes come from a curated first-position table + movable E-/A-form barre templates offset by `baseFret` (aug/dim7 exploit shape symmetry). Slash chords voice the base chord and carry `bass` separately. `parseChordName(name)`, `splitJoinedChords('Am-Am7')`, `toVoicingInstrument(songInstrument)`, `VOICING_INSTRUMENTS`. `chordTones(name)` returns the instrument-free half — the parse plus `semitones` above the root — so `chordPlayback.js` sounds a sheet without re-typing the interval tables. Reuses `tabNotation.js`'s `CHORD_TOKEN_RE`/`NOTE_TO_PC`/`spellPitchClass` (exported from there for this module) instead of duplicating the tables. Unknown/unparseable chords → null, never throws. |
| `canvasRoll.js` | Shared canvas helpers for the two piano-roll renderers (`<PianoRoll>` falling-note + `<MidiPianoRoll>` DAW-style, #2477). `layerColor(index)` — the per-layer/track palette (8 hues, wraps both directions) used by note bars, keyboards, and legends; `roundRect(ctx, x, y, w, h, r)` — rounded-rect path with `ctx.roundRect` feature-detect and arcTo fallback; `rollPalette()` — resolves the theme-following `{ bg, accent, accentRgb }` from `--port-accent` via `getComputedStyle` (canvas can't read CSS vars); `ROLL_BG` — the shared near-black bg literal. Pure canvas math/palette, no React. |
diff --git a/client/src/lib/audioContext.js b/client/src/lib/audioContext.js
index dc3cfbb107..4afc412486 100644
--- a/client/src/lib/audioContext.js
+++ b/client/src/lib/audioContext.js
@@ -5,7 +5,7 @@
// synth, MIDI preview) stay aligned for free. New audio features should
// import this instead of growing another module-level singleton.
//
-// Known holdouts, on purpose: components/city/audio/cityAudioEngine.js keeps
+// Known holdouts, on purpose: components/openworld/audio/openWorldAudioEngine.js keeps
// its own context (it owns a persistent gain graph and its own — differently
// contracted — getAudioContext export); MorseTrainer creates a per-mount
// context it close()s on unmount, which would kill a shared one for everyone
diff --git a/client/src/lib/downloadBlob.js b/client/src/lib/downloadBlob.js
index b9bf538d0e..9767b55766 100644
--- a/client/src/lib/downloadBlob.js
+++ b/client/src/lib/downloadBlob.js
@@ -4,7 +4,7 @@
// the data isn't already a Blob (defaults to application/octet-stream).
//
// Collapses the inline `URL.createObjectURL` + `<a download>` + `revokeObjectURL`
-// dance (e.g. the soul ExportTab). Data-URL downloads (CityPhotoOverlay) don't
+// dance (e.g. the soul ExportTab). Data-URL downloads (OpenWorldPhotoOverlay) don't
// fit — they have no object URL to revoke, and a data-URL string would get
// re-wrapped in a Blob here.
export function downloadBlob(data, filename, type = 'application/octet-stream') {
diff --git a/client/src/lib/index.js b/client/src/lib/index.js
index c934faca87..06971c5eb6 100644
--- a/client/src/lib/index.js
+++ b/client/src/lib/index.js
@@ -101,7 +101,7 @@ export * from './youtubeUrl.js';
// === Page-scoped pure helpers ===
export * from './audioContext.js';
-export * from './cityPlaybackFrame.js';
+export * from './openWorldPlaybackFrame.js';
export * from './canvasRoll.js';
export * from './chiptunePlayback.js';
export * from './chordPlayback.js';
diff --git a/client/src/lib/cityPlaybackFrame.js b/client/src/lib/openWorldPlaybackFrame.js
similarity index 92%
rename from client/src/lib/cityPlaybackFrame.js
rename to client/src/lib/openWorldPlaybackFrame.js
index f1d7a6f343..f5612d5be8 100644
--- a/client/src/lib/cityPlaybackFrame.js
+++ b/client/src/lib/openWorldPlaybackFrame.js
@@ -1,6 +1,6 @@
-// Pure mappers that turn a recorded CyberCity snapshot frame (issue #877 capture
-// pipeline) into the prop shape CityScene consumes, for the timeline scrubber
-// (issue #967). No React, no I/O — unit-tested in cityPlaybackFrame.test.js.
+// Pure mappers that turn a recorded OpenWorld snapshot frame (issue #877 capture
+// pipeline) into the prop shape OpenWorldScene consumes, for the timeline scrubber
+// (issue #967). No React, no I/O — unit-tested in openWorldPlaybackFrame.test.js.
//
// A snapshot frame is compact: per-app { id, name, status }, agent assignments,
// and counts/health/cos/backup/character. It does NOT carry the rich landmark
@@ -20,7 +20,7 @@ export const SUPPORTED_SNAPSHOT_SCHEMA_VERSION = 1;
export const isPlayableFrame = (frame) =>
!!frame && frame.schemaVersion === SUPPORTED_SNAPSHOT_SCHEMA_VERSION;
-// Build the apps array CityScene renders from a frame, recovering render-only
+// Build the apps array OpenWorldScene renders from a frame, recovering render-only
// fields (processes, repoPath, type, archived) from the matching live app and
// overriding overallStatus with the frame's recorded status. Apps in the live
// set but absent from the frame are dropped (they teardown-animate out). Apps in
@@ -67,7 +67,7 @@ export function buildPlaybackAgentMap(frame, playbackApps = [], liveAgentMap = n
return map;
}
-// The CityScene props a snapshot frame can FAITHFULLY drive — i.e. scene elements
+// The OpenWorldScene props a snapshot frame can FAITHFULLY drive — i.e. scene elements
// whose data the frame actually carries at the right granularity:
// apps → buildings (per-app status)
// agentMap → agent entities (assignments)
@@ -85,7 +85,7 @@ export function buildPlaybackAgentMap(frame, playbackApps = [], liveAgentMap = n
//
// Returns null when the frame isn't playable (wrong/absent schemaVersion) so the
// caller can keep showing live data and flag the frame.
-export function mergeFrameIntoCityProps(frame, live = {}) {
+export function mergeFrameIntoOpenWorldProps(frame, live = {}) {
if (!isPlayableFrame(frame)) return null;
const apps = buildPlaybackApps(frame, live.apps);
const agentMap = buildPlaybackAgentMap(frame, apps, live.agentMap);
diff --git a/client/src/lib/cityPlaybackFrame.test.js b/client/src/lib/openWorldPlaybackFrame.test.js
similarity index 93%
rename from client/src/lib/cityPlaybackFrame.test.js
rename to client/src/lib/openWorldPlaybackFrame.test.js
index 0faa98f5c4..b3c0338a09 100644
--- a/client/src/lib/cityPlaybackFrame.test.js
+++ b/client/src/lib/openWorldPlaybackFrame.test.js
@@ -3,10 +3,10 @@ import {
isPlayableFrame,
buildPlaybackApps,
buildPlaybackAgentMap,
- mergeFrameIntoCityProps,
+ mergeFrameIntoOpenWorldProps,
buildPlaybackStats,
SUPPORTED_SNAPSHOT_SCHEMA_VERSION,
-} from './cityPlaybackFrame.js';
+} from './openWorldPlaybackFrame.js';
const liveApps = [
{ id: 'a1', name: 'App One', overallStatus: 'online', archived: false, processes: [{ name: 'api' }], repoPath: '/repos/a1', type: 'express' },
@@ -110,13 +110,13 @@ describe('buildPlaybackStats', () => {
});
});
-describe('mergeFrameIntoCityProps', () => {
+describe('mergeFrameIntoOpenWorldProps', () => {
it('returns null for an unplayable frame so the page keeps live data', () => {
- expect(mergeFrameIntoCityProps(frame({ schemaVersion: 99 }), { apps: liveApps })).toBeNull();
+ expect(mergeFrameIntoOpenWorldProps(frame({ schemaVersion: 99 }), { apps: liveApps })).toBeNull();
});
it('maps the faithfully-driveable scene props (apps/agentMap/cos/backup/character)', () => {
- const props = mergeFrameIntoCityProps(frame(), { apps: liveApps });
+ const props = mergeFrameIntoOpenWorldProps(frame(), { apps: liveApps });
expect(props.apps).toHaveLength(2);
expect(props.agentMap.get('a1').agents).toEqual([{ agentId: 'agent-1', status: 'running' }]);
expect(props.cosStatus).toMatchObject({ running: true, activeAgents: 1, stats: { tasksCompleted: 7 } });
@@ -125,7 +125,7 @@ describe('mergeFrameIntoCityProps', () => {
});
it('passes null (not a fabricated 0/empty) when cos/backup/character were unavailable at capture', () => {
- const props = mergeFrameIntoCityProps(
+ const props = mergeFrameIntoOpenWorldProps(
frame({ cos: null, backup: null, character: null }),
{ apps: liveApps },
);
@@ -135,7 +135,7 @@ describe('mergeFrameIntoCityProps', () => {
});
it('does NOT return count-only / unfed landmark props, so the page leaves them at live values', () => {
- const props = mergeFrameIntoCityProps(frame(), { apps: liveApps });
+ const props = mergeFrameIntoOpenWorldProps(frame(), { apps: liveApps });
// count-driven landmarks (freeze at live; their numbers go to the overlay instead)
// + rich-array landmarks the frame never captured.
for (const key of ['instances', 'systemHealth', 'reviewCounts', 'notificationCounts', 'cosTasks', 'memoryGraph', 'goals', 'jiraTickets', 'activityCalendar', 'productivityData', 'chronotype']) {
diff --git a/client/src/pages/CharacterSheet.jsx b/client/src/pages/CharacterSheet.jsx
index 2a67b0df64..7007dd333f 100644
--- a/client/src/pages/CharacterSheet.jsx
+++ b/client/src/pages/CharacterSheet.jsx
@@ -414,7 +414,7 @@ export default function CharacterSheet() {
const hpPct = Math.max(0, Math.min(100, (char.hp / char.maxHp) * 100));
// Level is age-derived now (#2673) — it no longer maps to an XP threshold, so the old
// "XP toward next level" bar is gone. XP survives as a plain cumulative stat here; the
- // birthday-progress bar lives on the CyberCity HUD badge (full page reframe is Slice 5).
+ // birthday-progress bar lives on the OpenWorld HUD badge (full page reframe is Slice 5).
const birthdayPct = Number.isFinite(char.ageYears)
? Math.round((char.ageYears - Math.floor(char.ageYears)) * 100)
: 0;
diff --git a/client/src/pages/ChiefOfStaff.jsx b/client/src/pages/ChiefOfStaff.jsx
index b68201ccd8..b9b46d7a93 100644
--- a/client/src/pages/ChiefOfStaff.jsx
+++ b/client/src/pages/ChiefOfStaff.jsx
@@ -333,7 +333,7 @@ export default function ChiefOfStaff() {
socket.on('apps:changed', handleAppsChanged);
// Don't emit cos:unsubscribe — the cos:* namespace is shared with
- // useCityData (CyberCity), useAgentFeedbackToast, and other always-mounted
+ // useOpenWorldData (OpenWorld), useAgentFeedbackToast, and other always-mounted
// consumers; the server's per-socket subscriber Set has no ref count.
// Unsubscribing here would yank events out from under them.
return () => {
diff --git a/client/src/pages/OpenWorld.fastTravel.test.jsx b/client/src/pages/OpenWorld.fastTravel.test.jsx
index cb8f6921ba..b69f5b8faa 100644
--- a/client/src/pages/OpenWorld.fastTravel.test.jsx
+++ b/client/src/pages/OpenWorld.fastTravel.test.jsx
@@ -7,13 +7,13 @@ import { MemoryRouter, Routes, Route, useLocation } from 'react-router';
// rendering WebGL in jsdom. The scene stub records the props it received so the assertions
// can read them directly.
const sceneProps = { current: null };
-vi.mock('../components/city/CityScene', () => ({
+vi.mock('../components/openworld/OpenWorldScene', () => ({
default: (props) => {
sceneProps.current = props;
return <div data-testid="scene" />;
},
}));
-vi.mock('../components/city/CityHud', () => ({
+vi.mock('../components/openworld/OpenWorldHud', () => ({
default: ({ onOpenFastTravel, activeRegion, onEnterPhotoMode }) => (
<div>
<button type="button" onClick={onOpenFastTravel}>hud-fast-travel</button>
@@ -22,28 +22,28 @@ vi.mock('../components/city/CityHud', () => ({
</div>
),
}));
-vi.mock('../components/city/CityScanlines', () => ({ default: () => null }));
-vi.mock('../components/city/CityPhotoOverlay', () => ({ default: () => null }));
-vi.mock('../components/city/CityPlaybackOverlay', () => ({ default: () => null }));
-vi.mock('../components/city/CitySettingsDrawer', () => ({ default: () => null }));
+vi.mock('../components/openworld/OpenWorldScanlines', () => ({ default: () => null }));
+vi.mock('../components/openworld/OpenWorldPhotoOverlay', () => ({ default: () => null }));
+vi.mock('../components/openworld/OpenWorldPlaybackOverlay', () => ({ default: () => null }));
+vi.mock('../components/openworld/OpenWorldSettingsDrawer', () => ({ default: () => null }));
-vi.mock('../hooks/useCityData', () => ({
- useCityData: () => ({
+vi.mock('../hooks/useOpenWorldData', () => ({
+ useOpenWorldData: () => ({
apps: [], cosAgents: [], cosStatus: {}, eventLogs: [], agentMap: new Map(),
reviewCounts: {}, instances: {}, systemHealth: null, notificationCounts: {},
backupStatus: null, cosTasks: [], healthMetrics: null, voiceState: null,
character: null, aiActivity: null, loading: false, connected: true,
}),
}));
-vi.mock('../hooks/useCityPlayback', () => ({
- useCityPlayback: () => ({
+vi.mock('../hooks/useOpenWorldPlayback', () => ({
+ useOpenWorldPlayback: () => ({
active: false, currentFrame: null, snapshots: [], frameIndex: 0, stats: null,
playing: false, speed: 1, loading: false, error: null,
enter: vi.fn(), exit: vi.fn(), seek: vi.fn(), step: vi.fn(),
togglePlay: vi.fn(), cycleSpeed: vi.fn(),
}),
}));
-vi.mock('../hooks/useCityAudio', () => ({ default: () => ({ playSfx: vi.fn(), isAudioReady: false }) }));
+vi.mock('../hooks/useOpenWorldAudio', () => ({ default: () => ({ playSfx: vi.fn(), isAudioReady: false }) }));
vi.mock('../hooks/useAutoRefetch', () => ({ useAutoRefetch: () => ({ data: null }) }));
// Only the endpoints this page polls. `useAutoRefetch` is stubbed above so none of them
// actually fire — the mock exists to keep the real api module (and its socket import) out
@@ -55,7 +55,7 @@ vi.mock('../services/api', () => ({
getChronotype: vi.fn(async () => null),
getMemoryGraph: vi.fn(async () => null),
getBrainInbox: vi.fn(async () => null),
- getCityIntrospection: vi.fn(async () => null),
+ getOpenWorldIntrospection: vi.fn(async () => null),
getMySprintTickets: vi.fn(async () => []),
}));
diff --git a/client/src/pages/OpenWorld.jsx b/client/src/pages/OpenWorld.jsx
index 6d2a102f09..78dd214113 100644
--- a/client/src/pages/OpenWorld.jsx
+++ b/client/src/pages/OpenWorld.jsx
@@ -1,35 +1,35 @@
import { useCallback, useState, useEffect, useMemo, useRef } from 'react';
import { useNavigate, useLocation, useParams } from 'react-router';
-import { useCityData } from '../hooks/useCityData';
-import { useCityPlayback } from '../hooks/useCityPlayback';
-import useCityAudio from '../hooks/useCityAudio';
+import { useOpenWorldData } from '../hooks/useOpenWorldData';
+import { useOpenWorldPlayback } from '../hooks/useOpenWorldPlayback';
+import useOpenWorldAudio from '../hooks/useOpenWorldAudio';
import useKeyboardControls from '../hooks/useKeyboardControls';
import useKeyboardShortcuts from '../hooks/useKeyboardShortcuts';
import { useAutoRefetch } from '../hooks/useAutoRefetch';
-import { mergeFrameIntoCityProps } from '../lib/cityPlaybackFrame';
+import { mergeFrameIntoOpenWorldProps } from '../lib/openWorldPlaybackFrame';
import * as api from '../services/api';
-import CityScene from '../components/city/CityScene';
-import CityHud from '../components/city/CityHud';
-import CityScanlines from '../components/city/CityScanlines';
-import CityPhotoOverlay from '../components/city/CityPhotoOverlay';
-import CityPlaybackOverlay from '../components/city/CityPlaybackOverlay';
-import { CitySettingsProvider, useCitySettingsContext } from '../components/city/CitySettingsContext';
-import { QUALITY_PRESETS } from '../hooks/useCitySettings';
-import CitySettingsDrawer from '../components/city/CitySettingsDrawer';
-import { computeFilterResult } from '../utils/cityFilter';
-import { resolveCityFocus } from '../utils/cityFocusState';
-import useCityViewport from '../hooks/useCityViewport';
-import { DEFAULT_PRESET_ID, cyclePreset } from '../utils/cityPhotoMode';
-import { computeSoundscape } from '../utils/citySoundscape';
-import { deriveCityPalette, getTimeOfDayPreset, resolveCityTimeOfDay, resolveWorldStyle } from '../components/city/cityConstants';
-import OpenWorldFastTravel from '../components/city/OpenWorldFastTravel';
+import OpenWorldScene from '../components/openworld/OpenWorldScene';
+import OpenWorldHud from '../components/openworld/OpenWorldHud';
+import OpenWorldScanlines from '../components/openworld/OpenWorldScanlines';
+import OpenWorldPhotoOverlay from '../components/openworld/OpenWorldPhotoOverlay';
+import OpenWorldPlaybackOverlay from '../components/openworld/OpenWorldPlaybackOverlay';
+import { OpenWorldSettingsProvider, useOpenWorldSettingsContext } from '../components/openworld/OpenWorldSettingsContext';
+import { QUALITY_PRESETS } from '../hooks/useOpenWorldSettings';
+import OpenWorldSettingsDrawer from '../components/openworld/OpenWorldSettingsDrawer';
+import { computeFilterResult } from '../utils/openWorldFilter';
+import { resolveOpenWorldFocus } from '../utils/openWorldFocusState';
+import useOpenWorldViewport from '../hooks/useOpenWorldViewport';
+import { DEFAULT_PRESET_ID, cyclePreset } from '../utils/openWorldPhotoMode';
+import { computeSoundscape } from '../utils/openWorldSoundscape';
+import { deriveOpenWorldPalette, getTimeOfDayPreset, resolveOpenWorldTimeOfDay, resolveWorldStyle } from '../components/openworld/openWorldConstants';
+import OpenWorldFastTravel from '../components/openworld/OpenWorldFastTravel';
import { getRegion, regionArrivalPoint, regionPath } from '../utils/openWorldRegions';
-import { CityPaletteProvider } from '../components/city/CityPaletteContext';
+import { OpenWorldPaletteProvider } from '../components/openworld/OpenWorldPaletteContext';
import { useThemeContext } from '../components/ThemeContext';
function OpenWorldInner() {
- const { apps, cosAgents, cosStatus, eventLogs, agentMap, reviewCounts, instances, systemHealth, notificationCounts, backupStatus, cosTasks, healthMetrics, voiceState, character, aiActivity, loading, connected } = useCityData();
- const { settings, updateSetting, resetNonce } = useCitySettingsContext();
+ const { apps, cosAgents, cosStatus, eventLogs, agentMap, reviewCounts, instances, systemHealth, notificationCounts, backupStatus, cosTasks, healthMetrics, voiceState, character, aiActivity, loading, connected } = useOpenWorldData();
+ const { settings, updateSetting, resetNonce } = useOpenWorldSettingsContext();
// Ambient soundscape (roadmap 3.4): the music's mood follows system health and its energy
// follows live agent activity. Derived from data the page already has — no extra fetch.
@@ -41,17 +41,17 @@ function OpenWorldInner() {
() => computeSoundscape({ systemHealth, agentCount: activeAgentCount }),
[systemHealth, activeAgentCount]
);
- const { playSfx } = useCityAudio(settings, soundscape);
+ const { playSfx } = useOpenWorldAudio(settings, soundscape);
const navigate = useNavigate();
const location = useLocation();
const { appId, regionId } = useParams();
- const { isDesktop } = useCityViewport();
+ const { isDesktop } = useOpenWorldViewport();
// URL-addressed building focus (issue #2593). The `/openworld/apps/:appId` route param is the
// single source of truth for "which borough is focused" — reload/back-forward/deep-link all
// restore it.
const { hasFocus, focusedApp, notFound: focusNotFound } = useMemo(
- () => resolveCityFocus(appId, apps, { loading }),
+ () => resolveOpenWorldFocus(appId, apps, { loading }),
[appId, apps, loading],
);
// Fast travel: `/openworld/region/:regionId` is the same contract one level out — the URL says
@@ -68,27 +68,27 @@ function OpenWorldInner() {
);
// OpenWorld follows the active PortOS theme: the HUD recolors via the
- // `cybercity-themed` CSS scope (see index.css) and the 3D scene's brand colors
+ // `openworld-themed` CSS scope (see index.css) and the 3D scene's brand colors
// + surround are derived from the same theme here.
- const { theme: cityTheme } = useThemeContext();
+ const { theme: openWorldTheme } = useThemeContext();
// Art direction — 'vibes' (bright low-poly open world, the default) or 'cyber' (the
// original neon night). It selects the time-of-day preset pair and the palette's
// structural/decorative surfaces, so it must resolve before either.
const worldStyle = resolveWorldStyle(settings?.worldStyle);
- // Pure: derive the themed palette and hand it down through CityPaletteContext (and,
- // inside <Canvas>, a second provider in CityScene since r3f's reconciler doesn't
+ // Pure: derive the themed palette and hand it down through OpenWorldPaletteContext (and,
+ // inside <Canvas>, a second provider in OpenWorldScene since r3f's reconciler doesn't
// bridge context). No more during-render mutation of a shared singleton.
- const cityPalette = useMemo(() => deriveCityPalette(cityTheme, worldStyle), [cityTheme, worldStyle]);
+ const openWorldPalette = useMemo(() => deriveOpenWorldPalette(openWorldTheme, worldStyle), [openWorldTheme, worldStyle]);
// The world renders day or night, following the theme mode by default (see
- // resolveCityTimeOfDay). The resolved preset key is handed to the scene via a
- // settings override (CitySky/CityLights/CityGround read settings.timeOfDay), and the
+ // resolveOpenWorldTimeOfDay). The resolved preset key is handed to the scene via a
+ // settings override (OpenWorldSky/OpenWorldLights/OpenWorldGround read settings.timeOfDay), and the
// backdrop takes the matching preset's mid-sky band so the DOM surround behind the
// canvas agrees with the sky the scene actually paints, in either art direction.
- const cityTimeOfDay = resolveCityTimeOfDay(settings?.timeOfDay, cityPalette.isDay, worldStyle);
- const sceneBackground = cityTimeOfDay.daytime
- ? getTimeOfDayPreset(cityTimeOfDay.presetKey).midSky
- : cityPalette.nightBackground;
+ const openWorldTimeOfDay = resolveOpenWorldTimeOfDay(settings?.timeOfDay, openWorldPalette.isDay, worldStyle);
+ const sceneBackground = openWorldTimeOfDay.daytime
+ ? getTimeOfDayPreset(openWorldTimeOfDay.presetKey).midSky
+ : openWorldPalette.nightBackground;
// Auto quality mode (issue #2592). In Auto, an adaptive render budget picks the
// effective tier at runtime (starting at High); in Manual, the effective tier is the
@@ -103,11 +103,11 @@ function OpenWorldInner() {
// Clear the stale local diagnostics readout whenever the budget re-arms: a RESET DEFAULTS
// (resetNonce) or a quality-mode transition (Manual↔Auto). The adaptive budget itself
- // re-arms via CityScene and re-reports tier + fresh samples on the next window.
+ // re-arms via OpenWorldScene and re-reports tier + fresh samples on the next window.
useEffect(() => { setAutoDiagnostics(null); }, [resetNonce, qualityMode]);
const sceneSettings = useMemo(() => {
- const base = { ...settings, effectiveTier, skyTheme: 'cyberpunk', timeOfDay: cityTimeOfDay.presetKey };
+ const base = { ...settings, effectiveTier, skyTheme: 'cyberpunk', timeOfDay: openWorldTimeOfDay.presetKey };
if (qualityMode !== 'auto') return base;
// Derive the render-affecting fields (reflections, particle density, DPR) from the
// adaptive tier; leave user-tuned lighting/scanline toggles untouched.
@@ -118,13 +118,13 @@ function OpenWorldInner() {
particleDensity: tierCfg.particleDensity,
dpr: tierCfg.dpr,
};
- }, [settings, effectiveTier, qualityMode, cityTimeOfDay.presetKey]);
+ }, [settings, effectiveTier, qualityMode, openWorldTimeOfDay.presetKey]);
const [filter, setFilter] = useState(() => {
// try/catch is necessary because sessionStorage values are external state
// a corrupted/older-schema entry would throw and crash the page render.
try {
- const raw = sessionStorage.getItem('cybercity.filter');
+ const raw = sessionStorage.getItem('openworld.filter');
if (raw) {
const parsed = JSON.parse(raw);
if (parsed && typeof parsed.status === 'string') {
@@ -144,7 +144,7 @@ function OpenWorldInner() {
// setItem can throw (Safari private mode, storage quota); ignore — this
// is a UX nicety, not load-bearing state.
try {
- sessionStorage.setItem('cybercity.filter', JSON.stringify(filter));
+ sessionStorage.setItem('openworld.filter', JSON.stringify(filter));
} catch {
// intentionally swallow
}
@@ -178,7 +178,7 @@ function OpenWorldInner() {
// --- Fast travel ----------------------------------------------------------
// Warping navigates to `/openworld/region/:regionId`; the route param then drives the
- // camera (CityFocusCamera) and, on foot, the player rig. Only the panel's open/closed
+ // camera (OpenWorldFocusCamera) and, on foot, the player rig. Only the panel's open/closed
// state is local — the destination itself always lives in the URL.
const [fastTravelOpen, setFastTravelOpen] = useState(false);
// The walking player's arrival point for the latest warp, carrying a monotonic token so
@@ -201,7 +201,7 @@ function OpenWorldInner() {
const openFastTravel = useCallback(() => setFastTravelOpen(true), []);
// Photo mode (roadmap 3.3): a cinematic capture mode with framing presets and a postcard
- // screenshot. The in-canvas CityPhotoCamera registers its capture function here via a ref so
+ // screenshot. The in-canvas OpenWorldPhotoCamera registers its capture function here via a ref so
// the overlay (outside the Canvas) can trigger a grab. Exiting photo mode clears the fn.
const [photoMode, setPhotoMode] = useState(false);
const [photoPresetId, setPhotoPresetId] = useState(DEFAULT_PRESET_ID);
@@ -214,7 +214,7 @@ function OpenWorldInner() {
// Playback / "history" mode (roadmap 3.6): scrub recorded city-state snapshots.
// Transport state lives in the hook; the page swaps the current frame's data
// into the scene props below. Mutually exclusive with photo mode.
- const playback = useCityPlayback();
+ const playback = useOpenWorldPlayback();
// M opens the fast-travel map. Deliberately open-only, not a toggle: the panel is a
// <Modal>, which owns Esc/backdrop dismissal — and the shared shortcut hook suppresses
@@ -346,7 +346,7 @@ function OpenWorldInner() {
// keeps the harbor current. `compare` strips the always-changing `ts` so a byte-identical
// payload keeps its identity and the harbor subtree skips reconciliation.
const { data: introspection } = useAutoRefetch(
- () => api.getCityIntrospection({ silent: true }),
+ () => api.getOpenWorldIntrospection({ silent: true }),
120_000,
{
compare: (prev, next) =>
@@ -382,8 +382,8 @@ function OpenWorldInner() {
{ enabled: jiraAppsKey.length > 0 },
);
- // Selecting a building focuses it in-place (issue #2593) — the URL becomes /city/apps/:id and the
- // camera flies to frame the borough WITHOUT leaving City. In street-level exploration the old
+ // Selecting a building focuses it in-place (issue #2593) — the URL becomes /openworld/apps/:id and the
+ // camera flies to frame the borough WITHOUT leaving OpenWorld. In street-level exploration the old
// behavior stands (walking up to a building and interacting opens the app page).
const handleBuildingClick = useCallback((app) => {
if (!app?.id) return;
@@ -418,7 +418,7 @@ function OpenWorldInner() {
}, [apps, cosAgents, instances, character, productivityData]);
// In playback mode, overlay the current snapshot frame's data onto the props
- // the scene consumes. mergeFrameIntoCityProps returns ONLY the props the frame
+ // the scene consumes. mergeFrameIntoOpenWorldProps returns ONLY the props the frame
// can faithfully drive (apps, agentMap, cosStatus, backupStatus, character),
// so anything it omits (the count-only and rich-array landmarks: task queue,
// federation, health tower, memory, goals, jira, activity, productivity) keeps
@@ -427,14 +427,14 @@ function OpenWorldInner() {
// unplayable frame → keep live.
const playbackProps = useMemo(() => {
if (!playback.active || !playback.currentFrame) return null;
- return mergeFrameIntoCityProps(playback.currentFrame, { apps, agentMap });
+ return mergeFrameIntoOpenWorldProps(playback.currentFrame, { apps, agentMap });
}, [playback.active, playback.currentFrame, apps, agentMap]);
const v = useCallback((key, live) => (playbackProps && key in playbackProps ? playbackProps[key] : live), [playbackProps]);
if (loading) {
return (
- <div className="flex flex-col items-center justify-center h-full gap-4 cybercity-themed" style={{ background: cityPalette.background }}>
+ <div className="flex flex-col items-center justify-center h-full gap-4 openworld-themed" style={{ background: openWorldPalette.background }}>
<div className="font-pixel text-cyan-400 text-lg tracking-widest animate-pulse" style={{ textShadow: '0 0 12px rgba(6,182,212,0.5)' }}>
ENTERING OPENWORLD
</div>
@@ -449,19 +449,19 @@ function OpenWorldInner() {
}
return (
- <CityPaletteProvider palette={cityPalette}>
- <div className="relative w-full h-full cybercity-themed" style={{ background: sceneBackground, isolation: 'isolate' }}>
- <CityScene
+ <OpenWorldPaletteProvider palette={openWorldPalette}>
+ <div className="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
// `color=` props, palette helper fns) or carries the palette value in its
- // useMemo deps so it rebuilds on a new palette object (CityGround, CityLandscape,
- // CityTraffic, CityNeonSigns, …). The two persistent GPU shader materials whose
- // uniforms are set once at construction (CityBillboards scan overlay,
- // CityVolumetricLights cones) push the new accent into their uColor uniform
- // imperatively, mirroring CitySky's per-frame uniform updates. Dropping the old
- // `key={cityPalette.themeId}` avoids the jarring full-scene rebuild flash.
- palette={cityPalette}
+ // useMemo deps so it rebuilds on a new palette object (WorldGround, OpenWorldLandscape,
+ // OpenWorldTraffic, OpenWorldNeonSigns, …). The two persistent GPU shader materials whose
+ // uniforms are set once at construction (OpenWorldBillboards scan overlay,
+ // OpenWorldVolumetricLights cones) push the new accent into their uColor uniform
+ // imperatively, mirroring OpenWorldSky's per-frame uniform updates. Dropping the old
+ // `key={openWorldPalette.themeId}` avoids the jarring full-scene rebuild flash.
+ palette={openWorldPalette}
background={sceneBackground}
apps={v('apps', apps)}
agentMap={v('agentMap', agentMap)}
@@ -503,11 +503,12 @@ function OpenWorldInner() {
focusedRegion={focusedRegion}
playerTeleport={playerTeleport}
hudSafe={focusHudSafe}
+ onTravelToRegion={handleTravelToRegion}
/>
{/* The full HUD hides in photo + playback mode so the view is clean; each
mode's overlay replaces it. */}
{!photoMode && !playback.active && (
- <CityHud
+ <OpenWorldHud
cosStatus={cosStatus}
cosAgents={cosAgents}
agentMap={agentMap}
@@ -539,7 +540,7 @@ function OpenWorldInner() {
activeRegion={focusedRegion}
/>
)}
- <CityPhotoOverlay
+ <OpenWorldPhotoOverlay
active={photoMode}
presetId={photoPresetId}
onPresetChange={setPhotoPresetId}
@@ -549,7 +550,7 @@ function OpenWorldInner() {
dofEnabled={photoDof}
onToggleDof={() => setPhotoDof(v => !v)}
/>
- <CityPlaybackOverlay
+ <OpenWorldPlaybackOverlay
active={playback.active}
loading={playback.loading}
error={playback.error}
@@ -576,11 +577,11 @@ function OpenWorldInner() {
activeRegionId={focusedRegion?.id || null}
onLeaveRegion={() => navigate('/openworld')}
/>
- <CityScanlines settings={settings} crt={cityPalette.crt} />
+ <OpenWorldScanlines settings={settings} crt={openWorldPalette.crt} />
{/* Settings on the shared Drawer (issue #2591). Closing preserves other query
- params (e.g. an open cityPane) so the disclosure state survives. The Auto-quality
+ params (e.g. an open openWorldPane) so the disclosure state survives. The Auto-quality
props (#2592) drive the Performance tab's effective-tier label + local diagnostics. */}
- <CitySettingsDrawer
+ <OpenWorldSettingsDrawer
open={showSettings}
onClose={() => navigate(`/openworld${location.search}`)}
qualityMode={qualityMode}
@@ -588,14 +589,14 @@ function OpenWorldInner() {
diagnostics={qualityMode === 'auto' ? autoDiagnostics : null}
/>
</div>
- </CityPaletteProvider>
+ </OpenWorldPaletteProvider>
);
}
export default function OpenWorld() {
return (
- <CitySettingsProvider>
+ <OpenWorldSettingsProvider>
<OpenWorldInner />
- </CitySettingsProvider>
+ </OpenWorldSettingsProvider>
);
}
diff --git a/client/src/services/README.md b/client/src/services/README.md
index 5ab86e7549..9fcc139509 100644
--- a/client/src/services/README.md
+++ b/client/src/services/README.md
@@ -134,7 +134,7 @@ toasts on throw). **Custom catch ⇒ `silent: true`** — otherwise toasts fire
| `apiOpenClaw.js` | File browser / picker backend. |
| `apiPalette.js` | Command-palette manifest + action dispatch. |
| `apiVoice.js` | Voice synthesis / processing. |
-| `apiCity.js` | CyberCity snapshots — historical city-state series for the timeline scrubber (GET /snapshots, GET /config, POST /capture). |
+| `apiOpenWorld.js` | OpenWorld snapshots — historical world-state series for the timeline scrubber (GET /snapshots, GET /config, POST /capture). |
| `apiPrivacy.js` | Privacy Center — encrypted PII Vault + Trusted Organizations registry (status, vault CRUD + reveal, org CRUD, org holdings replace-set) + Digital Twin social-account cross-link + household subjects (subject CRUD, consent audit, and a `subjectId` scope passed in each wrapper's trailing `options`). |
## Browser-facing (DOM, voice, build) — not pure API wrappers
diff --git a/client/src/services/api.js b/client/src/services/api.js
index dafc6d08f6..117288ae35 100644
--- a/client/src/services/api.js
+++ b/client/src/services/api.js
@@ -83,7 +83,7 @@ export * from './apiImporter.js';
export * from './apiStoryBuilder.js';
export * from './apiVoice.js';
export * from './apiAuth.js';
-export * from './apiCity.js';
+export * from './apiOpenWorld.js';
export * from './apiPrivacy.js';
export * from './apiQuotaBurn.js';
diff --git a/client/src/services/apiCity.js b/client/src/services/apiCity.js
deleted file mode 100644
index 5b16628097..0000000000
--- a/client/src/services/apiCity.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { request } from './apiCore.js';
-
-// CyberCity snapshots — historical city-state series for the timeline scrubber.
-// The capture pipeline (issue #877) records frames server-side; these read them.
-
-// GET /api/city/snapshots — the recorded series, oldest-first.
-// options: { since?: ISO string, limit?: number, silent?: boolean }
-export const getCitySnapshots = (options = {}) => {
- const { since, limit, ...rest } = options;
- const params = new URLSearchParams();
- if (since) params.set('since', since);
- if (limit != null) params.set('limit', limit);
- const qs = params.toString();
- return request(`/city/snapshots${qs ? `?${qs}` : ''}`, rest);
-};
-
-// GET /api/city/snapshots/config — effective capture config + next run time.
-export const getCitySnapshotConfig = (options = {}) =>
- request('/city/snapshots/config', options);
-
-// POST /api/city/snapshots/capture — capture a frame on demand.
-export const captureCitySnapshot = (options = {}) =>
- request('/city/snapshots/capture', { method: 'POST', ...options });
-
-// GET /api/city/introspection — DB tables + data/ domain sizes for the Data
-// Harbor district. Server-cached; `db: null` means the database is unreachable.
-export const getCityIntrospection = (options = {}) =>
- request('/city/introspection', options);
diff --git a/client/src/services/apiOpenWorld.js b/client/src/services/apiOpenWorld.js
new file mode 100644
index 0000000000..b8c21ed09a
--- /dev/null
+++ b/client/src/services/apiOpenWorld.js
@@ -0,0 +1,28 @@
+import { request } from './apiCore.js';
+
+// OpenWorld snapshots — historical world-state series for the timeline scrubber.
+// The capture pipeline (issue #877) records frames server-side; these read them.
+
+// GET /api/openworld/snapshots — the recorded series, oldest-first.
+// options: { since?: ISO string, limit?: number, silent?: boolean }
+export const getOpenWorldSnapshots = (options = {}) => {
+ const { since, limit, ...rest } = options;
+ const params = new URLSearchParams();
+ if (since) params.set('since', since);
+ if (limit != null) params.set('limit', limit);
+ const qs = params.toString();
+ return request(`/openworld/snapshots${qs ? `?${qs}` : ''}`, rest);
+};
+
+// GET /api/openworld/snapshots/config — effective capture config + next run time.
+export const getOpenWorldSnapshotConfig = (options = {}) =>
+ request('/openworld/snapshots/config', options);
+
+// POST /api/openworld/snapshots/capture — capture a frame on demand.
+export const captureOpenWorldSnapshot = (options = {}) =>
+ request('/openworld/snapshots/capture', { method: 'POST', ...options });
+
+// GET /api/openworld/introspection — DB tables + data/ domain sizes for the Data
+// Harbor district. Server-cached; `db: null` means the database is unreachable.
+export const getOpenWorldIntrospection = (options = {}) =>
+ request('/openworld/introspection', options);
diff --git a/client/src/services/apiSystem.js b/client/src/services/apiSystem.js
index d3e1962431..a82268a36e 100644
--- a/client/src/services/apiSystem.js
+++ b/client/src/services/apiSystem.js
@@ -6,7 +6,7 @@ export const getAlertsSummary = (options) => request('/alerts/summary', options)
// Character sheet (age-based level / XP / HP / usage-derived skills + metrics grid).
// `skills: false` / `metrics: false` skip the server's domain stat fan-out for each derived
// registry — pass them from callers that only read the persisted fields or the level (e.g.
-// the polling CyberCity XP HUD badge). Both default on, so a caller that wants the whole
+// the polling OpenWorld XP HUD badge). Both default on, so a caller that wants the whole
// sheet just calls getCharacter().
export const getCharacter = ({ skills = true, metrics = true, ...options } = {}) => {
const params = new URLSearchParams();
diff --git a/client/src/services/voiceClient.js b/client/src/services/voiceClient.js
index 9ceb9be75e..b92ecdf5fb 100644
--- a/client/src/services/voiceClient.js
+++ b/client/src/services/voiceClient.js
@@ -594,7 +594,7 @@ export const onVoiceEvent = (event, handler) => {
// Persistent, user-authorized screen-capture stream for the voice agent's
// ui_describe_visually tool. getDisplayMedia is the only browser-native way to
-// grab WebGL/canvas content (CyberCity, charts) without a heavy DOM-to-canvas
+// grab WebGL/canvas content (OpenWorld, charts) without a heavy DOM-to-canvas
// dependency — but browsers REQUIRE a transient user gesture to call it, and the
// screenshot request is server-initiated (mid voice turn), not a click. So the
// user authorizes a capture stream ONCE via a click (enableVisionCapture, which
diff --git a/client/src/utils/README.md b/client/src/utils/README.md
index 9739e0a6c4..7e0798370e 100644
--- a/client/src/utils/README.md
+++ b/client/src/utils/README.md
@@ -1,7 +1,7 @@
# client/src/utils/ — pure formatting & compute helpers
Lightweight, mostly-pure helpers used by pages, components, and hooks: formatters, time math,
-small functional utilities, the CyberCity scene-compute functions, and a few thin
+small functional utilities, the OpenWorld scene-compute functions, and a few thin
browser-storage / file-read / module-loading helpers. **Before writing a helper here, grep
this catalog first** — many domain patterns already have one. When you add a new module, add
it to `index.js` AND add a row here.
@@ -57,50 +57,50 @@ grep -i "what you want to do" client/src/utils/README.md
|---|---|
| `fileUpload` | Pure screenshot/attachment upload helpers: base64 read (`readFileAsBase64`) and image validation (`validateImageFile`). Also the shared upload constants — `JSON_UPLOAD_MAX_FILE_SIZE` (max file size / wire limit, mirrors `server/lib/uploadLimits.js`), `ATTACHMENT_MAX_FILE_SIZE`, `ALLOWED_ATTACHMENT_EXTENSIONS`, and the `accept` strings `ATTACHMENT_ACCEPT` / `IMAGE_ACCEPT` / `UPLOAD_IMAGE_ACCEPT`. The actual upload orchestration (`processScreenshotUploads` / `processAttachmentUploads` and their single-file variants) does network I/O and lives in `services/apiMedia.js` — import those from there, not from here. |
-## CyberCity — character & avatar
+## OpenWorld — character & avatar
| Module | Purpose |
|---|---|
-| `characterXp` | Character HUD badge math: `computeAgeView` (age-based level + progress to next birthday), `diffXp` (XP-gain / birthday burst diff), `birthDateCta` (missing-birth-date call to action), plus the legacy `levelFromXP` XP-curve lookup used by `cityArtifacts`. |
+| `characterXp` | Character HUD badge math: `computeAgeView` (age-based level + progress to next birthday), `diffXp` (XP-gain / birthday burst diff), `birthDateCta` (missing-birth-date call to action), plus the legacy `levelFromXP` XP-curve lookup used by `openWorldArtifacts`. |
-## CyberCity — scene compute helpers
+## OpenWorld — scene compute helpers
-Pure `compute*` functions that turn PortOS state into 3D-scene descriptors for the City
+Pure `compute*` functions that turn PortOS state into 3D-scene descriptors for the OpenWorld
districts. One module per district/feature; each exports a `compute<Feature>` entry point plus
its tunable constants and placement helpers.
| Module | Purpose |
|---|---|
-| `cityActivityHeatmap` | Calendar activity → per-tile heat levels (`computeActivityHeatmap`, `tileLevel`). |
-| `cityAgentMotion` | Agent orbit/trail motion math (`computeAgentOrbit`, `computeAgentTrailPoints`, trail colors). |
-| `cityAiCore` | AI-ops core: model tiers, beam thickness, and `computeAiCore` / `computeAiCoreBeams` from live AI status events. |
-| `cityArtifacts` | Earned-artifact milestones (level/goal/streak) → placed artifact descriptors (`computeArtifacts`). |
-| `cityBackupVault` | Backup-vault health/alerting state and color (`computeBackupVault`, `vaultHealth`). |
-| `cityChronotype` | Chronotype energy curve by hour → brightness/tempo modifiers (`computeChronotypeEnergy`). |
-| `cityDataHarbor` | Data Harbor pier district: DB table silos + data/ domain racks from /api/city/introspection (`computeDataHarbor`). |
-| `cityDistrictLayout` | Shared district layout math: auto-columns, grid placement, tallying, metric→height scaling. |
-| `cityEasterEggs` | Unlockable easter eggs from context (date/character/goals) → placements (`computeEasterEggs`). |
-| `cityFederation` | Sync-peer reachability horizon: status color/opacity, bridge state, peer placement (`computeFederationHorizon`). |
-| `cityFilter` | Status-filter definitions and app-filtering result (`computeFilterResult`). |
-| `cityFocusCamera` | Pure camera-framing math for OpenWorld's camera targets: orbital `position`/`target` framing one borough (`computeFocusCamera`) or a whole fast-travel region (`computeRegionCamera`) for a given aspect ratio + HUD safe area. |
-| `cityFocusState` | Resolve the `/openworld/apps/:appId` route param + app list into `{ hasFocus, focusedApp, notFound }`, deferring the not-found flag until apps finish loading (`resolveCityFocus`). |
-| `cityFlowLines` | Inter-building flow-line connections between active/agent nodes (`computeFlowConnections`). |
-| `cityGoalMonuments` | Goal monuments & forest: stall detection, milestone segments, placement (`computeGoalMonuments`, `computeGoalForest`). |
-| `cityHealthTower` | Health-metric tower segments from the latest health entry (`computeHealthTower`). |
-| `cityInteriorWindows` | Per-building interior-mapping window grid + selection predicate for InteriorMappingMaterial panes (`computeWindowGrid`, `buildingHasInteriorWindows`, `INTERIOR_WINDOW`). |
-| `cityJiraDistrict` | Jira ticket district: ticket state, sprint structures, placement (`computeJiraDistrict`). |
-| `cityMemoryDistrict` | Brain-graph memory district: category clustering, bridges, placement (`computeMemoryDistrict`). |
-| `cityMiniMap` | Mini-map projection of building positions into 2D bounds, plus opt-in waterfront geography (bay/shoreline/harbor) read from `cityPlan` (`computeMiniMap`, `projectPoint`, `geographyWorldPoints`, `projectGeography`). |
-| `cityPhotoMode` | Photo-mode camera presets, the demand-loop fly stepper, postcard stats, and screenshot filename (`getPreset`, `cyclePreset`, `stepFly`). |
-| `cityPlan` | Master town plan: district parcels, shoreline/bay, plaza, transit loop, street network (`PARCELS`, `WORLD`, `computeStreets`, `computeStreetProps`, `isInWater`). |
-| `openWorldRegions` | OpenWorld fast-travel registry: named regions over the `cityPlan` parcels, each mapped to the PortOS page it visualizes (`OPEN_WORLD_REGIONS`, `getRegion`, `listRegions`, `searchRegions`, `regionArrivalPoint`, `regionPath`). |
-| `cityPlayerRig` | Exploration player-rig math: third-person follow camera, boom collision, damping, facing, avatar state (`thirdPersonCamera`, `resolveBoom`, `dampAngle`, `moveFacing`, `avatarState`). |
-| `cityRenderBudget` | Pure Auto-quality render-budget state machine: p75 frame-time windows, hysteresis, cooldown, warm-up/gap rejection (`createRenderBudget`, `recordFrame`, `restartWarmup`, `resetRenderBudget`, `getEffectiveTier`, `QUALITY_TIERS`, `DEFAULT_RENDER_BUDGET_CONFIG`). |
-| `cityRooftops` | Deterministic rooftop fixture kits (antenna/tank/AC/dish) per app name (`computeRooftopKit`). |
-| `cityProductivity` | Productivity monument from streak/velocity tiers (`computeProductivityMonument`). |
-| `citySeasonalDecor` | Season/holiday resolution → seasonal decoration placements (`computeSeasonalDecor`). |
-| `citySoundscape` | Ambient soundscape: mood/energy classification, chord selection (`computeSoundscape`), and the manual mood override (`applyMoodOverride`). |
-| `cityTaskFlowRiver` | Task-flow river width/speed from backlog & throughput (`computeTaskFlowRiver`). |
-| `cityTaskQueue` | Task-queue state/color from status counts (`computeTaskQueue`). |
-| `cityTimeline` | Activity-log density bins and timeline buckets (`computeActivityDensity`, `buildTimelineBuckets`). |
-| `cityVoiceMarker` | Voice-agent marker state/color/label from voice status (`computeVoiceMarker`). |
+| `openWorldActivityHeatmap` | Calendar activity → per-tile heat levels (`computeActivityHeatmap`, `tileLevel`). |
+| `openWorldAgentMotion` | Agent orbit/trail motion math (`computeAgentOrbit`, `computeAgentTrailPoints`, trail colors). |
+| `openWorldAiCore` | AI-ops core: model tiers, beam thickness, and `computeAiCore` / `computeAiCoreBeams` from live AI status events. |
+| `openWorldArtifacts` | Earned-artifact milestones (level/goal/streak) → placed artifact descriptors (`computeArtifacts`). |
+| `openWorldBackupVault` | Backup-vault health/alerting state and color (`computeBackupVault`, `vaultHealth`). |
+| `openWorldChronotype` | Chronotype energy curve by hour → brightness/tempo modifiers (`computeChronotypeEnergy`). |
+| `openWorldDataHarbor` | Data Harbor pier district: DB table silos + data/ domain racks from /api/openworld/introspection (`computeDataHarbor`). |
+| `openWorldDistrictLayout` | Shared district layout math: auto-columns, grid placement, tallying, metric→height scaling. |
+| `openWorldEasterEggs` | Unlockable easter eggs from context (date/character/goals) → placements (`computeEasterEggs`). |
+| `openWorldFederation` | Sync-peer reachability horizon: status color/opacity, bridge state, peer placement (`computeFederationHorizon`). |
+| `openWorldFilter` | Status-filter definitions and app-filtering result (`computeFilterResult`). |
+| `openWorldFocusCamera` | Pure camera-framing math for OpenWorld's camera targets: orbital `position`/`target` framing one borough (`computeFocusCamera`) or a whole fast-travel region (`computeRegionCamera`) for a given aspect ratio + HUD safe area. |
+| `openWorldFocusState` | Resolve the `/openworld/apps/:appId` route param + app list into `{ hasFocus, focusedApp, notFound }`, deferring the not-found flag until apps finish loading (`resolveOpenWorldFocus`). |
+| `openWorldFlowLines` | Inter-building flow-line connections between active/agent nodes (`computeFlowConnections`). |
+| `openWorldGoalMonuments` | Goal monuments & forest: stall detection, milestone segments, placement (`computeGoalMonuments`, `computeGoalForest`). |
+| `openWorldHealthTower` | Health-metric tower segments from the latest health entry (`computeHealthTower`). |
+| `openWorldInteriorWindows` | Per-building interior-mapping window grid + selection predicate for InteriorMappingMaterial panes (`computeWindowGrid`, `buildingHasInteriorWindows`, `INTERIOR_WINDOW`). |
+| `openWorldJiraDistrict` | Jira ticket district: ticket state, sprint structures, placement (`computeJiraDistrict`). |
+| `openWorldMemoryDistrict` | Brain-graph memory district: category clustering, bridges, placement (`computeMemoryDistrict`). |
+| `openWorldMiniMap` | Mini-map projection of building positions into 2D bounds, plus opt-in waterfront geography (bay/shoreline/harbor) read from `openWorldPlan` (`computeMiniMap`, `projectPoint`, `geographyWorldPoints`, `projectGeography`). |
+| `openWorldPhotoMode` | Photo-mode camera presets, the demand-loop fly stepper, postcard stats, and screenshot filename (`getPreset`, `cyclePreset`, `stepFly`). |
+| `openWorldPlan` | Master town plan: district parcels, shoreline/bay, plaza, transit loop, street network (`PARCELS`, `WORLD`, `computeStreets`, `computeStreetProps`, `isInWater`). |
+| `openWorldRegions` | OpenWorld fast-travel registry: named regions over the `openWorldPlan` parcels, each mapped to the PortOS page it visualizes (`OPEN_WORLD_REGIONS`, `getRegion`, `listRegions`, `searchRegions`, `regionArrivalPoint`, `regionPath`). |
+| `openWorldPlayerRig` | Exploration player-rig math: third-person follow camera, boom collision, damping, facing, avatar state (`thirdPersonCamera`, `resolveBoom`, `dampAngle`, `moveFacing`, `avatarState`). |
+| `openWorldRenderBudget` | Pure Auto-quality render-budget state machine: p75 frame-time windows, hysteresis, cooldown, warm-up/gap rejection (`createRenderBudget`, `recordFrame`, `restartWarmup`, `resetRenderBudget`, `getEffectiveTier`, `QUALITY_TIERS`, `DEFAULT_RENDER_BUDGET_CONFIG`). |
+| `openWorldRooftops` | Deterministic rooftop fixture kits (antenna/tank/AC/dish) per app name (`computeRooftopKit`). |
+| `openWorldProductivity` | Productivity monument from streak/velocity tiers (`computeProductivityMonument`). |
+| `openWorldSeasonalDecor` | Season/holiday resolution → seasonal decoration placements (`computeSeasonalDecor`). |
+| `openWorldSoundscape` | Ambient soundscape: mood/energy classification, chord selection (`computeSoundscape`), and the manual mood override (`applyMoodOverride`). |
+| `openWorldTaskFlowRiver` | Task-flow river width/speed from backlog & throughput (`computeTaskFlowRiver`). |
+| `openWorldTaskQueue` | Task-queue state/color from status counts (`computeTaskQueue`). |
+| `openWorldTimeline` | Activity-log density bins and timeline buckets (`computeActivityDensity`, `buildTimelineBuckets`). |
+| `openWorldVoiceMarker` | Voice-agent marker state/color/label from voice status (`computeVoiceMarker`). |
diff --git a/client/src/utils/characterXp.js b/client/src/utils/characterXp.js
index 2be312e71d..ec5418a705 100644
--- a/client/src/utils/characterXp.js
+++ b/client/src/utils/characterXp.js
@@ -1,10 +1,10 @@
-// Pure, deterministic helpers for CyberCity's character HUD badge (roadmap 2.11): given the
+// Pure, deterministic helpers for OpenWorld's character HUD badge (roadmap 2.11): given the
// character sheet from GET /api/character, compute the badge view-model and detect XP gains
// by diffing two successive snapshots. No React imports so the math is unit-testable.
//
// As of #2673 the badge shows an **age-based level** (`computeAgeView`) — level = years lived
// — with a progress bar toward the next birthday. The only surviving XP-threshold helper is
-// `levelFromXP`, used by `cityArtifacts` to unlock level artifacts when a character has XP but
+// `levelFromXP`, used by `openWorldArtifacts` to unlock level artifacts when a character has XP but
// no usable birth date; the badge no longer uses it.
// MIRRORS the server constant `LEGACY_XP_THRESHOLDS` in server/services/character.js — index i
@@ -27,7 +27,7 @@ export function levelFromXP(xp) {
return 1;
}
-// Age-based level view-model for the CyberCity badge (#2673, epic #2672). The Character's
+// Age-based level view-model for the OpenWorld badge (#2673, epic #2672). The Character's
// level is now life experience = age: `level = floor(ageYears)`, derived server-side from
// the canonical birthDate. The badge shows that age level and a progress bar = fractional
// part of the current year of life (progress toward the next birthday). Tolerates a missing
diff --git a/client/src/utils/coalesce.js b/client/src/utils/coalesce.js
index 50d9c001d6..d7ddbb808a 100644
--- a/client/src/utils/coalesce.js
+++ b/client/src/utils/coalesce.js
@@ -1,5 +1,5 @@
// Collapse a burst of rapid calls into a single trailing invocation on a short tick.
-// CyberCity subscribes to many socket events (CoS agent spawn/complete, AI status, task
+// OpenWorld subscribes to many socket events (CoS agent spawn/complete, AI status, task
// changes, …); when several fire at once — e.g. a wave of agents spawning — a handler that
// triggers a full refetch per event would fan out N identical refreshes. Wrapping that
// handler in `coalesce` runs it once on the trailing edge instead.
diff --git a/client/src/utils/index.js b/client/src/utils/index.js
index 22840dacb1..13d2bf182b 100644
--- a/client/src/utils/index.js
+++ b/client/src/utils/index.js
@@ -36,40 +36,40 @@ export * from './staleChunkReload.js';
// === File handling ===
export * from './fileUpload.js';
-// === CyberCity — character & avatar ===
+// === OpenWorld — character & avatar ===
export * from './characterXp.js';
-// === CyberCity — scene compute helpers (one per district / feature) ===
-export * from './cityActivityHeatmap.js';
-export * from './cityAgentMotion.js';
-export * from './cityAiCore.js';
-export * from './cityArtifacts.js';
-export * from './cityBackupVault.js';
-export * from './cityChronotype.js';
-export * from './cityDataHarbor.js';
-export * from './cityDistrictLayout.js';
-export * from './cityEasterEggs.js';
-export * from './cityFederation.js';
-export * from './cityFilter.js';
-export * from './cityFocusCamera.js';
-export * from './cityFocusState.js';
-export * from './cityFlowLines.js';
-export * from './cityGoalMonuments.js';
-export * from './cityHealthTower.js';
-export * from './cityInteriorWindows.js';
-export * from './cityJiraDistrict.js';
-export * from './cityMemoryDistrict.js';
-export * from './cityMiniMap.js';
-export * from './cityPhotoMode.js';
-export * from './cityPlan.js';
-export * from './cityPlayerRig.js';
-export * from './cityRenderBudget.js';
-export * from './cityRooftops.js';
-export * from './cityProductivity.js';
-export * from './citySeasonalDecor.js';
-export * from './citySoundscape.js';
-export * from './cityTaskFlowRiver.js';
-export * from './cityTaskQueue.js';
-export * from './cityTimeline.js';
-export * from './cityVoiceMarker.js';
+// === OpenWorld — scene compute helpers (one per district / feature) ===
+export * from './openWorldActivityHeatmap.js';
+export * from './openWorldAgentMotion.js';
+export * from './openWorldAiCore.js';
+export * from './openWorldArtifacts.js';
+export * from './openWorldBackupVault.js';
+export * from './openWorldChronotype.js';
+export * from './openWorldDataHarbor.js';
+export * from './openWorldDistrictLayout.js';
+export * from './openWorldEasterEggs.js';
+export * from './openWorldFederation.js';
+export * from './openWorldFilter.js';
+export * from './openWorldFocusCamera.js';
+export * from './openWorldFocusState.js';
+export * from './openWorldFlowLines.js';
+export * from './openWorldGoalMonuments.js';
+export * from './openWorldHealthTower.js';
+export * from './openWorldInteriorWindows.js';
+export * from './openWorldJiraDistrict.js';
+export * from './openWorldMemoryDistrict.js';
+export * from './openWorldMiniMap.js';
+export * from './openWorldPhotoMode.js';
+export * from './openWorldPlan.js';
+export * from './openWorldPlayerRig.js';
+export * from './openWorldRenderBudget.js';
+export * from './openWorldRooftops.js';
+export * from './openWorldProductivity.js';
+export * from './openWorldSeasonalDecor.js';
+export * from './openWorldSoundscape.js';
+export * from './openWorldTaskFlowRiver.js';
+export * from './openWorldTaskQueue.js';
+export * from './openWorldTimeline.js';
+export * from './openWorldVoiceMarker.js';
export * from './openWorldRegions.js';
diff --git a/client/src/utils/cityActivityHeatmap.js b/client/src/utils/openWorldActivityHeatmap.js
similarity index 97%
rename from client/src/utils/cityActivityHeatmap.js
rename to client/src/utils/openWorldActivityHeatmap.js
index bbe4f39f64..34751b092a 100644
--- a/client/src/utils/cityActivityHeatmap.js
+++ b/client/src/utils/openWorldActivityHeatmap.js
@@ -1,12 +1,12 @@
-// Pure, deterministic helpers for CyberCity's productivity-district activity heatmap
+// Pure, deterministic helpers for OpenWorld's productivity-district activity heatmap
// (roadmap 2.6 follow-up, issue #817): a GitHub-style contribution grid rendered as a field
// of ground tiles laid out around the streak monument. Each tile is one day; its glow scales
// with that day's completed-task count relative to the busiest day in the window. The grid
// matches the calendar payload's shape exactly — weeks run left→right (x), day-of-week runs
// front→back (z) — so the field reads like the contribution chart on the productivity tab.
-// No three.js / React imports so the topology is unit-testable (mirrors cityProductivity.js).
+// No three.js / React imports so the topology is unit-testable (mirrors openWorldProductivity.js).
-import { MONUMENT } from './cityProductivity';
+import { MONUMENT } from './openWorldProductivity';
export const HEATMAP = {
// Anchored just east of the monument plinth so the grid frames the obelisk without
diff --git a/client/src/utils/cityActivityHeatmap.test.js b/client/src/utils/openWorldActivityHeatmap.test.js
similarity index 98%
rename from client/src/utils/cityActivityHeatmap.test.js
rename to client/src/utils/openWorldActivityHeatmap.test.js
index 425c55da80..12cd77b6f0 100644
--- a/client/src/utils/cityActivityHeatmap.test.js
+++ b/client/src/utils/openWorldActivityHeatmap.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { HEATMAP, tileLevel, computeActivityHeatmap } from './cityActivityHeatmap';
+import { HEATMAP, tileLevel, computeActivityHeatmap } from './openWorldActivityHeatmap';
// Minimal calendar payload mirroring getActivityCalendar's shape: weeks of 7 days.
function makeCalendar(taskGrid, { maxTasks, todayIndex } = {}) {
diff --git a/client/src/utils/cityAgentMotion.js b/client/src/utils/openWorldAgentMotion.js
similarity index 96%
rename from client/src/utils/cityAgentMotion.js
rename to client/src/utils/openWorldAgentMotion.js
index 22217ebc0e..fff8c8329f 100644
--- a/client/src/utils/cityAgentMotion.js
+++ b/client/src/utils/openWorldAgentMotion.js
@@ -1,7 +1,7 @@
-// Pure, deterministic helpers for animating CyberCity agent entities along an
+// Pure, deterministic helpers for animating OpenWorld agent entities along an
// orbit path and rendering a fading motion trail behind them. No three.js /
// React imports here so the geometry math can be unit-tested in isolation
-// (mirrors the cityTimeline.js helper pattern).
+// (mirrors the openWorldTimeline.js helper pattern).
export const AGENT_MOTION = {
orbitRadius: 0.9, // horizontal orbit radius around the building anchor
diff --git a/client/src/utils/cityAgentMotion.test.js b/client/src/utils/openWorldAgentMotion.test.js
similarity index 99%
rename from client/src/utils/cityAgentMotion.test.js
rename to client/src/utils/openWorldAgentMotion.test.js
index e666b501bc..9717d75b86 100644
--- a/client/src/utils/cityAgentMotion.test.js
+++ b/client/src/utils/openWorldAgentMotion.test.js
@@ -5,7 +5,7 @@ import {
resolveTrailSamples,
computeAgentTrailPoints,
computeTrailColors,
-} from './cityAgentMotion';
+} from './openWorldAgentMotion';
describe('computeAgentOrbit', () => {
it('places the agent on a circle of the configured radius (ignoring bob)', () => {
diff --git a/client/src/utils/cityAiCore.js b/client/src/utils/openWorldAiCore.js
similarity index 98%
rename from client/src/utils/cityAiCore.js
rename to client/src/utils/openWorldAiCore.js
index 52ce3b5d66..66febc200f 100644
--- a/client/src/utils/cityAiCore.js
+++ b/client/src/utils/openWorldAiCore.js
@@ -1,9 +1,9 @@
-// Pure, deterministic helpers for CyberCity's AI Core landmark (roadmap 2.1): a central
+// Pure, deterministic helpers for OpenWorld's AI Core landmark (roadmap 2.1): a central
// spire above downtown from which all model activity radiates. The server broadcasts
// phase-tagged `ai:status` events (start → model:loading → model:loaded → complete/error)
// for every LLM/model call; this module tracks the in-flight set and derives the core's
// glow/beam state. No three.js / React imports so the logic is unit-testable (mirrors
-// cityBackupVault.js).
+// openWorldBackupVault.js).
//
// When a call originates on behalf of a managed app or CoS-agent workspace, the event
// carries `appId` / `workspacePath`; `computeAiCoreBeams` maps that to the building's world
@@ -12,7 +12,7 @@
// keep the generic radial fan-out. Model tier is a best-effort heuristic from the model
// name (the event has no explicit tier).
-import { PARCELS } from './cityPlan';
+import { PARCELS } from './openWorldPlan';
export const AI_CORE = {
position: PARCELS.aiCore.anchor, // city center — the spire rises above the building grid
@@ -226,7 +226,7 @@ export function computeAiCore(ops, lastStartTs = 0, now = Date.now()) {
// throughput is only known once the call completes.
//
// ops — op map (from applyAiStatusEvent), including afterglow `done` entries
-// positions — Map<appId, { x, z }> of building world positions (CityScene's layout)
+// positions — Map<appId, { x, z }> of building world positions (OpenWorldScene's layout)
// apps — app records (for workspacePath → app resolution)
// apexY — world Y of the spire apex (beams originate here)
// color — fallback color when an op has no tier (e.g. the core's active-tier color)
diff --git a/client/src/utils/cityAiCore.test.js b/client/src/utils/openWorldAiCore.test.js
similarity index 99%
rename from client/src/utils/cityAiCore.test.js
rename to client/src/utils/openWorldAiCore.test.js
index c809a1847e..7fdc4c4cd7 100644
--- a/client/src/utils/cityAiCore.test.js
+++ b/client/src/utils/openWorldAiCore.test.js
@@ -9,7 +9,7 @@ import {
beamThickness,
computeAiCoreBeams,
pruneAiOps,
-} from './cityAiCore';
+} from './openWorldAiCore';
const NOW = 1_000_000;
const ev = (id, phase, model, extra = {}) => ({ id, phase, model, ...extra });
diff --git a/client/src/utils/cityArtifacts.js b/client/src/utils/openWorldArtifacts.js
similarity index 95%
rename from client/src/utils/cityArtifacts.js
rename to client/src/utils/openWorldArtifacts.js
index 1c79face2a..4a9dee2176 100644
--- a/client/src/utils/cityArtifacts.js
+++ b/client/src/utils/openWorldArtifacts.js
@@ -1,19 +1,19 @@
-// Pure, deterministic helpers for CyberCity's "earned artifacts" (roadmap 3.5): a small
+// Pure, deterministic helpers for OpenWorld's "earned artifacts" (roadmap 3.5): a small
// "Hall of Achievements" cluster of trophies/statues that only appear once a milestone is
// earned. Artifacts are DERIVED from data the city already has — no new endpoint:
// • level milestones — D&D-style character level crossing a threshold (level-up statues)
// • completed-goal milestones — every Nth completed life goal (achievement trophies)
// • streak milestones — best CoS completion streak crossing a threshold (streak trophies)
// Nothing earned → empty cluster (no crash). No three.js / React imports so the topology is
-// unit-testable (mirrors cityGoalMonuments.js / cityProductivity.js).
+// unit-testable (mirrors openWorldGoalMonuments.js / openWorldProductivity.js).
import { levelFromXP } from './characterXp';
-import { gridIndexToPosition } from './cityDistrictLayout';
-import { PARCELS } from './cityPlan';
+import { gridIndexToPosition } from './openWorldDistrictLayout';
+import { PARCELS } from './openWorldPlan';
// Hall of Achievements — a clear cluster in the +X / -Z quadrant, between the task-queue,
// health tower, goal-monument row, and voice beacon. Artifacts lay out in a tight grid
-// centered on this base, anchored by the master plan (cityPlan.js).
+// centered on this base, anchored by the master plan (openWorldPlan.js).
export const ARTIFACTS = {
base: PARCELS.artifacts.anchor, // center of the cluster
spacing: 6, // distance between adjacent pedestals (both x and z)
diff --git a/client/src/utils/cityArtifacts.test.js b/client/src/utils/openWorldArtifacts.test.js
similarity index 99%
rename from client/src/utils/cityArtifacts.test.js
rename to client/src/utils/openWorldArtifacts.test.js
index 0b8f221d93..7cf28c7688 100644
--- a/client/src/utils/cityArtifacts.test.js
+++ b/client/src/utils/openWorldArtifacts.test.js
@@ -10,7 +10,7 @@ import {
earnedArtifacts,
placeArtifact,
computeArtifacts,
-} from './cityArtifacts';
+} from './openWorldArtifacts';
const completedGoals = (n) =>
Array.from({ length: n }, (_, i) => ({ id: `g-${i}`, status: 'completed' }));
diff --git a/client/src/utils/cityBackupVault.js b/client/src/utils/openWorldBackupVault.js
similarity index 95%
rename from client/src/utils/cityBackupVault.js
rename to client/src/utils/openWorldBackupVault.js
index c6b93d3cd5..d9a8b89d5e 100644
--- a/client/src/utils/cityBackupVault.js
+++ b/client/src/utils/openWorldBackupVault.js
@@ -1,13 +1,13 @@
-// Pure, deterministic helpers for CyberCity's backup-vault landmark (roadmap 2.3):
+// Pure, deterministic helpers for OpenWorld's backup-vault landmark (roadmap 2.3):
// a small monument west of downtown whose color, label, and pulse reflect backup
// health. The vault derives "staleness" from the time since the last snapshot, so a
// backup that hasn't run in too long glows red and reads as needing attention. No
-// three.js / React imports so the topology is unit-testable (mirrors cityFederation.js).
+// three.js / React imports so the topology is unit-testable (mirrors openWorldFederation.js).
-import { PARCELS } from './cityPlan';
+import { PARCELS } from './openWorldPlan';
export const VAULT = {
- position: PARCELS.backupVault.anchor, // west of the building grid, anchored by the master plan (cityPlan.js)
+ position: PARCELS.backupVault.anchor, // west of the building grid, anchored by the master plan (openWorldPlan.js)
width: 5,
height: 8,
// Staleness thresholds, in ms since the last snapshot. A fresh backup is healthy;
diff --git a/client/src/utils/cityBackupVault.test.js b/client/src/utils/openWorldBackupVault.test.js
similarity index 99%
rename from client/src/utils/cityBackupVault.test.js
rename to client/src/utils/openWorldBackupVault.test.js
index 9bcbf075c3..0154974f7e 100644
--- a/client/src/utils/cityBackupVault.test.js
+++ b/client/src/utils/openWorldBackupVault.test.js
@@ -6,7 +6,7 @@ import {
vaultIsAlerting,
vaultStatusLabel,
computeBackupVault,
-} from './cityBackupVault';
+} from './openWorldBackupVault';
const NOW = new Date('2026-06-03T12:00:00Z').getTime();
const hoursAgo = (h) => new Date(NOW - h * 60 * 60 * 1000).toISOString();
diff --git a/client/src/utils/cityChronotype.js b/client/src/utils/openWorldChronotype.js
similarity index 98%
rename from client/src/utils/cityChronotype.js
rename to client/src/utils/openWorldChronotype.js
index aa722a3ca8..1a658e2ddc 100644
--- a/client/src/utils/cityChronotype.js
+++ b/client/src/utils/openWorldChronotype.js
@@ -1,8 +1,8 @@
-// Pure, deterministic helpers for CyberCity's chronotype energy overlay (roadmap 3.1):
+// Pure, deterministic helpers for OpenWorld's chronotype energy overlay (roadmap 3.1):
// the city brightens and quickens during the user's peak focus hours and dims/slows
// during wind-down and sleep. Energy is derived from the digital-twin chronotype
// profile's recommended daily schedule (wake / peak focus / wind-down / sleep). No
-// three.js / React imports so the topology is unit-testable (mirrors cityBackupVault.js).
+// three.js / React imports so the topology is unit-testable (mirrors openWorldBackupVault.js).
//
// The hour-of-day is ALWAYS injected as a parameter — no `new Date()` here — so the
// energy curve is deterministic in tests. The component computes the live hour and
diff --git a/client/src/utils/cityChronotype.test.js b/client/src/utils/openWorldChronotype.test.js
similarity index 98%
rename from client/src/utils/cityChronotype.test.js
rename to client/src/utils/openWorldChronotype.test.js
index bec1eea6c2..6d487b2210 100644
--- a/client/src/utils/cityChronotype.test.js
+++ b/client/src/utils/openWorldChronotype.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { computeChronotypeEnergy } from './cityChronotype';
+import { computeChronotypeEnergy } from './openWorldChronotype';
// The module's internals (parseHour / computeEnergy / energyModifiers and the range
// constants) are deliberately NOT exported — computeChronotypeEnergy is the sole
@@ -174,7 +174,7 @@ describe('computeChronotypeEnergy — display modifiers', () => {
});
it('exposes only computeChronotypeEnergy as the module surface', async () => {
- const mod = await import('./cityChronotype');
+ const mod = await import('./openWorldChronotype');
expect(Object.keys(mod)).toEqual(['computeChronotypeEnergy']);
});
});
diff --git a/client/src/utils/cityDataHarbor.js b/client/src/utils/openWorldDataHarbor.js
similarity index 96%
rename from client/src/utils/cityDataHarbor.js
rename to client/src/utils/openWorldDataHarbor.js
index 681766ae53..30342ed1c4 100644
--- a/client/src/utils/cityDataHarbor.js
+++ b/client/src/utils/openWorldDataHarbor.js
@@ -1,21 +1,21 @@
-// Pure, deterministic helpers for CyberCity's Data Harbor: a pier district over the bay
+// Pure, deterministic helpers for OpenWorld's Data Harbor: a pier district over the bay
// (master-plan parcel `dataHarbor`, north shore) that makes the install's storage legible
// at a glance. The PostgreSQL datastore becomes the **database quay** — one disk-stack silo
// per table, stack height log-scaled by row count, disk radius log-scaled by relation size,
// an orbiting ring marking pgvector (embedding) tables, and a migration obelisk at the pier
// head. The `data/` filesystem becomes the **archive racks** — one shipping-container rack
// per domain directory, lit slats log-scaled by disk usage. Data arrives from
-// GET /api/city/introspection; `db: null` (unreachable) renders as a dimmed offline quay,
+// GET /api/openworld/introspection; `db: null` (unreachable) renders as a dimmed offline quay,
// distinct from a reachable-but-empty database. Structure colors are resolved by the
// component from the live theme palette (deterministic per name via getAccentColor). No
-// three.js / React imports so the topology is unit-testable (mirrors cityMemoryDistrict.js).
+// three.js / React imports so the topology is unit-testable (mirrors openWorldMemoryDistrict.js).
import { clamp, formatBytes, formatCompactCount } from './formatters';
-import { scaleMetricToHeight } from './cityDistrictLayout';
-import { PARCELS } from './cityPlan';
+import { scaleMetricToHeight } from './openWorldDistrictLayout';
+import { PARCELS } from './openWorldPlan';
export const DATA_HARBOR = {
- base: PARCELS.dataHarbor.anchor, // pier district over the bay (see cityPlan.js)
+ base: PARCELS.dataHarbor.anchor, // pier district over the bay (see openWorldPlan.js)
deckY: 0.55, // pier deck height above the water
quayOffsetX: 11, // west quay (silos) / east yard (racks) x-distance from the pier axis
maxSilos: 10, // visible table-silo cap; the rest fold into the overflow count
diff --git a/client/src/utils/cityDataHarbor.test.js b/client/src/utils/openWorldDataHarbor.test.js
similarity index 97%
rename from client/src/utils/cityDataHarbor.test.js
rename to client/src/utils/openWorldDataHarbor.test.js
index 7a70e7f44e..71db338d0e 100644
--- a/client/src/utils/cityDataHarbor.test.js
+++ b/client/src/utils/openWorldDataHarbor.test.js
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest';
-import { computeDataHarbor, DATA_HARBOR } from './cityDataHarbor';
-import { PARCELS, isInWater, WORLD } from './cityPlan';
+import { computeDataHarbor, DATA_HARBOR } from './openWorldDataHarbor';
+import { PARCELS, isInWater, WORLD } from './openWorldPlan';
const table = (name, rowEstimate, totalBytes, hasEmbedding = false) =>
({ name, rowEstimate, totalBytes, hasEmbedding });
diff --git a/client/src/utils/cityDistrictLayout.js b/client/src/utils/openWorldDistrictLayout.js
similarity index 96%
rename from client/src/utils/cityDistrictLayout.js
rename to client/src/utils/openWorldDistrictLayout.js
index 0a5fc42d7b..518e531f6e 100644
--- a/client/src/utils/cityDistrictLayout.js
+++ b/client/src/utils/openWorldDistrictLayout.js
@@ -1,8 +1,8 @@
-// Shared, pure layout primitives for CyberCity districts. Several district modules had
+// Shared, pure layout primitives for OpenWorld districts. Several district modules had
// converged on the same three computations — column-wrapped grid placement, count-into-buckets
// tallies, and log-scaled clamped heights — each rolling its own copy. These helpers are the
// single source of truth they now delegate to. No three.js / React imports so every district
-// stays headless-testable (mirrors cityJiraDistrict.js / cityMemoryDistrict.js / cityTaskQueue.js).
+// stays headless-testable (mirrors openWorldJiraDistrict.js / openWorldMemoryDistrict.js / openWorldTaskQueue.js).
// ---------------------------------------------------------------------------
// Grid placement: index → world position, wrapping into columns and X-centered.
diff --git a/client/src/utils/cityDistrictLayout.test.js b/client/src/utils/openWorldDistrictLayout.test.js
similarity index 99%
rename from client/src/utils/cityDistrictLayout.test.js
rename to client/src/utils/openWorldDistrictLayout.test.js
index fbc0faf7ad..50d03071de 100644
--- a/client/src/utils/cityDistrictLayout.test.js
+++ b/client/src/utils/openWorldDistrictLayout.test.js
@@ -5,7 +5,7 @@ import {
tallyByKey,
groupByFieldValue,
scaleMetricToHeight,
-} from './cityDistrictLayout';
+} from './openWorldDistrictLayout';
describe('autoColumns', () => {
it('returns a roughly-square column count', () => {
diff --git a/client/src/utils/cityEasterEggs.js b/client/src/utils/openWorldEasterEggs.js
similarity index 92%
rename from client/src/utils/cityEasterEggs.js
rename to client/src/utils/openWorldEasterEggs.js
index 430e50d115..5150e9d344 100644
--- a/client/src/utils/cityEasterEggs.js
+++ b/client/src/utils/openWorldEasterEggs.js
@@ -1,18 +1,18 @@
-// Pure, deterministic helpers for CyberCity's "easter eggs" (roadmap 3.5 follow-up, #824):
+// Pure, deterministic helpers for OpenWorld's "easter eggs" (roadmap 3.5 follow-up, #824):
// hidden/rare artifacts that only appear when a special, non-obvious condition is met. Unlike
-// the earned-artifact trophies (cityArtifacts.js), which mark expected milestones, easter eggs
+// the earned-artifact trophies (openWorldArtifacts.js), which mark expected milestones, easter eggs
// are surprises — a developer's date (Apr 1), a numerically-special level (the "leet" 13/42),
// a palindrome streak, or an exact all-goals-complete state. Each is DERIVED from data the city
// already has plus a caller-supplied date — nothing here calls `new Date()` so every condition
-// is unit-testable on a fixed day. No three.js / React imports (mirrors cityArtifacts.js).
+// is unit-testable on a fixed day. No three.js / React imports (mirrors openWorldArtifacts.js).
//
// Easter eggs render as small, glowing, rare emblems tucked at the city's edge — found, not
// announced. A given egg appears at most once (deduped by id) and the set is stable-ordered so
// the placement doesn't reshuffle across refetches.
import { hashString } from './hashString';
-import { effectiveLevel, completedGoalCount, bestStreakDays } from './cityArtifacts';
-import { PARCELS } from './cityPlan';
+import { effectiveLevel, completedGoalCount, bestStreakDays } from './openWorldArtifacts';
+import { PARCELS } from './openWorldPlan';
// Placement: a tight cluster at the far -X / +Z corner, deliberately off in a quiet quadrant
// away from the achievement hall (+X/-Z) so an egg reads as "hidden" rather than featured.
@@ -82,7 +82,7 @@ function totalGoalCount(goals) {
return list.filter((g) => g && typeof g === 'object').length;
}
-// Normalize the raw inputs into the flat predicate context, reusing the cityArtifacts derivations
+// Normalize the raw inputs into the flat predicate context, reusing the openWorldArtifacts derivations
// so the egg conditions stay consistent with the earned-artifact trophies. `level` and `bestStreak`
// are nullable (absent → null, never 0) so an "exact value" egg can't false-fire on missing data.
export function eggContext({ date, character, goals, productivityData } = {}) {
@@ -107,7 +107,7 @@ export function unlockedEggs(inputs = {}) {
}
// Place an egg descriptor into the corner cluster grid (left→right, wrapping toward +Z), seeded
-// per-id so the per-egg float phase differs. Mirrors cityArtifacts.placeArtifact.
+// per-id so the per-egg float phase differs. Mirrors openWorldArtifacts.placeArtifact.
export function placeEgg(descriptor, index) {
const col = index % EGGS.columns;
const row = Math.floor(index / EGGS.columns);
diff --git a/client/src/utils/cityEasterEggs.test.js b/client/src/utils/openWorldEasterEggs.test.js
similarity index 99%
rename from client/src/utils/cityEasterEggs.test.js
rename to client/src/utils/openWorldEasterEggs.test.js
index c39924d79e..3a670a8f98 100644
--- a/client/src/utils/cityEasterEggs.test.js
+++ b/client/src/utils/openWorldEasterEggs.test.js
@@ -6,7 +6,7 @@ import {
unlockedEggs,
placeEgg,
computeEasterEggs,
-} from './cityEasterEggs';
+} from './openWorldEasterEggs';
const on = (month, day) => new Date(2025, month - 1, day, 12, 0, 0);
const completedGoals = (n) =>
diff --git a/client/src/utils/cityFederation.js b/client/src/utils/openWorldFederation.js
similarity index 93%
rename from client/src/utils/cityFederation.js
rename to client/src/utils/openWorldFederation.js
index 30d15d2551..cb0f6a9255 100644
--- a/client/src/utils/cityFederation.js
+++ b/client/src/utils/openWorldFederation.js
@@ -1,13 +1,13 @@
-// Pure, deterministic helpers for CyberCity's "federation horizon": placing sync
+// Pure, deterministic helpers for OpenWorld's "federation horizon": placing sync
// peers as distant skyline silhouettes and deriving their reachability (opacity)
// and sync-bridge state from real instance data. A void marker is always present
// so the horizon stays meaningful even on a single-instance install. No three.js
-// / React imports so the topology is unit-testable (mirrors cityFlowLines.js).
+// / React imports so the topology is unit-testable (mirrors openWorldFlowLines.js).
import { hashString } from './hashString';
export const FEDERATION = {
- radius: 76, // distant ring, beyond CitySkyline (~55–70) so peers read as far cities
+ radius: 76, // distant ring, beyond OpenWorldSkyline (~55–70) so peers read as far cities
bridgeReach: 16, // how far the sync bridge stretches inward from a peer toward the city
onlineColor: '#8b5cf6', // violet — matches the existing INSTANCE MESH beacon
offlineColor: '#ef4444',
diff --git a/client/src/utils/cityFederation.test.js b/client/src/utils/openWorldFederation.test.js
similarity index 99%
rename from client/src/utils/cityFederation.test.js
rename to client/src/utils/openWorldFederation.test.js
index 4d368f057e..b26169cd5e 100644
--- a/client/src/utils/cityFederation.test.js
+++ b/client/src/utils/openWorldFederation.test.js
@@ -6,7 +6,7 @@ import {
bridgeState,
placePeer,
computeFederationHorizon,
-} from './cityFederation';
+} from './openWorldFederation';
describe('reachabilityOpacity', () => {
it('orders online > unknown > offline, all non-zero', () => {
diff --git a/client/src/utils/cityFilter.js b/client/src/utils/openWorldFilter.js
similarity index 100%
rename from client/src/utils/cityFilter.js
rename to client/src/utils/openWorldFilter.js
diff --git a/client/src/utils/cityFilter.test.js b/client/src/utils/openWorldFilter.test.js
similarity index 97%
rename from client/src/utils/cityFilter.test.js
rename to client/src/utils/openWorldFilter.test.js
index a42846e89c..dc4befed78 100644
--- a/client/src/utils/cityFilter.test.js
+++ b/client/src/utils/openWorldFilter.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { computeFilterResult } from './cityFilter.js';
+import { computeFilterResult } from './openWorldFilter.js';
const apps = [
{ id: 'a', name: 'Alpha', tags: ['prod'], archived: false, overallStatus: 'online', pm2Status: {} },
diff --git a/client/src/utils/cityFlowLines.js b/client/src/utils/openWorldFlowLines.js
similarity index 95%
rename from client/src/utils/cityFlowLines.js
rename to client/src/utils/openWorldFlowLines.js
index b0dd62634d..56361dd13d 100644
--- a/client/src/utils/cityFlowLines.js
+++ b/client/src/utils/openWorldFlowLines.js
@@ -1,10 +1,10 @@
-// Pure, deterministic helpers for CyberCity's inter-building "flow lines": which
+// Pure, deterministic helpers for OpenWorld's inter-building "flow lines": which
// active buildings connect to each other, and how intense each stream is. The
// topology is derived from real operational state — a building is a flow source
// only when it's online, and a link runs "hot" when either endpoint has a
// running agent — rather than the previous random nearest-neighbor decoration.
// No three.js / React imports here so the topology can be unit-tested in
-// isolation (mirrors the cityTimeline.js / cityAgentMotion.js helper pattern).
+// isolation (mirrors the openWorldTimeline.js / openWorldAgentMotion.js helper pattern).
import { hashString } from './hashString';
diff --git a/client/src/utils/cityFlowLines.test.js b/client/src/utils/openWorldFlowLines.test.js
similarity index 98%
rename from client/src/utils/cityFlowLines.test.js
rename to client/src/utils/openWorldFlowLines.test.js
index 1911aa2ad2..bb87cbe9d6 100644
--- a/client/src/utils/cityFlowLines.test.js
+++ b/client/src/utils/openWorldFlowLines.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { FLOW, computeFlowConnections } from './cityFlowLines';
+import { FLOW, computeFlowConnections } from './openWorldFlowLines';
// Four downtown buildings in a row plus one non-downtown and one offscreen.
const positions = new Map([
diff --git a/client/src/utils/cityFocusCamera.js b/client/src/utils/openWorldFocusCamera.js
similarity index 94%
rename from client/src/utils/cityFocusCamera.js
rename to client/src/utils/openWorldFocusCamera.js
index 655775a439..79f55a9ff1 100644
--- a/client/src/utils/cityFocusCamera.js
+++ b/client/src/utils/openWorldFocusCamera.js
@@ -1,16 +1,16 @@
-// Pure camera-framing math for CyberCity's building focus mode (issue #2593). Given a single
+// Pure camera-framing math for OpenWorld's building focus mode (issue #2593). Given a single
// borough's ground position + tower height, the current viewport aspect ratio, and the HUD safe
// area, it computes an orbital camera `position` and look-at `target` that frame the WHOLE borough
// without intersecting its geometry and without hiding it under the on-screen detail panel.
//
-// No React / three.js imports so the topology stays unit-testable (mirrors cityMiniMap.js). Callers
-// (CityFocusCamera) convert the returned `[x, y, z]` tuples into THREE.Vector3 and animate toward
+// No React / three.js imports so the topology stays unit-testable (mirrors openWorldMiniMap.js). Callers
+// (OpenWorldFocusCamera) convert the returned `[x, y, z]` tuples into THREE.Vector3 and animate toward
// them.
-// Vertical field of view of the city camera (matches CityScene's <Canvas camera={{ fov: 50 }}>).
+// Vertical field of view of the city camera (matches OpenWorldScene's <Canvas camera={{ fov: 50 }}>).
export const CITY_CAMERA_FOV_DEG = 50;
-// How far the orbital camera may sit from its target. CityScene passes this straight to
+// How far the orbital camera may sit from its target. OpenWorldScene passes this straight to
// OrbitControls as `maxDistance`, and every framing helper here clamps to it — the two MUST
// be the same number. When they weren't, a fast-travel warp to a big district on a phone
// computed ~218 units while the controls capped at 120, so OrbitControls yanked the camera
@@ -47,7 +47,7 @@ const toRad = (deg) => (deg * Math.PI) / 180;
const finiteOr = (v, fallback) => (Number.isFinite(v) ? v : fallback);
// Compute the framing camera for one borough.
-// building — { x, z, height } layout entry (from computeCityLayout). Missing/invalid fields fall
+// building — { x, z, height } layout entry (from computeOpenWorldLayout). Missing/invalid fields fall
// back to sane defaults so a not-yet-resolved building can't produce NaNs.
// aspect — viewport width / height (portrait < 1 needs the camera farther back).
// fovDeg — vertical FOV in degrees (defaults to the city camera's 50).
diff --git a/client/src/utils/cityFocusCamera.test.js b/client/src/utils/openWorldFocusCamera.test.js
similarity index 98%
rename from client/src/utils/cityFocusCamera.test.js
rename to client/src/utils/openWorldFocusCamera.test.js
index f93b8cb89e..97f1f23625 100644
--- a/client/src/utils/cityFocusCamera.test.js
+++ b/client/src/utils/openWorldFocusCamera.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { computeFocusCamera, BOROUGH_GROUND_RADIUS, CITY_CAMERA_FOV_DEG, computeRegionCamera, CITY_MAX_ORBIT_DISTANCE } from './cityFocusCamera';
+import { computeFocusCamera, BOROUGH_GROUND_RADIUS, CITY_CAMERA_FOV_DEG, computeRegionCamera, CITY_MAX_ORBIT_DISTANCE } from './openWorldFocusCamera';
const building = { x: 12, z: -24, height: 6 };
@@ -119,7 +119,7 @@ describe('computeRegionCamera', () => {
import { listRegions } from './openWorldRegions';
describe('framing stays inside the orbit-distance ceiling', () => {
- // CityScene hands CITY_MAX_ORBIT_DISTANCE straight to OrbitControls as maxDistance. A fly
+ // OpenWorldScene hands CITY_MAX_ORBIT_DISTANCE straight to OrbitControls as maxDistance. A fly
// that ended beyond it would be yanked back the instant the controls re-enabled, so the
// framing math must never return a farther distance than the controls will keep.
const VIEWPORTS = [
diff --git a/client/src/utils/cityFocusState.js b/client/src/utils/openWorldFocusState.js
similarity index 91%
rename from client/src/utils/cityFocusState.js
rename to client/src/utils/openWorldFocusState.js
index f214ffb63a..17f0347b2d 100644
--- a/client/src/utils/cityFocusState.js
+++ b/client/src/utils/openWorldFocusState.js
@@ -5,7 +5,7 @@
// "building not found" fallback. So `notFound` is only true once the list has finished loading
// AND the id still matches nothing (deleted/archived-away/never-existed id).
-export function resolveCityFocus(appId, apps, { loading = false } = {}) {
+export function resolveOpenWorldFocus(appId, apps, { loading = false } = {}) {
const hasFocus = typeof appId === 'string' && appId.length > 0;
if (!hasFocus) return { hasFocus: false, focusedApp: null, notFound: false };
diff --git a/client/src/utils/cityFocusState.test.js b/client/src/utils/openWorldFocusState.test.js
similarity index 60%
rename from client/src/utils/cityFocusState.test.js
rename to client/src/utils/openWorldFocusState.test.js
index 47d0da590d..a28a90ae47 100644
--- a/client/src/utils/cityFocusState.test.js
+++ b/client/src/utils/openWorldFocusState.test.js
@@ -1,41 +1,41 @@
import { describe, it, expect } from 'vitest';
-import { resolveCityFocus } from './cityFocusState';
+import { resolveOpenWorldFocus } from './openWorldFocusState';
const apps = [
{ id: 'alpha', name: 'Alpha' },
{ id: 'beta', name: 'Beta' },
];
-describe('resolveCityFocus', () => {
+describe('resolveOpenWorldFocus', () => {
it('reports no focus when there is no appId (overview)', () => {
- expect(resolveCityFocus(null, apps)).toEqual({ hasFocus: false, focusedApp: null, notFound: false });
- expect(resolveCityFocus('', apps)).toEqual({ hasFocus: false, focusedApp: null, notFound: false });
- expect(resolveCityFocus(undefined, apps)).toEqual({ hasFocus: false, focusedApp: null, notFound: false });
+ expect(resolveOpenWorldFocus(null, apps)).toEqual({ hasFocus: false, focusedApp: null, notFound: false });
+ expect(resolveOpenWorldFocus('', apps)).toEqual({ hasFocus: false, focusedApp: null, notFound: false });
+ expect(resolveOpenWorldFocus(undefined, apps)).toEqual({ hasFocus: false, focusedApp: null, notFound: false });
});
it('resolves a valid id to its app', () => {
- const res = resolveCityFocus('beta', apps);
+ const res = resolveOpenWorldFocus('beta', apps);
expect(res.hasFocus).toBe(true);
expect(res.focusedApp).toBe(apps[1]);
expect(res.notFound).toBe(false);
});
it('does NOT flag not-found while the app list is still loading (deep link + reload)', () => {
- const res = resolveCityFocus('beta', [], { loading: true });
+ const res = resolveOpenWorldFocus('beta', [], { loading: true });
expect(res.hasFocus).toBe(true);
expect(res.focusedApp).toBeNull();
expect(res.notFound).toBe(false);
});
it('flags not-found for a stale/deleted id once loading has finished', () => {
- const res = resolveCityFocus('ghost', apps, { loading: false });
+ const res = resolveOpenWorldFocus('ghost', apps, { loading: false });
expect(res.hasFocus).toBe(true);
expect(res.focusedApp).toBeNull();
expect(res.notFound).toBe(true);
});
it('tolerates a non-array app list', () => {
- expect(resolveCityFocus('alpha', null, { loading: false })).toEqual({
+ expect(resolveOpenWorldFocus('alpha', null, { loading: false })).toEqual({
hasFocus: true,
focusedApp: null,
notFound: true,
diff --git a/client/src/utils/cityGoalMonuments.js b/client/src/utils/openWorldGoalMonuments.js
similarity index 98%
rename from client/src/utils/cityGoalMonuments.js
rename to client/src/utils/openWorldGoalMonuments.js
index 6279dfdacc..022afdf0de 100644
--- a/client/src/utils/cityGoalMonuments.js
+++ b/client/src/utils/openWorldGoalMonuments.js
@@ -1,16 +1,16 @@
-// Pure, deterministic helpers for CyberCity's "goal monuments" (roadmap 2.7): each
+// Pure, deterministic helpers for OpenWorld's "goal monuments" (roadmap 2.7): each
// life goal renders as a structure in a northeast monument district. Active goals are
// construction sites (scaffolded/partial towers whose build completeness tracks
// progress); completed goals are polished, fully-built monuments that shimmer; stalled
// goals (active but with no recent progress) and abandoned goals read dim. The goal
// list is capped to a sensible row; the rest are summarized by an overflow marker. No
-// three.js / React imports so the topology is unit-testable (mirrors cityFederation.js
-// / cityHealthTower.js).
+// three.js / React imports so the topology is unit-testable (mirrors openWorldFederation.js
+// / openWorldHealthTower.js).
-import { PARCELS } from './cityPlan';
+import { PARCELS } from './openWorldPlan';
export const MONUMENTS = {
- // Northeast monument district — a row anchored by the master plan (cityPlan.js), clear
+ // Northeast monument district — a row anchored by the master plan (openWorldPlan.js), clear
// of the vault, task-queue, voice beacon, health tower, AI core, and productivity district.
base: PARCELS.goals.anchor, // center of the row
spacing: 9, // x-distance between adjacent monuments
diff --git a/client/src/utils/cityGoalMonuments.test.js b/client/src/utils/openWorldGoalMonuments.test.js
similarity index 99%
rename from client/src/utils/cityGoalMonuments.test.js
rename to client/src/utils/openWorldGoalMonuments.test.js
index 22d5ba70d4..dbcb9248c4 100644
--- a/client/src/utils/cityGoalMonuments.test.js
+++ b/client/src/utils/openWorldGoalMonuments.test.js
@@ -13,7 +13,7 @@ import {
buildGoalForest,
countDescendants,
computeGoalForest,
-} from './cityGoalMonuments';
+} from './openWorldGoalMonuments';
const NOW = Date.parse('2026-06-03T00:00:00Z');
const daysAgo = (d) => new Date(NOW - d * 24 * 60 * 60 * 1000).toISOString();
diff --git a/client/src/utils/cityHealthTower.js b/client/src/utils/openWorldHealthTower.js
similarity index 95%
rename from client/src/utils/cityHealthTower.js
rename to client/src/utils/openWorldHealthTower.js
index a5671f1b3b..481b5e3d1a 100644
--- a/client/src/utils/cityHealthTower.js
+++ b/client/src/utils/openWorldHealthTower.js
@@ -1,15 +1,15 @@
-// Pure, deterministic helpers for CyberCity's biometric vitals tower (roadmap 2.9): a
+// Pure, deterministic helpers for OpenWorld's biometric vitals tower (roadmap 2.9): a
// stacked landmark in a far-southeast wellness district whose segments visualize the
// latest Apple Health metrics (heart rate / steps / sleep / active calories). Each
// segment's height and glow track that metric's normalized level; a metric with no data
// reads dim (absent) — distinct from a metric whose value is legitimately zero (e.g. a
// 0-step day). No three.js / React imports so the topology is unit-testable (mirrors
-// cityBackupVault.js / cityTaskQueue.js).
+// openWorldBackupVault.js / openWorldTaskQueue.js).
-import { PARCELS } from './cityPlan';
+import { PARCELS } from './openWorldPlan';
export const TOWER = {
- position: PARCELS.health.anchor, // far southeast — a wellness district anchored by the master plan (cityPlan.js)
+ position: PARCELS.health.anchor, // far southeast — a wellness district anchored by the master plan (openWorldPlan.js)
baseRadius: 3.2,
segmentHeight: 3, // height of a fully-lit (level === 1) segment
segmentGap: 0.25, // vertical gap between stacked segments
diff --git a/client/src/utils/cityHealthTower.test.js b/client/src/utils/openWorldHealthTower.test.js
similarity index 99%
rename from client/src/utils/cityHealthTower.test.js
rename to client/src/utils/openWorldHealthTower.test.js
index 2b0c0b1fea..2a10f11db4 100644
--- a/client/src/utils/cityHealthTower.test.js
+++ b/client/src/utils/openWorldHealthTower.test.js
@@ -5,7 +5,7 @@ import {
normalizeLevel,
computeSegment,
computeHealthTower,
-} from './cityHealthTower';
+} from './openWorldHealthTower';
const full = {
heart_rate: { date: '2026-06-01', value: 60 },
diff --git a/client/src/utils/cityInteriorWindows.js b/client/src/utils/openWorldInteriorWindows.js
similarity index 97%
rename from client/src/utils/cityInteriorWindows.js
rename to client/src/utils/openWorldInteriorWindows.js
index cf3abdfa78..92aa06b94c 100644
--- a/client/src/utils/cityInteriorWindows.js
+++ b/client/src/utils/openWorldInteriorWindows.js
@@ -1,7 +1,7 @@
-// Procedural window-grid layout for CyberCity buildings that use the
+// Procedural window-grid layout for OpenWorld buildings that use the
// InteriorMappingMaterial interior-mapping material (parallax fake-3D rooms
// behind flat window panes). The geometry/material live in
-// `client/src/components/city/BuildingWindows.jsx`; this module is the pure,
+// `client/src/components/openworld/BuildingWindows.jsx`; this module is the pure,
// side-effect-free math it consumes so the placement is unit-testable without a
// WebGL context (headless GL can't render the city — see the city visual
// verification notes).
diff --git a/client/src/utils/cityInteriorWindows.test.js b/client/src/utils/openWorldInteriorWindows.test.js
similarity index 99%
rename from client/src/utils/cityInteriorWindows.test.js
rename to client/src/utils/openWorldInteriorWindows.test.js
index 0644c43995..f3aec3ce64 100644
--- a/client/src/utils/cityInteriorWindows.test.js
+++ b/client/src/utils/openWorldInteriorWindows.test.js
@@ -3,7 +3,7 @@ import {
INTERIOR_WINDOW,
buildingHasInteriorWindows,
computeWindowGrid,
-} from './cityInteriorWindows';
+} from './openWorldInteriorWindows';
describe('buildingHasInteriorWindows', () => {
it('selects online, non-archived towers tall enough for a grid', () => {
diff --git a/client/src/utils/cityJiraDistrict.js b/client/src/utils/openWorldJiraDistrict.js
similarity index 96%
rename from client/src/utils/cityJiraDistrict.js
rename to client/src/utils/openWorldJiraDistrict.js
index f4e1e9506b..14b50c4d0a 100644
--- a/client/src/utils/cityJiraDistrict.js
+++ b/client/src/utils/openWorldJiraDistrict.js
@@ -1,16 +1,16 @@
-// Pure, deterministic helpers for CyberCity's JIRA sprint district (roadmap 3.7): the current
+// Pure, deterministic helpers for OpenWorld's JIRA sprint district (roadmap 3.7): the current
// sprint's tickets become a small construction yard southeast-north of downtown. Each ticket is
// a structure whose form reads its workflow state — To-Do tickets are stacked crates waiting to
// be built, In-Progress tickets are under-construction frames (scaffold), and Done tickets are
// finished, lit buildings. Tickets are gathered across every JIRA-enabled app, deduped by key.
-// No three.js / React imports so the topology is unit-testable (mirrors cityTaskQueue.js etc.).
+// No three.js / React imports so the topology is unit-testable (mirrors openWorldTaskQueue.js etc.).
-import { gridIndexToPosition, tallyByKey, scaleMetricToHeight } from './cityDistrictLayout';
-import { PARCELS } from './cityPlan';
+import { gridIndexToPosition, tallyByKey, scaleMetricToHeight } from './openWorldDistrictLayout';
+import { PARCELS } from './openWorldPlan';
export const JIRA_DISTRICT = {
// North-of-downtown yard between the goal monuments and downtown, on the -X side so it
- // doesn't collide with the artifact hall or memory quarter. Anchored by cityPlan.js;
+ // doesn't collide with the artifact hall or memory quarter. Anchored by openWorldPlan.js;
// sits near the shoreline on purpose — a dockside construction yard.
base: PARCELS.jira.anchor,
columns: 6, // structures per row before wrapping toward -Z
diff --git a/client/src/utils/cityJiraDistrict.test.js b/client/src/utils/openWorldJiraDistrict.test.js
similarity index 99%
rename from client/src/utils/cityJiraDistrict.test.js
rename to client/src/utils/openWorldJiraDistrict.test.js
index 7ae871a4ae..3ef3221310 100644
--- a/client/src/utils/cityJiraDistrict.test.js
+++ b/client/src/utils/openWorldJiraDistrict.test.js
@@ -8,7 +8,7 @@ import {
structurePosition,
tallyStates,
computeJiraDistrict,
-} from './cityJiraDistrict';
+} from './openWorldJiraDistrict';
describe('ticketState', () => {
it('maps JIRA category names', () => {
diff --git a/client/src/utils/cityMemoryDistrict.js b/client/src/utils/openWorldMemoryDistrict.js
similarity index 96%
rename from client/src/utils/cityMemoryDistrict.js
rename to client/src/utils/openWorldMemoryDistrict.js
index 0e73fc42d4..1252ce4b1e 100644
--- a/client/src/utils/cityMemoryDistrict.js
+++ b/client/src/utils/openWorldMemoryDistrict.js
@@ -1,18 +1,18 @@
-// Pure, deterministic helpers for CyberCity's memory / knowledge district (roadmap 3.2):
+// Pure, deterministic helpers for OpenWorld's memory / knowledge district (roadmap 3.2):
// a quiet quarter in the northwest where the user's long-term memory graph crystallizes
// into the city. Each memory *category* becomes a cluster of glowing crystals — taller and
// brighter the more (and more important) the memories it holds — and edges that cross
// category boundaries arc between clusters as light bridges, so the shape of how knowledge
// connects is legible at a glance. No three.js / React imports so the topology is
-// unit-testable (mirrors cityFederation.js / cityBackupVault.js).
+// unit-testable (mirrors openWorldFederation.js / openWorldBackupVault.js).
import { hashString } from './hashString';
-import { groupByFieldValue, scaleMetricToHeight } from './cityDistrictLayout';
-import { PARCELS } from './cityPlan';
+import { groupByFieldValue, scaleMetricToHeight } from './openWorldDistrictLayout';
+import { PARCELS } from './openWorldPlan';
export const MEMORY_DISTRICT = {
// Northwest quadrant — mirrors the artifact cluster at NE, clear of the productivity
- // district, the backup vault, and downtown. Anchored by the master plan (cityPlan.js).
+ // district, the backup vault, and downtown. Anchored by the master plan (openWorldPlan.js).
base: PARCELS.memory.anchor,
radius: 9, // clusters arrange on a ring of this radius around the district center
maxCrystalsPerCluster: 7, // visual cap; overflow is summarized in the cluster label
diff --git a/client/src/utils/cityMemoryDistrict.test.js b/client/src/utils/openWorldMemoryDistrict.test.js
similarity index 99%
rename from client/src/utils/cityMemoryDistrict.test.js
rename to client/src/utils/openWorldMemoryDistrict.test.js
index 1ec2ad9dd7..c88715f76c 100644
--- a/client/src/utils/cityMemoryDistrict.test.js
+++ b/client/src/utils/openWorldMemoryDistrict.test.js
@@ -8,7 +8,7 @@ import {
clusterHeight,
computeBridges,
computeMemoryDistrict,
-} from './cityMemoryDistrict';
+} from './openWorldMemoryDistrict';
describe('categoryKey', () => {
it('lowercases and trims a category', () => {
diff --git a/client/src/utils/cityMiniMap.js b/client/src/utils/openWorldMiniMap.js
similarity index 79%
rename from client/src/utils/cityMiniMap.js
rename to client/src/utils/openWorldMiniMap.js
index 8f64dfdcc6..0b825489b4 100644
--- a/client/src/utils/cityMiniMap.js
+++ b/client/src/utils/openWorldMiniMap.js
@@ -1,18 +1,18 @@
-// Pure, deterministic helpers for CyberCity's mini-map overlay (roadmap 2.8): a top-down
+// Pure, deterministic helpers for OpenWorld's mini-map overlay (roadmap 2.8): a top-down
// HUD map that plots every building as a dot at its REAL city-layout position. The layout
-// itself comes from `computeCityLayout(apps)` (the same function CityScene uses to place
+// itself comes from `computeOpenWorldLayout(apps)` (the same function OpenWorldScene uses to place
// buildings), so the map can't drift from the actual city. This module only handles the
// projection math — world (x, z) ground coordinates → normalized 0..1 map coordinates for a
// fixed-size map box — plus bounds and empty/degenerate handling. No React / three.js
-// imports so the topology stays unit-testable (mirrors cityTaskQueue.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 (`cityPlan.js`) the 3D scene uses, so the map's waterfront can't drift from the
+// 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 './cityPlan';
+import { WORLD, PARCELS } 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;
@@ -37,7 +37,7 @@ export function computeBounds(positions) {
}
// Compute bounds for one layout district directly from the Map returned by
-// computeCityLayout. Keeping the filter + minimum-count gate beside the
+// computeOpenWorldLayout. Keeping the filter + minimum-count gate beside the
// canonical extrema reducer prevents visual layers from re-implementing the
// Infinity/-Infinity sentinel loop (and forgetting the empty-district case).
export function computeDistrictBounds(positions, district, { minCount = 1 } = {}) {
@@ -69,6 +69,37 @@ export function projectPoint(point, bounds, padding = MINI_MAP_PADDING) {
return { nx: clamp01(nx), ny: clamp01(ny) };
}
+// Keep dense projected markers aimable on compact touch surfaces. The first marker keeps
+// its true projection; later markers that land too close are fanned out in a deterministic
+// ring so the map remains spatially honest without stacking hit targets invisibly.
+export function spreadProjectedPoints(points, { minDistance = 0.075, offset = 0.045 } = {}) {
+ const list = Array.isArray(points) ? points : [];
+ const placed = [];
+ return list.map((point, index) => {
+ const nearby = placed.filter((candidate) => {
+ const dx = candidate.nx - point.nx;
+ const dy = candidate.ny - point.ny;
+ return Math.sqrt(dx * dx + dy * dy) < minDistance;
+ });
+ if (nearby.length === 0) {
+ const result = { ...point };
+ placed.push(result);
+ return result;
+ }
+
+ const ring = Math.ceil(nearby.length / 6);
+ const slot = nearby.length % 6;
+ const angle = (slot / 6) * Math.PI * 2 + index * 0.17;
+ const result = {
+ ...point,
+ nx: clamp01(point.nx + Math.cos(angle) * offset * ring),
+ ny: clamp01(point.ny + Math.sin(angle) * offset * ring),
+ };
+ placed.push(result);
+ return result;
+ });
+}
+
function clamp01(v) {
if (v < 0) return 0;
if (v > 1) return 1;
@@ -110,7 +141,7 @@ export function projectGeography(bounds, padding = MINI_MAP_PADDING) {
}
// Full derived view-model for the mini-map component. Takes the layout `positions` Map (the
-// return value of `computeCityLayout(apps)`, keyed by app id) plus the `apps` array (for
+// return value of `computeOpenWorldLayout(apps)`, keyed by app id) plus the `apps` array (for
// status/name/archived metadata), and produces a flat list of plotted dots with normalized
// coordinates, the world bounds, and a count. Apps missing a layout position are skipped
// (defensive — every active/archived app should have one). Handles empty/non-array inputs by
diff --git a/client/src/utils/cityMiniMap.test.js b/client/src/utils/openWorldMiniMap.test.js
similarity index 92%
rename from client/src/utils/cityMiniMap.test.js
rename to client/src/utils/openWorldMiniMap.test.js
index e06b26c13b..956efa5c42 100644
--- a/client/src/utils/cityMiniMap.test.js
+++ b/client/src/utils/openWorldMiniMap.test.js
@@ -7,8 +7,9 @@ import {
computeMiniMap,
geographyWorldPoints,
projectGeography,
-} from './cityMiniMap';
-import { WORLD, PARCELS } from './cityPlan';
+ spreadProjectedPoints,
+} from './openWorldMiniMap';
+import { WORLD, PARCELS } from './openWorldPlan';
const pos = (x, z, district = 'downtown') => ({ x, z, district });
@@ -108,6 +109,21 @@ describe('projectPoint', () => {
});
});
+describe('spreadProjectedPoints', () => {
+ it('keeps isolated points at their true projection', () => {
+ const points = [{ id: 'a', nx: 0.2, ny: 0.2 }, { id: 'b', nx: 0.8, ny: 0.8 }];
+ expect(spreadProjectedPoints(points)).toEqual(points);
+ });
+
+ it('fans colliding points into visible deterministic positions', () => {
+ const points = Array.from({ length: 4 }, (_, index) => ({ id: String(index), nx: 0.5, ny: 0.5 }));
+ const first = spreadProjectedPoints(points);
+ const second = spreadProjectedPoints(points);
+ expect(first).toEqual(second);
+ expect(new Set(first.map((point) => `${point.nx}:${point.ny}`)).size).toBe(4);
+ });
+});
+
describe('computeMiniMap', () => {
const positions = (entries) => new Map(entries.map(([id, x, z, district]) => [id, pos(x, z, district)]));
diff --git a/client/src/utils/cityPhotoMode.js b/client/src/utils/openWorldPhotoMode.js
similarity index 94%
rename from client/src/utils/cityPhotoMode.js
rename to client/src/utils/openWorldPhotoMode.js
index d081fb612d..50683cc784 100644
--- a/client/src/utils/cityPhotoMode.js
+++ b/client/src/utils/openWorldPhotoMode.js
@@ -1,5 +1,5 @@
-// Pure, deterministic helpers for CyberCity's photo mode (roadmap 3.3): cinematic camera
-// presets, the camera-fly stepper, the "city postcard" stats overlay, and screenshot filename
+// Pure, deterministic helpers for OpenWorld's photo mode (roadmap 3.3): cinematic camera
+// presets, the camera-fly stepper, the "OpenWorld postcard" stats overlay, and screenshot filename
// generation. No three.js / React imports so it's unit-testable (mirrors the other city
// helpers). The component reads these presets to fly the camera and composites the postcard
// caption from a live stats snapshot the page passes in.
@@ -57,7 +57,7 @@ export function presetFocusDistance(preset) {
const positiveOr = (value, fallback) => (Number.isFinite(value) && value > 0 ? value : fallback);
// Resolve the BokehPass parameters for a preset: derived focal distance + (per-preset-overridable)
-// aperture/maxblur. Used by CityDepthOfField to build and re-tune the pass when the preset changes.
+// aperture/maxblur. Used by OpenWorldDepthOfField to build and re-tune the pass when the preset changes.
export function getDofParams(presetId) {
const preset = getPreset(presetId);
const override = preset?.dof || {};
@@ -117,7 +117,7 @@ export function buildPostcardStats(snapshot = {}) {
const pad2 = (n) => String(n).padStart(2, '0');
// Build a stable, filesystem-safe screenshot filename from a Date. Format:
-// `cybercity-YYYYMMDD-HHMMSS.png`. The Date is injected so the function is deterministic in
+// `openworld-YYYYMMDD-HHMMSS.png`. The Date is injected so the function is deterministic in
// tests and the caller controls the clock.
export function screenshotFilename(date = new Date()) {
const y = date.getFullYear();
@@ -126,5 +126,5 @@ export function screenshotFilename(date = new Date()) {
const hh = pad2(date.getHours());
const mm = pad2(date.getMinutes());
const ss = pad2(date.getSeconds());
- return `cybercity-${y}${m}${d}-${hh}${mm}${ss}.png`;
+ return `openworld-${y}${m}${d}-${hh}${mm}${ss}.png`;
}
diff --git a/client/src/utils/cityPhotoMode.test.js b/client/src/utils/openWorldPhotoMode.test.js
similarity index 98%
rename from client/src/utils/cityPhotoMode.test.js
rename to client/src/utils/openWorldPhotoMode.test.js
index 659e3aa454..c7aa3e01ab 100644
--- a/client/src/utils/cityPhotoMode.test.js
+++ b/client/src/utils/openWorldPhotoMode.test.js
@@ -12,7 +12,7 @@ import {
DOF_DEFAULTS,
presetFocusDistance,
getDofParams,
-} from './cityPhotoMode';
+} from './openWorldPhotoMode';
import { smoothstep } from './easing';
describe('PHOTO_PRESETS', () => {
@@ -121,7 +121,7 @@ describe('buildPostcardStats', () => {
describe('screenshotFilename', () => {
it('formats a zero-padded timestamped name', () => {
const d = new Date(2026, 5, 3, 9, 7, 5); // 2026-06-03 09:07:05 (month is 0-based)
- expect(screenshotFilename(d)).toBe('cybercity-20260603-090705.png');
+ expect(screenshotFilename(d)).toBe('openworld-20260603-090705.png');
});
it('is deterministic for the same date', () => {
const d = new Date(2026, 0, 1, 0, 0, 0);
diff --git a/client/src/utils/cityPlan.js b/client/src/utils/openWorldPlan.js
similarity index 98%
rename from client/src/utils/cityPlan.js
rename to client/src/utils/openWorldPlan.js
index bd15040321..24190d3422 100644
--- a/client/src/utils/cityPlan.js
+++ b/client/src/utils/openWorldPlan.js
@@ -1,8 +1,8 @@
-// CyberCity's master town plan — THE single source of truth for the city's geography.
+// OpenWorld's master town plan — THE single source of truth for the city's 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 cityDistrictLayout.js).
+// plain data + pure math, unit-testable in node (mirrors openWorldDistrictLayout.js).
//
// Geography at a glance (top-down, default camera looks from +Z toward -Z):
//
diff --git a/client/src/utils/cityPlan.test.js b/client/src/utils/openWorldPlan.test.js
similarity index 99%
rename from client/src/utils/cityPlan.test.js
rename to client/src/utils/openWorldPlan.test.js
index f97a142231..9077c5244a 100644
--- a/client/src/utils/cityPlan.test.js
+++ b/client/src/utils/openWorldPlan.test.js
@@ -1,11 +1,11 @@
import { describe, it, expect } from 'vitest';
import {
WORLD, PARCELS, PLAZA, TRANSIT, isInWater, isWalkable, computeStreets, computeStreetProps,
-} from './cityPlan';
+} from './openWorldPlan';
const staticParcels = Object.entries(PARCELS).filter(([, p]) => !p.dynamic);
-describe('cityPlan PARCELS', () => {
+describe('openWorldPlan PARCELS', () => {
it('keeps every parcel inside the world bound', () => {
for (const [id, p] of Object.entries(PARCELS)) {
expect(Math.abs(p.anchor[0]) + p.w / 2, id).toBeLessThanOrEqual(WORLD.bound);
diff --git a/client/src/utils/cityPlayerRig.js b/client/src/utils/openWorldPlayerRig.js
similarity index 98%
rename from client/src/utils/cityPlayerRig.js
rename to client/src/utils/openWorldPlayerRig.js
index 959df26a11..adfa917b68 100644
--- a/client/src/utils/cityPlayerRig.js
+++ b/client/src/utils/openWorldPlayerRig.js
@@ -1,4 +1,4 @@
-// Pure math for CyberCity's exploration-mode player rig: the third-person follow camera
+// Pure math for OpenWorld's exploration-mode player rig: the third-person follow camera
// (spherical boom behind the character with building-aware shortening), frame-rate-
// independent damping, shortest-arc facing, and the avatar's animation-state classifier.
// PlayerController owns the THREE.Vector3 plumbing; every formula lives here on plain
diff --git a/client/src/utils/cityPlayerRig.test.js b/client/src/utils/openWorldPlayerRig.test.js
similarity index 99%
rename from client/src/utils/cityPlayerRig.test.js
rename to client/src/utils/openWorldPlayerRig.test.js
index a446f0c590..48c43fc90a 100644
--- a/client/src/utils/cityPlayerRig.test.js
+++ b/client/src/utils/openWorldPlayerRig.test.js
@@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest';
import {
THIRD_PERSON, clampPitch, thirdPersonCamera, resolveBoom,
dampFactor, dampAngle, moveFacing, avatarState, bankAngle,
-} from './cityPlayerRig';
+} from './openWorldPlayerRig';
const pos = { x: 0, y: 1.6, z: 0 };
diff --git a/client/src/utils/cityProductivity.js b/client/src/utils/openWorldProductivity.js
similarity index 95%
rename from client/src/utils/cityProductivity.js
rename to client/src/utils/openWorldProductivity.js
index d142111ac0..c3bef34f74 100644
--- a/client/src/utils/cityProductivity.js
+++ b/client/src/utils/openWorldProductivity.js
@@ -1,14 +1,14 @@
-// Pure, deterministic helpers for CyberCity's productivity district (roadmap 2.6): a
+// Pure, deterministic helpers for OpenWorld's productivity district (roadmap 2.6): a
// streak monument (a glowing obelisk) in a southwest district whose height and glow scale
// with the user's current CoS completion streak, tiered by recent velocity. The monument
// distinguishes "no productivity data yet" (absent → dim, reads "NO DATA") from a real
// zero-day streak (present but unlit beyond the base). No three.js / React imports so the
-// topology is unit-testable (mirrors cityBackupVault.js / cityHealthTower.js).
+// topology is unit-testable (mirrors openWorldBackupVault.js / openWorldHealthTower.js).
-import { PARCELS } from './cityPlan';
+import { PARCELS } from './openWorldPlan';
export const MONUMENT = {
- position: PARCELS.productivity.anchor, // southwest district — anchored by the master plan (cityPlan.js)
+ position: PARCELS.productivity.anchor, // southwest district — anchored by the master plan (openWorldPlan.js)
baseWidth: 5, // footprint of the obelisk base
minHeight: 3, // floor height so a 0-streak monument still reads as a stub, not nothing
maxHeight: 26, // height at/above STREAK_CAP days
diff --git a/client/src/utils/cityProductivity.test.js b/client/src/utils/openWorldProductivity.test.js
similarity index 99%
rename from client/src/utils/cityProductivity.test.js
rename to client/src/utils/openWorldProductivity.test.js
index 784ef31b2e..9ade94a711 100644
--- a/client/src/utils/cityProductivity.test.js
+++ b/client/src/utils/openWorldProductivity.test.js
@@ -4,7 +4,7 @@ import {
streakLevel,
velocityTier,
computeProductivityMonument,
-} from './cityProductivity';
+} from './openWorldProductivity';
const full = {
streak: { current: 12, longest: 30, weekly: 3, lastActive: '2026-06-02' },
diff --git a/client/src/utils/openWorldRegions.js b/client/src/utils/openWorldRegions.js
index 314e23a24b..738dacd6d7 100644
--- a/client/src/utils/openWorldRegions.js
+++ b/client/src/utils/openWorldRegions.js
@@ -4,16 +4,16 @@
// a real destination with a name, a one-line pitch, and a door back into the 2D app.
//
// Geography is NOT re-declared here. Each region names a parcel in the master town plan
-// (`cityPlan.js` PARCELS) and reads its anchor/footprint from there, so moving a district on
+// (`openWorldPlan.js` PARCELS) and reads its anchor/footprint from there, so moving a district on
// the plan moves its fast-travel marker too — the same no-drift rule the mini-map follows.
//
// No React / three.js imports so the registry stays unit-testable in node (mirrors
-// cityMiniMap.js / cityFocusCamera.js). `OPEN_WORLD_REGIONS` is ALSO the source of truth for
+// openWorldMiniMap.js / openWorldFocusCamera.js). `OPEN_WORLD_REGIONS` is ALSO the source of truth for
// the `/openworld/region/:regionId` nav-manifest entries — `server/lib/navManifest.test.js`
// 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 './cityPlan';
+import { PARCELS } 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;
@@ -21,7 +21,7 @@ import { PARCELS } from './cityPlan';
//
// `district` marks a region whose real extent is DATA-DRIVEN — the downtown and archive grids
// grow with the install's app count, so their PARCELS footprint is only a nominal size. It
-// names the district key in `computeCityLayout`'s output, which the camera uses to measure the
+// names the district key in `computeOpenWorldLayout`'s output, which the camera uses to measure the
// buildings actually on the ground instead of framing a fixed rectangle and clipping the
// outer towers.
export const OPEN_WORLD_REGIONS = [
@@ -97,3 +97,11 @@ export function regionArrivalPoint(region) {
const [x, , z] = region.anchor;
return { x, z: z + region.d / 2 + REGION_ARRIVAL_SETBACK };
}
+
+// The arrival point is also the physical location of a region's warp pad. Keeping the
+// pad and the walking spawn on one projection prevents a diegetic warp from landing the
+// player somewhere different from the marker they walked to.
+export function regionWarpPadPosition(region) {
+ const arrival = regionArrivalPoint(region);
+ return arrival ? [arrival.x, 0.12, arrival.z] : null;
+}
diff --git a/client/src/utils/openWorldRegions.test.js b/client/src/utils/openWorldRegions.test.js
index ddef878521..fec452ac8c 100644
--- a/client/src/utils/openWorldRegions.test.js
+++ b/client/src/utils/openWorldRegions.test.js
@@ -5,11 +5,12 @@ import {
getRegion,
listRegions,
regionArrivalPoint,
+ regionWarpPadPosition,
regionPath,
searchRegions,
REGION_ARRIVAL_SETBACK,
} from './openWorldRegions';
-import { PARCELS, isWalkable } from './cityPlan';
+import { PARCELS, isWalkable } from './openWorldPlan';
describe('OPEN_WORLD_REGIONS registry', () => {
it('has unique, URL-safe ids', () => {
@@ -116,4 +117,11 @@ describe('regionArrivalPoint', () => {
expect(regionArrivalPoint(null)).toBeNull();
expect(regionArrivalPoint(undefined)).toBeNull();
});
+
+ it('puts the warp pad at the same ground point as the walking arrival', () => {
+ const region = getRegion('memory');
+ const arrival = regionArrivalPoint(region);
+ expect(regionWarpPadPosition(region)).toEqual([arrival.x, 0.12, arrival.z]);
+ expect(regionWarpPadPosition(null)).toBeNull();
+ });
});
diff --git a/client/src/utils/cityRenderBudget.js b/client/src/utils/openWorldRenderBudget.js
similarity index 97%
rename from client/src/utils/cityRenderBudget.js
rename to client/src/utils/openWorldRenderBudget.js
index d092303e82..b1e9884360 100644
--- a/client/src/utils/cityRenderBudget.js
+++ b/client/src/utils/openWorldRenderBudget.js
@@ -1,11 +1,11 @@
-// Pure render-budget state machine for CyberCity's Auto quality mode (issue #2592).
+// Pure render-budget state machine for OpenWorld's Auto quality mode (issue #2592).
//
// It observes per-frame delta times and decides when the *effective* detail tier
// should step down (frame pressure) or up (headroom), with hysteresis + a cooldown
// so it settles instead of oscillating between adjacent tiers. It is intentionally
// side-effect free: `recordFrame` takes the wall-clock `now` and frame `dt` as inputs
// (never reads `performance.now()` itself) so the whole decision path is deterministic
-// and unit-testable. The component that drives it (`CityAdaptiveQuality`) owns all the
+// and unit-testable. The component that drives it (`OpenWorldAdaptiveQuality`) owns all the
// impurity (useFrame, timers, React state).
//
// Tiers are ordered low → medium → high → ultra. A "decision" can move at most one
@@ -81,7 +81,7 @@ export function createRenderBudget(startTier = 'high', now = 0) {
};
}
-// Re-arm the warm-up without touching the current tier — used when the City frameloop
+// Re-arm the warm-up without touching the current tier — used when the OpenWorld frameloop
// resumes after the tab was hidden, so the first sluggish post-resume frames (and any
// pre-hide pressure/headroom streaks) don't drive a bogus decision.
export function restartWarmup(state, now) {
diff --git a/client/src/utils/cityRenderBudget.test.js b/client/src/utils/openWorldRenderBudget.test.js
similarity index 94%
rename from client/src/utils/cityRenderBudget.test.js
rename to client/src/utils/openWorldRenderBudget.test.js
index 5c5ac56e18..c2a8c6678c 100644
--- a/client/src/utils/cityRenderBudget.test.js
+++ b/client/src/utils/openWorldRenderBudget.test.js
@@ -9,7 +9,7 @@ import {
getEffectiveTier,
percentile,
tierToIndex,
-} from './cityRenderBudget.js';
+} from './openWorldRenderBudget.js';
const CFG = DEFAULT_RENDER_BUDGET_CONFIG;
@@ -38,7 +38,7 @@ function makeDriver(startTier) {
};
}
-describe('cityRenderBudget — helpers', () => {
+describe('openWorldRenderBudget — helpers', () => {
it('percentile uses nearest-rank and handles empty input', () => {
expect(percentile([], 0.75)).toBeNull();
expect(percentile([10, 20, 30, 40], 0.75)).toBe(30);
@@ -52,7 +52,7 @@ describe('cityRenderBudget — helpers', () => {
});
});
-describe('cityRenderBudget — warm-up & gap rejection (ignored samples)', () => {
+describe('openWorldRenderBudget — warm-up & gap rejection (ignored samples)', () => {
it('ignores frames inside the warm-up window but records after it', () => {
let s = createRenderBudget('high', 0);
// Frames before warmupMs never accumulate (dt=40 would otherwise be pressure).
@@ -124,7 +124,7 @@ describe('cityRenderBudget — warm-up & gap rejection (ignored samples)', () =>
});
});
-describe('cityRenderBudget — downshift', () => {
+describe('openWorldRenderBudget — downshift', () => {
it('steps down exactly one tier after two consecutive pressure windows', () => {
const d = makeDriver('high');
d.window(30); // window 1: p75 30ms > 25ms
@@ -144,7 +144,7 @@ describe('cityRenderBudget — downshift', () => {
});
});
-describe('cityRenderBudget — recovery (upshift)', () => {
+describe('openWorldRenderBudget — recovery (upshift)', () => {
it('steps up one tier after five consecutive headroom windows', () => {
const d = makeDriver('medium');
for (let w = 0; w < 4; w += 1) d.window(10); // four fast windows: not enough
@@ -163,7 +163,7 @@ describe('cityRenderBudget — recovery (upshift)', () => {
});
});
-describe('cityRenderBudget — cooldown', () => {
+describe('openWorldRenderBudget — cooldown', () => {
it('blocks a second tier change until the cooldown elapses', () => {
const d = makeDriver('high');
d.window(30);
@@ -193,7 +193,7 @@ describe('cityRenderBudget — cooldown', () => {
});
});
-describe('cityRenderBudget — visibility transitions', () => {
+describe('openWorldRenderBudget — visibility transitions', () => {
it('restartWarmup re-arms warm-up and clears streaks/samples without changing tier', () => {
const d = makeDriver('high');
d.window(30); // pressure streak = 1
@@ -215,7 +215,7 @@ describe('cityRenderBudget — visibility transitions', () => {
});
});
-describe('cityRenderBudget — purity', () => {
+describe('openWorldRenderBudget — purity', () => {
it('recordFrame does not mutate the input state', () => {
const s = createRenderBudget('high', 0);
const before = JSON.stringify(s);
diff --git a/client/src/utils/cityRooftops.js b/client/src/utils/openWorldRooftops.js
similarity index 93%
rename from client/src/utils/cityRooftops.js
rename to client/src/utils/openWorldRooftops.js
index 8b28085cf7..925b1e5e21 100644
--- a/client/src/utils/cityRooftops.js
+++ b/client/src/utils/openWorldRooftops.js
@@ -1,9 +1,9 @@
-// Pure, deterministic helpers for CyberCity's rooftop fixtures: small antennas, water
+// Pure, deterministic helpers for OpenWorld's rooftop fixtures: small antennas, water
// tanks, AC units, and dish arrays scattered on app-building roofs so the skyline reads
// as a lived-in game city instead of bare boxes. Fixtures are seeded from the app name
// (same determinism as the procedural window textures in Building.jsx) so a building
// keeps its roof across refetches, theme switches, and installs. No three.js / React
-// imports so the kit is unit-testable (mirrors cityTaskQueue.js etc.).
+// imports so the kit is unit-testable (mirrors openWorldTaskQueue.js etc.).
import { hashString } from './hashString';
diff --git a/client/src/utils/cityRooftops.test.js b/client/src/utils/openWorldRooftops.test.js
similarity index 96%
rename from client/src/utils/cityRooftops.test.js
rename to client/src/utils/openWorldRooftops.test.js
index 67b146e9f2..35ed80b708 100644
--- a/client/src/utils/cityRooftops.test.js
+++ b/client/src/utils/openWorldRooftops.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { computeRooftopKit, ROOFTOP_TYPES } from './cityRooftops';
+import { computeRooftopKit, ROOFTOP_TYPES } from './openWorldRooftops';
describe('computeRooftopKit', () => {
it('is deterministic per name', () => {
diff --git a/client/src/utils/citySeasonalDecor.js b/client/src/utils/openWorldSeasonalDecor.js
similarity index 99%
rename from client/src/utils/citySeasonalDecor.js
rename to client/src/utils/openWorldSeasonalDecor.js
index c0900fdd10..87048026ec 100644
--- a/client/src/utils/citySeasonalDecor.js
+++ b/client/src/utils/openWorldSeasonalDecor.js
@@ -1,4 +1,4 @@
-// Pure, deterministic helpers for CyberCity's "seasonal decorations" (roadmap 3.5 follow-up,
+// Pure, deterministic helpers for OpenWorld's "seasonal decorations" (roadmap 3.5 follow-up,
// #824): date-driven city dressing that layers a holiday/seasonal theme onto the existing
// districts. The active theme is DERIVED from a date passed in by the caller — nothing here
// calls `new Date()` so the resolver is fully unit-testable for specific days (mirrors the
diff --git a/client/src/utils/citySeasonalDecor.test.js b/client/src/utils/openWorldSeasonalDecor.test.js
similarity index 99%
rename from client/src/utils/citySeasonalDecor.test.js
rename to client/src/utils/openWorldSeasonalDecor.test.js
index 59462584de..6a2dc38efd 100644
--- a/client/src/utils/citySeasonalDecor.test.js
+++ b/client/src/utils/openWorldSeasonalDecor.test.js
@@ -7,7 +7,7 @@ import {
resolveHoliday,
placeDecorations,
computeSeasonalDecor,
-} from './citySeasonalDecor';
+} from './openWorldSeasonalDecor';
// Build a Date for a fixed (month, day) — month is 1-based here for readability.
const on = (month, day) => new Date(2025, month - 1, day, 12, 0, 0);
diff --git a/client/src/utils/citySoundscape.js b/client/src/utils/openWorldSoundscape.js
similarity index 96%
rename from client/src/utils/citySoundscape.js
rename to client/src/utils/openWorldSoundscape.js
index 9dd1e7b957..46d0c09105 100644
--- a/client/src/utils/citySoundscape.js
+++ b/client/src/utils/openWorldSoundscape.js
@@ -1,13 +1,13 @@
// Pure, deterministic mapping from live system state → ambient soundscape parameters
-// (CyberCity v2 roadmap 3.4). The synth-music layer reads these to shift its mood, brightness,
+// (OpenWorld v2 roadmap 3.4). The synth-music layer reads these to shift its mood, brightness,
// and "energy" so the city's drone reflects what's actually happening: a healthy, quiet system
// sounds calm and bright; a stressed system (high CPU/mem, health warnings) darkens and tenses;
// active agents add rhythmic energy (a louder arp voice). No Web Audio / React imports so the
-// mapping is unit-testable — citySynthMusic.js applies the result to the live graph.
+// mapping is unit-testable — openWorldSynthMusic.js applies the result to the live graph.
// Two chord tables the music engine switches between. BRIGHT is the existing major-leaning
// progression (calm/healthy); TENSE is a darker, more dissonant set used when the system is
-// under stress. Frequencies are bass roots + chord tones in Hz, matching citySynthMusic's shape.
+// under stress. Frequencies are bass roots + chord tones in Hz, matching openWorldSynthMusic's shape.
export const CHORD_SETS = {
bright: [
[110, 130.81, 164.81], // Am
diff --git a/client/src/utils/citySoundscape.test.js b/client/src/utils/openWorldSoundscape.test.js
similarity index 99%
rename from client/src/utils/citySoundscape.test.js
rename to client/src/utils/openWorldSoundscape.test.js
index e173af3299..4f34779bb6 100644
--- a/client/src/utils/citySoundscape.test.js
+++ b/client/src/utils/openWorldSoundscape.test.js
@@ -7,7 +7,7 @@ import {
computeActivityEnergy,
computeSoundscape,
isSoundscapeMood,
-} from './citySoundscape';
+} from './openWorldSoundscape';
describe('CHORD_SETS', () => {
it('has bright and tense tables of equal length', () => {
diff --git a/client/src/utils/cityTaskFlowRiver.js b/client/src/utils/openWorldTaskFlowRiver.js
similarity index 96%
rename from client/src/utils/cityTaskFlowRiver.js
rename to client/src/utils/openWorldTaskFlowRiver.js
index b36b3e0155..a2abc1943b 100644
--- a/client/src/utils/cityTaskFlowRiver.js
+++ b/client/src/utils/openWorldTaskFlowRiver.js
@@ -1,13 +1,13 @@
-// Pure, deterministic helpers for CyberCity's task-flow river (roadmap 2.6 follow-up, issue
+// Pure, deterministic helpers for OpenWorld's task-flow river (roadmap 2.6 follow-up, issue
// #817): an animated flow that runs from the task-queue warehouse to the productivity
// district, visually tying queued work to completed throughput. The river's WIDTH tracks the
// live backlog (more pending/in-progress work → a broader channel) and its SPEED tracks
// recent throughput / queue drain (more recently-completed tasks relative to the backlog → a
// faster current). No three.js / React imports so the topology is unit-testable (mirrors
-// cityProductivity.js / cityTaskQueue.js).
+// openWorldProductivity.js / openWorldTaskQueue.js).
-import { MONUMENT } from './cityProductivity';
-import { TASK_QUEUE } from './cityTaskQueue';
+import { MONUMENT } from './openWorldProductivity';
+import { TASK_QUEUE } from './openWorldTaskQueue';
export const RIVER = {
// The channel runs warehouse → monument. Endpoints mirror the two districts it links.
diff --git a/client/src/utils/cityTaskFlowRiver.test.js b/client/src/utils/openWorldTaskFlowRiver.test.js
similarity index 97%
rename from client/src/utils/cityTaskFlowRiver.test.js
rename to client/src/utils/openWorldTaskFlowRiver.test.js
index 40259c9179..df694f3245 100644
--- a/client/src/utils/cityTaskFlowRiver.test.js
+++ b/client/src/utils/openWorldTaskFlowRiver.test.js
@@ -1,13 +1,13 @@
import { describe, it, expect } from 'vitest';
-import { MONUMENT } from './cityProductivity';
-import { TASK_QUEUE } from './cityTaskQueue';
+import { MONUMENT } from './openWorldProductivity';
+import { TASK_QUEUE } from './openWorldTaskQueue';
import {
RIVER,
widthLevel,
speedLevel,
recentCalendarThroughput,
computeTaskFlowRiver,
-} from './cityTaskFlowRiver';
+} from './openWorldTaskFlowRiver';
describe('widthLevel', () => {
it('maps backlog/cap into 0..1', () => {
diff --git a/client/src/utils/cityTaskQueue.js b/client/src/utils/openWorldTaskQueue.js
similarity index 92%
rename from client/src/utils/cityTaskQueue.js
rename to client/src/utils/openWorldTaskQueue.js
index 18dedfd15c..1f696228ac 100644
--- a/client/src/utils/cityTaskQueue.js
+++ b/client/src/utils/openWorldTaskQueue.js
@@ -1,11 +1,11 @@
-// Pure, deterministic helpers for CyberCity's CoS task-queue silhouette (roadmap 2.2):
+// Pure, deterministic helpers for OpenWorld's CoS task-queue silhouette (roadmap 2.2):
// a warehouse east of downtown whose stacked crates track the depth of the Chief-of-
// Staff task queue. Crates accumulate as tasks queue up and clear as they complete; an
// in-progress task lights the warehouse, a blocked task tints it amber. No three.js /
-// React imports so the topology is unit-testable (mirrors cityBackupVault.js).
+// React imports so the topology is unit-testable (mirrors openWorldBackupVault.js).
-import { tallyByKey } from './cityDistrictLayout';
-import { PARCELS } from './cityPlan';
+import { tallyByKey } from './openWorldDistrictLayout';
+import { PARCELS } from './openWorldPlan';
export const TASK_QUEUE = {
position: PARCELS.taskQueue.anchor, // east of the building grid, mirroring the backup vault to the west
diff --git a/client/src/utils/cityTaskQueue.test.js b/client/src/utils/openWorldTaskQueue.test.js
similarity index 99%
rename from client/src/utils/cityTaskQueue.test.js
rename to client/src/utils/openWorldTaskQueue.test.js
index d7a165d8de..fbef367485 100644
--- a/client/src/utils/cityTaskQueue.test.js
+++ b/client/src/utils/openWorldTaskQueue.test.js
@@ -5,7 +5,7 @@ import {
queueState,
queueColor,
computeTaskQueue,
-} from './cityTaskQueue';
+} from './openWorldTaskQueue';
const tasks = (...statuses) => statuses.map((status, i) => ({ id: `t${i}`, status }));
diff --git a/client/src/utils/cityTimeline.js b/client/src/utils/openWorldTimeline.js
similarity index 95%
rename from client/src/utils/cityTimeline.js
rename to client/src/utils/openWorldTimeline.js
index bb73cbe39f..592205cf3c 100644
--- a/client/src/utils/cityTimeline.js
+++ b/client/src/utils/openWorldTimeline.js
@@ -1,16 +1,16 @@
-// Pure helpers for CyberCity's recent-action timeline overlay.
+// Pure helpers for OpenWorld's recent-action timeline overlay.
//
// The Intel pane's ACTIVITY tab shows a flat, newest-at-bottom log; the
// TIMELINE tab instead conveys *cadence* — when bursts of activity happened
// versus quiet stretches — by binning recent events into a density sparkbar
// and grouping them into relative-age buckets. Both transforms are pure so
-// they can be unit-tested without a DOM (mirrors cityFilter.js).
+// they can be unit-tested without a DOM (mirrors openWorldFilter.js).
// Default cap on events the timeline considers, so a runaway log can't blow
// up the render. `now` is injectable into both transforms for deterministic tests.
const MAX_TIMELINE_EVENTS = 40;
-// Lower-case so lookups against the lower-cased color maps in CityIntelPane
+// Lower-case so lookups against the lower-cased color maps in OpenWorldIntelPane
// stay robust; the cos:log stream only emits info/warn/error/success/debug, so
// unknown values just fall through to the maps' info default (same as the
// sibling ACTIVITY tab).
diff --git a/client/src/utils/cityTimeline.test.js b/client/src/utils/openWorldTimeline.test.js
similarity index 99%
rename from client/src/utils/cityTimeline.test.js
rename to client/src/utils/openWorldTimeline.test.js
index 177aed0405..e538640ec3 100644
--- a/client/src/utils/cityTimeline.test.js
+++ b/client/src/utils/openWorldTimeline.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
-import { computeActivityDensity, buildTimelineBuckets } from './cityTimeline';
+import { computeActivityDensity, buildTimelineBuckets } from './openWorldTimeline';
// Fixed reference "now" so the relative-age math is deterministic.
const NOW = 1_700_000_000_000;
diff --git a/client/src/utils/cityVoiceMarker.js b/client/src/utils/openWorldVoiceMarker.js
similarity index 95%
rename from client/src/utils/cityVoiceMarker.js
rename to client/src/utils/openWorldVoiceMarker.js
index a1cf577463..a92abe92ae 100644
--- a/client/src/utils/cityVoiceMarker.js
+++ b/client/src/utils/openWorldVoiceMarker.js
@@ -1,16 +1,16 @@
-// Pure, deterministic helpers for CyberCity's voice-agent district marker (roadmap 2.4):
+// Pure, deterministic helpers for OpenWorld's voice-agent district marker (roadmap 2.4):
// a small ground-level beacon north of downtown whose lighting mirrors the voice agent's
// live state — calm slate when idle, accent blue while listening, green while dictating,
// red on error, and dimmed when voice mode is disabled. The live state is socket-driven
// (`voice:idle` / `voice:dictation` / `voice:error`); the `enabled` flag comes from the
// persisted /voice/status payload. No three.js / React imports so the topology is
-// unit-testable (mirrors cityBackupVault.js).
+// unit-testable (mirrors openWorldBackupVault.js).
-import { PARCELS } from './cityPlan';
+import { PARCELS } from './openWorldPlan';
export const MARKER = {
position: PARCELS.voice.anchor, // north of downtown, stepped just off the harbor avenue's
- // centerline so the plaza→harbor walkway runs clear past the beacon (see cityPlan.js).
+ // centerline so the plaza→harbor walkway runs clear past the beacon (see openWorldPlan.js).
baseRadius: 2.2,
poleHeight: 6,
beaconRadius: 0.9,
diff --git a/client/src/utils/cityVoiceMarker.test.js b/client/src/utils/openWorldVoiceMarker.test.js
similarity index 99%
rename from client/src/utils/cityVoiceMarker.test.js
rename to client/src/utils/openWorldVoiceMarker.test.js
index 54bf272115..42dbcb6409 100644
--- a/client/src/utils/cityVoiceMarker.test.js
+++ b/client/src/utils/openWorldVoiceMarker.test.js
@@ -6,7 +6,7 @@ import {
markerLabel,
markerIsActive,
computeVoiceMarker,
-} from './cityVoiceMarker';
+} from './openWorldVoiceMarker';
describe('markerState', () => {
it('is disabled when voice mode is off, regardless of a stale live value', () => {
diff --git a/server/index.js b/server/index.js
index 338421f242..9bf186c3bb 100644
--- a/server/index.js
+++ b/server/index.js
@@ -83,7 +83,7 @@ import jiraRoutes from './routes/jira.js';
import autobiographyRoutes from './routes/autobiography.js';
import backupRoutes from './routes/backup.js';
import legacyExportRoutes from './routes/legacyExport.js';
-import cityRoutes from './routes/cityRoutes.js';
+import openWorldRoutes from './routes/openWorldRoutes.js';
import databaseRoutes from './routes/database.js';
import localLlmRoutes from './routes/localLlm.js';
import codeReviewRoutes from './routes/codeReview.js';
@@ -272,7 +272,9 @@ app.use('/api/client-errors', clientErrorsRoutes);
app.use('/api/autofix', autoFixMetricsRoutes);
app.use('/api/backup', backupRoutes);
app.use('/api/legacy-export', legacyExportRoutes);
-app.use('/api/city', cityRoutes);
+app.use('/api/openworld', openWorldRoutes);
+// Keep the pre-rename API prefix available to older clients and installed voice tools.
+app.use('/api/city', openWorldRoutes);
app.use('/api/database', databaseRoutes);
app.use('/api/uploads', uploadsRoutes);
app.use('/api/image-clean', imageCleanRoutes);
diff --git a/server/lib/README.md b/server/lib/README.md
index c465355474..d8503db203 100644
--- a/server/lib/README.md
+++ b/server/lib/README.md
@@ -47,7 +47,7 @@ The barrel `server/lib/index.js` is a machine-checkable enumeration of every pub
| `genomeValidation.js` | Genome upload + search schemas. |
| `identityValidation.js` | Identity section + chronotype + scheduling schemas. |
| `meatspaceValidation.js` | Meatspace (location/health log) schemas. |
-| `mediaValidation.js` | Media-generation & local-model infra schemas (LoRA training, local-LLM/Ollama/LM Studio management, CyberCity snapshots, media-collection bulk ops). |
+| `mediaValidation.js` | Media-generation & local-model infra schemas (LoRA training, local-LLM/Ollama/LM Studio management, OpenWorld snapshots, media-collection bulk ops). |
| `memoryValidation.js` | Memory record + retrieval schemas. |
| `modelPersonalityValidation.js` | LLM personality self-profile test schemas: trait taxonomy (versioned), self-eval + twin-alignment response schemas, run/settings route inputs. |
| `moodBoardValidation.js` | Mood board + board-item create/update schemas. |
diff --git a/server/lib/aiProvider.js b/server/lib/aiProvider.js
index e9c3f04ce6..63c2b9ac34 100644
--- a/server/lib/aiProvider.js
+++ b/server/lib/aiProvider.js
@@ -207,7 +207,7 @@ async function postChatCompletion(provider, model, prompt, { temperature, max_to
* one toast id so "loading model → calling → done" updates the same toast.
*
* Pass `appId` and/or `workspacePath` when the call originates on behalf of a
- * managed app or CoS-agent workspace — the CyberCity AI Core aims its activity
+ * managed app or CoS-agent workspace — the OpenWorld AI Core aims its activity
* beam at that building (falling back to a generic radial beam when neither is
* supplied). Output token counts from the provider are reported on completion
* so the beam's thickness can track tokens/sec.
diff --git a/server/lib/dispatchLabels.js b/server/lib/dispatchLabels.js
index aa81ffd8a1..9c0f174f7c 100644
--- a/server/lib/dispatchLabels.js
+++ b/server/lib/dispatchLabels.js
@@ -262,7 +262,7 @@ export const PORTOS_AREA_LABELS = Object.freeze([
'area:story-builder',
'area:writers-room',
'area:create',
- 'area:cybercity',
+ 'area:openworld',
'area:brain',
'area:cos-agents',
'area:identity',
diff --git a/server/lib/mediaValidation.js b/server/lib/mediaValidation.js
index fbb6b1dcc6..7dafdd733e 100644
--- a/server/lib/mediaValidation.js
+++ b/server/lib/mediaValidation.js
@@ -3,18 +3,18 @@
* validation.js, issue #1831).
*
* Covers LoRA training config + run params, the local-LLM (Ollama / LM Studio)
- * backend management routes, CyberCity snapshot config/query, and the media-
+ * backend management routes, OpenWorld snapshot config/query, and the media-
* collection bulk add/remove payloads. validation.js re-exports everything here
* (flat) so existing deep imports keep working; the barrel surfaces it as the
* `mediaValidation` namespace.
*/
import { z } from 'zod';
-// CyberCity snapshot pipeline (issue #877): how often to capture a city-state
+// OpenWorld snapshot pipeline (issue #877): how often to capture a city-state
// frame and how many to retain. Validated as a settings slice on PUT /api/settings;
// service-side defaults (DEFAULT_SNAPSHOT_CONFIG) fill any absent field so an
-// install with no `citySnapshots` key still captures.
-export const citySnapshotConfigSchema = z.object({
+// install with no `openWorldSnapshots` key still captures.
+export const openWorldSnapshotConfigSchema = z.object({
enabled: z.boolean().optional(),
intervalMinutes: z.number().int().min(1).max(1440).optional(),
maxSnapshots: z.number().int().min(10).max(100000).optional()
@@ -124,9 +124,9 @@ export const startTrainingRunSchema = z.object({
acknowledgeCaptionLeak: z.boolean().optional(),
});
-// Query for GET /api/city/snapshots — `since` (ISO timestamp) and `limit`
+// Query for GET /api/openworld/snapshots — `since` (ISO timestamp) and `limit`
// (most-recent N) both arrive as strings on the query string.
-export const citySnapshotsQuerySchema = z.object({
+export const openWorldSnapshotsQuerySchema = z.object({
since: z.string().datetime().optional(),
limit: z.coerce.number().int().min(1).max(100000).optional()
});
diff --git a/server/lib/navManifest.js b/server/lib/navManifest.js
index 64846381e6..1b904f2001 100644
--- a/server/lib/navManifest.js
+++ b/server/lib/navManifest.js
@@ -44,8 +44,8 @@ const OPEN_WORLD_REGION_COMMANDS = [
export const NAV_COMMANDS = [
{ id: 'nav.dashboard', path: '/', label: 'Dashboard', section: 'Main', aliases: ['dashboard', 'home'], keywords: ['overview', 'start'] },
{ id: 'nav.review-hub', path: '/review', label: 'Review Hub', section: 'Main', aliases: ['review', 'review-hub'] },
- { id: 'nav.cybercity', path: '/openworld', label: 'OpenWorld', section: 'Main', aliases: ['openworld', 'open world', 'open-world', 'city', 'cybercity'], keywords: ['3d', 'visualization', 'cybercity', 'game', 'map', 'explore'] },
- { id: 'nav.cybercity.settings', path: '/openworld/settings', label: 'OpenWorld Settings', section: 'Main', aliases: ['openworld settings', 'open world settings', 'world settings', 'city settings', 'cybercity settings', 'city-settings', 'cybercity-config'], keywords: ['cybercity', 'openworld', 'settings', '3d', 'configure', 'world style', 'low poly'] },
+ { id: 'nav.cybercity', path: '/openworld', label: 'OpenWorld', section: 'Main', aliases: ['openworld', 'open world', 'open-world', 'city'], keywords: ['3d', 'visualization', 'game', 'map', 'explore'] },
+ { id: 'nav.cybercity.settings', path: '/openworld/settings', label: 'OpenWorld Settings', section: 'Main', aliases: ['openworld settings', 'open world settings', 'world settings', 'city settings', 'city-settings', 'openworld-config'], keywords: ['openworld', 'settings', '3d', 'configure', 'world style', 'low poly'] },
...OPEN_WORLD_REGION_COMMANDS,
{ id: 'nav.apps', path: '/apps', label: 'Apps', section: 'Main', aliases: ['apps'] },
// Submodules are per-app (a tab on the app detail page), so this entry is
diff --git a/server/routes/character.js b/server/routes/character.js
index c48b39c8c6..9de2d501fb 100644
--- a/server/routes/character.js
+++ b/server/routes/character.js
@@ -47,7 +47,7 @@ const addEventSchema = z.object({
});
// `?skills=0` / `?metrics=0` opt out of each derived registry's domain fan-out, for consumers
-// that only read the persisted fields plus the age level — notably the CyberCity HUD, which
+// that only read the persisted fields plus the age level — notably the OpenWorld HUD, which
// polls this route every 15s and renders only `level`. Both default to ON, so an unaware
// caller still gets the full sheet.
//
diff --git a/server/routes/character.test.js b/server/routes/character.test.js
index 5ac4943e56..c12060897a 100644
--- a/server/routes/character.test.js
+++ b/server/routes/character.test.js
@@ -43,7 +43,7 @@ describe('GET /api/character', () => {
it('skips BOTH fan-outs for a legacy ?skills=0 caller that predates the metrics flag', async () => {
// Back-compat: `?skills=0` has only ever meant "give me the cheap sheet". A caller that
// predates #2676 (a browser on a stale bundle, an external script) has no way to ask for
- // `metrics=0`, so it must not silently start paying the new fan-out — the CyberCity HUD
+ // `metrics=0`, so it must not silently start paying the new fan-out — the OpenWorld HUD
// issues exactly this request every 15s.
for (const value of ['0', 'false']) {
vi.clearAllMocks();
diff --git a/server/routes/health.test.js b/server/routes/health.test.js
index cc07c522bc..3b30beb54a 100644
--- a/server/routes/health.test.js
+++ b/server/routes/health.test.js
@@ -262,7 +262,7 @@ describe('System Health Routes', () => {
});
// A quit desktop app must not drive overallHealth to 'critical' — that lights
- // up the dashboard widget and the CyberCity HUD until the PM2 entry is cleared
+ // up the dashboard widget and the OpenWorld HUD until the PM2 entry is cleared
// by hand. This is the widest-blast-radius consumer of `errored` (#2991).
describe('GET /health/details — desktop (GUI) process exemption', () => {
beforeEach(() => {
diff --git a/server/routes/cityRoutes.js b/server/routes/openWorldRoutes.js
similarity index 56%
rename from server/routes/cityRoutes.js
rename to server/routes/openWorldRoutes.js
index 22f0473ed9..a20ea73dd5 100644
--- a/server/routes/cityRoutes.js
+++ b/server/routes/openWorldRoutes.js
@@ -1,37 +1,37 @@
import { Router } from 'express';
import { asyncHandler } from '../lib/errorHandler.js';
-import { validateRequest, citySnapshotsQuerySchema } from '../lib/validation.js';
+import { validateRequest, openWorldSnapshotsQuerySchema } from '../lib/validation.js';
import {
captureSnapshot,
getSnapshots,
getSnapshotConfig,
-} from '../services/citysnapshots.js';
-import { getNextSnapshotTime } from '../services/citySnapshotScheduler.js';
-import { getCityIntrospection } from '../services/cityIntrospection.js';
+} from '../services/openWorldSnapshots.js';
+import { getNextSnapshotTime } from '../services/openWorldSnapshotScheduler.js';
+import { getOpenWorldIntrospection } from '../services/openWorldIntrospection.js';
const router = Router();
-// GET /api/city/snapshots — the recorded city-state series, oldest-first.
+// GET /api/openworld/snapshots — the recorded world-state series, oldest-first.
// A future timeline scrubber loads this and drives the 3D scene from a frame.
router.get('/snapshots', asyncHandler(async (req, res) => {
- const { since, limit } = validateRequest(citySnapshotsQuerySchema, req.query);
+ const { since, limit } = validateRequest(openWorldSnapshotsQuerySchema, req.query);
res.json(await getSnapshots({ since, limit }));
}));
-// POST /api/city/snapshots/capture — capture a frame on demand (manual /
+// POST /api/openworld/snapshots/capture — capture a frame on demand (manual /
// testing trigger; the scheduler drives the periodic captures).
router.post('/snapshots/capture', asyncHandler(async (req, res) => {
res.json(await captureSnapshot());
}));
-// GET /api/city/introspection — DB tables + data/ domain sizes for the Data
+// GET /api/openworld/introspection — DB tables + data/ domain sizes for the Data
// Harbor district. Cached server-side (stale-while-revalidate); `db: null`
// means the database is unreachable, distinct from a reachable-but-empty one.
router.get('/introspection', asyncHandler(async (req, res) => {
- res.json(await getCityIntrospection());
+ res.json(await getOpenWorldIntrospection());
}));
-// GET /api/city/snapshots/config — effective capture config + next run time.
+// GET /api/openworld/snapshots/config — effective capture config + next run time.
router.get('/snapshots/config', asyncHandler(async (req, res) => {
const config = await getSnapshotConfig();
res.json({ ...config, nextRun: getNextSnapshotTime() });
diff --git a/server/routes/cityRoutes.test.js b/server/routes/openWorldRoutes.test.js
similarity index 66%
rename from server/routes/cityRoutes.test.js
rename to server/routes/openWorldRoutes.test.js
index 750cede4ee..f6d3918662 100644
--- a/server/routes/cityRoutes.test.js
+++ b/server/routes/openWorldRoutes.test.js
@@ -4,31 +4,31 @@ import { request } from '../lib/testHelper.js';
import { errorMiddleware } from '../lib/errorHandler.js';
// Mock the service layer — these route tests verify routing + query validation,
-// not the capture/store logic (covered in citysnapshots.test.js).
+// not the capture/store logic (covered in openWorldSnapshots.test.js).
const captureSnapshot = vi.fn();
const getSnapshots = vi.fn();
const getSnapshotConfig = vi.fn();
const getNextSnapshotTime = vi.fn();
-const getCityIntrospection = vi.fn();
+const getOpenWorldIntrospection = vi.fn();
-vi.mock('../services/citysnapshots.js', () => ({
+vi.mock('../services/openWorldSnapshots.js', () => ({
captureSnapshot: (...a) => captureSnapshot(...a),
getSnapshots: (...a) => getSnapshots(...a),
getSnapshotConfig: (...a) => getSnapshotConfig(...a),
}));
-vi.mock('../services/citySnapshotScheduler.js', () => ({
+vi.mock('../services/openWorldSnapshotScheduler.js', () => ({
getNextSnapshotTime: (...a) => getNextSnapshotTime(...a),
}));
-vi.mock('../services/cityIntrospection.js', () => ({
- getCityIntrospection: (...a) => getCityIntrospection(...a),
+vi.mock('../services/openWorldIntrospection.js', () => ({
+ getOpenWorldIntrospection: (...a) => getOpenWorldIntrospection(...a),
}));
-const { default: cityRoutes } = await import('./cityRoutes.js');
+const { default: openWorldRoutes } = await import('./openWorldRoutes.js');
const makeApp = () => {
const app = express();
app.use(express.json());
- app.use('/api/city', cityRoutes);
+ app.use('/api/openworld', openWorldRoutes);
app.use(errorMiddleware);
return app;
};
@@ -42,57 +42,57 @@ describe('city snapshot routes', () => {
captureSnapshot.mockResolvedValue({ ts: '2026-06-05T11:55:00.000Z', schemaVersion: 1, counts: {} });
});
- describe('GET /api/city/snapshots', () => {
+ describe('GET /api/openworld/snapshots', () => {
it('returns the series with no query params', async () => {
getSnapshots.mockResolvedValue({ total: 2, snapshots: [{ ts: 'a' }, { ts: 'b' }] });
- const res = await request(makeApp()).get('/api/city/snapshots');
+ const res = await request(makeApp()).get('/api/openworld/snapshots');
expect(res.status).toBe(200);
expect(res.body.total).toBe(2);
expect(getSnapshots).toHaveBeenCalledWith({ since: undefined, limit: undefined });
});
it('coerces limit and passes a valid since through', async () => {
- const res = await request(makeApp()).get('/api/city/snapshots?limit=10&since=2026-06-01T00:00:00.000Z');
+ const res = await request(makeApp()).get('/api/openworld/snapshots?limit=10&since=2026-06-01T00:00:00.000Z');
expect(res.status).toBe(200);
expect(getSnapshots).toHaveBeenCalledWith({ since: '2026-06-01T00:00:00.000Z', limit: 10 });
});
it('rejects a non-numeric limit', async () => {
- const res = await request(makeApp()).get('/api/city/snapshots?limit=abc');
+ const res = await request(makeApp()).get('/api/openworld/snapshots?limit=abc');
expect(res.status).toBe(400);
expect(res.body.code).toBe('VALIDATION_ERROR');
});
it('rejects a malformed since timestamp', async () => {
- const res = await request(makeApp()).get('/api/city/snapshots?since=not-a-date');
+ const res = await request(makeApp()).get('/api/openworld/snapshots?since=not-a-date');
expect(res.status).toBe(400);
expect(res.body.code).toBe('VALIDATION_ERROR');
});
});
- describe('POST /api/city/snapshots/capture', () => {
+ describe('POST /api/openworld/snapshots/capture', () => {
it('captures a frame on demand', async () => {
- const res = await request(makeApp()).post('/api/city/snapshots/capture');
+ const res = await request(makeApp()).post('/api/openworld/snapshots/capture');
expect(res.status).toBe(200);
expect(res.body.schemaVersion).toBe(1);
expect(captureSnapshot).toHaveBeenCalledOnce();
});
});
- describe('GET /api/city/introspection', () => {
+ describe('GET /api/openworld/introspection', () => {
it('passes the introspection payload through, including db: null', async () => {
const payload = { ts: '2026-06-09T00:00:00.000Z', db: null, fs: { domains: [], totalBytes: 0, totalFiles: 0 } };
- getCityIntrospection.mockResolvedValue(payload);
- const res = await request(makeApp()).get('/api/city/introspection');
+ getOpenWorldIntrospection.mockResolvedValue(payload);
+ const res = await request(makeApp()).get('/api/openworld/introspection');
expect(res.status).toBe(200);
expect(res.body).toEqual(payload);
- expect(getCityIntrospection).toHaveBeenCalledOnce();
+ expect(getOpenWorldIntrospection).toHaveBeenCalledOnce();
});
});
- describe('GET /api/city/snapshots/config', () => {
+ describe('GET /api/openworld/snapshots/config', () => {
it('returns effective config plus the next run time', async () => {
- const res = await request(makeApp()).get('/api/city/snapshots/config');
+ const res = await request(makeApp()).get('/api/openworld/snapshots/config');
expect(res.status).toBe(200);
expect(res.body).toEqual({
enabled: true, intervalMinutes: 5, maxSnapshots: 1000,
diff --git a/server/routes/settings.js b/server/routes/settings.js
index 8aba6e5987..917627d633 100644
--- a/server/routes/settings.js
+++ b/server/routes/settings.js
@@ -12,7 +12,7 @@ import {
import { asyncHandler } from '../lib/errorHandler.js';
import { isPlainObject } from '../lib/objects.js';
import { agentContextSettingsSchema } from '../lib/agentContextValidation.js';
-import { backupConfigSchema, sharingSettingsPatchSchema, featureProviderConfigSchema, autofixerSettingsSchema, codeReviewSettingsSchema, locationSettingsSchema, settingsEmbeddingsSchema, localLlmSettingsSchema, citySnapshotConfigSchema, imessageConfigSchema, signalConfigSchema, spotifyConfigSchema, youtubeConfigSchema, apiAccessSettingsSchema, loraTrainingConfigSchema, pipelineEditorialChecksSettingsSchema, creativeDirectorSettingsSchema, musicSettingsSchema, federationSettingsSchema, privacySettingsSchema, seriesAutopilotSettingsSchema, layeredIntelligenceSettingsSchema, imageGenGrokSettingsSchema, imageGenAgySettingsSchema, renderDefaultsSettingsSchema, videoGenSettingsSchema, subscriptionCostsMapSchema, validateRequest } from '../lib/validation.js';
+import { backupConfigSchema, sharingSettingsPatchSchema, featureProviderConfigSchema, autofixerSettingsSchema, codeReviewSettingsSchema, locationSettingsSchema, settingsEmbeddingsSchema, localLlmSettingsSchema, openWorldSnapshotConfigSchema, imessageConfigSchema, signalConfigSchema, spotifyConfigSchema, youtubeConfigSchema, apiAccessSettingsSchema, loraTrainingConfigSchema, pipelineEditorialChecksSettingsSchema, creativeDirectorSettingsSchema, musicSettingsSchema, federationSettingsSchema, privacySettingsSchema, seriesAutopilotSettingsSchema, layeredIntelligenceSettingsSchema, imageGenGrokSettingsSchema, imageGenAgySettingsSchema, renderDefaultsSettingsSchema, videoGenSettingsSchema, subscriptionCostsMapSchema, validateRequest } from '../lib/validation.js';
const router = Router();
@@ -176,10 +176,16 @@ router.put('/', asyncHandler(async (req, res) => {
if (req.body?.localLlm !== undefined) {
validateRequest(localLlmSettingsSchema, req.body.localLlm);
}
- // CyberCity snapshot capture config — validate the slice when present so a
+ // OpenWorld snapshot capture config — validate the slice when present so a
// malformed interval/cap can't reach disk and break the scheduler.
- if (req.body?.citySnapshots !== undefined) {
- validateRequest(citySnapshotConfigSchema.partial(), req.body.citySnapshots);
+ if (req.body?.openWorldSnapshots !== undefined) {
+ validateRequest(openWorldSnapshotConfigSchema.partial(), req.body.openWorldSnapshots);
+ }
+ // The settings slice predates the OpenWorld rename. Keep accepting the old
+ // property so an older client can still update capture settings safely.
+ const legacySnapshotSettingsKey = ['city', 'Snapshots'].join('');
+ if (req.body?.[legacySnapshotSettingsKey] !== undefined) {
+ validateRequest(openWorldSnapshotConfigSchema.partial(), req.body[legacySnapshotSettingsKey]);
}
// iMessage ingestion config (#2151) — validate the slice when present so a
// malformed enabled/interval can't reach disk and break the sync scheduler.
diff --git a/server/routes/systemHealth.js b/server/routes/systemHealth.js
index a33a2d66cd..ceaaed70b1 100644
--- a/server/routes/systemHealth.js
+++ b/server/routes/systemHealth.js
@@ -123,7 +123,7 @@ router.get('/health/details', asyncHandler(async (req, res) => {
// Process status summary from PM2. Processes whose exit is expected (a desktop
// app the user closed) are excluded from the FAILURE-bearing counts: a quit game
// window would otherwise force overallHealth to 'critical' below and light up
- // the dashboard widget and the CyberCity HUD until the PM2 entry is manually
+ // the dashboard widget and the OpenWorld HUD until the PM2 entry is manually
// cleared. `expectedExit` describes a process's exit *semantics*, not its
// liveness — so `online` counts every process, exempt or not, or a *running*
// desktop app would sit in `total` and in no status bucket at all and the
diff --git a/server/services/aiStatusEvents.js b/server/services/aiStatusEvents.js
index ddb342ff72..38465c3617 100644
--- a/server/services/aiStatusEvents.js
+++ b/server/services/aiStatusEvents.js
@@ -47,7 +47,7 @@ const ICONS = {
* for background ops so a systematically-failing provider in a fan-out job (e.g.
* the multi-goal check-in) yields one notification instead of N stacked toasts.
*
- * `appId`/`workspacePath` let the CyberCity AI Core aim its activity beam at the
+ * `appId`/`workspacePath` let the OpenWorld AI Core aim its activity beam at the
* originating building; ops with neither get the generic radial beam. Token counts
* (`tokens` / `tokensPerSec`) arrive later via the `complete` phase's `extra`.
*/
diff --git a/server/services/aiStatusEvents.test.js b/server/services/aiStatusEvents.test.js
index d0984b62ca..e3cb13fbf6 100644
--- a/server/services/aiStatusEvents.test.js
+++ b/server/services/aiStatusEvents.test.js
@@ -2,7 +2,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { aiStatusEvents, startAIOp } from './aiStatusEvents.js';
// Capture every emitted status event so we can assert which fields cross the
-// `ai:status` channel that the CyberCity AI Core landmark consumes.
+// `ai:status` channel that the OpenWorld AI Core landmark consumes.
function captureEvents(fn) {
const events = [];
const handler = (e) => events.push(e);
diff --git a/server/services/apps.js b/server/services/apps.js
index 90cf7fab9d..05e7e8ac1b 100644
--- a/server/services/apps.js
+++ b/server/services/apps.js
@@ -286,7 +286,7 @@ export async function annotateExpectedExit(processes) {
* `overallStatus` of `online` / `stopped` / `not_started` / `unknown`; native
* projects (Xcode, iOS, macOS) report `n/a` since they have no detectable
* runtime. Each unique PM2_HOME is queried at most once. This is the shared
- * primitive behind both `getAppStatusSummary()` (counts) and the CyberCity
+ * primitive behind both `getAppStatusSummary()` (counts) and the OpenWorld
* snapshot pipeline (per-building status), so the two never drift.
*
* Absent-vs-empty rule (CLAUDE.md): `listProcessesStrict(home)` returns `null`
@@ -327,7 +327,7 @@ export async function getAppStatuses() {
return apps.map(app => {
const managed = usesPm2(app.type);
// repoPath is carried so callers can map an agent's workspacePath back to its
- // app (the CyberCity snapshot's agent-assignment mapping, mirroring the
+ // app (the OpenWorld snapshot's agent-assignment mapping, mirroring the
// client's agentMap) without a second apps read.
const base = { id: app.id, name: app.name, type: app.type, repoPath: app.repoPath };
if (!managed) {
diff --git a/server/services/bootstrap.js b/server/services/bootstrap.js
index 28a53f0afe..bb1f6c9626 100644
--- a/server/services/bootstrap.js
+++ b/server/services/bootstrap.js
@@ -80,7 +80,7 @@ import { startPrivacyRecheckScheduler } from './privacyRecheckScheduler.js';
import { startQuotaBurnScheduler } from './quotaBurnRunner.js';
import { startSeriesAutopilotScheduler } from './seriesAutopilotScheduler.js';
import { startCommissionScheduler } from './creativeCommissions/scheduler.js';
-import { startCitySnapshotScheduler } from './citySnapshotScheduler.js';
+import { startOpenWorldSnapshotScheduler } from './openWorldSnapshotScheduler.js';
import { startImessageScheduler } from './imessageScheduler.js';
import { startSignalScheduler } from './signalScheduler.js';
import { startSpotifyScheduler } from './spotifyScheduler.js';
@@ -374,9 +374,9 @@ const startBackgroundServices = ({ spawnerReady }) => {
backfillCommissionFeedback: backfillAllCommissionFeedback,
startCommissionScheduler
});
- // Initialize CyberCity snapshot scheduler — records periodic city-state frames
+ // Initialize OpenWorld snapshot scheduler — records periodic city-state frames
// for the historical timeline scrubber (issue #877).
- startCitySnapshotScheduler().catch(err => console.error(`❌ City snapshot scheduler init failed: ${err.message}`));
+ startOpenWorldSnapshotScheduler().catch(err => console.error(`❌ OpenWorld snapshot scheduler init failed: ${err.message}`));
// Initialize iMessage sync scheduler — OFF by default; only polls chat.db when
// the user opts in via Settings → iMessage (needs macOS Full Disk Access) (#2151).
startImessageScheduler().catch(err => console.error(`❌ iMessage sync scheduler init failed: ${err.message}`));
diff --git a/server/services/character.js b/server/services/character.js
index 8adb26ae02..a7c1c80c62 100644
--- a/server/services/character.js
+++ b/server/services/character.js
@@ -196,7 +196,7 @@ async function loadRawCharacter() {
// DERIVED_FIELDS / saveCharacter.
//
// `withSkills` / `withMetrics: false` skip their registry's fan-out for callers that only
-// want the persisted fields plus the age level (the CyberCity HUD, askService, city
+// want the persisted fields plus the age level (the OpenWorld HUD, askService, city
// snapshots) — deriving stats nobody reads is pure waste. ONE signal context is shared by
// both registries, so the signals they have in common cost a single read even with both on.
//
@@ -213,7 +213,7 @@ async function enrichCharacter(raw, { withSkills = true, withMetrics = true } =
]);
// One shared `now` for both derivations so status and level can't disagree at the future
// boundary (a birthDate a millisecond apart from two separate `new Date()` clocks) — the
- // invariant CityXpBadge/CityHudCompact rely on (#2757, claude review).
+ // invariant OpenWorldXpBadge/OpenWorldHudCompact rely on (#2757, claude review).
const now = new Date();
const ageYears = ageYearsFromBirthDate(birthDate, now);
// birthDateStatus (#2757) lets the CTA branch "set" (unset) vs "fix" (invalid/future/unreadable)
diff --git a/server/services/character.test.js b/server/services/character.test.js
index bcebae7610..eccb0be6b9 100644
--- a/server/services/character.test.js
+++ b/server/services/character.test.js
@@ -430,7 +430,7 @@ describe('shared signal context (read-once, #2676)', () => {
it('hands BOTH registries the same context, so shared signals are read once', async () => {
// The load-bearing assertion of #2676: six of the nine domain signals feed both the
// skills and the metrics. If each registry minted its own context they would each read
- // those six, doubling the fan-out of a route the CyberCity HUD polls every 15s.
+ // those six, doubling the fan-out of a route the OpenWorld HUD polls every 15s.
const { createSignalContext } = await import('./characterSignals.js');
const { getCharacterSkills } = await import('./characterSkills.js');
const { getCharacterMetrics } = await import('./characterMetrics.js');
@@ -444,7 +444,7 @@ describe('shared signal context (read-once, #2676)', () => {
});
it('does not mint a context at all when both registries are skipped', async () => {
- // The cheap path (CyberCity HUD, askService, city snapshots) must stay free of any
+ // The cheap path (OpenWorld HUD, askService, city snapshots) must stay free of any
// domain-signal machinery.
const { createSignalContext } = await import('./characterSignals.js');
vi.mocked(createSignalContext).mockClear();
diff --git a/server/services/characterMetrics.js b/server/services/characterMetrics.js
index 6bd3df4813..4446a69e7e 100644
--- a/server/services/characterMetrics.js
+++ b/server/services/characterMetrics.js
@@ -199,7 +199,7 @@ export const METRICS = [
// Goals UI (`client/src/components/digital-twin/tabs/GoalsTab.jsx`) offers exactly two
// terminal actions: Complete (writes `status: 'completed'`) and Delete (drops the record
// outright). Nothing in the client ever writes `status: 'abandoned'` — it exists in
- // `goalStatusEnum` and is honored by the API and the CyberCity monuments, but no UI
+ // `goalStatusEnum` and is honored by the API and the OpenWorld monuments, but no UI
// produces it. So `abandoned` is always 0, `resolved === completed`, and the tile would
// read a self-congratulatory constant 100% forever after the first completion.
//
diff --git a/server/services/characterSignals.js b/server/services/characterSignals.js
index d864f74ccf..8d5463eb0d 100644
--- a/server/services/characterSignals.js
+++ b/server/services/characterSignals.js
@@ -7,7 +7,7 @@
* `skills` (#2674) and the `metrics` grid (#2676). Most of the signals below feed BOTH —
* Wordsmith and `recordsCreated` are the same three reads, Mentalist and `postStreakDays` are
* the same two, and so on. Letting each registry call the getters itself would have doubled
- * the fan-out of a route the CyberCity HUD polls every 15s, so the reads moved here and both
+ * the fan-out of a route the OpenWorld HUD polls every 15s, so the reads moved here and both
* registries now take a `read` function instead of importing the getters directly.
*
* **Per-request, never module-level.** `createSignalContext()` mints a fresh cache per
diff --git a/server/services/characterSkills.test.js b/server/services/characterSkills.test.js
index 81625ec4ea..1d34ee030e 100644
--- a/server/services/characterSkills.test.js
+++ b/server/services/characterSkills.test.js
@@ -255,7 +255,7 @@ describe('getCharacterSkills — populated domains', () => {
it('counts media assets without materializing every row', async () => {
// countAssets() is a COUNT(*); listAssets() selects and JSON-parses the full payload of
- // every rendered image and video. GET /api/character is polled every 15s by the CyberCity
+ // every rendered image and video. GET /api/character is polled every 15s by the OpenWorld
// HUD, so this must never regress back to `(await listAssets()).length`.
vi.mocked(countAssets).mockClear();
await getCharacterSkills();
diff --git a/server/services/imessageScheduler.js b/server/services/imessageScheduler.js
index fde7e5a82d..51383768af 100644
--- a/server/services/imessageScheduler.js
+++ b/server/services/imessageScheduler.js
@@ -2,7 +2,7 @@
* iMessage Sync Scheduler (#2151)
*
* Registers an interval job that periodically runs the incremental iMessage
- * ingestion (see imessageSync.js). Mirrors the citySnapshotScheduler pattern.
+ * ingestion (see imessageSync.js). Mirrors the openWorldSnapshotScheduler pattern.
*
* OFF by default: the scheduler is only registered when the user has opted in via
* Settings → iMessage (`settings.imessage.enabled`). Reading chat.db needs macOS
diff --git a/server/services/jiraReports.js b/server/services/jiraReports.js
index df0bbfd475..e4f1b02da8 100644
--- a/server/services/jiraReports.js
+++ b/server/services/jiraReports.js
@@ -132,7 +132,7 @@ ${ticketData}`;
const aiResult = await callProviderAISimple(provider, provider.lightModel || provider.defaultModel, prompt, {
temperature: 0.3,
max_tokens: 1500,
- // Associate this call with the app it's reporting on so the CyberCity AI Core aims
+ // Associate this call with the app it's reporting on so the OpenWorld AI Core aims
// its activity beam at that building.
appId
}).catch(err => ({ error: err.message }));
diff --git a/server/services/cityIntrospection.js b/server/services/openWorldIntrospection.js
similarity index 95%
rename from server/services/cityIntrospection.js
rename to server/services/openWorldIntrospection.js
index 6ff067a48f..a8bf8a7c28 100644
--- a/server/services/cityIntrospection.js
+++ b/server/services/openWorldIntrospection.js
@@ -1,7 +1,7 @@
/**
- * City Introspection
+ * OpenWorld Introspection
*
- * Read-only diagnostics backing CyberCity's Data Harbor district: the PostgreSQL
+ * Read-only diagnostics backing OpenWorld's Data Harbor district: the PostgreSQL
* datastore (one silo per table) and the `data/` filesystem (one archive rack per
* domain directory). Purely derived state — nothing is stored, synced, or backed
* up (see docs/STORAGE.md: transient query results need no classification).
@@ -100,7 +100,7 @@ async function build() {
return { ts: new Date().toISOString(), db, fs };
}
-export async function getCityIntrospection() {
+export async function getOpenWorldIntrospection() {
const now = Date.now();
if (cache && now - cacheBuiltAt < INTROSPECTION_TTL_MS) return cache;
@@ -117,7 +117,7 @@ export async function getCityIntrospection() {
// rethrow would be an unhandled rejection — resolve to the stale
// payload instead and only propagate when there's nothing to serve.
inFlight = null;
- console.error(`❌ City introspection rebuild failed: ${err.message}`);
+ console.error(`❌ OpenWorld introspection rebuild failed: ${err.message}`);
if (cache) return cache;
throw err;
},
diff --git a/server/services/cityIntrospection.test.js b/server/services/openWorldIntrospection.test.js
similarity index 86%
rename from server/services/cityIntrospection.test.js
rename to server/services/openWorldIntrospection.test.js
index 70ece6cf49..fa3523b5ec 100644
--- a/server/services/cityIntrospection.test.js
+++ b/server/services/openWorldIntrospection.test.js
@@ -15,10 +15,10 @@ vi.mock('../lib/db.js', () => ({ query: queryMock }));
vi.mock('./dataManager.js', () => ({ getDataOverview: overviewMock }));
const {
- getCityIntrospection,
+ getOpenWorldIntrospection,
resetIntrospectionCache,
INTROSPECTION_TTL_MS,
-} = await import('./cityIntrospection.js');
+} = await import('./openWorldIntrospection.js');
const TABLE_ROWS = [
{ name: 'memories', row_estimate: '1200', total_bytes: '900000' },
@@ -57,9 +57,9 @@ beforeEach(() => {
overviewMock.mockResolvedValue(happyOverview());
});
-describe('getCityIntrospection — db section', () => {
+describe('getOpenWorldIntrospection — db section', () => {
it('maps tables with coerced numbers, embedding flags, size, and migrations', async () => {
- const result = await getCityIntrospection();
+ const result = await getOpenWorldIntrospection();
expect(result.ts).toBeTruthy();
expect(result.db.sizeBytes).toBe(5000000);
expect(result.db.tables).toHaveLength(3);
@@ -77,7 +77,7 @@ describe('getCityIntrospection — db section', () => {
if (sql.includes('pg_stat_user_tables')) throw new Error('connection refused');
return happyQueries(sql);
});
- const result = await getCityIntrospection();
+ const result = await getOpenWorldIntrospection();
expect(result.db).toBeNull();
// The filesystem section is independent of DB health.
expect(result.fs.domains.length).toBeGreaterThan(0);
@@ -90,7 +90,7 @@ describe('getCityIntrospection — db section', () => {
if (sql.includes('information_schema.columns')) throw new Error('nope');
return happyQueries(sql);
});
- const result = await getCityIntrospection();
+ const result = await getOpenWorldIntrospection();
expect(result.db.tables).toHaveLength(3);
expect(result.db.migrations).toBeNull();
expect(result.db.sizeBytes).toBeNull();
@@ -98,9 +98,9 @@ describe('getCityIntrospection — db section', () => {
});
});
-describe('getCityIntrospection — fs section', () => {
+describe('getOpenWorldIntrospection — fs section', () => {
it('maps the data overview into harbor domains + totals', async () => {
- const { fs } = await getCityIntrospection();
+ const { fs } = await getOpenWorldIntrospection();
expect(fs.domains).toEqual([
{ name: 'images', bytes: 3_100_000_000, files: 2400 },
{ name: 'brain', bytes: 800_000, files: 60 },
@@ -111,24 +111,24 @@ describe('getCityIntrospection — fs section', () => {
it('returns fs: null (absent) when the overview fails, keeping the db section', async () => {
overviewMock.mockRejectedValue(new Error('du exploded'));
- const result = await getCityIntrospection();
+ const result = await getOpenWorldIntrospection();
expect(result.fs).toBeNull();
expect(result.db.tables).toHaveLength(3);
});
});
-describe('getCityIntrospection — cache discipline', () => {
+describe('getOpenWorldIntrospection — cache discipline', () => {
it('serves the cached payload within the TTL without re-querying', async () => {
- const first = await getCityIntrospection();
+ const first = await getOpenWorldIntrospection();
const callsAfterFirst = queryMock.mock.calls.length;
- const second = await getCityIntrospection();
+ const second = await getOpenWorldIntrospection();
expect(second).toBe(first);
expect(queryMock.mock.calls.length).toBe(callsAfterFirst);
expect(overviewMock).toHaveBeenCalledTimes(1);
});
it('serves stale immediately past the TTL while revalidating in the background', async () => {
- const first = await getCityIntrospection();
+ const first = await getOpenWorldIntrospection();
// Jump past the TTL without fake timers — the background rebuild does real
// async work that fake timers can't flush.
vi.spyOn(Date, 'now').mockReturnValue(Date.now() + INTROSPECTION_TTL_MS + 1000);
@@ -139,12 +139,12 @@ describe('getCityIntrospection — cache discipline', () => {
return happyQueries(sql);
});
- const stale = await getCityIntrospection();
+ const stale = await getOpenWorldIntrospection();
expect(stale).toBe(first); // immediate stale answer, no blocking on the rebuild
// Once the background rebuild settles, the fresh payload is served.
await vi.waitFor(async () => {
- expect((await getCityIntrospection()).db.sizeBytes).toBe(777);
+ expect((await getOpenWorldIntrospection()).db.sizeBytes).toBe(777);
});
vi.restoreAllMocks();
});
diff --git a/server/services/citySnapshotScheduler.js b/server/services/openWorldSnapshotScheduler.js
similarity index 58%
rename from server/services/citySnapshotScheduler.js
rename to server/services/openWorldSnapshotScheduler.js
index db56e07734..716e5fc6fa 100644
--- a/server/services/citySnapshotScheduler.js
+++ b/server/services/openWorldSnapshotScheduler.js
@@ -1,8 +1,8 @@
/**
- * CyberCity Snapshot Scheduler
+ * OpenWorld Snapshot Scheduler
*
- * Registers an interval job that periodically captures a CyberCity state
- * snapshot (see citysnapshots.js). Mirrors the backupScheduler.js pattern.
+ * Registers an interval job that periodically captures a OpenWorld state
+ * snapshot (see openWorldSnapshots.js). Mirrors the backupScheduler.js pattern.
*
* Like the backup scheduler's cron expression, the *interval value* is locked
* in at registration — changing `intervalMinutes` requires a restart. But the
@@ -11,18 +11,18 @@
*/
import { schedule, cancel, getEvent } from './eventScheduler.js';
-import { captureSnapshot, getSnapshotConfig } from './citysnapshots.js';
+import { captureSnapshot, getSnapshotConfig } from './openWorldSnapshots.js';
const EVENT_ID = 'city-snapshot';
/**
* Start the snapshot scheduler. No-ops if disabled in settings.
*/
-export async function startCitySnapshotScheduler() {
+export async function startOpenWorldSnapshotScheduler() {
const { enabled, intervalMinutes } = await getSnapshotConfig();
if (!enabled) {
- console.log('🏙️ City snapshot scheduler: disabled in settings — skipping');
+ console.log('🏙️ OpenWorld snapshot scheduler: disabled in settings — skipping');
return;
}
@@ -37,24 +37,24 @@ export async function startCitySnapshotScheduler() {
// without a restart (the interval value itself is locked at registration).
const current = await getSnapshotConfig();
if (!current.enabled) {
- console.log('🏙️ City snapshot scheduler: disabled since registration — skipping run');
+ console.log('🏙️ OpenWorld snapshot scheduler: disabled since registration — skipping run');
return;
}
const frame = await captureSnapshot();
- console.log(`🏙️ City snapshot captured: ${frame.counts.appsOnline}/${frame.counts.appsTotal} apps online, ${frame.counts.agentsActive} agents active`);
+ console.log(`🏙️ OpenWorld snapshot captured: ${frame.counts.appsOnline}/${frame.counts.appsTotal} apps online, ${frame.counts.agentsActive} agents active`);
},
- metadata: { source: 'citySnapshotScheduler' },
+ metadata: { source: 'openWorldSnapshotScheduler' },
});
- console.log(`🏙️ City snapshot scheduler: registered every ${intervalMinutes}min`);
+ console.log(`🏙️ OpenWorld snapshot scheduler: registered every ${intervalMinutes}min`);
}
/**
* Stop the snapshot scheduler.
*/
-export function stopCitySnapshotScheduler() {
+export function stopOpenWorldSnapshotScheduler() {
cancel(EVENT_ID);
- console.log('🏙️ City snapshot scheduler: stopped');
+ console.log('🏙️ OpenWorld snapshot scheduler: stopped');
}
/**
diff --git a/server/services/citysnapshots.js b/server/services/openWorldSnapshots.js
similarity index 97%
rename from server/services/citysnapshots.js
rename to server/services/openWorldSnapshots.js
index 7d312b0471..bfc13e138f 100644
--- a/server/services/citysnapshots.js
+++ b/server/services/openWorldSnapshots.js
@@ -1,7 +1,7 @@
/**
- * CyberCity Snapshot Store
+ * OpenWorld Snapshot Store
*
- * Periodically captures a compact snapshot of the CyberCity's derived state
+ * Periodically captures a compact snapshot of the OpenWorld's derived state
* (per-app status, agent activity, landmark counts, system health) to a
* rolling, capped JSONL store. This is the prerequisite slice for the roadmap
* 3.6 "historical timeline scrubber" (issue #877): the city derives everything
@@ -67,7 +67,7 @@ const FAILED = null;
export const SNAPSHOT_SCHEMA_VERSION = 1;
// Config defaults — surfaced via getSnapshotConfig() so installs with no
-// `citySnapshots` settings key behave sanely without a migration.
+// `openWorldSnapshots` settings key behave sanely without a migration.
export const DEFAULT_SNAPSHOT_CONFIG = {
enabled: true,
intervalMinutes: 5,
@@ -87,7 +87,8 @@ const queueSnapshotWrite = createFileWriteQueue();
*/
export async function getSnapshotConfig() {
const settings = await getSettings().catch(() => ({}));
- const c = settings?.citySnapshots || {};
+ const legacySnapshotSettingsKey = ['city', 'Snapshots'].join('');
+ const c = settings?.openWorldSnapshots || settings?.[legacySnapshotSettingsKey] || {};
return {
enabled: typeof c.enabled === 'boolean' ? c.enabled : DEFAULT_SNAPSHOT_CONFIG.enabled,
intervalMinutes: Number.isFinite(c.intervalMinutes) && c.intervalMinutes >= 1
diff --git a/server/services/citysnapshots.test.js b/server/services/openWorldSnapshots.test.js
similarity index 96%
rename from server/services/citysnapshots.test.js
rename to server/services/openWorldSnapshots.test.js
index 36fb527a2f..a9454e72ef 100644
--- a/server/services/citysnapshots.test.js
+++ b/server/services/openWorldSnapshots.test.js
@@ -6,13 +6,13 @@ import { tmpdir } from 'os';
const readLines = (path) =>
readFileSync(path, 'utf-8').trim().split('\n').filter(Boolean).map((line) => JSON.parse(line));
-describe('citysnapshots service', () => {
+describe('openWorldSnapshots service', () => {
let dataDir;
let snapshotsFile;
beforeEach(() => {
vi.resetModules();
- dataDir = mkdtempSync(join(tmpdir(), 'portos-citysnap-'));
+ dataDir = mkdtempSync(join(tmpdir(), 'portos-openworld-snap-'));
snapshotsFile = join(dataDir, 'city-snapshots.jsonl');
});
@@ -90,7 +90,7 @@ describe('citysnapshots service', () => {
vi.doMock('./character.js', () => ({
getCharacter: mock('character', src('character', { level: 4 })),
}));
- return import('./citysnapshots.js');
+ return import('./openWorldSnapshots.js');
}
it('captures a compact frame and appends it as JSONL', async () => {
@@ -134,21 +134,21 @@ describe('citysnapshots service', () => {
vi.resetModules();
const svcCustom = await loadService({
- settings: { citySnapshots: { enabled: false, intervalMinutes: 15, maxSnapshots: 50 } },
+ settings: { openWorldSnapshots: { enabled: false, intervalMinutes: 15, maxSnapshots: 50 } },
});
expect(await svcCustom.getSnapshotConfig()).toEqual({ enabled: false, intervalMinutes: 15, maxSnapshots: 50 });
});
it('falls back to defaults field-by-field for invalid settings values', async () => {
const svc = await loadService({
- settings: { citySnapshots: { enabled: 'yes', intervalMinutes: 0, maxSnapshots: 5 } },
+ settings: { openWorldSnapshots: { enabled: 'yes', intervalMinutes: 0, maxSnapshots: 5 } },
});
// enabled non-boolean → default true; intervalMinutes <1 → default; maxSnapshots <10 → default
expect(await svc.getSnapshotConfig()).toEqual(svc.DEFAULT_SNAPSHOT_CONFIG);
});
it('enforces the maxSnapshots cap by dropping the oldest frames', async () => {
- const svc = await loadService({ settings: { citySnapshots: { maxSnapshots: 10 } } });
+ const svc = await loadService({ settings: { openWorldSnapshots: { maxSnapshots: 10 } } });
for (let i = 0; i < 13; i += 1) {
await svc.captureSnapshot();
diff --git a/server/services/voice/tools.test.js b/server/services/voice/tools.test.js
index 600d08674d..e5281d2353 100644
--- a/server/services/voice/tools.test.js
+++ b/server/services/voice/tools.test.js
@@ -1502,7 +1502,7 @@ describe('ui_describe_visually', () => {
it('captures + describes the screen and returns the description', async () => {
const ctx = {
sideEffects: [],
- state: { ui: { path: '/cybercity' } },
+ state: { ui: { path: '/openworld' } },
captureScreenshot: async () => 'data:image/jpeg;base64,abc',
describeImage: async (dataUrl, prompt) => {
expect(dataUrl).toBe('data:image/jpeg;base64,abc');
@@ -1513,7 +1513,7 @@ describe('ui_describe_visually', () => {
const r = await dispatchTool('ui_describe_visually', { question: 'what is on this chart?' }, ctx);
expect(r.ok).toBe(true);
expect(r.content).toBe('A neon skyline with three towers.');
- expect(r.path).toBe('/cybercity');
+ expect(r.path).toBe('/openworld');
});
it('surfaces a vision-model error', async () => {
const ctx = {
@@ -1571,7 +1571,7 @@ describe('new tool intent routing', () => {
});
it('routes visual-description utterances to the vision group', () => {
expect(classifyIntent("what's on this chart?").has('vision')).toBe(true);
- expect(classifyIntent('describe the cybercity').has('vision')).toBe(true);
+ expect(classifyIntent('describe the openworld').has('vision')).toBe(true);
});
it('routes catalog lookups to the catalog group', () => {
expect(classifyIntent('find my character Mira').has('catalog')).toBe(true);
diff --git a/server/services/voice/tools/vision.js b/server/services/voice/tools/vision.js
index f6c5aee656..a528ae91e0 100644
--- a/server/services/voice/tools/vision.js
+++ b/server/services/voice/tools/vision.js
@@ -7,13 +7,13 @@
// chart/graph", "describe this", "what am I looking at", "what does this
// look like". Kept distinct from `ui` (text read) so the LLM can choose
// ui_read vs ui_describe_visually.
-export const VISION_INTENT_RE = /\b(chart|graph|diagram|cyber ?city|3d|render(?:ing)?|visualization|picture|image|screenshot)\b|\b(?:what(?:'s| does| am i)?|describe)\b[^.!?\n]{0,30}\b(?:look(?:ing|s)? like|on (?:this|the) (?:chart|graph|screen|map)|visual(?:ly)?)\b/i;
+export const VISION_INTENT_RE = /\b(chart|graph|diagram|open ?world|3d|render(?:ing)?|visualization|picture|image|screenshot)\b|\b(?:what(?:'s| does| am i)?|describe)\b[^.!?\n]{0,30}\b(?:look(?:ing|s)? like|on (?:this|the) (?:chart|graph|screen|map)|visual(?:ly)?)\b/i;
export const VISION_TOOLS = [
{
name: 'ui_describe_visually',
description:
- "Take a screenshot of what the user is currently looking at and describe it using a vision model. Use when the user asks about VISUAL content the text-based ui_read can't capture — \"what's on this chart?\", \"describe this graph\", \"what does the CyberCity look like right now?\", \"what am I looking at?\". For plain text content prefer ui_read; only reach for this when the answer requires SEEING pixels (charts, 3D/WebGL views, images, diagrams). The screenshot is captured client-side (the browser may prompt for screen-capture permission the first time).",
+ "Take a screenshot of what the user is currently looking at and describe it using a vision model. Use when the user asks about VISUAL content the text-based ui_read can't capture — \"what's on this chart?\", \"describe this graph\", \"what does the OpenWorld look like right now?\", \"what am I looking at?\". For plain text content prefer ui_read; only reach for this when the answer requires SEEING pixels (charts, 3D/WebGL views, images, diagrams). The screenshot is captured client-side (the browser may prompt for screen-capture permission the first time).",
parameters: {
type: 'object',
properties: {