Hermes
949bfe46bf
v0.10.0: Mouse support
...
- mouse-mixin class with on-mouse-down/up/move/scroll handler slots
- handle-mouse-event dispatches to the right handler by event type
- hit-test finds deepest component at (x,y) coordinates
- selection struct + get-selection + copy-to-clipboard
- SGR mouse parsing already existed in input system (mouse-event struct,
parse-sgr-mouse function, CSI dispatch in %read-escape-sequence)
- 3 tests, 100% passing
2026-05-11 20:03:59 +00:00
Hermes
14193b8c92
Update plan docs to cl-tty
2026-05-11 19:55:46 +00:00
Hermes
811d51a4f2
Rename cl-tui -> cl-tty, v0.9.0: Dialog System + Toast
...
Rename: cl-tty avoids naming collision with Quicklisp's cl-tui (naryl/cl-tui,
a cl-charms-based ncurses library). Our project is pure escape-sequence CL.
v0.9.0 adds:
- Dialog base class: modal overlay with backdrop, centered panel, size
variants (:small/:medium/:large), stack-based management
- Dialog subclasses: alert, confirm, select-dialog, prompt-dialog
- Toast notifications: transient, top-right corner, auto-dismiss,
colored variants (info/success/warning/error)
- 78 tests total, 100% passing
ASDF: read-time package references (+fiveam:+) replaced with
find-symbol so .asd loads without FiveAM pre-loaded
2026-05-11 19:55:37 +00:00
Hermes
9648c72b85
v0.8.0: Markdown + Code + Diff rendering module
...
Add cl-tui.markdown package with:
- Markdown parser: headings, paragraphs, bold, italic, inline-code, links,
code blocks, blockquotes, lists, thematic breaks
- Syntax highlighting: Lisp, Python, JavaScript, Bash with keyword,
builtin, comment, number, function coloring
- Diff renderer: colorized unified diff (+/-/@ lines)
- Terminal renderer: ANSI escape sequences via backend-style functions
- 67 tests, 100% passing
- All parser helpers use values returns (not cons) for multiple-value-bind
ASDF: v0.7.0 -> v0.8.0, new markdown module + test suite
2026-05-11 18:26:34 +00:00
Hermes
e96c338a57
v0.7.0: Select dropdown with fuzzy filter
...
Select widget: list of options with keyboard navigation (up/down/enter/esc,
ctrl+n/p), case-insensitive substring filter with character-set Jaccard
fuzzy fallback, category headers, viewport culling, on-select callback.
Fixed from subagent review:
- Category filter return-from bug: categories kept in filtered set
- Dead trigram code removed (string-trigrams, trigram-score)
- Exports cleaned up (removed unused trigram exports)
- Character-set Jaccard replaces trigrams (better for short strings)
25 select tests, 100% GREEN.
196 total (27 backend + 58 box + 60 input + 26 scrollbox/tabbar + 25 select)
2026-05-11 17:36:00 +00:00
Hermes
9adefb5dbb
v0.6.0: ScrollBox + TabBar — container components
...
ScrollBox:
- Container with vertical/horizontal scroll, viewport culling
- Scroll offset (:scroll-y, :scroll-x) with clamp to valid bounds
- Scrollbars rendered when content exceeds viewport
- Sticky scroll (auto-scroll to bottom on content change)
- Component protocol: component-children, component-layout-node
TabBar:
- Horizontal tab row with active/inactive styling
- tab-bar-next/prev (wraps around), tab-bar-select, tab-bar-handle-key
- Tab title rendering with overflow truncation (ellipsis)
- Component protocol: component-layout-node
26 scrollbox+tabbar tests, 100% GREEN:
171 total (27 backend + 58 box + 60 input + 26 scrollbox)
Review fixes applied:
- Removed duplicate definitions (org per-function blocks are prose-only)
- Fixed ASDF test path (../../tests/...)
- Version bumped to 0.6.0
- Added clamp-scroll export
- Added tab-bar-next/prev/select/handle-key tests
- Added scroll clamp boundary tests
2026-05-11 17:17:22 +00:00
Hermes
3b0410b088
docs: restructure org for per-function literate prose
...
37 per-function code blocks with prose explaining design reasoning,
edge cases, and CL traps. Combined tangle blocks at end for actual
compilation.
New scripts/tangle.py: reliable Python tangler (emacs --batch failed).
Added: %split-string, %join-lines, tangle helper.
CL traps documented in org prose:
- defstruct generates keyword constructors (no :constructor needed)
- case with strings uses EQL — use cond + string=
- CL strings: no \n escape — use (string #\Newline)
- FiveAM closure capture — use list boxing
- read-byte is package-locked — use read-raw-byte
- ASDF compile-file stricter than LOAD — debug with LOAD
60 tests, 100% GREEN.
2026-05-11 16:51:07 +00:00
Hermes
c55f1773fb
docs: sync org file with working code
...
The .lisp files were edited directly during REPL-driven development.
Pushed all fixes back into the org source of truth:
- Fixed defstruct positional constructor wrappers
- Fixed case+string eql trap (cond+string=)
- Fixed CL string escape sequences (multiline literals)
- Fixed FiveAM closure capture (list boxing)
- Fixed textarea format calls (%join-lines helper)
- Fixed tangle paths for all 5 code blocks
- Consolidated all tests into single test block
- Updated key-match-p, dispatch-key-event, defkeymap macro
All 60 tests pass (100% GREEN).
2026-05-11 16:39:03 +00:00
Hermes
f07cb65186
v0.5.0: Text input + keybinding system
...
Four new modules:
- input.lisp: terminal raw mode, escape sequence parser, key/mouse event
structs, read-event backend integration
- text-input.lisp: single-line text input with cursor, insertion,
deletion, ctrl-A/E/W/U/K, on-submit callback, max-length
- textarea.lisp: multi-line text input with cursor up/down, newline,
backspace joins lines, delete, undo/redo stack
- keybindings.lisp: layered keymap dispatch (global/local/focused),
defkeymap macro, key spec matching with modifier prefixes
60 test assertions, 100% GREEN:
RED: 0/12, 0/27, 0/30 — no tests existed
GREEN: 60/60 across backend (27), box (58), input (60)
Dependencies: sb-posix for terminal raw mode (tcgetattr/tcsetattr)
Test files: 30 input tests covering all widgets and keybinding system
2026-05-11 16:31:07 +00:00
Hermes
2d3227aaf1
review fixes: version bump, keyword check, warning assertion
...
Fixes from subagent review:
- ASDF version 0.3.0 → 0.4.0
- define-preset now checks (check-type name keyword) at macro-expand time
- load-preset-unknown-warns test now uses (signals warning ...) to
actually verify the warning fires (was false-positive before)
2026-05-11 15:27:55 +00:00
Hermes
0851311c3d
v0.4.0: Theme engine — semantic colors, presets, dark/light variants
...
- Theme class with role→hex hash table, mode (dark/light)
- theme-color reader/writer (gethash based)
- define-preset macro with dark and light variants
- load-preset function with keyword lookup
- 2 built-in presets: default (gold) and nord
- 30+ semantic roles per preset (primary, accent, error, syntax-*, etc.)
- 9 theme tests: create, set/get, unknown, dark/light presets,
nord, unknown-warn, switch-mode
- 57 total component tests, 100% GREEN
2026-05-11 15:25:09 +00:00
Hermes
6ba69f4610
review fixes: in-suite, version bump, default children method
...
Fixes from subagent review:
- render-tests.lisp: added (in-suite box-suite) — tests were registered
to default suite, never executed by runner
- dirty-tests.lisp: same fix
- cl-tui.asd: version 0.2.0 → 0.3.0
- render.lisp: component-children default method (c t) nil for
protocol completeness (component-parent already had this)
2026-05-11 15:16:59 +00:00
Hermes
b0e5c18257
v0.3.0: Rendering pipeline — render dispatch, tree walk, dirty propagation
...
- render generic function dispatches per component type
- render-screen entry point with sync wrapper
- render-node walks tree, computes layout, calls render
- component-layout-node generic (box/text methods)
- component-children/component-parent generics
- propagate-dirty marks component + ancestors dirty
- box and text now inherit from dirty-mixin
- 6 new tests: render dispatch, layout-node accessor, children,
dirty propagation, available-width defaults
- 42 component tests, 100% GREEN
2026-05-11 15:12:38 +00:00
Hermes
88c576a6b9
review fixes: word-wrap hard-break, title-align, ASDF fix, edge cases
...
Fixes from subagent review:
- Word-wrap now hard-breaks words exceeding max-width (was returning
un-truncated overflow strings)
- Box zero-size guard now catches any zero/single dimension (was only
catching both zero together)
- Title-align now respected (:left/:center/:right) with proper positioning
- render-text declares (ignore spans) to suppress unused warning
- ASDF test-op fixed: run! → run-tests (symbol didn't exist)
- New test: box-single-column (width=1 renders nothing)
- Tightened word-wrap test: verifies hard-break produces both chunks
- Simplified word-wrap with cond instead of nested if/progn (avoided
recurring paren-balance issue)
2026-05-11 14:57:44 +00:00
Hermes
a1b1352d10
v0.2.0: Dirty tracking — dirty-mixin, mark-clean, mark-dirty
...
- dirty-mixin class with dirty slot (initform t)
- mark-clean clears dirty flag
- mark-dirty sets dirty flag
- 3 tests: default-dirty, clean, dirty-cycle
- ROADMAP.org: v0.2.0 all tasks DONE
- 31 component tests, 100% GREEN
2026-05-11 14:49:03 +00:00
Hermes
5672aaf3fd
v0.2.0: Text renderable with word-wrap and inline spans
...
- Text class with content, fg/bg, wrap-mode (:word or :none)
- Span class for inline styled segments (bold, italic, etc.)
- render-text dispatches through backend's draw-text
- word-wrap function splits text at word boundaries
- split-string utility for whitespace tokenization
- 9 new tests: creation, content, empty, truncation, word-wrap,
single-word, span creation, span storage
- modern-backend now accepts :output-stream
- ASDF updated with text component
- 28 total component tests, 100% GREEN
2026-05-11 14:45:56 +00:00
Hermes
a5f8e6c9d4
v0.2.0: Box renderable — border, background, and title
...
- Box class with border-style, title, fg/bg slots
- render-box dispatches through backend protocol
- draw-border for borders, draw-rect for background
- draw-text for title below top border
- 7 tests: defaults, border, background, title, no-border,
zero-size, minimum-size
- 13 assertions, 100% GREEN
- ASDF updated with src/components module
- modern-backend now accepts :output-stream initarg
2026-05-11 14:41:38 +00:00
76f4477313
Merge pull request 'v0.0.1: Backend Protocol — abstraction layer + simple backend' ( #2 ) from feature/v0.0.1-backend-protocol into main
...
Reviewed-on: http://10.10.10.201:3001/amr/cl-tui/pulls/2
2026-05-11 10:30:53 -04:00
Hermes
2b6fc32425
review fixes: 3 blocking bugs + 2 improvements
...
B1: modern-backend now inherits from backend (was standalone class)
B2: draw-rect y-position bug — loop now tracks row offset
B3: Layout module added to ASDF system definition
I1: 6 smoke tests replaced with behavioral tests (captured output)
I3: 6 edge case tests: empty, single-child, zero-size, deep
nesting, large padding, negative grow
Also fixed:
- Added missing make-simple-backend constructor to simple.lisp
- Added in-package to classes.lisp and simple.lisp (SBCL's load
restores *package* after each load, breaking batch-mode loading)
2026-05-11 14:08:51 +00:00
Hermes
2231fb6647
v0.0.3: layout engine — pure CL Flexbox solver, 35/35 tests GREEN
...
Fixes during debugging:
- Variable scope: loop's closing parens closed the let* prematurely,
making children/is-row/pr/pb undefined in own-size calculation
- gap NIL bug: make-layout-node passed :gap nil (from &key default)
to make-instance, overriding :initform 0 → (* nil ...) crash
- Child order: push (LIFO) in add-child reversed children order;
changed to nconc (FIFO), removed the compensating reverse
- Fixed distribute-sizes to base all children from their fixed size
then apply grow/shrink on top, instead of treating fixed-size
children as non-participating
2026-05-11 13:39:26 +00:00
Hermes
5e17e3d509
v0.0.3: layout engine — pure CL Flexbox constraint solver and push
2026-05-11 13:12:35 +00:00
Hermes
0397d1de2c
v0.0.2: modern backend — raw escape sequences
...
Implements the modern-backend with truecolor SGR, Unicode box-drawing
(rounded/double/single), DECICM synchronized updates, OSC 8 hyperlinks,
cursor style control, and hex color parsing.
RED: 32 checks, 5 fail (class forward-ref + test bug)
GREEN: 32/32 checks passing (100%)
- backend/modern.lisp — escape generators + modern-backend class
- backend/modern-tests.lisp — 16 test cases, 32 assertions
- backend/package.lisp — updated exports
- org/modern-backend.org — literate source
2026-05-11 12:53:55 +00:00
Hermes
db59fa4f55
v0.0.1: backend protocol — abstraction layer + simple backend
...
Implement the backend protocol with two backends (modern planned,
simple done). Includes package definitions, CLOS generic protocol,
simple-backend with ASCII borders, and 9 FiveAM tests.
RED: 9/9 tests failing (no implementation)
GREEN: 9/9 tests passing
- backend/package.lisp — defpackage, exports
- backend/classes.lisp — backend base class, 18 generics
- backend/simple.lisp — simple-backend implementation
- backend/tests.lisp — 9 FiveAM test cases
- org/backend-protocol.org — literate source
2026-05-11 12:45:26 +00:00
Hermes
bd22f1a43d
test: check token permissions
2026-05-11 11:45:59 +00:00
3e0268c982
Initial commit: cl-tui — Reusable Common Lisp Terminal UI Framework
...
Layout engine (Yoga FFI), renderables (Box, Text), rendering engine,
theme engine, TextInput/Textarea, ScrollBox/TabBar, Select, Markdown/Code/Diff,
dialog system, mouse support, plugin/slot system.
2026-05-11 06:48:20 -04:00