From e6c471a9f8c4f5de2e51801530ece9182e215060 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 15 Jul 2026 11:30:23 +0545 Subject: [PATCH] fix(src/window/spotlight): add error handling around action invocation Prevent crashes when result.action() raises exceptions and log warnings. --- src/window/spotlight/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/window/spotlight/main.py b/src/window/spotlight/main.py index 5d853a9..b3007e2 100644 --- a/src/window/spotlight/main.py +++ b/src/window/spotlight/main.py @@ -530,8 +530,11 @@ class Spotlight(Box): ) def _activate_result(self, result: SearchResult): - if result.action: - result.action() + try: + if result.action: + result.action() + except Exception as e: + logger.warning(f"[spotlight] result.action() failed: {e}") self.launched() def _activate_result_by_id(self, result_id: str):