fix: track hover across the entire player to prevent overlay feedback flicker

This commit is contained in:
2026-10-20 22:00:31 +02:00
parent 885dea74f2
commit 7036109152
4 changed files with 117 additions and 7 deletions
+19
View File
@@ -36,6 +36,22 @@ class StartupStreamingServer(StreamingServer):
super()._get(request)
def check_overlay_hover(root, app, fixtures):
result_path = root / "overlay-hover.json"
diagnostics = root / "overlay-hover.log"
result = subprocess.run(
["open", "-n", "-W", "--stderr", str(diagnostics), "-a", str(app),
str(fixtures / "cache.mp4"), "--args", "--no-config", "--check-overlay-hover", str(result_path)],
capture_output=True, text=True, timeout=25,
)
report = json.loads(result_path.read_text()) if result_path.exists() else {}
if result.returncode != 0 or not report.get("passed") or report.get("steps") != 7:
log = diagnostics.read_text(errors="replace") if diagnostics.exists() else ""
raise RuntimeError(f"native overlay hover failed: {report}; {result.stdout}{result.stderr}{log}")
print("PASS native overlay hover: video, title, playback, top-right and queue controls stay visible; "
"window exit hides and reentry reveals controls")
def check_window_drag(root, app, fixtures):
result_path = root / "window-drag.json"
diagnostics = root / "window-drag.log"
@@ -686,6 +702,9 @@ with tempfile.TemporaryDirectory(prefix="terebi-startup-") as directory:
if launch.returncode != 0 or not result["passed"] or result["bundleIdentifier"] != identifier:
raise RuntimeError(f"packaged startup failed: {result}; {stdout}{stderr}")
print("PASS packaged bootstrap: registered app PID/identity, in-process player load, actual playback and Now Playing")
check_overlay_hover(root, app, fixtures)
if os.environ.get("TEREBI_CHECK_HOVER_ONLY") == "1":
sys.exit(0)
check_window_drag(root, app, fixtures)
if os.environ.get("TEREBI_CHECK_DRAG_ONLY") != "1":
check_queue_drag(root, app, fixtures)