diff --git a/app/src/index.css b/app/src/index.css
index f3f0aa9..32bdf5c 100644
--- a/app/src/index.css
+++ b/app/src/index.css
@@ -122,7 +122,7 @@ body {
color: var(--dh-term-muted);
}
-/* xterm host */
+/* xterm host — match frame (#1b1b1b); xterm.css defaults viewport to #000 */
.dh-xterm-host {
min-height: 0;
background: var(--dh-term-bg, #1b1b1b);
@@ -131,10 +131,16 @@ body {
.dh-xterm-host .xterm {
height: 100%;
padding: 10px 12px;
+ background: transparent;
}
.dh-xterm-host .xterm-viewport {
overflow-y: auto !important;
+ background-color: var(--dh-term-bg, #1b1b1b) !important;
+}
+
+.dh-xterm-host .xterm-screen {
+ background-color: transparent;
}
.xterm {
diff --git a/app/src/routes/k8s/DeploymentsPage.tsx b/app/src/routes/k8s/DeploymentsPage.tsx
index c9df055..de55810 100644
--- a/app/src/routes/k8s/DeploymentsPage.tsx
+++ b/app/src/routes/k8s/DeploymentsPage.tsx
@@ -1,11 +1,12 @@
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { useEffect, useMemo, useState } from "react";
-import { Button, Slider } from "@react-spectrum/s2";
+import { ActionMenu, Button, MenuItem, MenuSection, Slider, Text } from "@react-spectrum/s2";
import { style } from "@react-spectrum/s2/style" with { type: "macro" };
import { api } from "@/lib/api";
import { ConfirmDialog } from "@/components/ConfirmDialog";
import { CopyButton } from "@/components/CopyButton";
import { DetailEmpty, DetailHeading, DetailPane } from "@/components/DetailPane";
+import { InspectFields } from "@/components/InspectFields";
import { ListEmpty, ListPane } from "@/components/ListPane";
import { SettingRow } from "@/components/SettingRow";
import { toast } from "@/components/Toaster";
@@ -15,6 +16,10 @@ import { useUIStore } from "@/stores/uiStore";
import { copyText } from "@/routes/shared";
import { K8sChrome } from "@/routes/k8s/K8sChrome";
+function readyTone(ready: number, desired: number) {
+ return ready > 0 && ready === desired ? "success" : "muted";
+}
+
export function DeploymentsPage() {
const namespace = useUIStore((s) => s.namespace);
const qc = useQueryClient();
@@ -36,6 +41,8 @@ export function DeploymentsPage() {
}, [list.data, q]);
const row = filtered.find((d) => d.metadata.name === selected);
+ const ready = row?.status?.readyReplicas ?? 0;
+ const desired = row?.spec?.replicas ?? 0;
useEffect(() => {
setReplicas(row?.spec?.replicas ?? 1);
@@ -55,88 +62,71 @@ export function DeploymentsPage() {
}
search={{ value: q, onChange: setQ, placeholder: "Search deployments" }}
>
- {filtered.map((d) => (
- setSelected(d.metadata.name)}
- items={[
- { id: "open", label: "Open", onAction: () => setSelected(d.metadata.name) },
- { id: "copy", label: "Copy name", onAction: () => void copyText(d.metadata.name) },
- {
- id: "scale-up",
- label: "Scale +",
- onAction: () =>
- void api
- .scaleDeployment(namespace, d.metadata.name, (d.spec?.replicas || 1) + 1)
- .then(() => qc.invalidateQueries({ queryKey: ["deployments"] })),
- },
- {
- id: "restart",
- label: "Restart",
- onAction: () =>
- void api
- .restartDeployment(namespace, d.metadata.name)
- .then(() => qc.invalidateQueries({ queryKey: ["deployments"] })),
- },
- { id: "sep-1", label: "", onAction: () => {} },
- {
- id: "delete",
- label: "Delete…",
- destructive: true,
- onAction: () => {
- setSelected(d.metadata.name);
- setConfirmDelete(true);
+ {filtered.map((d) => {
+ const r = d.status?.readyReplicas ?? 0;
+ const want = d.spec?.replicas ?? 0;
+ return (
+ setSelected(d.metadata.name)}
+ items={[
+ { id: "open", label: "Open", onAction: () => setSelected(d.metadata.name) },
+ { id: "copy", label: "Copy name", onAction: () => void copyText(d.metadata.name) },
+ {
+ id: "scale-up",
+ label: "Scale +",
+ onAction: () =>
+ void api
+ .scaleDeployment(namespace, d.metadata.name, (d.spec?.replicas || 1) + 1)
+ .then(() => qc.invalidateQueries({ queryKey: ["deployments"] })),
},
- },
- ]}
- suffix={
- 0 &&
- (d.status?.readyReplicas ?? 0) === (d.spec?.replicas ?? 0)
- ? "success"
- : "muted"
- }
- >
- {d.status?.readyReplicas ?? 0}/{d.spec?.replicas ?? 0}
-
- }
- >
-
- {d.metadata.name}
-
-
- ))}
+ {
+ id: "restart",
+ label: "Restart",
+ onAction: () =>
+ void api
+ .restartDeployment(namespace, d.metadata.name)
+ .then(() => qc.invalidateQueries({ queryKey: ["deployments"] })),
+ },
+ { id: "sep-1", label: "", onAction: () => {} },
+ {
+ id: "delete",
+ label: "Delete…",
+ destructive: true,
+ onAction: () => {
+ setSelected(d.metadata.name);
+ setConfirmDelete(true);
+ },
+ },
+ ]}
+ suffix={
+
+ {r}/{want}
+
+ }
+ >
+
+ {d.metadata.name}
+
+
+ );
+ })}
}
header={
row ? (
-
-
-
-
- {row.metadata.name}
- 0 &&
- (row.status?.readyReplicas ?? 0) === (row.spec?.replicas ?? 0)
- ? "success"
- : "muted"
- }
- >
- {row.status?.readyReplicas ?? 0}/{row.spec?.replicas ?? 0}
-
-
-
- {namespace}
-
-
-
+
+
+ {row.metadata.name}
+
+ {ready}/{desired}
+
+
-
+
-
+
+
+
+
+
+
+
+
) : null
}
>
{row ? (
-
-
{replicas}}
- >
- {
- void api
- .scaleDeployment(namespace, row.metadata.name, v)
- .then(() => {
- toast.success("Scaled", { description: `${row.metadata.name} → ${v}` });
- qc.invalidateQueries({ queryKey: ["deployments"] });
- })
- .catch((e: any) => toast.error("Scale failed", { description: e?.message }));
- }}
- />
-
+
+
+ {replicas}}
+ >
+ {
+ void api
+ .scaleDeployment(namespace, row.metadata.name, v)
+ .then(() => {
+ toast.success("Scaled", { description: `${row.metadata.name} → ${v}` });
+ qc.invalidateQueries({ queryKey: ["deployments"] });
+ })
+ .catch((e: any) => toast.error("Scale failed", { description: e?.message }));
+ }}
+ />
+
+
+
`${k}=${v}`)
+ .join(", ")
+ : undefined,
+ mono: true,
+ },
+ {
+ label: "Image",
+ value: row.spec?.template?.spec?.containers?.[0]?.image,
+ mono: true,
+ copy: row.spec?.template?.spec?.containers?.[0]?.image,
+ },
+ { label: "Created", value: row.metadata.creationTimestamp },
+ { label: "UID", value: row.metadata.uid, mono: true, copy: row.metadata.uid },
+ ]}
+ />
) : null}
diff --git a/app/src/routes/k8s/HelmPage.tsx b/app/src/routes/k8s/HelmPage.tsx
index 664406a..b9e99fb 100644
--- a/app/src/routes/k8s/HelmPage.tsx
+++ b/app/src/routes/k8s/HelmPage.tsx
@@ -5,9 +5,14 @@ import { style } from "@react-spectrum/s2/style" with { type: "macro" };
import { api } from "@/lib/api";
import { GlassSheet, TerminalBlock } from "@/components/GlassSheet";
import { ConfirmDialog } from "@/components/ConfirmDialog";
+import { ListEmpty } from "@/components/ListPane";
import { PageShell } from "@/components/PageShell";
+import { RowMenu } from "@/components/spectrum/RowMenu";
import { StatusBadge } from "@/components/spectrum/StatusBadge";
+import { Tip } from "@/components/spectrum/Tip";
+import { toast } from "@/components/Toaster";
import { useUIStore } from "@/stores/uiStore";
+import { copyText } from "@/routes/shared";
import { K8sChrome } from "@/routes/k8s/K8sChrome";
export function HelmPage() {
@@ -19,6 +24,8 @@ export function HelmPage() {
const [output, setOutput] = useState("");
const [sheetOpen, setSheetOpen] = useState(false);
const [sheetTitle, setSheetTitle] = useState("Helm");
+ const [installOpen, setInstallOpen] = useState(false);
+ const [installing, setInstalling] = useState(false);
const [confirmUninstall, setConfirmUninstall] = useState
(null);
const list = useQuery({
queryKey: ["helm", namespace],
@@ -32,50 +39,90 @@ export function HelmPage() {
setSheetOpen(true);
};
+ const releases = list.data || [];
+
return (
-
-
-
-
-
+
+
+ }
+ >
+
+ {list.isLoading ? (
+
Loading releases…
+ ) : releases.length === 0 ? (
+
setInstallOpen(true)}>
+ Install chart
+
+ }
/>
-
-
-
+ ) : (
+ releases.map((r) => (
+
+ void api
+ .helmRollback(r.namespace, r.name)
+ .then((res: any) => showOut(`Rollback · ${r.name}`, res.output || "rolled back"))
+ .catch((e: any) => showOut(`Rollback · ${r.name}`, e?.message || "failed")),
+ },
+ { id: "copy", label: "Copy name", onAction: () => void copyText(r.name) },
+ { id: "sep-1", label: "", onAction: () => {} },
+ {
+ id: "uninstall",
+ label: "Uninstall…",
+ destructive: true,
+ onAction: () => setConfirmUninstall(r.name),
+ },
+ ]}
+ suffix={
+ {r.status}
+ }
+ >
+
+ {r.name}
+
+
+ {r.chart} · rev {r.revision}
+
+
+ ))
+ )}
+
+
+
+
+
-
+ >
+ }
+ >
+
+
+
+
+
-
- {(list.data || []).length === 0 ? (
-
- No releases in “{namespace}”.
-
- ) : (
- (list.data || []).map((r) => (
-
-
-
-
{r.name}
-
- {r.chart} · rev {r.revision}
-
-
-
- {r.status}
-
-
-
-
-
-
-
- ))
- )}
-
-
{
if (!confirmUninstall) return;
- const res: any = await api.helmUninstall(namespace, confirmUninstall);
- showOut(`Uninstall · ${confirmUninstall}`, res.output || "uninstalled");
- setConfirmUninstall(null);
- qc.invalidateQueries({ queryKey: ["helm"] });
+ try {
+ const res: any = await api.helmUninstall(namespace, confirmUninstall);
+ showOut(`Uninstall · ${confirmUninstall}`, res.output || "uninstalled");
+ toast.success("Uninstalled", { description: confirmUninstall });
+ setConfirmUninstall(null);
+ qc.invalidateQueries({ queryKey: ["helm"] });
+ } catch (e: any) {
+ toast.error("Uninstall failed", { description: e?.message });
+ }
}}
/>
diff --git a/app/src/routes/k8s/K8sOverviewPage.tsx b/app/src/routes/k8s/K8sOverviewPage.tsx
index 8660fb1..d3aaed5 100644
--- a/app/src/routes/k8s/K8sOverviewPage.tsx
+++ b/app/src/routes/k8s/K8sOverviewPage.tsx
@@ -39,7 +39,6 @@ export function K8sOverviewPage() {
const phase = p.status?.phase || "Unknown";
counts.set(phase, (counts.get(phase) || 0) + 1);
}
- if (!counts.size) counts.set("Empty", 1);
return [...counts.entries()].map(([name, value]) => ({ name, value }));
}, [podList]);
@@ -104,13 +103,12 @@ export function K8sOverviewPage() {
-
+
d.value > 0)}
/>
diff --git a/app/src/routes/k8s/K8sResourcesPage.tsx b/app/src/routes/k8s/K8sResourcesPage.tsx
index 25cfc65..578e18d 100644
--- a/app/src/routes/k8s/K8sResourcesPage.tsx
+++ b/app/src/routes/k8s/K8sResourcesPage.tsx
@@ -167,16 +167,15 @@ export function K8sResourcesPage() {
q={q}
onQ={setQ}
renderMeta={(s) => (
-
- {s.spec?.type || "ClusterIP"}
-
- {s.spec?.clusterIP || "—"}
- {(s.spec?.ports || [])
- .slice(0, 3)
- .map((p: any) => ` · ${p.port}${p.protocol ? "/" + p.protocol : ""}`)
- .join("")}
-
-
+
+ {s.spec?.type || "ClusterIP"}
+ {" · "}
+ {s.spec?.clusterIP || "—"}
+ {(s.spec?.ports || [])
+ .slice(0, 3)
+ .map((p: any) => ` · ${p.port}${p.protocol ? "/" + p.protocol : ""}`)
+ .join("")}
+
)}
/>
@@ -228,14 +227,13 @@ export function K8sResourcesPage() {
renderMeta={(sec) => {
const keys = Object.keys(sec.data || sec.stringData || {});
return (
-
- {sec.type || "Opaque"}
-
- {keys.length
- ? `keys: ${keys.slice(0, 6).join(", ")}${keys.length > 6 ? "…" : ""}`
- : "no keys"}
-
-
+
+ {sec.type || "Opaque"}
+ {" · "}
+ {keys.length
+ ? `keys: ${keys.slice(0, 6).join(", ")}${keys.length > 6 ? "…" : ""}`
+ : "no keys"}
+
);
}}
/>
@@ -253,7 +251,7 @@ export function K8sResourcesPage() {
const ok = ready?.status === "True";
return (
-
{ok ? "Ready" : "NotReady"}
+
{ok ? "Ready" : "NotReady"}
{n.status?.nodeInfo?.kubeletVersion || ""}
@@ -272,14 +270,11 @@ export function K8sResourcesPage() {
onQ={setQ}
renderMeta={(ev) => (
-
-
- {ev.reason || ev.type || "Event"}
-
-
- {ev.involvedObject?.kind}/{ev.involvedObject?.name || ev.involved || ""}
-
-
+
+ {ev.reason || ev.type || "Event"}
+ {" · "}
+ {ev.involvedObject?.kind}/{ev.involvedObject?.name || ev.involved || ""}
+
{ev.message || "—"}
@@ -312,12 +307,11 @@ export function K8sResourcesPage() {
q={q}
onQ={setQ}
renderMeta={(cj) => (
-
- {cj.spec?.schedule || "—"}
-
- {cj.spec?.suspend ? "suspended" : "active"}
-
-
+
+ {cj.spec?.schedule || "—"}
+ {" · "}
+ {cj.spec?.suspend ? "suspended" : "active"}
+
)}
/>
diff --git a/app/src/routes/k8s/PodsPage.tsx b/app/src/routes/k8s/PodsPage.tsx
index b52db35..f8686c0 100644
--- a/app/src/routes/k8s/PodsPage.tsx
+++ b/app/src/routes/k8s/PodsPage.tsx
@@ -1,6 +1,6 @@
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { useMemo, useState } from "react";
-import { Button, Tab, TabList, TabPanel, Tabs } from "@react-spectrum/s2";
+import { ActionMenu, MenuItem, MenuSection, Tab, TabList, TabPanel, Tabs, Text } from "@react-spectrum/s2";
import { style } from "@react-spectrum/s2/style" with { type: "macro" };
import { api } from "@/lib/api";
import { ConfirmDialog } from "@/components/ConfirmDialog";
@@ -8,6 +8,7 @@ import { ConsolePanel } from "@/components/ConsolePanel";
import { CopyButton } from "@/components/CopyButton";
import { DetailEmpty, DetailHeading, DetailPane } from "@/components/DetailPane";
import { ExecTerminal } from "@/components/ExecTerminal";
+import { InspectFields } from "@/components/InspectFields";
import { ListEmpty, ListPane } from "@/components/ListPane";
import { RowMenu } from "@/components/spectrum/RowMenu";
import { StatusBadge } from "@/components/spectrum/StatusBadge";
@@ -15,11 +16,17 @@ import { useUIStore } from "@/stores/uiStore";
import { copyText } from "@/routes/shared";
import { K8sChrome } from "@/routes/k8s/K8sChrome";
+function phaseTone(phase?: string): "success" | "muted" | "destructive" {
+ if (phase === "Running") return "success";
+ if (phase === "Failed") return "destructive";
+ return "muted";
+}
+
export function PodsPage() {
const namespace = useUIStore((s) => s.namespace);
const qc = useQueryClient();
const [selected, setSelected] = useState
(null);
- const [podTab, setPodTab] = useState<"logs" | "exec">("logs");
+ const [podTab, setPodTab] = useState<"logs" | "exec" | "inspect">("logs");
const [confirmDelete, setConfirmDelete] = useState(false);
const [q, setQ] = useState("");
const list = useQuery({ queryKey: ["pods", namespace], queryFn: () => api.pods(namespace), refetchInterval: 5000 });
@@ -32,6 +39,7 @@ export function PodsPage() {
}, [list.data, q]);
const selectedPod = filtered.find((p) => p.metadata.name === selected);
+ const phase = selectedPod?.status?.phase || "Unknown";
return (
@@ -67,9 +75,7 @@ export function PodsPage() {
},
]}
suffix={
-
- {p.status?.phase || "Unknown"}
-
+ {p.status?.phase || "Unknown"}
}
>
@@ -84,28 +90,31 @@ export function PodsPage() {
header={
-
- {selected}
-
-
- {selectedPod?.status?.phase || "Unknown"}
-
+
{selected}
+
{phase}
-
+
+
+
+
+
}
>
setPodTab(key as "logs" | "exec")}
+ onSelectionChange={(key) => setPodTab(key as "logs" | "exec" | "inspect")}
>
Logs
Exec
+ Inspect
+
+ {selectedPod ? (
+ c.name)
+ .filter(Boolean)
+ .join(", "),
+ },
+ {
+ label: "Image",
+ value: selectedPod.spec?.containers?.[0]?.image,
+ mono: true,
+ copy: selectedPod.spec?.containers?.[0]?.image,
+ },
+ { label: "Restart policy", value: selectedPod.spec?.restartPolicy },
+ { label: "Created", value: selectedPod.metadata.creationTimestamp },
+ { label: "UID", value: selectedPod.metadata.uid, mono: true, copy: selectedPod.metadata.uid },
+ ]}
+ />
+ ) : null}
+