Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
keep City downtown buildings clear of the central AI Core plaza
[._.]/ Adam Eivy2c60932f3589
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 378cdc0ae6..203b341803 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -22,6 +22,7 @@- **[issue-875] CyberCity district layout internals consolidated** — the city's districts now share one set of layout primitives for grid placement, category tallies, and log-scaled building heights, so each district no longer carries its own copy of that math. No visible change to the city.- **[issue-713] Simpler, collapsed sidebar** — The left navigation is consolidated to a focused set of top-level areas with a "More" group for the long tail. Messaging and your wiki now live under Brain, system and infrastructure tools under Dev Tools, and health tracking is now simply "Health"; Goals is promoted to its own top-level entry. Deep page tabs no longer clutter the sidebar — open a page and its tabs live in the page — and everything stays reachable from ⌘K and voice navigation.- **[issue-919] Internal: shared-helper catalog for the client utility modules** — Added a discovery index and a drift-guard test so the client's pure helper modules stay easy to find and can't silently fall out of the catalog. No user-facing change.+- **City keeps a clear plaza around the AI Core** — downtown buildings that would otherwise grid onto the central AI Core landmark are now pushed out to the edge of a one-cell plaza, so no building or label overlaps the core (a lone app sits at the plaza's front edge facing the camera). The warehouse district is unaffected. District neon signs also gain a styled back panel with a thin accent strip so they read as finished objects when seen from behind instead of flat black cutouts.## Fixeddiff --git a/client/src/components/city/CityNeonSigns.jsx b/client/src/components/city/CityNeonSigns.jsxindex d1ec493f00..a8f7b7ea54 100644--- a/client/src/components/city/CityNeonSigns.jsx+++ b/client/src/components/city/CityNeonSigns.jsx@@ -45,10 +45,16 @@ function NeonSign({ position, rotation, text, color, fontSize = 0.4, flickerRate<meshBasicMaterial color="#020208" transparent opacity={0.5} /></mesh>- {/* Back blocker to prevent mirrored text */}+ {/* Styled back blocker to prevent mirrored text — a tinted panel plus a thin+ accent strip so the sign reads as a finished object from behind, not a+ flat black cutout. */}<mesh position={[0, 0, -0.03]}><planeGeometry args={[textWidth + 0.3, textHeight + 0.15]} />- <meshBasicMaterial color="#020208" side={THREE.BackSide} />+ <meshBasicMaterial color="#07111f" transparent opacity={0.78} side={THREE.BackSide} />+ </mesh>+ <mesh position={[0, 0, -0.032]}>+ <planeGeometry args={[textWidth + 0.42, 0.04]} />+ <meshBasicMaterial color={color} transparent opacity={0.24} side={THREE.BackSide} /></mesh>{/* Neon text */}diff --git a/client/src/components/city/cityLayout.js b/client/src/components/city/cityLayout.jsindex a4e3e994ed..0071d013d9 100644--- a/client/src/components/city/cityLayout.js+++ b/client/src/components/city/cityLayout.js@@ -3,6 +3,26 @@ import { autoColumns, gridIndexToPosition } from '../../utils/cityDistrictLayoutconst STATUS_ORDER = { online: 0, stopped: 1, not_started: 2, not_found: 3 };+// Keep downtown buildings off the central AI Core landmark: anything that lands+// inside a one-cell plaza radius is pushed radially out to the plaza edge so its+// tower/label doesn't intersect the core. A building exactly at the origin has no+// direction to push, so it falls back to the front (-Z) edge facing the camera.+const CORE_CLEARANCE_RADIUS = BUILDING_PARAMS.spacing;+const CENTER_FALLBACK_ANGLE = -Math.PI / 2;++const cleanZero = (n) => (Math.abs(n) < 1e-9 ? 0 : n);++const clearCorePlaza = (x, z) => {+ const dist = Math.hypot(x, z);+ if (dist >= CORE_CLEARANCE_RADIUS) return { x, z };++ const angle = dist > 0 ? Math.atan2(z, x) : CENTER_FALLBACK_ANGLE;+ return {+ x: cleanZero(Math.cos(angle) * CORE_CLEARANCE_RADIUS),+ z: cleanZero(Math.sin(angle) * CORE_CLEARANCE_RADIUS),+ };+};+export const computeCityLayout = (apps) => {const active = [];const archived = [];@@ -27,7 +47,7 @@ export const computeCityLayout = (apps) => {active.forEach((app, i) => {const [x, , z] = gridIndexToPosition(i, { columns: activeCols, spacing, rowCount: activeRows });- positions.set(app.id, { x, z, district: 'downtown', height: getBuildingHeight(app) });+ positions.set(app.id, { ...clearCorePlaza(x, z), district: 'downtown', height: getBuildingHeight(app) });});// Warehouse district (archived apps): X-centered grid offset along +Z from downtown.diff --git a/client/src/components/city/cityLayout.test.js b/client/src/components/city/cityLayout.test.jsindex 5ae8050278..ea8643441c 100644--- a/client/src/components/city/cityLayout.test.js+++ b/client/src/components/city/cityLayout.test.js@@ -5,32 +5,41 @@ import { computeCityLayout } from './cityLayout';const online = (id) => ({ id, overallStatus: 'online', archived: false });describe('computeCityLayout', () => {- it('lays active apps in a square grid centered on the origin', () => {+ it('lays active apps around a reserved AI Core plaza', () => {const pos = computeCityLayout([online('a'), online('b'), online('c'), online('d')]);- // 4 apps → 2 cols, 2 rows; X & Z both centered at offset (2-1)*12/2 = 6- expect(pos.get('a')).toMatchObject({ x: -6, z: -6, district: 'downtown' });- expect(pos.get('b')).toMatchObject({ x: 6, z: -6, district: 'downtown' });- expect(pos.get('c')).toMatchObject({ x: -6, z: 6, district: 'downtown' });- expect(pos.get('d')).toMatchObject({ x: 6, z: 6, district: 'downtown' });- // Each entry also carries a numeric building height (consumed by the- // PlayerController proximity check); positions are no longer height-blind.+ // 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');+ expect(pos.get('a').x).toBeCloseTo(-8.485281);+ expect(pos.get('a').z).toBeCloseTo(-8.485281);+ expect(pos.get('b').x).toBeCloseTo(8.485281);+ expect(pos.get('b').z).toBeCloseTo(-8.485281);+ expect(pos.get('c').x).toBeCloseTo(-8.485281);+ expect(pos.get('c').z).toBeCloseTo(8.485281);+ expect(pos.get('d').x).toBeCloseTo(8.485281);+ expect(pos.get('d').z).toBeCloseTo(8.485281);+ // Plaza clearance only rewrites x/z — each entry still carries a numeric building+ // height (consumed by the PlayerController proximity check).expect(typeof pos.get('a').height).toBe('number');expect(pos.get('a').height).toBeGreaterThan(0);});- it('places a single active app at the origin', () => {+ it('pushes a lone centered app to the front edge of the core plaza', () => {const pos = computeCityLayout([online('solo')]);- expect(pos.get('solo')).toMatchObject({ x: 0, z: 0, district: 'downtown' });+ // 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 along +Z', () => {+ it('offsets archived apps into a warehouse grid along +Z (plaza clearance is downtown-only)', () => {const pos = computeCityLayout([online('a'),{ id: 'x', overallStatus: 'online', archived: true },{ id: 'y', overallStatus: 'online', archived: true },]);- // 1 active → activeRows 1 → warehouseZ = 1*12/2 + 4 = 10; 2 archived → 2 cols, X offset 6- expect(pos.get('a')).toMatchObject({ x: 0, z: 0, district: 'downtown' });+ // 1 active → activeRows 1 → warehouseZ = 1*12/2 + 4 = 10; 2 archived → 2 cols, X offset 6.+ // The active app clears to the plaza front edge; warehouse positions are untouched.+ expect(pos.get('a')).toMatchObject({ x: 0, z: -12, district: 'downtown' });expect(pos.get('x')).toMatchObject({ x: -6, z: 10, district: 'warehouse' });expect(pos.get('y')).toMatchObject({ x: 6, z: 10, district: 'warehouse' });});@@ -40,8 +49,9 @@ describe('computeCityLayout', () => {{ id: 'stopped', overallStatus: 'stopped', archived: false },{ id: 'live', overallStatus: 'online', archived: false },]);- // online sorts to index 0 (col 0), stopped to index 1 (col 1); 2 cols, 1 row, X offset 6- expect(pos.get('live')).toMatchObject({ x: -6, z: 0, district: 'downtown' });- expect(pos.get('stopped')).toMatchObject({ x: 6, z: 0, district: 'downtown' });+ // online sorts to index 0 (col 0), stopped to index 1 (col 1) at ±6; clearCorePlaza+ // then pushes both out along ±X to the 12-unit plaza edge.+ expect(pos.get('live')).toMatchObject({ x: -12, z: 0, district: 'downtown' });+ expect(pos.get('stopped')).toMatchObject({ x: 12, z: 0, district: 'downtown' });});});