v0.8.0: TUI stabilization, command palette reverse-video highlight, hint bar redesign

- ROADMAP: consolidate all TUI work under v0.8.0 (removed premature
  v0.9.0/v0.10.x labels), restored original v0.9.0 eval harness plan
- channel-tui-view.org: Emacs-style reverse-video cursor (swap fg/bg
  instead of drawing █), hint bar now shows F:focus/MCP:count on left
  and token gauge + keybindings on right, sidebar reorganized to show
  GATE TRACE, RULES + BLOCK COUNT, COST, FILES panels
- channel-tui-main.org: command palette selection now uses reverse-video
  highlight (bg-input fg on input-fg bg, matching cursor style), fixed
  cond order so sel-p is checked before cat (all items had :category
  making sel-p unreachable), added session-cost extraction from daemon
- passepartout: export COLORTERM=truecolor for modern backend detection
This commit is contained in:
2026-05-17 15:37:40 -04:00
parent 2fedbbcb3b
commit e04b12c31c
53 changed files with 12406 additions and 197 deletions

View File

@@ -645,7 +645,8 @@ supplied (e.g. \"/\"), pre-fill the select filter with it."
(level (getf msg :level))
(gate-trace (getf msg :gate-trace))
(rule-count (getf payload :rule-count))
(foveal-id (getf payload :foveal-id)))
(foveal-id (getf payload :foveal-id))
(session-cost (getf payload :session-cost)))
;; v0.7.2: HITL approval-required panel
(when (eq level :approval-required)
(let* ((hitl-msg (or (getf payload :message)
@@ -692,6 +693,7 @@ supplied (e.g. \"/\"), pre-fill the select filter with it."
(return-from on-daemon-msg nil))))
(when rule-count (setf (st :rule-count) rule-count))
(when foveal-id (setf (st :foveal-id) foveal-id))
(when session-cost (setf (st :session-cost) session-cost))
(cond
(text (setf (st :busy) nil)
(add-msg :agent text :gate-trace gate-trace))
@@ -1043,25 +1045,31 @@ Returns T on success, nil on failure. Does NOT wait or retry."
(cl-tty.backend:draw-text be 1 top
(cl-tty.dialog:dialog-title dlg)
(theme-color :accent) bg-p)
;; Options
(let ((y-off 1))
(dolist (item filtered)
(let* ((display-idx (first item))
(option (third item))
(title (getf option :title))
(cat (getf option :category))
(sel-p (eql display-idx sel-idx))
(text (if cat (format nil " ~a" title)
(format nil " ~a~a" (if sel-p "▸ " " ") title)))
(row (+ top y-off)))
(when (>= row (1- h)) (return))
(cl-tty.backend:draw-text be 1 row text
(cond (cat (theme-color :text-muted))
(sel-p (theme-color :accent))
(t (theme-color :agent-fg)))
bg-p :bold sel-p)
(incf y-off))))
;; Filter prompt
;; Options
(let ((y-off 1))
(dolist (item filtered)
(let* ((display-idx (first item))
(option (third item))
(title (getf option :title))
(cat (getf option :category))
(sel-p (eql display-idx (or sel-idx 0)))
(text (if cat (format nil " ~a" title)
(format nil " ~a" title)))
(row (+ top y-off)))
(when (>= row (1- h)) (return))
(cond
(sel-p
(cl-tty.backend:draw-rect be 1 row (1- chat-w) 1
:bg (theme-color :input-fg))
(cl-tty.backend:draw-text be 1 row (format nil " >> ~a" title)
(theme-color :bg-input) (theme-color :input-fg)))
(cat
(cl-tty.backend:draw-text be 1 row text
(theme-color :text-muted) bg-p))
(t
(cl-tty.backend:draw-text be 1 row text
(theme-color :agent-fg) bg-p)))
(incf y-off))))
(cl-tty.backend:draw-rect be 0 (- h 3) chat-w 1 :bg bg-p)
(cl-tty.backend:draw-text be 0 (- h 3)
(format nil "> ~a" (or filter ""))