fix: revert to blocking connect-daemon, daemon connection now reliable

- Revert async connect-daemon thread (bt:make-thread unreliable — errors
  in the thread cause silent failure, no connection, no error message)
- Restore blocking connect-daemon before with-terminal (original pattern
  that was working)
- Revert /reconnect to synchronous call
- Remove stale async thread code and error messages
This commit is contained in:
2026-05-15 09:21:54 -04:00
parent c148570d4c
commit 53aa471a51

View File

@@ -437,10 +437,12 @@ Event handlers + daemon I/O + main loop.
(add-msg :system "* Goodbye *")
(send-daemon (list :type :event :payload '(:action :quit)))
(setf (st :running) nil))
;; /reconnect — re-establish daemon connection
((string-equal text "/reconnect")
(disconnect-daemon)
(connect-daemon))
;; /reconnect — re-establish daemon connection
((string-equal text "/reconnect")
(disconnect-daemon)
(add-msg :system "* Reconnecting... *")
(connect-daemon)
(setf (st :dirty) (list t t nil)))
;; Normal message
(t
(add-msg :user text)
@@ -905,8 +907,8 @@ supplied (e.g. \"/\"), pre-fill the select filter with it."
(if (typep be 'cl-tty.backend:modern-backend) "modern" "simple")
w h))
;; Initial dirty all to trigger first redraw in loop
(setq w (or (and (numberp w) (> w 0) w) 80)
h (or (and (numberp h) (> h 0) h) 24))
(setq w (or (and (numberp w) (> w 0) w) 80)
h (or (and (numberp h) (> h 0) h) 24))
(loop while (st :running) do
(dolist (ev (drain-queue))
(cond