User dogfood found many bugs. This wave addresses: - nginx.conf: proxy_next_upstream + retries on 502/503/504, explicit proxy_ssl_name, 8s connect timeout. The DNS-resolver race that caused the Studio 'apply_patch 502' is now eaten by nginx retry. - src/lib/wizardApi.ts: applyBatch retries 3x on 502/503/504 with exponential backoff. Even if nginx misses the retry the client takes a second shot. - src/lib/chatApi.ts: listThreads now THROWS when ensureInbox fails instead of silently returning []. Chat scene shows the error + retry button instead of an empty 'No conversations' state that hides the real failure. - src/scenes/Chat.tsx: explicit error banner with 'Try again' button. - src/lib/llmClient.ts: rewritten to call /api/v1/llm/generate (real demo gateway, same as dev.flow-master.ai uses). Removed the local /internal/canvas-llm/chat sidecar entirely. - src/scenes/Agent.tsx: removed the LLM-state probe + 'off by default' OFF pill. LLM is now part of the assistant unconditionally. - src/lib/flowCuration.ts: dropped the STARTABLE_FLOW_KEYS allowlist gate in curatedPublishedFlows so list_processes now returns every published business process, not just pr_to_po_def. - src/state/store.ts + tests: DataMode is now 'live' only. Removed the SNAPSHOT branch; live is the only mode. Renamed the failure toast accordingly. Initial scene is 'mission' not 'landing'. - src/scenes/Login.tsx + test: post-login navigates to 'mission' instead of the empty landing splash. - src/scenes/Settings.tsx + src/components/CommandBar.tsx: removed every snapshot/setMode reference. Settings shows 'EA2 · live always'. Command palette no longer offers a snapshot switch. - src/App.tsx: topbar redesign. Removed Settings + Home tabs (now in user menu), removed standalone Light/Dark + Console buttons (collapsed into user menu), removed the SNAPSHOT/LIVE mode pill + topbar refresh. New UserMenu component shows a 2-char avatar circle; clicking opens a dropdown with Home / Settings / Refresh data / theme toggle / API console toggle. Topbar now has: brand · tabs · cmd-k · notification bell · avatar. - src/index.css: user-menu styles + chat-err styles + dark variants. 30/30 vitest pass. tsc + vite build green.
FlowMaster — Canvas
Live at https://canvas.flow-master.ai · operations cockpit for every process the company runs.
Canvas is the FlowMaster operator surface. Industrial-blueprint doctrine: paper canvas, navy frame, amber accent, 1px hairlines, square edges, monospace operational density. People, Finance, Procurement, and IT in one frame.
What it is
- React 19 single-page app (Vite + ReactFlow + cmdk + framer-motion + zustand + dagre + leaflet).
- Connected directly to EA2 in the browser via the API client at
src/lib/api.ts. EA2 is the runtime source of truth. - Microsoft SSO is the primary sign-in path. The login screen probes
/api/v1/auth/microsoft/loginon mount and only enables the SSO button when the redirect is wired; the dead-button state is honest ("not configured" / "not wired") instead of silently failing. Developer dev-login remains as a fallback for the demo lane.
Scenes
- Landing — entry surface with persona switcher and recent processes.
- Mission Control — live work-items + reactflow process graph + inspector.
- Approvals — work waiting on the signed-in operator.
- Run History — recent runtime transactions and outcomes.
- Process Studio (Wizard) — the Process Creation Wizard, ported from
dev.flow-master.ai. Intake → analyze → generate → validate → publish.
Writes to EA2 at every step via
src/lib/wizardApi.ts. - Hubs (HR / Finance / Procurement / IT) — department lenses over the EA2 catalog. Each hub focuses Mission Control, surfaces hub-specific KPIs, and exposes the start-process actions the hub head can take.
- Geo Attendance — leaflet map (OpenStreetMap tiles) showing per-site
attendance status from
src/lib/attendanceApi.ts. - Chat — internal employee ↔ manager messaging (
src/lib/chatApi.ts), threaded, text-only. Replaces booting Teams for "what laptop?" type questions. - Command Assistant (Agent) — chat surface with deterministic tools
(
src/lib/agentTools.ts) for navigation, process start, chat send, retain / recall against per-tenant memory. When the LLM proxy (llm-proxy/) is configured the assistant also synthesises fluent natural-language replies; when it isn't, the deterministic path still works. - Documents — data shapes per process.
- Explainer — "What is FlowMaster?" recalled from the FlowMaster explainer and rendered in-product.
- Settings — identity, theme, polling cadence, console default.
- Login / SSO callback.
Three view-as personas
Bundled in src/data/personas.ts. Switching persona re-signs in under
the persona's email so the operator UI reflects that seat.
| Persona | Title | Default hub |
|---|---|---|
| Mariana | Chief Executive | Finance |
| Aisha | Head of People (HR) | HR |
| Rohan | Head of IT | IT |
Agent + per-tenant memory
src/lib/agentMemory.ts keeps three fact kinds (world / experience /
opinion) keyed by tenant + user. The agent calls deterministic tools
defined in src/lib/agentTools.ts. When OPENAI_API_KEY or
ANTHROPIC_API_KEY is set on the llm-proxy/ sidecar, the agent layers
LLM responses on top of the tool output; otherwise it falls back to the
deterministic display strings.
The proxy lives in llm-proxy/main.py (FastAPI, no streaming, no tool
calls, no images). The shape mirrors @earendil-works/pi-ai's
normalized completions so a forked Pi coding agent can drop in later
without changing the browser contract.
Run, test, build
pnpm install
# dev (with backend proxy for live mode)
pnpm dev # → http://127.0.0.1:5173
# tests
pnpm test # vitest
# build
pnpm build # tsc + vite
Deploy
Deployment is tracked in FM06/flowmaster-ops, overlay
manifests/overlays/demo/. nginx in the image reverse-proxies /api/*
to the EA2 backend so the SPA is same-origin (no CORS).
pnpm build
docker buildx build --platform linux/amd64 \
-f Dockerfile.runtime \
-t gitea.flow-master.ai/shad/canvas-frontend:sha-<git> \
--load .
docker push gitea.flow-master.ai/shad/canvas-frontend:sha-<git>
# Then bump the image pin in manifests/overlays/demo/mc-deployment.yaml.
Source
gitea.flow-master.ai/shad/canvas-frontend is the authoritative source
for canvas.flow-master.ai. The earlier flowmaster-mission-control-demo
repository is retained for history but no longer deployed.