fix(design): 按概念图重排面板层级并验证真实组件
This commit is contained in:
@@ -38,7 +38,8 @@ actor SystemSampler {
|
||||
// A synchronous OS read may outlive cancellation. Keep the in-flight slot occupied.
|
||||
}
|
||||
|
||||
func sample() -> MetricsSnapshot {
|
||||
func sample(includeProcesses: Bool? = nil) -> MetricsSnapshot {
|
||||
if let includeProcesses { setProcessVisible(includeProcesses) }
|
||||
if !didProbe {
|
||||
didProbe = true
|
||||
if ProcessInfo.processInfo.environment["KYMO_PANEL_PROBE"] == "1" { PanelCapabilityProbe.run() }
|
||||
|
||||
@@ -24,7 +24,7 @@ final class MetricsStore {
|
||||
await sampler.setProcessVisible(self?.isPanelVisible == true)
|
||||
while !Task.isCancelled {
|
||||
let visibleGeneration = self?.visibilityGeneration
|
||||
var next = await sampler.sample()
|
||||
var next = await sampler.sample(includeProcesses: self?.isPanelVisible == true)
|
||||
guard !Task.isCancelled, self?.generation == currentGeneration else { return }
|
||||
if self?.isPanelVisible != true || self?.visibilityGeneration != visibleGeneration { next.processes = nil }
|
||||
self?.snapshot = next
|
||||
|
||||
Reference in New Issue
Block a user