feat: Cameleer3 design system — complete standalone implementation
Wires up all 5 routes in App.tsx (/, /metrics, /routes/:id, /exchanges/:id, /agents). Fixes pre-existing build errors: vite.config.ts now uses vitest/config defineConfig so the test property is typed correctly; removes unused imports in Collapsible.tsx and _chart-utils.ts; removes unused parameter in metrics.ts generateTimeSeries. Build: tsc -b && vite build passes clean. Test suite: 72/72 pass. Bundle: 334kB JS (101kB gzip) + 54kB CSS (10kB gzip). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
import { Routes, Route } from 'react-router-dom'
|
||||
import { Dashboard } from './pages/Dashboard/Dashboard'
|
||||
import { Metrics } from './pages/Metrics/Metrics'
|
||||
import { RouteDetail } from './pages/RouteDetail/RouteDetail'
|
||||
import { ExchangeDetail } from './pages/ExchangeDetail/ExchangeDetail'
|
||||
import { AgentHealth } from './pages/AgentHealth/AgentHealth'
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/" element={<Dashboard />} />
|
||||
<Route path="/metrics" element={<Metrics />} />
|
||||
<Route path="/routes/:id" element={<RouteDetail />} />
|
||||
<Route path="/exchanges/:id" element={<ExchangeDetail />} />
|
||||
<Route path="/agents" element={<AgentHealth />} />
|
||||
</Routes>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export function formatAxisLabel(val: number): string {
|
||||
return val.toFixed(1)
|
||||
}
|
||||
|
||||
export function formatXLabel(val: number | Date, totalPoints: number): string {
|
||||
export function formatXLabel(val: number | Date, _totalPoints: number): string {
|
||||
if (val instanceof Date || (typeof val === 'number' && val > 1e10)) {
|
||||
const d = val instanceof Date ? val : new Date(val)
|
||||
return d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
import { useState, useRef } from 'react'
|
||||
import styles from './Collapsible.module.css'
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ function generateTimeSeries(
|
||||
baseValue: number,
|
||||
variance: number,
|
||||
points: number,
|
||||
startHour = 6,
|
||||
): TimeSeriesPoint[] {
|
||||
const result: TimeSeriesPoint[] = []
|
||||
const now = new Date('2026-03-18T09:15:00')
|
||||
|
||||
Reference in New Issue
Block a user