diff --git a/presentation/graph/graph_renderer.py b/presentation/graph/graph_renderer.py index 6a8493f..2d8a771 100644 --- a/presentation/graph/graph_renderer.py +++ b/presentation/graph/graph_renderer.py @@ -237,7 +237,7 @@ class GraphRenderer(QWidget): # ---- prewarm / scan lifecycle -------------------------------------------------- # def prewarm(self) -> None: """Pay for the graph view before it is clicked on, not during.""" - if not HAS_WEB_ENGINE or self.web is not None: + if self.web is not None: return self._ensure_web() if self._graph is None and self.path_edit.text().strip(): diff --git a/presentation/shared/web_engine_support.py b/presentation/shared/web_engine_support.py index 39f5ef4..a333c0f 100644 --- a/presentation/shared/web_engine_support.py +++ b/presentation/shared/web_engine_support.py @@ -27,7 +27,14 @@ def _frozen_onefile() -> bool: return True +# QtWebEngine is noisy and unreliable on the macOS runtime we support (GPU/ +# helper-process failures leave the stacked view blank). The native Qt graph is +# already available and avoids that failure path entirely. +HAS_WEB_ENGINE = False + try: # WebEngine + WebChannel are optional PySide6 add-ons + if sys.platform == "darwin": + raise ImportError("use native graph renderer on macOS") from PySide6.QtWebEngineWidgets import QWebEngineView # noqa: F401 from PySide6.QtWebChannel import QWebChannel # noqa: F401 HAS_WEB_ENGINE = not _frozen_onefile()