refactor(frontend): drop dead code in traffic and ws pipelines

Removes zero-consumer surface verified by repo-wide grep: the
reference-count render machinery, the never-called clearData chain,
unread snapshot fields (rangeMinutes, reason), dead refresh callbacks
on the connection hooks, the write-only wsRef sync, and the worker's
unreachable DEFAULT_CONFIG placeholder (now definite assignment under
the init-first client contract). No behavior change; the compressed
sampler path, samplerStats diagnostics, and lastTimestamp perf
contract stay. Net -120 lines across six files.
This commit is contained in:
Tunglies
2026-09-11 13:19:50 +08:00
parent 38c54c5b3b
commit 82d76113f2
6 changed files with 25 additions and 145 deletions
@@ -39,17 +39,6 @@ interface StatCardProps {
onClick?: () => void
}
// 全局变量类型定义
declare global {
interface Window {
animationFrameId?: number
lastTrafficData?: {
up: number
down: number
}
}
}
// 统计卡片组件 - 使用memo优化
const CompactStatCard = memo(
({ icon, title, value, unit, color, onClick }: StatCardProps) => {