# Next Session: Phone Dashboard — Satyr Creature + Vite Proxy Fix

**Use this prompt to continue from session 400**

---

## What Was Done (Session 400)

Visually verified the Aquarium dashboard via Chrome during a live phone call. Per-turn creatures work. Two issues found and one fixed live.

### Verified Working (Live Call, ~10 turns)
1. **Per-turn dashboard events**: serpent (STT), minotaur (LLM), leviathan (TTS) all light up during phone call — confirmed visually
2. **Anti-Alzheimer**: "Restored 12 messages from previous session" + **"Hey, I'm back! What's on your mind?"** greeting played
3. **Task extraction**: `phone-tasks-20260404-050501-48cbd4` enqueued and dequeued (visible in dashboard console)
4. **CE transcript sync**: Phone transcripts searchable via BM25 ("Bluetooth earphone", "keep counting to me", "weather in Bangalore")
5. **TITAN + BEAST stats panel**: Working after localStorage fix (GPU, temp, RAM all showing)
6. **Context bar**: Shows "No session" (correct — phone uses Panda, not WebRTC on Titan)

### Fixed Live (localStorage)
- **"Annie offline" + "Stats unavailable"** — root cause: `getAnnieBase()` in `src/auth/token.ts:28-29` defaults to `http://localhost:7860` but Annie voice runs on Titan `192.168.68.52:7860`. Fixed via:
  ```js
  localStorage.setItem('aquarium-v4-annie-base', 'http://192.168.68.52:7860')
  ```
- Memory saved: `memory/feedback_dashboard_annie_base.md`

### NOT Yet Fixed (Code Changes Needed)
1. **Satyr creature missing from dashboard** — the phone call has NO persistent visual indicator
2. **Vite proxy for Annie** — localStorage fix works but resets on new browsers

---

## Task 1: Add Satyr to Dashboard (3-4 files)

Satyr is the phone-call lifecycle creature. It emits `start` when call begins and `complete` when call ends. The renderer (`renderer.ts:75-84`) already has **sustained activation** — `start` events keep a creature lit until `complete` arrives. So once added, satyr will **stay lit for the entire phone call automatically**.

### Files to modify:

1. **`services/context-engine/dashboard/src/types.ts`** (lines 18-44)
   - Add `'satyr'` to `CreatureId` union type, in a `// Acting — Phone loop` section

2. **`services/context-engine/dashboard/src/creatures/registry.ts`**
   - Add to `ACCENTS` dict: `satyr: { r: 160, g: 82, b: 45 }` (sienna — earthy, forest creature)
   - Add to `ENTRIES` array: `{ id: 'satyr', name: 'Satyr', zone: 'acting', service: 'annie-voice', process: 'phone-loop', label: 'Phone Loop', accent: ACCENTS.satyr, isLLM: false }`
   - Add to `LAYOUT_MAP`: `'satyr': { relX: -0.52, relY: 0.28 }` (near serpent/leviathan voice cluster)

3. **`services/context-engine/dashboard/src/creatures/silhouettes.ts`**
   - Add `case 'satyr': return drawSatyr(ctx, cx, cy, r, c, glow, t);` to switch
   - Implement `drawSatyr()` function (~30-40 lines, horned head + compact body, follow pattern of existing silhouettes)

### Backend already has satyr:
- `chronicler.py:124` — `"satyr": {"zone": Zone.ACTING, "service": "annie-voice", "process": "phone-loop"}`
- `observability.py:29-56` — `"satyr": {"zone": "acting", "process": "phone-loop"}`
- `phone_loop.py:451-455` — `emit_event("satyr", "start", ...)` at call begin
- `phone_loop.py:769-773` — `emit_event("satyr", "complete", ...)` at call end

---

## Task 2: Vite Proxy for Annie Endpoints (permanent fix)

**File:** `services/context-engine/dashboard/vite.config.ts` (lines 20-25)

The existing proxy sends `/v1` to CE on `:8100`. Annie-specific endpoints need their own proxy to `:7860`:
- `/v1/context/inspect` → Annie voice context bar
- `/v1/system/stats` → TITAN/BEAST stats panel
- `/v1/workspace/*` → workspace evolution panel

Add `ANNIE_TARGET` env var alongside existing `API_TARGET`.

---

## Task 3: Live Verification (After Code Changes)

After deploying satyr fix:
1. Open dashboard, verify satyr creature visible in ACTING zone
2. Make phone call → satyr should light up on start and **stay lit for entire call**
3. Per-turn: serpent → minotaur → leviathan should flash per turn ON TOP of sustained satyr

### Cross-channel test (from session 399, still untested):
4. After call, send Telegram message referencing call content → verify Annie has context
5. During call, say "research golf courses" → hang up → check `/v1/promises` for extraction

---

## Key Architecture
- phone_loop.py (Panda) → HTTP → server.py + context-engine (Titan)
- Dashboard: Vite dev at `:5173`, proxies `/v1` to Titan:8100, SSE at `/v1/events/stream`
- Sustained activation: `renderer.ts:75-84` — `start` event keeps creature lit until `complete`
- Plan file: `/home/rajesh/.claude/plans/replicated-hugging-flamingo.md`
