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)
This commit is contained in:
Hermes
2026-05-11 17:36:00 +00:00
parent 9adefb5dbb
commit e96c338a57
5 changed files with 779 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
(asdf:defsystem :cl-tui
:description "Reusable Common Lisp Terminal UI Framework"
:author "Amr Gharbeia"
:version "0.6.0"
:version "0.7.0"
:license "TBD"
:depends-on (:fiveam :sb-posix)
:components
@@ -32,7 +32,10 @@
;; Container components (v0.6.0)
(:file "container-package" :depends-on ("package" "input-package"))
(:file "scrollbox" :depends-on ("container-package" "dirty" "box"))
(:file "tabbar" :depends-on ("container-package" "dirty" "box"))))
(:file "tabbar" :depends-on ("container-package" "dirty" "box"))
;; Select widget (v0.7.0)
(:file "select-package" :depends-on ("package" "input-package"))
(:file "select" :depends-on ("select-package" "dirty" "box"))))
:in-order-to ((test-op (test-op :cl-tui-tests))))
(asdf:defsystem :cl-tui-tests
@@ -52,12 +55,14 @@
(:file "render-tests")
(:file "theme-tests")
(:file "input-tests")
(:file "scrollbox-tabbar-tests" :pathname "../../tests/scrollbox-tabbar-tests.lisp"))))
(:file "scrollbox-tabbar-tests" :pathname "../../tests/scrollbox-tabbar-tests.lisp")
(:file "select-tests" :pathname "../../tests/select-tests.lisp"))))
:perform (test-op (o c)
(dolist (suite '((:cl-tui-backend-test "BACKEND-SUITE")
(:cl-tui-box-test "BOX-SUITE")
(:cl-tui-input-test "INPUT-SUITE")
(:cl-tui-scrollbox-test "SCROLLBOX-SUITE")))
(:cl-tui-scrollbox-test "SCROLLBOX-SUITE")
(:cl-tui-select-test "SELECT-SUITE")))
(let* ((pkg (find-package (first suite)))
(s (and pkg (find-symbol (second suite) pkg))))
(when s