aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-24 16:43:36 +0200
committerblasty <blasty@local>2026-07-24 16:43:36 +0200
commitb13b1f181483dfb61d1be1d666f1595b4e7d504f (patch)
treea52e87b5e6e7d9e288012d3f5872d98c1c479a9b /tests
parentpalette: fix results width (were compounded narrower than the modal) (diff)
downloadida-tui-b13b1f181483dfb61d1be1d666f1595b4e7d504f.tar.gz
ida-tui-b13b1f181483dfb61d1be1d666f1595b4e7d504f.tar.xz
ida-tui-b13b1f181483dfb61d1be1d666f1595b4e7d504f.zip
decomp: restore the 'decompiling…' overlay on F5/Tab from the listing
The F5/Tab-from-listing path decompiled the function inside _decomp_from_listing (via _decomp_line_for) in a background thread with no overlay, THEN _show_active re-decompiled it -- but that second call hit the cache and returned instantly, so dec.loading was set and cleared within a frame and the overlay only flashed. The long wait (the real decompile) happened with nothing on screen. Raise the pseudocode pane + loading overlay synchronously in action_toggle_view before launching the background decompile, so the wait is covered. Non-function F5 restores the listing via _decomp_from_listing_failed. Pilot view_toggle now drives the real path (action_toggle_view from the listing) and asserts the overlay is raised synchronously; F5 paths (decomp_fallback, continuous_view, region_define) all still pass (20/20 + view_toggle 7/7).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_scenarios.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py
index 94baf93..e21226c 100644
--- a/tests/test_scenarios.py
+++ b/tests/test_scenarios.py
@@ -617,17 +617,18 @@ async def s_view_toggle(c: Ctx):
c.check("tab switches to disassembly",
app._active == "listing" and dis.display and not dec.display,
f"active={app._active}")
- await c.press("tab")
- await c.wait(lambda: app._active == "decomp", 10)
- # a (re)decompile shows the grayed overlay
+ # F5/Tab from the listing must raise the 'decompiling…' overlay synchronously,
+ # BEFORE the background decompile runs (regression: it used to decompile first
+ # in _decomp_from_listing, so the overlay only flashed once cached).
dec.loaded_ea = None
- app._show_active()
+ app.action_toggle_view()
cover = dec._cover_widget
- c.check("decompile shows a 'decompiling…' overlay",
+ c.check("F5 from the listing raises the '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 c.wait(lambda: not dec.loading and dec._cover_widget is None, 25)
+ await c.wait(lambda: app._active == "decomp" and not dec.loading
+ and dec._cover_widget is None, 25)
c.check("overlay clears when the decompile finishes",
not dec.loading and dec._cover_widget is None)
# line-number gutter