import { Activity, AlertTriangle, ChevronsDown, ChevronsUp, Columns3, RefreshCw } from "lucide-react"; import { type FormEvent, useEffect, useState } from "react"; import type { BuildSummary, ExecutionViewV8 } from "@/lib/types"; import { warningText } from "@/lib/types"; import { statusLabel, StatusBadge } from "@/components/ui/Badges"; import { moduleAuditUrl } from "@/lib/api"; interface Props { builds: BuildSummary[]; selectedId: string; view: ExecutionViewV8; refreshing: boolean; onSelect: (id: string) => void; expandedRounds: Set; allExpanded: boolean; onRound: (round: number) => void; onToggleAll: () => void; } export function TopBar({ builds, selectedId, view, refreshing, onSelect, expandedRounds, allExpanded, onRound, onToggleAll }: Props) { const [input, setInput] = useState(selectedId); useEffect(() => setInput(selectedId), [selectedId]); const submit = (event: FormEvent) => { event.preventDefault(); onSelect(input); }; const noteCount = view.warnings.length; return

脚本构建

setInput(event.target.value)} placeholder="Run ID" title="输入 Run ID 后按 Enter 打开" enterKeyHint="go" />
{refreshing ? : null} {view.dataShape === "legacy-incomplete" ? : null} 数据比对 {noteCount ?
数据说明{noteCount}
    {view.warnings.map((warning, index) =>
  • {warningText(warning)}
  • )}
数据时间:{formatTime(view.capturedAt)}
: null}
; } const formatTime = (value: string) => { const date = new Date(value); return Number.isNaN(date.getTime()) ? value : date.toLocaleString("zh-CN", { hour12: false }); };