From c2f56ee87f9de280fb8d5e94f1730a0574e0c0e7 Mon Sep 17 00:00:00 2001 From: blasty Date: Thu, 9 Jul 2026 16:53:13 +0200 Subject: decompiler: grayed 'decompiling…' overlay during (re)decompile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a decompile runs (tab to pseudocode, or an implicit refresh after rename), DecompView.loading covers the pane with a centered, grayed '― decompiling… ―' (custom get_loading_widget + .decomp-loading CSS), cleared when the body arrives. The loading cover blurs the widget, which made Tab fall back to focus-nav instead of toggling; made the app Tab/Shift+Tab binding priority so it toggles regardless of focus, and restore focus to the pane when the decompile finishes. pilot suite 55/55 (adds overlay-shown / overlay-cleared). --- tests/test_tui.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests') diff --git a/tests/test_tui.py b/tests/test_tui.py index 884b1c3..494ea4a 100644 --- a/tests/test_tui.py +++ b/tests/test_tui.py @@ -157,6 +157,25 @@ async def run(db): app._active == "disasm" and dis.display and not dec.display, f"active={app._active}") + # A (re)decompile shows a grayed 'decompiling…' overlay while it runs. + await pilot.press("tab") + await wait_until(pilot, lambda: app._active == "decomp", timeout=10) + await wait_until(pilot, lambda: dec.loaded_ea is not None, timeout=20) + dec.loaded_ea = None # force a reload (as rename/refresh does) + app._show_active() + cover = dec._cover_widget + check("decompile shows a 'decompiling…' overlay", + dec.loading and cover is not None + and "decomp-loading" in cover.classes + and "decompiling" in str(cover.render()), + f"loading={dec.loading} cover={cover!r}") + await wait_until(pilot, lambda: not dec.loading and dec._cover_widget is None, + timeout=25) + check("overlay clears when the decompile finishes", + not dec.loading and dec._cover_widget is None) + await pilot.press("tab") # back to disasm for the rest of the tests + await wait_until(pilot, lambda: app._active == "disasm", timeout=10) + # Vim-style search in the disassembly view. line0 = dis.model.cached_line(0) raw = (line0.text.split() or ["push"])[0] if line0 else "push" -- cgit v1.3.1-sl0p