sync: update from private repo (c8b6d29)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-10 09:09:39 +00:00
parent 5502478636
commit 25c087067a
12 changed files with 400 additions and 121 deletions
@@ -22,7 +22,7 @@ const KIND_COLORS: Record<string, { dot: string; badge: string; badgeText: strin
export const ActivityEventCard = memo(function ActivityEventCard({ event, isLast }: { event: ActivityEvent; isLast?: boolean }) {
const colors = KIND_COLORS[event.kind] ?? KIND_COLORS.other!;
const meta = formatActivityMeta(event.workerId, event.mode);
const meta = formatActivityMeta(event.workerId, event.mode, event.backendId);
return (
<div className="grid gap-3" style={{ gridTemplateColumns: '16px minmax(0,1fr)' }}>
+12 -3
View File
@@ -115,10 +115,17 @@ export interface ActivityEvent {
timestamp: string | null;
workerId: string | null;
mode: string | null;
/** Physical backend behind a proxy worker (from [backend:...] tags). */
backendId: string | null;
}
export function formatActivityMeta(workerId: string | null, mode: string | null): string {
return [workerId ? `worker: ${workerPill(workerId)}` : '', mode ? `mode: ${mode}` : ''].filter(Boolean).join(' · ');
export function formatActivityMeta(workerId: string | null, mode: string | null, backendId?: string | null): string {
return [
workerId ? `worker: ${workerPill(workerId)}` : '',
// Show the physical backend when it differs from the (proxy) worker name.
backendId && backendId !== workerId ? `backend: ${workerPill(backendId)}` : '',
mode ? `mode: ${mode}` : '',
].filter(Boolean).join(' · ');
}
export function parseActivityLog(logText: string): ActivityEvent[] {
@@ -130,13 +137,15 @@ export function parseActivityLog(logText: string): ActivityEvent[] {
const timestamp = timestampMatch?.[1] ?? null;
const workerId = /\[worker:([^\]]+)\]/.exec(rawLine)?.[1] ?? null;
const mode = /\[mode:([^\]]+)\]/.exec(rawLine)?.[1] ?? null;
const backendId = /\[backend:([^\]]+)\]/.exec(rawLine)?.[1] ?? null;
const line = rawLine
.replace(/^\[[^\]]+\]\s+/, '')
.replace(/\[worker:[^\]]+\]\s*/g, '')
.replace(/\[mode:[^\]]+\]\s*/g, '')
.replace(/\[backend:[^\]]+\]\s*/g, '')
.trim();
const base = { id: `${timestamp ?? 'line'}-${index}`, timestamp, workerId, mode };
const base = { id: `${timestamp ?? 'line'}-${index}`, timestamp, workerId, mode, backendId };
const movementStart = /^\[([^\]]+)\] (?:start|ステップ開始)$/.exec(line);
if (movementStart) {