From b48e79125188d984dd91317d5de8379e84eac2f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Mar 2026 08:59:41 +0000 Subject: [PATCH 1/2] Initial plan From 328fcce409e7d18c737108afbbed0c82cc9ca173 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Mar 2026 09:02:07 +0000 Subject: [PATCH 2/2] Guard StatusBarManager against uninitialized self.bar Co-authored-by: clstaudt <875194+clstaudt@users.noreply.github.com> --- tuttle/app/core/status_bar.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tuttle/app/core/status_bar.py b/tuttle/app/core/status_bar.py index 4b6c69b..0393bba 100644 --- a/tuttle/app/core/status_bar.py +++ b/tuttle/app/core/status_bar.py @@ -186,6 +186,9 @@ def __init__( self._right_divider = StatusBarDivider() self._right_divider.visible = False + # Initialized to None; set by build() + self.bar: Optional[Container] = None + def build(self) -> Container: """Build the status bar container.""" self.bar = Container( @@ -281,15 +284,18 @@ def update_warnings( self._warning_divider.visible = has_warnings # Update bar color based on urgency - if overdue_count > 0: - self.bar.bgcolor = colors.bg_statusbar_danger - elif has_warnings: - self.bar.bgcolor = colors.bg_statusbar_warning - else: - self.bar.bgcolor = colors.bg_statusbar + if self.bar is not None: + if overdue_count > 0: + self.bar.bgcolor = colors.bg_statusbar_danger + elif has_warnings: + self.bar.bgcolor = colors.bg_statusbar_warning + else: + self.bar.bgcolor = colors.bg_statusbar def try_update(self): """Try to push visual updates to the bar.""" + if self.bar is None: + return try: self.bar.update() except Exception: