Skip to content

feat(ui): port control room to configurable project root with cutover - #11815

Closed
blackmacfaint-ai wants to merge 22 commits into
cheaper-inference:release/v3.8.51from
blackmacfaint-ai:chore/b-drive-ui-migration
Closed

blackmacfaint-ai wants to merge 22 commits into
cheaper-inference:release/v3.8.51from
blackmacfaint-ai:chore/b-drive-ui-migration

Conversation

@blackmacfaint-ai

Copy link
Copy Markdown

Ziel

Den produktiven OmniRoute Control Room von fest verdrahteten C:\-Pfaden auf einen konfigurierbaren Projekt-Root (OMNIROUTE_ROOT) umstellen und den Betrieb auf B:\OmniRoute\voice-agents überführen — mit Backup, reversiblem Cutover und reproduzierbarer Testumgebung.

Änderungen

  • Portabilität: docker-compose.ui.yml, ui/run-ui.cmd, ui/tests/run_ui_test.cmd, ui/main.py, ui/tests/control_room_test.py lösen Pfade über OMNIROUTE_ROOT bzw. relativ zur Skriptdatei auf; keine erforderlichen C:-Pfade mehr.
  • Preflight-Checker: scripts/verify_b_drive_migration.py (verify_tree, compare_files, CLI) als deterministisches Cutover-Gate.
  • Runbook: docs/superpowers/runbooks/b-drive-ui-cutover.md — Backup, Build, Swap, Verifikation, Rollback (inkl. Durchführungsprotokoll).
  • Test-Dependencies: requirements-ui-test.txt (playwright==1.62.0), Runtime-Manifest unverändert.
  • Health-Fix: orca/queue.py WAL→DELETE-Journal-Fallback + abgesicherte queue.counts() in /health — behebt den /health-500, der den Container auf Docker-Desktop-Bind-Mounts unhealthy hielt.
  • Support-Dateien: untracked orca-Module (kanban/projects/scheduler/notify) und Dependency-Manifeste (pyproject.toml, requirements-ui.txt, uv.lock) als Arbeitsstand übernommen.

Verifikation

  • Offline-Regression: 39 passed, 1 deselected (Live-UI-Test); fokussierte Migrations-/Journal-Suite: 10 passed.
  • Trockenlauf auf 20139 mit B:-Mounts: Container healthy, /health + /api/auth/ok 200, Board unverändert.
  • Produktions-Cutover durchgeführt: Container healthy (RestartCount 0), Mounts B:\OmniRoute\voice-agents\data + ...\ui\static, board.json byteidentisch zum Backup.
  • UI-Suite gegen Produktion: 30/31 — einziger Fehler: fehlender UI_ACCESS_TOKEN in .env am B:-Arbeitsstand (Secrets werden nie in Git/Images kopiert; Bereitstellung separat).

Hinweise

  • C:-Baum unangetastet → Rollback jederzeit über das Runbook möglich.
  • Keine Secrets committet; .dockerignore schließt sie aus.

