34f3c2888f
Nine screens against orchestra-ui-spec.md and the accepted mockups, on the ethos design system: signal violet #8F7AE5, the routing fork motif, the 64px rail and 56px top bar, mono for every machine value and sans for every human one. Each screen was built by its own agent against a fixed foundation, so the shell, tokens and primitives have one author and the screens cannot drift into nine dialects. Real data only. Where no endpoint exists the screen says which one it needs instead of inventing a value. That is most of what was learned here: Steer / Correct is disabled because nothing records a human decision from the web, take-control is disabled because nothing forwards keystrokes to a pane, context occupancy is missing from three screens, and projects can show no repo, remote, quality gate or verification policy because those live only in config.jsonc. Three bugs the render caught that no computed value would have: The previous stylesheet fought every shared class name and leaked properties the new rules never mention, which is how position:fixed survived on .topbar. It is now scoped under .legacy and applies only to the login route, which also stops its green accent and its backdrop-filter from reaching the console. Go marshals a zero time.Time as "0001-01-01T00:00:00Z" and omitempty does not omit a struct, so absent timestamps arrived populated-looking and rendered as "739855d ago". Stripped once at the API boundary every screen reads through, with a test. Long machine ids overflowed their cards and painted under the next one. Verified by rendering: chromium screenshots of the dashboard, tasks, task detail, terminal, workers and review at 1440px, and the dashboard at 390px. Geist is still not on disk, so both stacks fall back to the system faces. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVbaKucEYBjMqVeUgJUsc1
61 lines
2.0 KiB
TypeScript
61 lines
2.0 KiB
TypeScript
import { Route, Routes } from 'react-router-dom'
|
|
import { useQuery } from '@tanstack/react-query'
|
|
import { Shell } from './shell/Shell'
|
|
import { Dashboard } from './screens/Dashboard'
|
|
import { Tasks } from './screens/Tasks'
|
|
import { TaskDetail } from './screens/TaskDetail'
|
|
import { Terminal } from './screens/Terminal'
|
|
import { Decisions } from './screens/Decisions'
|
|
import { Workers } from './screens/Workers'
|
|
import { Projects } from './screens/Projects'
|
|
import { Review } from './screens/Review'
|
|
import { Settings } from './screens/Settings'
|
|
import { api } from './api/client'
|
|
import type { Account } from './api/types'
|
|
|
|
/** The operator console. Auth stays in main.tsx; this is only what an
|
|
* authenticated operator sees. */
|
|
export function Console({
|
|
account,
|
|
onLogout,
|
|
onCredentialsChanged,
|
|
}: {
|
|
account: Account
|
|
onLogout: () => void
|
|
onCredentialsChanged: (username: string) => void
|
|
}) {
|
|
const overview = useQuery({
|
|
queryKey: ['overview'],
|
|
queryFn: api.overview,
|
|
refetchInterval: 5000,
|
|
})
|
|
|
|
return (
|
|
<Routes>
|
|
{/* No revision in the top bar yet. The overview carries worker builds,
|
|
not the coordinator's, and labelling a worker build as the
|
|
coordinator's would be a lie in the one place an operator trusts. */}
|
|
<Route element={<Shell live={!overview.isError} />}>
|
|
<Route index element={<Dashboard />} />
|
|
<Route path="tasks" element={<Tasks />} />
|
|
<Route path="tasks/:id" element={<TaskDetail />} />
|
|
<Route path="tasks/:id/terminal" element={<Terminal />} />
|
|
<Route path="decisions" element={<Decisions />} />
|
|
<Route path="workers" element={<Workers />} />
|
|
<Route path="projects" element={<Projects />} />
|
|
<Route path="review" element={<Review />} />
|
|
<Route
|
|
path="settings"
|
|
element={
|
|
<Settings
|
|
account={account}
|
|
onLogout={onLogout}
|
|
onCredentialsChanged={onCredentialsChanged}
|
|
/>
|
|
}
|
|
/>
|
|
</Route>
|
|
</Routes>
|
|
)
|
|
}
|