From c584037c77c63f6a08f8837f357c89432b8043e7 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Wed, 20 May 2026 22:08:04 +0300 Subject: feat: badge outdated integration updates --- src/app/state.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/app/state.rs') diff --git a/src/app/state.rs b/src/app/state.rs index 2b078caf..921a82c9 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -1011,6 +1011,25 @@ impl AppState { self.show_agent_labels_on_pane_borders } + pub(crate) fn integration_updates_available(&self) -> bool { + self.integration_recommendations + .iter() + .any(|item| item.state == crate::integration::IntegrationStatusKind::Outdated) + } + + pub(crate) fn global_menu_attention_badge_visible(&self) -> bool { + self.update_available.is_some() || self.integration_updates_available() + } + + pub(crate) fn global_menu_item_has_badge(&self, item: &str) -> bool { + (item == "update ready" && self.update_available.is_some()) + || (item == "settings" && self.integration_updates_available()) + } + + pub(crate) fn settings_section_has_badge(&self, section: SettingsSection) -> bool { + section == SettingsSection::Integrations && self.integration_updates_available() + } + pub fn focused_pane_requests_mouse_capture(&self) -> bool { self.mode == Mode::Terminal && self -- cgit v1.2.3