diegosouzapw and others added 15 commits August 23, 2026 15:32
Introduce the first responsive OmniRoute Control Room with live agent status, trace inspection, voice/text command handling, device presence, privacy controls, and WCAG-focused keyboard and screen-reader support. Document the AI OS architecture for PC, Android, coaching, capability policies, and money-maker orchestration.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Replace the placeholder navigation with nine real views: devices with
capability matrix and agent heartbeats, jobs with trace table and detail
drawer, kanban memory board, artifact registry, ledger summary, project
portfolio, approval gates and settings. Token-protected endpoints degrade
to an explicit preview hint without a token.
Add a live agent network panel to the orchestra view: command source,
copper orchestrator hub, bus rail with in-flight jobs and agent diamond
nodes fed by real /agents heartbeats and /orca/status. Nodes open agent
and job trace drawers; responsive 2x2 grid on mobile.
Add a 44-check Playwright suite covering all nine views, canvas agent
and job drawers, job filters, approvals, settings, keyboard a11y and
the token-protected live-data path. An E2E job trigger creates a real
orca job, verifies it in trace, canvas and drawer, then cleans it up.
pytest wrapper skips when the server is down; run_ui_test.cmd starts
its own server via with_server.py for CI-style runs.
The approval inbox now reflects the real kanban todo column with a
token set: approve moves the card to done, reject to archive, via the
existing /kanban/{id}/move endpoint. Without a token the demo fallback
stays. Adds a postJson helper and extends the regression suite with
five checks covering create, visibility, approve, column change and
cleanup (49/49 green).
Promote the orchestration canvas to its own navigation view with a
larger network graph (six bus jobs, bigger diamonds, status legend)
while hiding the dashboard canvas panel outside the view. Add PWA
capabilities: web manifest with generated copper-diamond icons,
service worker with offline shell fallback, meta tags and root
manifest/sw routes. Regression suite grows to 60 checks covering the
canvas view, PWA manifest, service worker registration, offline cache
and icon availability.
Desktop-Shell fuer den Orchestra Control Room: eigenstaendiges
Electron-Projekt (voice-agents/desktop/) mit automatischem
UI-Server-Start auf Port 20129, Single-Instance-Lock, Tray-Icon,
externem Link-Handling und Basalt-Dark-Fenster. Start ueber
run-desktop.cmd; Installer via electron-builder (NSIS/portable).
findProjectRoot() tries OMNIROUTE_UI_ROOT, the known project path, then
the relative fallback, so the autostart works from the app.asar install
location instead of failing with ENOENT. Also stop electron-builder from
climbing to C:\OmniRoute's workspaces (npmRebuild off, empty workspaces).

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Add a deny->archive regression section mirroring the approve->done
checks, with a shared _column_of() helper for the board-state lookup.
Replace the post-reload networkidle wait in the e2e job test, which was
flaky because the UI polls every 10s and the service worker keeps
requests open, with domcontentloaded plus a main-content selector wait.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Port the control room 1:1 to the ArcRift dashboard design with a live
force-directed knowledge graph (LPA communities, degree-scaled nodes,
zoom/pan), a sidebar with projects/node types/system health, floating
facts and chat panels, global search and settings. A new /memory
endpoint builds the graph from kanban, skills, jobs and artifacts and
feeds node-detail panels, pipeline handoff edges and per-type actions
(move card, open job trace). Harden live data: exclude /memory from
the service worker cache, send no-store headers on all dynamic GETs
and kill orphaned servers on the CI port before each test run.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Add the verified YouTube Shorts upload pipeline: orca/youtube.py (resumable
upload via refresh token from .env or client_secrets.json fallback, --tags
CLI flag for LLM-generated metadata), an automated consent flow in
scripts/youtube_oauth_setup.py, a step-by-step setup guide and a gitignore
entry for client_secrets*. Uploads were verified end-to-end against the
main channel (unlisted).

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Add persistent job events, deterministic routing, authenticated command/SSE flow, and health-aware stack startup with Control Room coverage.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
- claim_next_queued: atomic SQLite claim with job.started in same commit
- queue: persist empty dict results as JSON instead of NULL
- api: require token on /orca/status and /orca/jobs/{id}, report both
  queued and pending counts
- ui: parse LF/CRLF SSE frames and reconnect up to 3 times with
  Last-Event-ID cursor
- test runner: use System32 timeout.exe to avoid PATH clash

Adds ui/tests/test_orca_adversarial.py with 9 regression tests.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
- Add JWT auth endpoints (/api/auth/login, /register, /me, /ok)
- Create auth.py module with token generation and user management
- Add accessibility labels for search inputs and canvas
- Add aria-live regions for dynamic content
- Add keyboard navigation for context menu
- Add error identification for form validation

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Run the Control Room from B:\OmniRoute\voice-agents instead of hardcoded
C: paths: Compose, native and test launchers resolve OMNIROUTE_ROOT,
runtime and browser-test paths derive from the project root, and a
reversible cutover runbook documents backup, build, swap and rollback.
Adds a migration preflight checker, test-only Playwright requirements
(playwright==1.62.0) and a SQLite WAL-to-DELETE journal fallback that
fixes the /health 500 which left the container unhealthy on Docker
Desktop bind mounts.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Sebastian and others added 7 commits August 27, 2026 19:20
Resolve the .gitignore conflict by taking the release branch version,
which already contains our local ignore sections.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
The release branch .gitignore does not include client_secrets*, so the
merged version dropped our Google OAuth secret guard. Re-add it to keep
client secrets out of commits.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
The release branch .gitignore dropped our rule for voice-agents/data/,
which holds boards, job journals and media. Re-add it so runtime data
cannot be staged accidentally.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
- mount host skills into the image and route LLM calls via
  host.docker.internal so the container worker reaches the gateway
- send Authorization only when an API key is configured (empty Bearer
  header was rejected by httpx)
- enforce the migration preflight before the UI test suite and in the
  cutover runbook (abort on failure)
