perf(schedule): 减少重渲染与冗余动画

- useCanvasNodeDrag.moveDrag 改 ref 直改 DOM,松手才写 store,避免拖拽期间反复重渲染 SchedulePage
- runs 轮询改 setTimeout 链式 + 移除 runs 依赖,避免每 1.5s 重建 interval
- SchedulePage 拆 PositionDraftBadge / RunNowButton,删除冗余的 runs/runsLoading/positionDraftCount 订阅
- 拆 ScheduleEdge 组件 + React.memo + useMemo,切换 edge 选中时不再重算所有 edgePath
- 删除 schedule.css 中引用未定义 keyframes 的 modal-in/spin 死动画
- 删除 .schedule-edge-line transition、.schedule-run-result-backdrop backdrop-filter;补 .artifact-card transition

Refs: kaneo #19-#24
This commit is contained in:
tao.chen
2026-08-20 11:27:45 +08:00
parent 4acfbb162f
commit cc8ac220a5
4 changed files with 173 additions and 124 deletions
@@ -2,7 +2,6 @@ import { useEffect } from "react";
import {
type ScheduleNode,
type ScheduleRunSummary,
} from "../../services/api";
import { useApi } from "../../context/AuthContext";
@@ -18,19 +17,17 @@ import {
} from "./utils";
export function RunHistory({
runs,
nodes,
loading,
disabled,
onRefresh,
}: {
runs: ScheduleRunSummary[];
nodes: ScheduleNode[];
loading: boolean;
disabled: boolean;
onRefresh: () => void;
}) {
const api = useApi();
const runs = useSchedulesStore((s) => s.runs);
const loading = useSchedulesStore((s) => s.runsLoading);
const expandedRunId = useSchedulesStore((s) => s.expandedRunId);
const runDetails = useSchedulesStore((s) => s.runDetails);
const detailLoadingId = useSchedulesStore((s) => s.detailLoadingId);