Move integration health into active tasks and fix dark topology labels.

Drop header netx-api/oclaw pills, restore UME/OClaw runtime rows in ops tasks, and raise node/edge label contrast on the dark canvas.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-05 09:16:52 +08:00
parent 4dd121b42f
commit 83acb5eef1
10 changed files with 106 additions and 128 deletions

View file

@ -11,23 +11,11 @@ import { openOrFocusModule } from "../utils/moduleWindows";
import { returnToWorkbench } from "../utils/workbench";
import { useAuth } from "../auth/AuthContext";
type ConnLevel = "up" | "down" | "unknown";
type Props = {
connections: {
netxApi: ConnLevel;
netxApiLatencyMs?: number;
oclawBridge: ConnLevel;
oclawBridgeLatencyMs?: number;
oclawBridgeErrorKind?: string;
oclawBridgeError?: string;
oclawBridgeQueueSize?: number;
oclawBridgePublishedOk?: number;
};
children: ReactNode;
};
export function AppLayout({ connections, children }: Props) {
export function AppLayout({ children }: Props) {
const { t } = useI18n();
const { pathname } = useLocation();
const { user, logout } = useAuth();
@ -41,22 +29,6 @@ export function AppLayout({ connections, children }: Props) {
staleTime: 1500,
});
const activeTasks = opsTasksQuery.data?.active ?? 0;
const netxSuffix =
typeof connections.netxApiLatencyMs === "number" ? ` (${connections.netxApiLatencyMs}ms)` : "";
const oclawSuffix =
connections.oclawBridge === "up"
? typeof connections.oclawBridgePublishedOk === "number"
? ` (pub ${connections.oclawBridgePublishedOk})`
: ""
: connections.oclawBridgeErrorKind
? ` (${connections.oclawBridgeErrorKind})`
: typeof connections.oclawBridgeQueueSize === "number" && connections.oclawBridgeQueueSize > 0
? ` (q ${connections.oclawBridgeQueueSize})`
: "";
const oclawTitle =
connections.oclawBridge === "down" && connections.oclawBridgeError
? connections.oclawBridgeError
: undefined;
useAppWindowRegistration(pathname);
@ -88,47 +60,28 @@ export function AppLayout({ connections, children }: Props) {
) : null}
</div>
<div className="app-brand__actions">
<div className="app-brand__actions-group">
<span className={`conn-pill conn-pill--on-brand conn-pill--${connections.netxApi}`}>
{t("layout.netxApi")}: {connections.netxApi}
{netxSuffix}
</span>
<span
className={`conn-pill conn-pill--on-brand conn-pill--${connections.oclawBridge}`}
title={oclawTitle}
>
{t("layout.oclawBridge")}: {connections.oclawBridge}
{oclawSuffix}
</span>
</div>
{user ? (
<>
<span className="app-brand__actions-sep" aria-hidden />
<div className="app-brand__actions-group">
<button
type="button"
className={`conn-pill conn-pill--on-brand conn-pill--tasks conn-pill--${activeTasks > 0 ? "up" : "unknown"}`}
title={t("layout.activeTasksHint")}
onClick={() => openOrFocusModule({ moduleId: "audit", path: "/audit/tasks" })}
>
{t("layout.activeTasks", { count: activeTasks })}
</button>
<span
className="conn-pill conn-pill--on-brand conn-pill--user"
title={user.role}
>
{user.username}
</span>
<button
type="button"
className="header-menu__trigger header-menu__trigger--on-brand"
onClick={() => void logout()}
>
{t("auth.logout")}
</button>
<HeaderMenu />
</div>
</>
<div className="app-brand__actions-group">
<button
type="button"
className={`conn-pill conn-pill--on-brand conn-pill--tasks conn-pill--${activeTasks > 0 ? "up" : "unknown"}`}
title={t("layout.activeTasksHint")}
onClick={() => openOrFocusModule({ moduleId: "audit", path: "/audit/tasks" })}
>
{t("layout.activeTasks", { count: activeTasks })}
</button>
<span className="conn-pill conn-pill--on-brand conn-pill--user" title={user.role}>
{user.username}
</span>
<button
type="button"
className="header-menu__trigger header-menu__trigger--on-brand"
onClick={() => void logout()}
>
{t("auth.logout")}
</button>
<HeaderMenu />
</div>
) : (
<HeaderMenu />
)}