v0.7.2: HITL panel collapse on approve/deny — TDD

resolve-hitl-panel marks the most recent panel message with
:panel-resolved (:approved or :denied) and writes back to
the message vector. View-chat renders resolved panels with
dimmed color instead of :hitl theme color.

/approve and /deny handlers call resolve-hitl-panel after
sending structured events to the daemon. Confirmation messages
now use checkmark/crossmark prefixes.

- channel-tui-main: resolve-hitl-panel fn, wired into handlers
- channel-tui-view: is-resolved check for panel dimming
- +2 tests: panel-after-approve, panel-after-deny
- TUI Main: 88/89 (1 pre-existing flake)
This commit is contained in:
2026-05-08 20:51:49 -04:00
parent 7c84dbfacb
commit 93a38d5308
4 changed files with 84 additions and 22 deletions

View File

@@ -85,11 +85,14 @@ Returns list of trimmed strings. Single words wider than width are split."
(color (theme-color (case role (:user :user) (:agent :agent) (:system :system) (t :agent))))
(prefix (case role (:user "⬆") (:agent "⬇") (t " ")))
(is-panel (getf msg :panel))
(is-resolved (getf msg :panel-resolved))
(line-text (format nil "~a [~a] ~a" prefix time content))
(wrapped (word-wrap line-text (- w 2))))
;; HITL panel: render with colored border
(when is-panel
(setf color (theme-color :hitl)))
(setf color (if is-resolved
(theme-color :dim)
(theme-color :hitl))))
(dolist (line wrapped)
(when (< y (1- h))
(if (eq role :agent)