feat(dashboard): GuruConnect v2 operator console (pass 1)
All checks were successful
All checks were successful
React + Vite + TypeScript SPA: scaffold, operations-terminal design system, Bearer-token auth, and the Machines view. - Design system: OKLCH-tinted dark theme (ink-slate + signal-cyan), Hanken Grotesk + JetBrains Mono, status-color language (online/offline/granted/pending/denied/not_required), motion with prefers-reduced-motion honored. - Auth: token in sessionStorage via ref (never React state), protected routes, 401 session teardown, admin-gated per-agent-key UI. - Machines view: data table (sticky header, keyboard-activated rows, skeleton loading, actionable empty/error states), non-blocking detail drawer, delete confirm, admin key management with copy-once reveal. - UI primitives: Modal (focus trap + inert + portal + dialogStack), Drawer, Table, Badge/StatusDot, toast, states. - Typed API client normalizing the two error-envelope shapes. Passed Code Review (no blockers), impeccable critique-and-polish, and local gates (tsc/lint/build green). Dev-only Vite proxy to :3002. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
35
dashboard/vite.config.ts
Normal file
35
dashboard/vite.config.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// Dev proxy targets the local GuruConnect (GC) server. `/api` and `/ws` are
|
||||
// forwarded to the Rust server on :3002 so `npm run dev` works against a real
|
||||
// backend without CORS gymnastics.
|
||||
//
|
||||
// `base` is "./" so the built assets reference relative paths — production
|
||||
// serving copies `dist/` into the server's static dir and a catch-all route
|
||||
// serves index.html. Wiring that catch-all in the Rust server is a DEPLOY
|
||||
// concern (see README), not done in this pass.
|
||||
const GC_SERVER = "http://localhost:3002";
|
||||
|
||||
export default defineConfig({
|
||||
base: "./",
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5273,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: GC_SERVER,
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/ws": {
|
||||
target: GC_SERVER,
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: "dist",
|
||||
sourcemap: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user