v1.0.0 review fixes: dialog, textarea, scrollbox, demo, ASDF, layout

Fixes from subagent code review (15 findings):

CRITICAL runtime bugs:
- dialog.lisp: backend-write calls -> draw-rect/draw-text (wrong arg count)
- dialog.lisp: removed undefined render-component call
- dialog.lisp: toast render backend-write -> draw-text

MAJOR data loss / silent failures:
- textarea.lisp: undo overflow now drops oldest entry instead of wiping stack
- scrollbox.lisp: :background-element -> :bright-black (theme keyword never resolved)

ASDF completeness:
- modern-tests.lisp wired as component and test-op suite
- layout tests added to test-op suite list
- markdown suite lookup now uses keyword (was looking up wrong string)
- test runner updated to match

API cleanup:
- container-package: removed duplicate render export
- select-package: removed duplicate render export
- markdown.lisp: #\Escape -> #\Esc for consistency
- textarea.lisp: removed duplicate %split-string defn

Demo robustness:
- Added unwind-protect for guaranteed terminal cleanup
- Uses make-modern-backend constructor
- Uses set-raw-mode/restore-terminal-state

Layout:
- normalize-box handles partial padding specs (was returning all zeros)
This commit is contained in:
Hermes
2026-05-11 21:50:53 +00:00
parent 1a19d12f7d
commit d63ba69fb7
10 changed files with 79 additions and 101 deletions

View File

@@ -21,8 +21,10 @@
(defun normalize-box (spec)
(cond ((null spec) '(:top 0 :right 0 :bottom 0 :left 0))
((numberp spec) `(:top ,spec :right ,spec :bottom ,spec :left ,spec))
((getf spec :top) spec)
(t '(:top 0 :right 0 :bottom 0 :left 0))))
(t (loop with result = '(:top 0 :right 0 :bottom 0 :left 0)
for (key val) on spec by #'cddr
do (setf (getf result key) val)
finally (return result)))))
(defun box-edge (box edge)
(or (getf box edge) 0))