From 4cf09c7cebd59f2fcaebafb7d2abfee9b521c50f Mon Sep 17 00:00:00 2001 From: blasty Date: Fri, 24 Jul 2026 23:56:09 +0200 Subject: split-view phase 4: split-aware status, min-width gate, verified nav MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Polish for the split view: * _split_status(): status line now reads "name @ ea [split · pseudocode line N ↔ K insn]" / "[split · listing]" from the focused pane, instead of the single-view [pseudocode]/[listing] labels clobbering it. Wired into both cursor-moved handlers and _apply_decomp. * min-width gate: action_toggle_split refuses to enter split below _SPLIT_MIN_WIDTH (100 cols) so two usable code panes always have room. * navigation keeps both panes on the same function: verified (not fixed — goto/follow in split already routes _open_entry -> _show_active split branch, reloading the listing + decomp + region map for the new function). Review turned two roadmap items into non-issues: split is a persistent mode orthogonal to nav entries (back/forward just navigate within split), and search is already per-focused-pane. Pilot split_view gains: split-aware status, goto-in-split navigates, and both panes reload on navigation (16/16). Full suite 157/2-flake. Split view is feature-complete (phases 1-4). --- tests/test_scenarios.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py index 0bca4d8..3401645 100644 --- a/tests/test_scenarios.py +++ b/tests/test_scenarios.py @@ -350,6 +350,9 @@ async def s_split_view(c: Ctx): loaded = await c.wait(lambda: dec.loaded_ea == app._cur.ea, 25) c.check("split loads the pseudocode alongside the listing", loaded, f"loaded={dec.loaded_ea} cur={app._cur.ea if app._cur else None}") + await c.wait(lambda: "[split" in c.status(), 5) + c.check("split view shows a split-aware status", "[split" in c.status(), + f"status={c.status()!r}") # phase 3: the rich per-line instruction map (decomp_map tool, run on the # pilot's real worker) — verify it returns, aligns with the markers, and # bands a whole region for a multi-instruction C line. @@ -412,6 +415,19 @@ async def s_split_view(c: Ctx): await c.pause(0.1) c.check("Tab again focuses the listing pane", app._active == "listing", f"active={app._active}") + # navigation in split keeps BOTH panes on the (new) function + nf = c.find_func(lambda f: f.addr != app._cur.ea and f.size > 80) + if nf is not None: + await c.press("g") + await c.type(hex(nf.addr)) + await c.press("enter") + nav = await c.wait(lambda: app._cur and app._cur.ea == nf.addr, 15) + c.check("goto in split navigates", nav, + f"cur={app._cur.ea if app._cur else None} want={nf.addr}") + both = await c.wait(lambda: dec.loaded_ea == nf.addr and app._split + and lst.display and dec.display, 25) + c.check("split reloads both panes on navigation", both, + f"dec={dec.loaded_ea} split={app._split}") await c.press("s") gone = await c.wait(lambda: not app._split and lst.display and not dec.display, 10) -- cgit v1.3.1-sl0p