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
-13
View File
@@ -1005,10 +1005,6 @@ interface ITrafficWorkerAppendMessage {
}
}
interface ITrafficWorkerClearMessage {
type: 'clear'
}
interface ITrafficWorkerSetRangeMessage {
type: 'setRange'
minutes: number
@@ -1021,7 +1017,6 @@ interface ITrafficWorkerRequestSnapshotMessage {
type TrafficWorkerRequestMessage =
| ITrafficWorkerInitMessage
| ITrafficWorkerAppendMessage
| ITrafficWorkerClearMessage
| ITrafficWorkerSetRangeMessage
| ITrafficWorkerRequestSnapshotMessage
@@ -1029,15 +1024,7 @@ interface ITrafficWorkerSnapshotMessage {
type: 'snapshot'
dataPoints: ITrafficDataPoint[]
samplerStats: ISamplerStats
rangeMinutes: number
lastTimestamp?: number
reason:
| 'init'
| 'interval'
| 'range-change'
| 'request'
| 'append-throttle'
| 'clear'
}
interface ITrafficWorkerLogMessage {