From 0b16c4829f665cc70326b91d708c7d8ee99bc794 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Wed, 6 May 2026 11:14:42 -0400 Subject: [PATCH] fix: set input-blocking nil on input window so agent responses render Croatoan child windows don't inherit the screen's :input-blocking nil. Without explicit (setf (input-blocking iw) nil), get-char blocks the main loop indefinitely, preventing redraw from running. New agent messages queued by the reader-loop thread were never rendered until the user pressed a key. Now the loop runs at 30fps and responses appear immediately. --- lisp/gateway-tui-main.lisp | 7 ++++--- org/gateway-tui-main.org | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/gateway-tui-main.lisp b/lisp/gateway-tui-main.lisp index 876e730..9647c67 100644 --- a/lisp/gateway-tui-main.lisp +++ b/lisp/gateway-tui-main.lisp @@ -235,10 +235,11 @@ (ch (- h 5)) (cw (make-instance 'window :height ch :width (- w 2) :y 3 :x 1)) (iw (make-instance 'window :height 1 :width (- w 2) :y (- h 1) :x 1)) - (swank-port (or (ignore-errors - (parse-integer (uiop:getenv "TUI_SWANK_PORT"))) - 4006))) + (swank-port (or (ignore-errors + (parse-integer (uiop:getenv "TUI_SWANK_PORT"))) + 4006))) (setf (function-keys-enabled-p iw) t + (input-blocking iw) nil (st :dirty) (list t t t)) (connect-daemon) (when (> swank-port 0) diff --git a/org/gateway-tui-main.org b/org/gateway-tui-main.org index 6065e48..a93c95a 100644 --- a/org/gateway-tui-main.org +++ b/org/gateway-tui-main.org @@ -272,10 +272,11 @@ Event handlers + daemon I/O + main loop. (ch (- h 5)) (cw (make-instance 'window :height ch :width (- w 2) :y 3 :x 1)) (iw (make-instance 'window :height 1 :width (- w 2) :y (- h 1) :x 1)) - (swank-port (or (ignore-errors - (parse-integer (uiop:getenv "TUI_SWANK_PORT"))) - 4006))) + (swank-port (or (ignore-errors + (parse-integer (uiop:getenv "TUI_SWANK_PORT"))) + 4006))) (setf (function-keys-enabled-p iw) t + (input-blocking iw) nil (st :dirty) (list t t t)) (connect-daemon) (when (> swank-port 0)