reorg: tangle to XDG, remove stale lisp files, fix tui input

- Changed all 50 org file :tangle targets from ../lisp/ to
  ~/.local/share/passepartout/lisp/ (XDG data dir)
- Removed 49 generated .lisp files from project lisp/ directory
- Removed tests/system-integration-tests.lisp (generated)
- Removed lisp/*.fasl (compiled, stale)
- Updated core-manifest.org to tangle .asd to XDG root
- Remapped quicklisp symlink: local-projects/passepartout → XDG

TUI fixes in channel-tui-main.org:
- Removed with-raw-terminal (stty raw breaks fd 0 reads in this SBCL)
- Use cat subprocess + pipe for keyboard input (via :input :interactive)
- Blocking read-char on pipe with with-timeout 0.1s for daemon processing
- Key events queued via drain-queue alongside daemon messages
- Full dialog key routing (Escape, Up/Down, Enter, filters, Backspace)
- SIGWINCH resize handling
- Post-handshake backend-size re-query
- Daemon version in status bar (was v0.5.0 hardcoded)
- Handshake version stored in state, no add-msg
- :daemon-version and :size-queried in state plist
- view-status uses draw-rect for background
- Test section gated with #+passepartout-tests
This commit is contained in:
2026-05-14 12:34:06 -04:00
parent 0ad9d3bdb5
commit b9a4318ef8
100 changed files with 109 additions and 12282 deletions

View File

@@ -1,5 +1,5 @@
#+TITLE: Passepartout TUI — Model
#+PROPERTY: header-args:lisp :tangle ../lisp/channel-tui-state.lisp
#+PROPERTY: header-args:lisp :tangle /home/user/.local/share/passepartout/lisp/channel-tui-state.lisp
* Model
@@ -17,7 +17,7 @@ All state mutation flows through event handlers in the controller.
reader loop. (drain-queue) returns and clears the queue.
** Package + State
#+BEGIN_SRC lisp :tangle ../lisp/channel-tui-state.lisp
#+BEGIN_SRC lisp :tangle /home/user/.local/share/passepartout/lisp/channel-tui-state.lisp
(defpackage :passepartout.channel-tui
(:use :cl :passepartout :usocket :bordeaux-threads)
(:export :tui-main :st :add-msg :now :input-string
@@ -202,7 +202,7 @@ All state mutation flows through event handlers in the controller.
#+END_SRC
** Sidebar panel definitions
#+BEGIN_SRC lisp :tangle ../lisp/channel-tui-state.lisp
#+BEGIN_SRC lisp :tangle /home/user/.local/share/passepartout/lisp/channel-tui-state.lisp
(defvar *sidebar-panels*
'((:id :gate-trace :title "Gate Trace" :width 28)
(:id :focus :title "Focus" :width 28)
@@ -214,7 +214,7 @@ All state mutation flows through event handlers in the controller.
#+END_SRC
** Helpers
#+BEGIN_SRC lisp :tangle ../lisp/channel-tui-state.lisp
#+BEGIN_SRC lisp :tangle /home/user/.local/share/passepartout/lisp/channel-tui-state.lisp
(defun now ()
(multiple-value-bind (s m h) (get-decoded-time)
(declare (ignore s))
@@ -251,7 +251,7 @@ All state mutation flows through event handlers in the controller.
#+END_SRC
** Slash Commands
#+BEGIN_SRC lisp :tangle ../lisp/channel-tui-state.lisp
#+BEGIN_SRC lisp :tangle /home/user/.local/share/passepartout/lisp/channel-tui-state.lisp
(defvar *slash-commands*
'((:title "/eval <expr> — Evaluate Lisp" :value "/eval" :category :session)
(:title "/undo — Undo last operation" :value "/undo" :category :session)
@@ -281,7 +281,7 @@ All state mutation flows through event handlers in the controller.
#+END_SRC
** Daemon Commands
#+BEGIN_SRC lisp :tangle ../lisp/channel-tui-state.lisp
#+BEGIN_SRC lisp :tangle /home/user/.local/share/passepartout/lisp/channel-tui-state.lisp
(defvar *daemon-commands*
'((:title "Status — Daemon health info" :value (:action :status) :category :session)
(:title "Stats — Daemon statistics" :value (:action :stats) :category :session)
@@ -297,7 +297,7 @@ All state mutation flows through event handlers in the controller.
#+END_SRC
** Event Queue
#+BEGIN_SRC lisp :tangle ../lisp/channel-tui-state.lisp
#+BEGIN_SRC lisp :tangle /home/user/.local/share/passepartout/lisp/channel-tui-state.lisp
(defun queue-event (ev)
(bt:with-lock-held (*event-lock*) (push ev *event-queue*)))