- exclude .env* and client_secrets.json from the docker build context

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Folds the duplicated /chat/completions calls from ui/main.py (ask_llm,
describe_image fallback) and orca/skills.py (_llm_call) into one
orca/llm.chat(messages, *, model, timeout, base_url, api_key) seam with a
single bearer guard and response parse. skills still uses a sync asyncio.run
bridge because it runs in a worker executor thread. Adds two contract tests
for payload, bearer-on-key, empty-key and timeout.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Moves the /memory node/link/triple/session/chat builder out of the HTTP route
into a pure orca.memory_graph.build_graph(cards, job_list, skill_defs,
artifacts, agent_file, now) seam — no I/O, time passed in for determinism.
Verified behavior-identical against the live container's /memory output
(nodes/links/triples 94/136/128 == container), main.py -156 net, +1 test.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Documents the shared architecture vocabulary (ORCA, Kanban, Job-Queue, Control
Room, Ledger) plus the orca-module seam map and remaining open seams, as the
basis for codebase-design / improve-codebase-architecture work.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@blackmacfaint-ai

Copy link
Copy Markdown
Author

Review-Zusammenfassung — 3 Architektur-Commits (Head d5464d6f9)

Ergänzend zum Cutover-Port (konfigurierbarer Projekt-Root, B:-Umstellung) enthält dieser PR drei Architektur-Commits aus der Initiative „Domain-Tiefe". Alle Checks grün (semgrep success, Mergify neutral), mergebar gegen release/v3.8.51.

1. b09e5c331 — refactor(orchestra): unify lm calls behind orca/llm chat seam

  • Was: Neue Naht orca/llm.chat(messages, *, model, timeout, base_url, api_key) — vereint drei duplizierte /chat/completions-Calls (ui/main.py:ask_llm, describe_image-Fallback, orca/skills.py:_llm_call) zu einem HTTP-Transport mit einem Bearer-Guard (nur bei gesetztem Key), einem Response-Parse, einer Timeout-Politik.
  • Warum: Die drei Pfade hatten je eigenen Guard/Payload — derselbe Leerkey-Defekt (Illegal header value b'Bearer ') musste doppelt gefixt werden. Die Naht entfernt die Duplikation (+130/−34; skills.py verliert seinen httpx-Import).
  • Verhalten: _llm_call bleibt sync via asyncio.run-Brücke (läuft im Worker-Executor-Thread); Timeouts je Konsument erhalten (120/240s).
  • Tests: 2 Vertrags-Tests (Payload + Bearer bei Key, Leerkey ohne Header, Timeout). Offline-Suite 44→45 passed.

2. f87917747 — refactor(orchestra): extract memory graph build into orca/memory_graph

  • Was: Der ~180-Zeilen-Graph-Builder aus der /memory-Route in eine pure Funktion orca/memory_graph.build_graph(cards, job_list, skill_defs, artifacts, agent_file, now) -> dict extrahiert; die Route ist jetzt ein dünner Adapter (Daten laden → build_graph → no_cache).
  • Warum: Pure Transformation (5 Quellen → Nodes/Links/Triples/Sessions/Chat) war inline im HTTP-Layer und nur über HTTP testbar. main.py 897→746 Zeilen (−151 netto).
  • Verhalten belegt: Gegen die Live-Container-/memory-Ausgabe abgeglichen — nodes/links/triples/sessions/chat 100% identisch (94/136/128/28/50). Kein Verhaltensdrift.
  • Tests: 1 deterministischer build_graph-Test (Task/Job/Relationen/Chat). Offline 45 passed.

3. d5464d6f9 — docs(orchestra): add domain glossary CONTEXT.md

  • Was: Domain-Glossar (ORCA, Kanban, Job-Queue, Control Room, Ledger) + Modul-Landkarte mit Seams + offene Architektur-Fragen. Basis für künftige codebase-design-/Architektur-Arbeit. Reine Doku, 55 Zeilen.

Validierungs-Bilanz (gemeinsam)

  • Offline-Regression nach beiden Refactors: 45 passed; py_compile + Import-Smoke grün; Deletion-first-Pass (tote headers-Var, überflüssiger __future__-Import, Test-Boilerplate entfernt).
  • Live-Beweis im Produktions-Container: Smoketest-Job de6e71e9ae11 via POST /orca/jobs → done mit echter LLM-Antwort durch die neue llm.chat()-Naht; Queue intakt (29 done).
  • Keine funktionalen Änderungen außerhalb der refaktorierten Pfade — Rest des PRs (Cutover, Queue-Fixes) unverändert.

Für den Owner

  • Merge-bereit: mergeable=true, alle Checks grün. Nichts Blockierendes offen.
  • Risiko: gering — reine Refactors mit Verhaltensnachweis; die Live-Job-Queue wurde nach dem Umbau durchlaufen.
  • Hinweis (nicht Teil dieses PRs): eine spätere Compose-Änderung (Artifact-Registry-Mount) liegt noch uncommitted im Worktree und würde den PR ggf. erweitern.

