fix(menubar): 修正进程退出判断与公网刷新及风扇语言

This commit is contained in:
2026-11-03 22:12:44 +08:00
parent ea4d0e7f23
commit c8d7326a80
13 changed files with 238 additions and 49 deletions
@@ -2,6 +2,13 @@ import Foundation
/// Compute once per data/filter/sort event, never from row rendering or scroll position.
nonisolated enum ProcessTableProjection {
/// Filtering hides rows without terminating processes. A failed read proves no departure.
static func exitedSelection(_ selected: ProcessIdentity?, in snapshot: ProcessSnapshot?) -> ProcessIdentity? {
guard let selected, let snapshot, !snapshot.failed,
!snapshot.rows.contains(where: { $0.id == selected }) else { return nil }
return selected
}
static func rows(_ input: [ProcessMetrics], query: String, sorting: [ProcessSort], order: [ProcessIdentity]) -> [ProcessMetrics] {
let ranks = Dictionary(uniqueKeysWithValues: order.enumerated().map { ($0.element, $0.offset) })
return input.filter {