Merge branch 'wk1'

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
rootandClaude Fable 5.1 committed 2026-09-30 00:25:47 +08:00
commit 62b4969c32
38 files changed
+1240 -105

No files matched your search

+27 -1
View File
@@ -1,5 +1,5 @@
import { useQueryClient } from "@tanstack/react-query";
import type { HealthLevel, SystemHealth, SystemProcess } from "@umt/contracts";
import type { HealthLevel, SystemHealth, SystemProcess, SystemWorkerLane } from "@umt/contracts";
import {
AlertTriangle,
ChevronDown,
@@ -226,6 +226,8 @@ function Processes({ d }: { d: SystemHealth }) {
cell: (p) =>
p.concurrency.io === undefined && p.concurrency.agent === undefined ? (
<span className="text-muted-foreground">—</span>
) : p.lanes.length ? (
<LaneCell p={p} />
) : (
<span className="whitespace-nowrap tabular-nums">
io {p.concurrency.io ?? 0} · 智能体 {p.concurrency.agent ?? 0}
@@ -261,6 +263,30 @@ function Processes({ d }: { d: SystemHealth }) {
);
}
const LANE_LABEL: Record<SystemWorkerLane["lane"], string> = { file: "文件", network: "网络", maintenance: "维护" };
/** io worker 分道(WK-1):每道一行「运行中/并发 · 排队」,维护道让路时标出来 */
function LaneCell({ p }: { p: SystemProcess }) {
return (
<div className="grid justify-items-end gap-0.5 text-meta">
{p.lanes.map((l) => (
<span
key={l.lane}
className="whitespace-nowrap tabular-nums"
title={l.source === "env" ? "并发由环境变量指定,设置页的值不生效" : undefined}
>
{LANE_LABEL[l.lane]} {l.running}/{l.concurrency}
{l.queued ? ` · 排队 ${l.queued}` : ""}
{l.yielding ? " · 让路中" : ""}
</span>
))}
{p.concurrency.agent !== undefined ? (
<span className="whitespace-nowrap tabular-nums text-muted-foreground">智能体 {p.concurrency.agent}</span>
) : null}
</div>
);
}
/** 已下线实例:已退出、容器已重建或被同容器新进程替换的旧心跳行,默认折叠,不参与告警 */
function RetiredProcesses({ rows }: { rows: SystemProcess[] }) {
const [open, setOpen] = useState(false);