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(cos): make 3D avatars draggable to re-orient

Adam Eivye4b7077f2413
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index d7716c6976..3729b54398 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -2,6 +2,7 @@
## Added
+- **3D Chief of Staff avatars are draggable to re-orient.** All five 3D avatar styles (Cyber, Sigil, Esoteric, Nexus, Muse) now respond to typical mouse/touch drag controls — click-and-drag rotates the avatar around its center, with damping for a smooth feel. Pan and zoom are intentionally disabled so the framing stays consistent on the small avatar tile. Wrapper divs use `cursor-grab`/`active:cursor-grabbing` and `touch-none` so the affordance is visible and touch drags don't fight page scroll. Implemented via drei's `OrbitControls` inside each avatar's `<Scene>`. Files: `client/src/components/cos/CyberCoSAvatar.jsx`, `client/src/components/cos/SigilCoSAvatar.jsx`, `client/src/components/cos/EsotericCoSAvatar.jsx`, `client/src/components/cos/NexusCoSAvatar.jsx`, `client/src/components/cos/MuseCoSAvatar.jsx`.
- **Live AI operation status — toasts + server logs for every model call.** The user had no idea when a feature like Digital Twin → Taste → "Generate Summary" was actually doing work versus hung; the button just animated and silently waited up to a minute while LM Studio loaded a model on demand. New `server/services/aiStatusEvents.js` exports an `EventEmitter` + `startAIOp({ op, label, providerId, providerName, model })` helper that emits phase-tagged events (`start`, `model:loading`, `model:loaded`, `complete`, `error`) with provider/model/op metadata. `server/services/socket.js` bridges the emitter onto a new `ai:status` Socket.IO channel broadcast to all clients. `server/lib/aiProvider.js` — `callProviderAISimple()` now starts a status op for every API call (logs always; toasts when the caller passes `op`/`opLabel`, plus model-loading/error always), and the LM Studio auto-load path emits `model:loading` ("Loading openai/gpt-oss-20b into LM Studio…") + `model:loaded` ("openai/gpt-oss-20b loaded (4.2s)") so the user sees what's happening instead of a frozen button. `server/services/taste-questionnaire.js` passes labeled ops for the three taste AI calls (section summary, overall summary, deeper personalized question) so toasts read "Generating Movies & Film taste summary…" rather than a generic provider name. New `client/src/hooks/useAIStatusNotifications.js` subscribes to `ai:status`, renders one mutating toast per op id (`toast.loading` → `toast.success`/`toast.error` with the same id so phases update the same toast), and is mounted globally in `client/src/components/Layout.jsx`. Silent (uninstrumented) ops only toast when something user-visible happens (model load, error, or call exceeds 2.5s) so background calls don't spam the UI; explicit user-triggered ops toast immediately. Server logs are single-line emoji-prefixed with op slug, phase, message, provider, model, and elapsed time per CLAUDE.md style. Files: `server/services/aiStatusEvents.js` (new), `server/lib/aiProvider.js`, `server/services/socket.js`, `server/services/taste-questionnaire.js`, `client/src/hooks/useAIStatusNotifications.js` (new), `client/src/components/Layout.jsx`.
## Fixed
diff --git a/client/src/components/cos/CyberCoSAvatar.jsx b/client/src/components/cos/CyberCoSAvatar.jsx
index ef30c52f8d..0b4a2ab875 100644
--- a/client/src/components/cos/CyberCoSAvatar.jsx
+++ b/client/src/components/cos/CyberCoSAvatar.jsx
@@ -1,6 +1,6 @@
import { useRef, useMemo } from 'react';
import { Canvas, useFrame } from '@react-three/fiber';
-import { Float, MeshDistortMaterial, Sparkles } from '@react-three/drei';
+import { Float, MeshDistortMaterial, OrbitControls, Sparkles } from '@react-three/drei';
import * as THREE from 'three';
import { AGENT_STATES } from './constants';
@@ -424,13 +424,23 @@ function Scene({ state, speaking }) {
{/* Ground glow */}
<GroundGlow color={color} />
+
+ {/* Drag-to-rotate controls */}
+ <OrbitControls
+ enablePan={false}
+ enableZoom={false}
+ enableDamping
+ dampingFactor={0.08}
+ rotateSpeed={0.6}
+ makeDefault
+ />
</>
);
}
export default function CyberCoSAvatar({ state, speaking }) {
return (
- <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]">
+ <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6] cursor-grab active:cursor-grabbing touch-none" title="Drag to rotate">
<Canvas
camera={{ position: [0, 0, 3.5], fov: 45 }}
style={{ background: 'transparent' }}
diff --git a/client/src/components/cos/EsotericCoSAvatar.jsx b/client/src/components/cos/EsotericCoSAvatar.jsx
index 172960a786..fc1f9c1358 100644
--- a/client/src/components/cos/EsotericCoSAvatar.jsx
+++ b/client/src/components/cos/EsotericCoSAvatar.jsx
@@ -1,6 +1,6 @@
import { useRef, useMemo } from 'react';
import { Canvas, useFrame } from '@react-three/fiber';
-import { Float, MeshDistortMaterial, Sparkles, Stars } from '@react-three/drei';
+import { Float, MeshDistortMaterial, OrbitControls, Sparkles, Stars } from '@react-three/drei';
import * as THREE from 'three';
import { AGENT_STATES } from './constants';
@@ -192,13 +192,22 @@ function Scene({ state, speaking }) {
{/* Background stars for depth */}
<Stars radius={100} depth={50} count={1000} factor={4} saturation={0} fade speed={1} />
+
+ <OrbitControls
+ enablePan={false}
+ enableZoom={false}
+ enableDamping
+ dampingFactor={0.08}
+ rotateSpeed={0.6}
+ makeDefault
+ />
</>
);
}
export default function EsotericCoSAvatar({ state, speaking }) {
return (
- <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]">
+ <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6] cursor-grab active:cursor-grabbing touch-none" title="Drag to rotate">
<Canvas
camera={{ position: [0, 0, 5], fov: 45 }}
style={{ background: 'transparent' }}
diff --git a/client/src/components/cos/MuseCoSAvatar.jsx b/client/src/components/cos/MuseCoSAvatar.jsx
index 66f4c0e968..8c8a93bccf 100644
--- a/client/src/components/cos/MuseCoSAvatar.jsx
+++ b/client/src/components/cos/MuseCoSAvatar.jsx
@@ -1,6 +1,6 @@
import { useRef, useMemo, useEffect, useState, Suspense } from 'react';
import { Canvas, useFrame } from '@react-three/fiber';
-import { useGLTF, Sparkles } from '@react-three/drei';
+import { useGLTF, OrbitControls, Sparkles } from '@react-three/drei';
import * as THREE from 'three';
import { AGENT_STATES } from './constants';
@@ -136,6 +136,15 @@ function Scene({ state, speaking }) {
<GLBHead color={color} state={state} speaking={speaking} />
<StateEffects color={color} state={state} />
<GroundGlow color={color} />
+
+ <OrbitControls
+ enablePan={false}
+ enableZoom={false}
+ enableDamping
+ dampingFactor={0.08}
+ rotateSpeed={0.6}
+ makeDefault
+ />
</>
);
}
@@ -181,7 +190,7 @@ export default function MuseCoSAvatar({ state, speaking }) {
if (!modelPresent) return <MissingModelHint />;
return (
- <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]">
+ <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6] cursor-grab active:cursor-grabbing touch-none" title="Drag to rotate">
<Canvas
camera={{ position: [0, 0, 3.3], fov: 45 }}
style={{ background: 'transparent' }}
diff --git a/client/src/components/cos/NexusCoSAvatar.jsx b/client/src/components/cos/NexusCoSAvatar.jsx
index c441c73640..5db1fc5fe1 100644
--- a/client/src/components/cos/NexusCoSAvatar.jsx
+++ b/client/src/components/cos/NexusCoSAvatar.jsx
@@ -1,6 +1,6 @@
import { useRef, useMemo } from 'react';
import { Canvas, useFrame } from '@react-three/fiber';
-import { Float, MeshDistortMaterial, Sparkles } from '@react-three/drei';
+import { Float, MeshDistortMaterial, OrbitControls, Sparkles } from '@react-three/drei';
import * as THREE from 'three';
import { AGENT_STATES } from './constants';
@@ -358,13 +358,22 @@ function Scene({ state, speaking }) {
speed={sparkleSpeed}
color={color}
/>
+
+ <OrbitControls
+ enablePan={false}
+ enableZoom={false}
+ enableDamping
+ dampingFactor={0.08}
+ rotateSpeed={0.6}
+ makeDefault
+ />
</>
);
}
export default function NexusCoSAvatar({ state, speaking }) {
return (
- <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]">
+ <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6] cursor-grab active:cursor-grabbing touch-none" title="Drag to rotate">
<Canvas
camera={{ position: [0, 0.2, 3.5], fov: 45 }}
style={{ background: 'transparent' }}
diff --git a/client/src/components/cos/SigilCoSAvatar.jsx b/client/src/components/cos/SigilCoSAvatar.jsx
index a18a75f78a..c5c3b76411 100644
--- a/client/src/components/cos/SigilCoSAvatar.jsx
+++ b/client/src/components/cos/SigilCoSAvatar.jsx
@@ -1,6 +1,6 @@
import { useMemo, useRef } from 'react';
import { Canvas, useFrame } from '@react-three/fiber';
-import { Float, MeshDistortMaterial, Sparkles } from '@react-three/drei';
+import { Float, MeshDistortMaterial, OrbitControls, Sparkles } from '@react-three/drei';
import * as THREE from 'three';
import { AGENT_STATES } from './constants';
@@ -273,13 +273,22 @@ function Scene({ state, speaking }) {
speed={sparkleSpeed}
color={color}
/>
+
+ <OrbitControls
+ enablePan={false}
+ enableZoom={false}
+ enableDamping
+ dampingFactor={0.08}
+ rotateSpeed={0.6}
+ makeDefault
+ />
</>
);
}
export default function SigilCoSAvatar({ state, speaking }) {
return (
- <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6]">
+ <div className="relative w-full max-w-[8rem] lg:max-w-[12rem] aspect-[5/6] cursor-grab active:cursor-grabbing touch-none" title="Drag to rotate">
<Canvas
camera={{ position: [0, 0.1, 3.7], fov: 45 }}
style={{ background: 'transparent' }}