Compare commits
31 Commits
d14d1ab8ae
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b22a15cc5d | |||
| b8f359f518 | |||
| 3a4c5a6f23 | |||
| 7d7fbe0881 | |||
| 3b6bf53829 | |||
| 5c2a928522 | |||
| cfb1fb01d2 | |||
| f32acc54a1 | |||
| 18a73b4fe0 | |||
| 36275b0307 | |||
| 81c558dcdf | |||
| 15a5aaba8c | |||
| 0705804fc6 | |||
| 104164048c | |||
| 34a95373a9 | |||
| 41d52d94d0 | |||
| f0fe2d8ed8 | |||
| 71398e93eb | |||
| 3cce601aa8 | |||
| 3e0163c2c7 | |||
| 81243704ea | |||
| 79bc3fb94d | |||
| d42882446f | |||
| b2c3a82bf4 | |||
| 162d489556 | |||
| dd6f9bd23e | |||
| 51d833a64a | |||
| 902196ba0b | |||
| ab2dc009a6 | |||
| bde09f7ea8 | |||
| e28af77f18 |
@@ -207,12 +207,13 @@ When sending code to the REPL, use the correct `(in-package ...)` form first.
|
|||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| `:cl-tty.backend` | Backend protocol — terminal init, draw-text, read-event |
|
| `:cl-tty.backend` | Backend protocol — terminal init, draw-text, read-event |
|
||||||
| `:cl-tty.rendering` | Framebuffer — make-framebuffer, flush-framebuffer |
|
| `:cl-tty.rendering` | Framebuffer — make-framebuffer, flush-framebuffer |
|
||||||
| `:cl-tty.input` | Input — key-event, defkeymap, dispatch-key-event |
|
| `:cl-tty.input` | Input — key-event, defkeymap, dispatch-key-event, text-input, textarea |
|
||||||
| `:cl-tty.layout` | Layout — vbox, hbox, spacer, layout-calculate |
|
| `:cl-tty.layout` | Layout — vbox, hbox, spacer, layout-calculate |
|
||||||
| `:cl-tty.dialog` | Dialog system — dialog stack, select-dialog |
|
| `:cl-tty.box` | Components — box, text, word-wrap, char-width, dirty-mixin, render protocol |
|
||||||
| `:cl-tty.select` | Select widget — filter, handle-key |
|
| `:cl-tty.theme` | Theme — theme class, define-preset, load-preset, theme-color |
|
||||||
|
| `:cl-tty.dialog` | Dialog — dialog stack, select, select-dialog, alert-dialog, toast |
|
||||||
| `:cl-tty.slot` | Slot/plugin system |
|
| `:cl-tty.slot` | Slot/plugin system |
|
||||||
| `:cl-tty.markdown` | Markdown rendering |
|
| `:cl-tty.markdown` | Markdown — parse-blocks, parse-inline, highlight-code, render-md |
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@@ -286,3 +287,42 @@ when the runtime itself cannot start.
|
|||||||
- **YOU MAY NOT** push a version tag (e.g., `v0.5.0`), create a GitHub release,
|
- **YOU MAY NOT** push a version tag (e.g., `v0.5.0`), create a GitHub release,
|
||||||
or run `git push` that triggers CI/CD version workflows without explicit
|
or run `git push` that triggers CI/CD version workflows without explicit
|
||||||
permission. Ask first.
|
permission. Ask first.
|
||||||
|
|
||||||
|
## Library/Application Boundary (passepartout + cl-tty)
|
||||||
|
|
||||||
|
The line between cl-tty and passepartout must be clear. Violations produce
|
||||||
|
duplicated code, inconsistent UX, and maintenance burden across both projects.
|
||||||
|
|
||||||
|
**The rule: before writing any UI code in passepartout, check cl-tty first.**
|
||||||
|
If the abstraction already exists in cl-tty, use it. If it doesn't exist, add it
|
||||||
|
to cl-tty first, then consume it in passepartout.
|
||||||
|
|
||||||
|
| This belongs in **cl-tty** (library) | This belongs in **passepartout** (application) |
|
||||||
|
|---------------------------------------|------------------------------------------------|
|
||||||
|
| Widget rendering, layout computation, dirty tracking | Which widgets to show and when |
|
||||||
|
| Theme system (presets, role→hex resolution, load/switch) | Theme choice and application-specific semantic keys |
|
||||||
|
| Markdown parser, renderer, syntax highlighter | What markdown content to render |
|
||||||
|
| Input handling (keymaps, text-input, textarea, event dispatch) | What keybindings to register and what actions they trigger |
|
||||||
|
| Dialog, select, toast rendering and keyboard navigation | Dialog content and on-submit/on-select callbacks |
|
||||||
|
| Word-wrap, char-width, cursor rendering | Cursor position and text content |
|
||||||
|
| Box, scrollbox, tabbar, panel containers | Data displayed inside containers |
|
||||||
|
|
||||||
|
**Concrete checklist before writing any UI function in a passepartout .org file:**
|
||||||
|
1. Run `(do-external-symbols (s :cl-tty.box) ...)` or check this table
|
||||||
|
2. If the function exists in cl-tty, call it — do not reimplement
|
||||||
|
3. If the function doesn't exist but belongs in a library (generic widget, theme
|
||||||
|
mechanism, layout primitive, input handler), add it to cl-tty first
|
||||||
|
4. If the function is passepartout-specific business logic (command dispatch,
|
||||||
|
daemon communication, gate trace data model), write it in passepartout
|
||||||
|
|
||||||
|
Common violations found in the codebase (do not repeat):
|
||||||
|
- Writing a parallel theme system (`*tui-theme*`, `*tui-theme-presets*`,
|
||||||
|
`theme-switch`) — use `cl-tty.theme` instead
|
||||||
|
- Writing a custom word-wrap — use `cl-tty.box:word-wrap` instead
|
||||||
|
- Writing a custom markdown parser or syntax highlighter — use
|
||||||
|
`cl-tty.markdown` instead
|
||||||
|
- Bypassing `select-handle-key` with manual dialog key dispatch — use
|
||||||
|
`select-handle-key` and `render-dialog` instead
|
||||||
|
- Hardcoding inline hex colors — use `(theme-color :role)` instead
|
||||||
|
- Manual framebuffer coordinate arithmetic — use `vbox`/`hbox`/`spacer` layout
|
||||||
|
from `cl-tty.layout` instead
|
||||||
|
|||||||
Submodule projects/cl-tty updated: 07cea571ef...94df17a7b9
Submodule projects/passepartout updated: 60ce9c894c...a0694d6489
Reference in New Issue
Block a user