fix(web): route Mission Control API calls through orchestrator proxy #747

Merged
jason.woltje merged 2 commits from fix/mission-control-proxy-routes into main 2026-03-08 17:00:28 +00:00
Owner

Problem

Mission Control components called /api/mission-control/*mosaic-api.woltje.com (404, wrong service). These routes live on the orchestrator service and must go through the Next.js server-side proxy.

Fix

New: Catch-all proxy at /api/orchestrator/[...path]/route.ts — forwards any method to ORCHESTRATOR_URL/<path> with ORCHESTRATOR_API_KEY injected server-side.

Updated: All Mission Control components now call /api/orchestrator/api/mission-control/* instead of /api/mission-control/*.

Components fixed: GlobalAgentRoster, AuditLogDrawer, PanelControls, KillAllDialog, BargeInInput + their tests.

## Problem Mission Control components called `/api/mission-control/*` → `mosaic-api.woltje.com` (404, wrong service). These routes live on the **orchestrator** service and must go through the Next.js server-side proxy. ## Fix **New:** Catch-all proxy at `/api/orchestrator/[...path]/route.ts` — forwards any method to `ORCHESTRATOR_URL/<path>` with `ORCHESTRATOR_API_KEY` injected server-side. **Updated:** All Mission Control components now call `/api/orchestrator/api/mission-control/*` instead of `/api/mission-control/*`. Components fixed: `GlobalAgentRoster`, `AuditLogDrawer`, `PanelControls`, `KillAllDialog`, `BargeInInput` + their tests.
jason.woltje added 1 commit 2026-03-08 16:45:44 +00:00
fix(web): route Mission Control API calls through orchestrator proxy
Some checks failed
ci/woodpecker/push/ci Pipeline failed
23036cb1dd
The Mission Control components were calling /api/mission-control/* which
routes to mosaic-api.woltje.com (the main API) — those routes don't exist
there, causing 404s.

These routes live on the orchestrator service and must go through the
Next.js server-side proxy (which injects ORCHESTRATOR_API_KEY):

Changes:
- Add catch-all proxy route at /api/orchestrator/[...path]/route.ts
  Forwards any GET/POST/PATCH/PUT/DELETE to ORCHESTRATOR_URL/<path>
  Replaces the need for per-endpoint proxy files for new routes.
- Update all Mission Control components to call
  /api/orchestrator/api/mission-control/* instead of /api/mission-control/*
- Update test expectations to match new paths
jason.woltje added 1 commit 2026-03-08 16:54:49 +00:00
fix(web): fix lint/prettier and TypeScript errors in proxy route
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
811a32eb61
- Remove unnecessary null-coalesce on request.nextUrl.search
- Fix body typing: use null instead of undefined for no-body requests
- Use conditional spread to satisfy fetch() overload types
- Auto-fix prettier formatting across all changed files
jason.woltje merged commit a6f1438f40 into main 2026-03-08 17:00:28 +00:00
Sign in to join this conversation.