aboutsummaryrefslogtreecommitdiffstats
path: root/idatui/app.py
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-23 23:52:23 +0200
committerblasty <blasty@local>2026-07-23 23:52:23 +0200
commit976fcb8440242d45565e19897f3ef1164a3c9940 (patch)
tree8644a5ac67645c1e9fda822cab3f712469a8c840 /idatui/app.py
parentlaunch: sweep a crashed worker's stale DB locks before starting the supervisor (diff)
downloadida-tui-976fcb8440242d45565e19897f3ef1164a3c9940.tar.gz
ida-tui-976fcb8440242d45565e19897f3ef1164a3c9940.tar.xz
ida-tui-976fcb8440242d45565e19897f3ef1164a3c9940.zip
ux: start the analysis server from inside the TUI (no more dead window)
The remaining "long wait with no feedback" was the launcher's _ensure_server: it started the supervisor and blocked ~10s polling for the port BEFORE the TUI (and its overlay) existed. Only a one-line stderr message covered it. Move that wait behind the overlay. The launcher now only does instant checks (sweep stale locks if the server is down, honor --no-server) and hands the binary straight to the TUI with ensure_server=True. The TUI's _connect starts the server itself and narrates it in the loading overlay ("starting analysis server… (Ns)") before opening/analyzing the binary. idb_open is idempotent, so an already-open session is still adopted instantly (the launcher no longer needs to probe sessions). _ensure_server gained a progress callback so it reports to the overlay instead of stderr (which would corrupt the TUI screen). Verified with the server DOWN: chrome + overlay appear within ~0.5s, notes go "starting analysis server… (0s)" -> "opening echo — analyzing…" -> "echo — 128 functions…" -> land on main. Pilot suite (db/ensure_server=False path) green: startup/palette/view_toggle/disasm_nav/search/rename/follow_xrefs/ decomp_nav/mouse/listing_view/continuous_view/func_banners.
Diffstat (limited to 'idatui/app.py')
-rw-r--r--idatui/app.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/idatui/app.py b/idatui/app.py
index 462aaf2..6e9388f 100644
--- a/idatui/app.py
+++ b/idatui/app.py
@@ -2290,12 +2290,13 @@ class IdaTui(App):
def __init__(self, url: str, db: str | None, keepalive: bool = True,
open_path: str | None = None, rpc_path: str | None = None,
- ttl: int = 1800) -> None:
+ ttl: int = 1800, ensure_server: bool = False) -> None:
super().__init__()
self._url = url
self._db = db
self._open_path = open_path
self._ttl = ttl
+ self._ensure_server = ensure_server
self._do_keepalive = keepalive
self._rpc_path = rpc_path
self._rpc = None
@@ -2443,6 +2444,17 @@ class IdaTui(App):
@work(thread=True, exclusive=True, group="connect")
def _connect(self) -> None:
try:
+ if self._ensure_server:
+ # Start the analysis server here (not in the launcher) so the
+ # chrome + overlay are already up while we wait for it.
+ from .launch import _ensure_server as _ensure
+ if not _ensure(self._url, self._open_path,
+ progress=lambda m: self.app.call_from_thread(
+ self._status, m)):
+ self.app.call_from_thread(
+ self._status, "could not start the analysis server")
+ self.app.call_from_thread(self._dismiss_loading)
+ return
client = IDAClient(self._url, db=self._db)
client.connect()
if self._open_path is not None: