Restore terminal on TUI error/panic path (#214)
The interactive client called `result?` before `cleanup_tui_runtime`, so any error propagated out of the run loop skipped terminal restore and left it in raw mode / alternate screen. Typed input then appeared invisible after exit because echo/cooked mode were never restored. Wrap the runtime teardown in a RAII `TuiRuntimeGuard` whose `Drop` performs a full restore unless teardown was explicitly completed via `finish`/`finish_for_run_result`. This guarantees restoration on error and panic-unwind paths. Add unit tests covering the drop-restore and finish-disarm behavior.
J
jeremy committed
3817d7d5823ab5596bc267b33093a431f086ee78
Parent: ea00901