v0.7.3: cl-tty TUI migration — replace Croatoan (ncurses CFFI) with cl-tty (pure CL) #1

Open
amr wants to merge 3 commits from refactor/cl-tty-tui into main
Owner

Replaces Croatoan (ncurses CFFI) with cl-tty (pure CL, no FFI) as the terminal rendering backend for the TUI channel.

Changes

  • passepartout.asd: swapped :croatoan:cl-tty dependency
  • state.org: removed Croatoan from :use package list, theme-color returns hex strings
  • main.org: main loop uses with-raw-terminal + with-terminal + framebuffer-backend. Key dispatch via read-event with structured events. SIGWINCH resize handling.
  • view.org: all render functions rewritten to use cl-tty.backend:draw-text on framebuffer-backend instead of Croatoan window operations
  • render-styled: migrated from Croatoan add-string/height to cl-tty draw-text
  • Fixed: #\) character literal ambiguity in org source (CL reader vs paren counter)
  • Fixed: missing closing paren in defun on-key (the t clause last setf had 7 trailing parens, needed 8)

Verification

  • (ql:quickload :passepartout/tui) compiles cleanly under SBCL 2.5.2
  • All Croatoan references removed from tangled lisp files
  • cl-tty v1.0.0+ provides TrueColor, framebuffer, mouse, SIGWINCH, OSC 8, etc.

Prerequisite

  • Requires cl-tty v1.0.0+ at ~/quicklisp/local-projects/cl-tty
Replaces Croatoan (ncurses CFFI) with cl-tty (pure CL, no FFI) as the terminal rendering backend for the TUI channel. ### Changes - **passepartout.asd**: swapped `:croatoan` → `:cl-tty` dependency - **state.org**: removed Croatoan from `:use` package list, theme-color returns hex strings - **main.org**: main loop uses `with-raw-terminal` + `with-terminal` + framebuffer-backend. Key dispatch via `read-event` with structured events. SIGWINCH resize handling. - **view.org**: all render functions rewritten to use `cl-tty.backend:draw-text` on framebuffer-backend instead of Croatoan window operations - **render-styled**: migrated from Croatoan `add-string`/`height` to cl-tty `draw-text` - **Fixed**: `#\)` character literal ambiguity in org source (CL reader vs paren counter) - **Fixed**: missing closing paren in `defun on-key` (the t clause last setf had 7 trailing parens, needed 8) ### Verification - `(ql:quickload :passepartout/tui)` compiles cleanly under SBCL 2.5.2 - All Croatoan references removed from tangled lisp files - cl-tty v1.0.0+ provides TrueColor, framebuffer, mouse, SIGWINCH, OSC 8, etc. ### Prerequisite - Requires cl-tty v1.0.0+ at ~/quicklisp/local-projects/cl-tty
amr added 2 commits 2026-05-12 18:44:57 -04:00
- Added missing closing paren for defun on-key in org/channel-tui-main.org
  line 616 (was 7 trailing ), now 8)
- Replaced #\) character literal with (code-char 41) to avoid reader
  ambiguity with paren-delimiter counting
- All 3 TUI org files tangled and verified compilable
- passepartout/tui loads without errors under SBCL 2.5.2
All 8 roadmap items complete:
- .asd swapped :croatoan → :cl-tty
- Package cleaned in state.org
- Main loop rewritten (with-raw-terminal + with-terminal + framebuffer)
- View functions use cl-tty.backend:draw-text
- render-styled fixed (Croatoan references removed)
- Org artifacts cleaned from tangled lisp files
- Compilation verified (ql:quickload :passepartout/tui)
- Branch pushed to Gitea
amr added 1 commit 2026-05-12 18:47:44 -04:00
- Sidebar: Croatoan window → cl-tty framebuffer draw-text
- Overlay mode: absolute-positioned ncurses → Emacs minibuffer-style
  bottom panel (shrink chat height, render in freed rows)
- Command palette: Croatoan window overlay → framebuffer bottom panel
- TrueColor: Croatoan set-rgb → cl-tty hex-to-rgb + SGR 38/48
- Tool viz: Croatoan init-pair/color-pair → cl-tty draw-text fg/bg
- Mouse: Croatoan mouse-enabled-p → cl-tty v1.1.0 SGR mouse parsing
This pull request has changes conflicting with the target branch.
  • docs/ROADMAP.org
  • lisp/channel-tui-main.lisp
  • lisp/channel-tui-state.lisp
  • lisp/channel-tui-view.lisp
  • org/channel-tui-main.org
  • org/channel-tui-state.org
  • org/channel-tui-view.org
  • passepartout.asd
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin refactor/cl-tty-tui:refactor/cl-tty-tui
git checkout refactor/cl-tty-tui
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: amr/passepartout#1