feat(interface): show resume hint on the existing exit panel

When a scan ends without calling ``finish_scan`` (Ctrl+C, TUI quit,
crash), ``display_completion_message`` now appends one extra line
inside the existing completion panel:

    Resume  strix --run-name <run_name>

Same ``dim``-label / coloured-value styling as the panel's ``Target``
and ``Output`` rows. Only rendered when ``scan_completed`` is False —
a finished scan doesn't need a resume nudge.

Triggers ``orchestration/scan.py``'s implicit-resume path on the next
invocation (presence of ``{run_dir}/bus.json`` is the trigger), so
the user gets back exactly where they left off — root + every
non-terminal subagent's full LLM history, bus topology, prior
findings.

Covers both ``run_cli`` and ``run_tui`` paths since
``display_completion_message`` is called from ``main()`` regardless
of which front-end ran.
This commit is contained in:
0xallam
2026-04-26 00:38:17 -07:00
parent d26fe76b88
commit 01f80e2dd4
4 changed files with 10 additions and 57 deletions
-9
View File
@@ -21,7 +21,6 @@ from strix.telemetry.tracer import Tracer, set_global_tracer
from .utils import (
build_live_stats_text,
format_resume_hint,
format_vulnerability_report,
)
@@ -140,10 +139,6 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
def signal_handler(_signum: int, _frame: Any) -> None:
tracer.cleanup()
hint = format_resume_hint(args.run_name)
if hint is not None:
console.print()
console.print(hint)
sys.exit(1)
atexit.register(cleanup_on_exit)
@@ -217,10 +212,6 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
except Exception as e:
console.print(f"[bold red]Error during penetration test:[/] {e}")
hint = format_resume_hint(args.run_name)
if hint is not None:
console.print()
console.print(hint)
raise
if tracer.final_scan_result: