Fix notification ring not appearing on terminal panes

Merged
LA
9mo ago
+86-17

Summary

  • Changed let notificationStore to @ObservedObject var notificationStore in TerminalPanelView and PanelContentView

Root cause

TerminalNotificationStore is an ObservableObject with @Published notifications. When passed as a plain let to child views, SwiftUI sees the same object reference on every re-render and skips re-evaluating the view body. The hasUnreadNotification() check was never re-run, so the blue ring never appeared.

The sidebar badge worked because it uses @EnvironmentObject. The bonsplit tab badge worked because it's synced imperatively via .onChange(of:).

Test plan

  • Open multiple terminal panes
  • Run cmux notify "Test" targeting a background pane
  • Blue ring should appear on the notified pane
  • Clicking/focusing the pane should clear the ring

Closes #126