4 Commits
Author SHA1 Message Date
phranck 4493126758 Refactor: Swift 6 concurrency improvements and ContainerView architecture
Phase 1: Thread-Safe Primitives
- AppState now uses OSAllocatedUnfairLock for thread-safe state management
- SignalManager flags remain nonisolated(unsafe) with documentation explaining
  why (signal handlers cannot use locks safely)

Phase 2: @MainActor Isolation (Core Types)
- Terminal, FrameDiffWriter, RenderLoop, AppRunner, ViewRenderer: @MainActor
- App.main() uses MainActor.assumeIsolated for synchronous entry point
- renderOnce() function: @MainActor
- Tests updated with @MainActor annotations

ContainerView Refactoring
- Changed from body: Never + Renderable to body: some View
- Extracted rendering logic to private _ContainerViewCore
- Enables modifiers to work correctly on ContainerView

All 591 tests pass, SwiftLint clean.
2026-02-07 02:50:41 +01:00
phranck d3f8ff60f3 Chore: Change license to MIT
- Add LICENSE file (MIT)
- Update 141 Swift file headers: CC BY-NC-SA 4.0 → License: MIT
2026-02-06 00:21:51 +01:00
phranck f77cd8bdec Chore: Unified file headers across all Swift files
Update IDETemplateMacros.plist and replace headers in 136 Swift files with
new format: 🖥️ TUIKit — Terminal UI Kit for Swift. Remove sdsd.swift template draft.
2026-02-03 20:48:29 +01:00
phranck dc34b0fa55 Refactor: Line-level diff rendering — only write changed terminal lines
Introduce FrameDiffWriter that stores the previous frame's output and
compares line-by-line on each render. Only lines that actually differ
are written to the terminal, reducing I/O by ~94% for mostly-static UI.

- Extract output line building from WindowGroup.renderScene into
  FrameDiffWriter.buildOutputLines() pure function
- WindowGroup.renderScene now returns FrameBuffer instead of writing
  directly to terminal
- RenderLoop (now final class) owns FrameDiffWriter for state tracking
- Content and status bar are diffed independently
- SIGWINCH invalidates diff cache for full repaint on resize
- SignalManager gains separate consumeResizeFlag() for resize detection
- 13 new tests for diff computation and output line building
2026-02-02 21:33:43 +01:00