From 2f1bb901ccf9ec536a1c4b2d07f582c717db15e6 Mon Sep 17 00:00:00 2001 From: Mads Hvelplund Date: Fri, 19 Jun 2026 12:22:30 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20timeout=3D0=20from=20scan=20err?= =?UTF-8?q?or=20toast=20=E2=80=94=20was=20causing=20instant=20dismissal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Textual's Notification expires when raised_at + timeout - time() <= 0. With timeout=0 the toast expired immediately on mount, making the error notification invisible to users. Drop the timeout argument to use Textual's default display duration (~5 s). --- strix/interface/tui/app.py | 3 +-- tests/interface/tui/test_app.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/strix/interface/tui/app.py b/strix/interface/tui/app.py index aefd4b04..58b20925 100644 --- a/strix/interface/tui/app.py +++ b/strix/interface/tui/app.py @@ -1403,13 +1403,12 @@ class StrixTUIApp(App): # type: ignore[misc] self._scan_thread.start() def _notify_scan_error(self, exc: Exception) -> None: - """Dispatch a persistent error toast from any thread.""" + """Dispatch an error toast from any thread.""" with contextlib.suppress(Exception): self.call_from_thread( self.notify, f"Scan failed: {type(exc).__name__}: {exc}", severity="error", - timeout=0, ) def _capture_sdk_event(self, agent_id: str, event: Any) -> None: diff --git a/tests/interface/tui/test_app.py b/tests/interface/tui/test_app.py index b2789710..c7821d28 100644 --- a/tests/interface/tui/test_app.py +++ b/tests/interface/tui/test_app.py @@ -22,7 +22,6 @@ def test_notify_scan_error_dispatches_toast() -> None: app.notify, "Scan failed: RuntimeError: something went wrong", severity="error", - timeout=0, )