{"repo": "alayra-systems-pvt-limited/alayra-nexus", "files": {"nexus-ui-plan.md": {"e17633ccf0f85776f9f0a472299bff7ff98e7813": {"t": 1785596021.6556487, "n": 46571, "h": "53d3f8cee535348e", "c": "# Alayra Nexus — Dashboard Plan (Phase 7)\n\n**Status:** LIVING DOCUMENT — this is the single source of truth for Phase 7 ordering.\n**Last reconciled:** 2026-07-14 (Session 47) · **Author:** Abbas · **Scope:** the Nexus operator dashboard.\n\n> **Why this file was rewritten.** The original (2026-07-11) plan ended with *\"Nothing in this plan has\n> been implemented\"* and numbered the phases one way; a product re-sequencing on 2026-07-12 numbered\n> them another way; and the code went a third way. Three sources drifted. This file now reconciles all\n> three and is authoritative. If a phase is not in §3, it is not scheduled.\n\nThe `kinetic-admin` app is **reference only** — a source of UX patterns — and is never modified.\n\n---\n\n## 0. THE BLOCKER: the new dashboard is not being served\n\n**`src/server.ts` serves `frontend/` (the old vanilla dashboard). `Dockerfile` copies `frontend/` into\nthe runtime image. `web/dist` is never served and never packaged.**\n\nEverything built in P7.1–P7.5 — Overview, the redesigned Nexus, model management, Analytics — is\ntherefore **invisible in every real deployment**, including the published container. It only appears\nwhen a developer runs the Vite dev server.\n\n**The cutover is blocked by a parity gap, not by laziness.** The old dashboard still owns two things\nthe new one does not:\n\n| Capability | Old `frontend/` | New `web/` |\n|---|---|---|\n| Settings (SSRF · guardrails · routing · cache · notifications · compliance · audit viewer) | ✅ working | ❌ placeholder |\n| Team keys | ✅ working | ❌ placeholder |\n| Models | ✅ own tab | ✅ *better* — folded into Nexus (P7.4b) |\n| Overview · Analytics · themes · pool/key/model editing | ❌ none | ✅ shipped |\n\nFlipping the static root today would take working configuration **away** from operators — a real\nregression. So the remaining phases are ordered to **close parity, then cut over.** The cutover is the\nmilestone that makes five phases of work real; nothing after it matters as much.\n\n---\n\n## 1. What is actually shipped (verified against git, 2026-07-14)\n\n| Phase | What landed | Commit |\n|---|---|---|\n| **P7.1** | Vite + Preact `web/` app; slate-glass tokens; **dark + light** theme; self-hosted fonts + charts (killed the CDN bug); component kit; app shell + router; 12-section IA | — |\n| **P7.2** | **Overview** landing: one `/admin/overview` aggregate, clickable stat cards, four 7-day charts, leaderboards, recent activity | — |\n| **P7.3** | **Nexus** (pools/keys/health + honest routing-rules view), **Models**, **Connect** | — |\n| **P7.4a** | Chart aliveness (per-metric colour, rich hover), Alayra logo wired, Nexus add-provider/add-key restored | `d5174af` |\n| **P7.4b** | **Models folded INTO Nexus** (tab removed); live model discovery (`fetch-models`); per-key RPM/TPM/max-users | `8f05a7f` |\n| **P7.4c** | Editable model details: capability-driven per-modality pricing (incl. realtime audio in/out) + bundled pricing catalog + auto-fill | `a102b6d` |\n| **P7.4d** | Edit provider / edit key dialogs; **Max Users enforced**; per-provider extra headers (Anthropic `anthropic-version`) | `bd12911` `4ff409b` `5c695e8` |\n| **P7.5** | **Analytics**: per-request outcome + latency + **cache-savings recording** (they were never written down), one aggregate endpoint, live Analytics page | `2d604ef` `7ca17db` `ed2c7b8` |\n\n**Sections live in `web/`:** Overview · Nexus · Connect · Analytics · Teams · Security · Caching · Logs · Settings.\n**Still placeholders:** Enterprise · Admin.\n\n---\n\n## 2. Information architecture — 12 sections\n\n**Models is gone** — folded into Nexus in P7.4b, where a pool now owns its own models, keys, limits\nand pricing. **Health was added in P7.12** (Abbas's call — server/provider health and future\nbenchmarks needed a home of their own; route `/status` because `/health` is the liveness probe).\n\nOverview · **Nexus** · Connect · Analytics · Teams · Enterprise · Security · Caching · **Health** ·\nLogs · Settings · Admin\n\n---\n\n## 3. Remaining phases — ordered by dependency, not preference\n\nThe first three phases exist to **reach parity so the cutover can happen**. Everything in them is\n\"surface a backend that is already built and tested\" — low risk, high visibility.\n\n### ~~P7.6 — Settings (sub-tabs) + Logs~~ ✅ **DONE** (`414baf5`)\nSettings is seven sub-tabs (Routing · Cache · Guardrails · Notifications · Network · Compliance ·\nAppearance), each loading and saving only what it owns; every control states its consequence. Logs is\nits own filterable, read-only section. **No backend change was needed** — every endpoint already\nexisted. Fixed two bugs found while building: the Toggle was silently dead (a `