Add app shell with left nav; split dashboard into top-level pages

Introduce a Layout shell with a collapsible left sidebar (state persisted
to localStorage) that becomes a hamburger drawer under md. Break the single
Dashboard into routed pages — Overview (summary tiles + node bar), Services,
Scheduled, Programs, Gateway, Mesh — nested under the shared Layout via an
Outlet. Centralize useEventStream in Layout (drop the per-page duplicates),
repoint detail-page back links at their section pages, and remove the now-dead
SectionHeader component / SECTION_HEADERS map (each page owns its header).
This commit is contained in:
2026-06-30 22:52:28 -07:00
parent 49e9e5adcc
commit bc915d23fb
17 changed files with 470 additions and 161 deletions

View File

@@ -1,6 +1,6 @@
import { useState } from "react"
import { useParams } from "react-router-dom"
import { useProgram, useEventStream } from "@/services/api/hooks"
import { useProgram } from "@/services/api/hooks"
import { runnerLabel, subdomainUrl } from "@/lib/labels"
import { DetailHeader } from "@/components/detail/DetailHeader"
import { ConfigPanel } from "@/components/detail/ConfigPanel"
@@ -8,7 +8,6 @@ import { DeploymentsSection } from "@/components/detail/DeploymentsSection"
import { ProgramActions, ActionOutputPanel, type ActionOutput } from "@/components/ProgramActions"
export function ProgramDetailPage() {
useEventStream()
const { name } = useParams<{ name: string }>()
const { data: deployment, isLoading, error, refetch } = useProgram(name ?? "")
const [actionOutput, setActionOutput] = useState<ActionOutput | null>(null)
@@ -39,7 +38,7 @@ export function ProgramDetailPage() {
return (
<div className="max-w-3xl mx-auto px-6 py-8">
<DetailHeader
backTo="/"
backTo="/programs"
backLabel="Back to Programs"
name={deployment.id}
behavior={deployment.behavior}