From 54d866f83a80efcb17fb7ebfe5eb5d77b4550da1 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 29 Oct 2026 06:52:52 -0700 Subject: [PATCH] feat(nix): rules, a window the cleared rules matched stays put After clear-all-workspace-rules a window that the old rules matched opens on the workspace in view and stays there. The first window of that title is closed before the next opens, because the title is how a window is named on both ports. --- nix/tests/vm/lib/komorebi_vm/core/scenarios/rules.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nix/tests/vm/lib/komorebi_vm/core/scenarios/rules.py b/nix/tests/vm/lib/komorebi_vm/core/scenarios/rules.py index b6aa06c7..24b7ca83 100644 --- a/nix/tests/vm/lib/komorebi_vm/core/scenarios/rules.py +++ b/nix/tests/vm/lib/komorebi_vm/core/scenarios/rules.py @@ -72,5 +72,15 @@ def run(platform: Platform, checks: Checks) -> None: ) platform.komorebic("clear-all-workspace-rules") - for client in (once, always, ignored): + platform.komorebic("focus-workspace", "0") + # the title is the window's name here, so the first window of it goes before the next opens + platform.close(once) + platform.wait_for(lambda: platform.os_window(once) is None, timeout=20) + later = platform.spawn("sent-once") + checks.check( + "once the rules are cleared, a window they matched stays on the workspace in view", + platform.wait_for(lambda: _on(platform, "sent-once") == 0, timeout=20) + and not platform.wait_for(lambda: _on(platform, "sent-once") != 0, timeout=3), + ) + for client in (always, ignored, later): platform.close(client)