@diegosouzapw diegosouzapw added the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Aug 30, 2026
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Obrigado pela contribuição, @blackmacfaint-ai — este PR traz um sistema bem completo (control room/orchestra com fila de jobs, SSE, upload para YouTube, canvas de orquestração, kanban de aprovação, PWA + wrapper Electron), mas ele vive inteiramente em voice-agents/ — uma stack Python (pytest, uv.lock) desacoplada da arquitetura Node/TypeScript do OmniRoute e sem correspondência em nenhuma pasta documentada no AGENTS.md.

Adiando para deferred-v3.8.52 para avaliação dedicada: a ideia é entender se vale a pena portar o conceito (reescrito em TypeScript, integrado à arquitetura existente do dashboard/MCP) em vez de mergear a stack Python como está. Se seguirmos com um port, o crédito pela concepção e implementação original é seu — vamos referenciar este PR explicitamente no trabalho que sair dele.

Nenhuma ação seria necessária de sua parte agora; se quiser adiantar contexto sobre a arquitetura do voice-agents/orchestra enquanto isso, é bem-vindo.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

@blackmacfaint-ai — terminei a avaliação de viabilidade. Veredito: não vamos portar a stack completa.

Por quê: voice-agents/ é um app Python (FastAPI) paralelo e bem construído — fila de jobs, kanban, registry de skills próprio, roteador de comandos, scheduler, grafo de memória, aprovação humana multi-canal, upload automático pro YouTube, wake-word de voz, PWA + Electron. Mas quase tudo já existe no OmniRoute com mais maturidade e desenho multi-tenant/multi-provider: fila de jobs + aprovação já é o Cloud Agent (Devin/Jules com plan-approval gates), skills via LLM já é o Omni Skills framework, grafo de memória já é o Memory system (FTS5+Qdrant). O resto (kanban, YouTube, wake-word, PWA/Electron próprios) não tem gancho na arquitetura Next.js/dashboard existente do projeto. Portar duplicaria ~16 mil linhas de um segundo produto dentro do repositório de um proxy de LLM — desalinhado com a proposta do OmniRoute.

O que aproveitamos: a ideia visual do "Orchestration Canvas" (grafo ao vivo Orchestrator→Agent→Tool com estados idle/running/waiting/error, clique abre detalhe com trace/custo/duração) é um conceito de design real que o dashboard não tem hoje — vamos evoluir isso como uma view nova sobre o Cloud Agent/A2A já existentes, com crédito ao design original desta PR.

Fechando por escopo — obrigado pela ideia e pelo trabalho, o conceito do canvas de orquestração segue vivo.

diegosouzapw added a commit that referenced this pull request Sep 1, 2026
… Agents/Routing/Overview tabs (part 2/2) (#12261)

UI completa do Orchestration Canvas sobre o modelo da parte 1: página /dashboard/orchestration com abas em URL (Agents=grafo vivo via FlowCanvas, Routing=ComboLiveStudio intocado, Overview=contadores+kanban com totais reais sob cap), drawer de detalhe com approve/cancel (unwrap por fonte verificado contra as rotas reais, erros client-safe, prUrl https-only), i18n com traduções REAIS em 43 locales, entrada no sidebar. Ciclo SDD: 9 tasks TDD com review por task (Task 15 com fix round: Critical A2A unwrap + rewrite de lint + guard XSS), review final whole-branch (Ready to merge, 0 Critical/Important, refactor de complexity provado behavior-preserving), 3 fixes de CI validados RED→GREEN. CI: tudo verde. Crédito do conceito visual: design da PR #11815.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… Agents/Routing/Overview tabs (part 2/2) (cheaper-inference#12261)

UI completa do Orchestration Canvas sobre o modelo da parte 1: página /dashboard/orchestration com abas em URL (Agents=grafo vivo via FlowCanvas, Routing=ComboLiveStudio intocado, Overview=contadores+kanban com totais reais sob cap), drawer de detalhe com approve/cancel (unwrap por fonte verificado contra as rotas reais, erros client-safe, prUrl https-only), i18n com traduções REAIS em 43 locales, entrada no sidebar. Ciclo SDD: 9 tasks TDD com review por task (Task 15 com fix round: Critical A2A unwrap + rewrite de lint + guard XSS), review final whole-branch (Ready to merge, 0 Critical/Important, refactor de complexity provado behavior-preserving), 3 fixes de CI validados RED→GREEN. CI: tudo verde. Crédito do conceito visual: design da PR cheaper-inference#11815.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants