v0.2.0: Box and Text renderables + dirty tracking #3

Merged
amr merged 4 commits from feature/v0.2.0-box-and-text into main 2026-05-11 22:02:21 -04:00
Owner

Implements: v0.2.0 from ROADMAP.org

Adds:

  • Box renderable — border (single/double/rounded), background fill, title
  • Text renderable — word-wrap, truncation mode, colored text
  • Span class — inline styled segments (bold, italic, underline, etc.)
  • Dirty tracking — dirty-mixin mixin class with mark-clean/mark-dirty
  • ASDF system updated with src/components module
  • modern-backend now accepts :output-stream for testing

Tests: 31 assertions, 100% GREEN

Lines: ~450 new lines across 5 source files + 3 test files

Previous PR: #2 (v0.0.1-v0.0.3: backend protocol + layout engine)

**Implements:** v0.2.0 from ROADMAP.org **Adds:** - Box renderable — border (single/double/rounded), background fill, title - Text renderable — word-wrap, truncation mode, colored text - Span class — inline styled segments (bold, italic, underline, etc.) - Dirty tracking — dirty-mixin mixin class with mark-clean/mark-dirty - ASDF system updated with src/components module - modern-backend now accepts :output-stream for testing **Tests:** 31 assertions, 100% GREEN **Lines:** ~450 new lines across 5 source files + 3 test files **Previous PR:** #2 (v0.0.1-v0.0.3: backend protocol + layout engine)
amr added 3 commits 2026-05-11 10:49:13 -04:00
- 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
- 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
- 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
amr added 1 commit 2026-05-11 10:57:46 -04:00
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)
amr merged commit 419c8df653 into main 2026-05-11 22:02:21 -04:00
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/cl-tty#3