The hives nav tab and route go, with no redirect; the roster is a card above the agents panel that starts folded and is read on the first open. The settings toggle is renamed from hide debug output to hide developer details, as it now also drops the components tab (the page still answers at /components); the stored preference keeps its key.
60 lines
2.6 KiB
TypeScript
60 lines
2.6 KiB
TypeScript
// Root shell component — routing only. Each route's content is its own
|
|
// page component under `./pages/`; this file just maps paths to them.
|
|
import { Route, Router, Switch } from "wouter-preact";
|
|
import { Shell } from "./shell/Shell.js";
|
|
import { useGuardedLocation } from "./shell/useGuardedLocation.js";
|
|
import { AgentsPage } from "./pages/agents/AgentsPage.js";
|
|
import { AgentTerminalPage } from "./pages/agents/AgentTerminalPage.js";
|
|
import { AlertsPage } from "./pages/AlertsPage.js";
|
|
import { BuildsPage } from "./pages/builds/BuildsPage.js";
|
|
import { MessagesPage } from "./pages/messages/MessagesPage.js";
|
|
import { NEW_FLOW_PATH } from "./pages/notifications/FlowDraft.js";
|
|
import { FlowEditorPage } from "./pages/notifications/FlowEditorPage.js";
|
|
import { NotificationsPage } from "./pages/notifications/NotificationsPage.js";
|
|
import { ComponentsPage } from "./pages/ComponentsPage.js";
|
|
import { JobsPage } from "./pages/JobsPage.js";
|
|
import { IssueReportPage } from "./pages/IssueReportPage.js";
|
|
import { ReviewPage } from "./pages/review/ReviewPage.js";
|
|
import { SchedulesPage } from "./pages/schedules/SchedulesPage.js";
|
|
import { StartPage } from "./pages/StartPage.js";
|
|
import { Panel } from "./ui/panel/Panel.js";
|
|
|
|
function NotFound() {
|
|
return (
|
|
<Panel title="404" icon="🧭">
|
|
<p>no route here.</p>
|
|
</Panel>
|
|
);
|
|
}
|
|
|
|
export function App() {
|
|
return (
|
|
<Router hook={useGuardedLocation}>
|
|
<Shell>
|
|
<Switch>
|
|
<Route path="/" component={StartPage} />
|
|
<Route path="/alerts" component={AlertsPage} />
|
|
<Route path="/agents" component={AgentsPage} />
|
|
<Route path="/agents/:name/terminal" component={AgentTerminalPage} />
|
|
<Route
|
|
path="/agents/:name/subagents/:subagent/terminal"
|
|
component={AgentTerminalPage}
|
|
/>
|
|
<Route path="/jobs" component={JobsPage} />
|
|
<Route path="/schedules" component={SchedulesPage} />
|
|
<Route path="/builds" component={BuildsPage} />
|
|
<Route path="/messages" component={MessagesPage} />
|
|
<Route path="/notifications" component={NotificationsPage} />
|
|
<Route path={NEW_FLOW_PATH}>
|
|
<FlowEditorPage params={{ flowId: "" }} isNew />
|
|
</Route>
|
|
<Route path="/notifications/:flowId" component={FlowEditorPage} />
|
|
<Route path="/issues" component={IssueReportPage} />
|
|
<Route path="/review" component={ReviewPage} />
|
|
<Route path="/components" component={ComponentsPage} />
|
|
<Route component={NotFound} />
|
|
</Switch>
|
|
</Shell>
|
|
</Router>
|
|
);
|
|
}
|