@@ -202,15 +202,12 @@ struct PanelRootView: View {
202202
203203 private var masterSubtitle : String {
204204 if !masterEnabled { return " Suspended — nothing is active " }
205- if sleepManager . isActive , ! tracking. liveSessions . isEmpty {
206- let n = tracking . liveSessions . count
207- return " Awake · \( n) agent \( n == 1 ? " " : " s " ) live "
205+ let n = tracking. hookFreshAgents . count
206+ if sleepManager . isActive , n > 0 {
207+ return " Awake · \( n) agent \( n == 1 ? " " : " s " ) working "
208208 }
209209 if sleepManager. isActive { return " Active · Mac awake " }
210- if !tracking. liveSessions. isEmpty {
211- let n = tracking. liveSessions. count
212- return " \( n) agent \( n == 1 ? " " : " s " ) live "
213- }
210+ if n > 0 { return " \( n) agent \( n == 1 ? " " : " s " ) working " }
214211 return " Ready "
215212 }
216213
@@ -310,13 +307,9 @@ struct PanelRootView: View {
310307 . disclosureGroupStyle ( PillDisclosureStyle ( ) )
311308 }
312309 . transition ( . opacity. combined ( with: . scale( scale: 0.96 ) ) )
313- } else if let graceEnd = sleepManager. autoGraceEndsAt, graceEnd > Date ( ) {
314- // Agents finished: the single visible countdown before sleeping.
315- gracePill ( endsAt: graceEnd)
316- . transition ( . opacity. combined ( with: . scale( scale: 0.96 ) ) )
317310 } else {
318- statusPill ( icon: " powersleep " ,
319- text: " Idle · sleeps when agents finish " ,
311+ statusPill ( icon: " moon " ,
312+ text: " Delegated · macOS controls sleep " ,
320313 tint: . secondary)
321314 . transition ( . opacity. combined ( with: . scale( scale: 0.96 ) ) )
322315 }
@@ -391,8 +384,7 @@ struct PanelRootView: View {
391384 case . auto:
392385 let n = sleepManager. activeAgentCount
393386 if n > 0 { return " Auto · \( n) agent \( n == 1 ? " " : " s " ) working " }
394- if sleepManager. autoGraceEndsAt != nil { return " Auto · releasing soon " }
395- return " Auto · sleeps when idle "
387+ return " Auto · macOS controls sleep "
396388 }
397389 }
398390
@@ -403,20 +395,20 @@ struct PanelRootView: View {
403395 VStack ( spacing: 10 ) {
404396 HStack ( spacing: 10 ) {
405397 iconChip ( system: " antenna.radiowaves.left.and.right " ,
406- active: !tracking. liveSessions . isEmpty,
398+ active: !tracking. hookFreshAgents . isEmpty,
407399 activeTint: . green)
408400 VStack ( alignment: . leading, spacing: 1 ) {
409401 Text ( " Agent Tracking " )
410402 . font ( . system( size: 13 , weight: . medium) )
411- Text ( tracking. liveSessions . isEmpty
412- ? " No sessions running "
413- : " Listening for events " )
403+ Text ( tracking. hookFreshAgents . isEmpty
404+ ? " Ready to track "
405+ : " Listening for hooks " )
414406 . font ( . caption2)
415407 . foregroundStyle ( . secondary)
416408 }
417409 Spacer ( )
418- if !tracking. liveSessions . isEmpty {
419- Text ( " \( tracking. liveSessions . count) " )
410+ if !tracking. hookFreshAgents . isEmpty {
411+ Text ( " \( tracking. hookFreshAgents . count) " )
420412 . font ( . caption2. weight ( . semibold) . monospacedDigit ( ) )
421413 . padding ( . horizontal, 7 )
422414 . padding ( . vertical, 2 )
@@ -542,25 +534,6 @@ struct PanelRootView: View {
542534 . background ( tint. opacity ( 0.12 ) , in: Capsule ( ) )
543535 }
544536
545- /// Grace-period pill with a live SwiftUI countdown — updates every second
546- /// without a separate Timer because Text(timerInterval:) drives itself.
547- /// This is the ONE countdown the user ever sees in Auto mode.
548- private func gracePill( endsAt: Date ) -> some View {
549- HStack ( spacing: 6 ) {
550- Image ( systemName: " powersleep " ) . font ( . caption2)
551- . accessibilityHidden ( true )
552- Text ( " Mac sleeps in " )
553- . font ( . caption2)
554- Text ( timerInterval: Date . now... endsAt, countsDown: true )
555- . font ( . caption2. monospacedDigit ( ) )
556- }
557- . foregroundStyle ( Color . secondary)
558- . padding ( . horizontal, 9 )
559- . padding ( . vertical, 5 )
560- . frame ( maxWidth: . infinity, alignment: . leading)
561- . background ( Color . secondary. opacity ( 0.12 ) , in: Capsule ( ) )
562- }
563-
564537 @ViewBuilder
565538 private func compactAction(
566539 icon: String ,
0 commit comments