Skip to content

Frame interactive inputs and demo update#4

Merged
joejollands merged 1 commit into
mainfrom
codex/create-design-spec-for-tui-package
Jan 15, 2026
Merged

Frame interactive inputs and demo update#4
joejollands merged 1 commit into
mainfrom
codex/create-design-spec-for-tui-package

Conversation

@joejollands
Copy link
Copy Markdown
Contributor

@joejollands joejollands commented Jan 15, 2026

Motivation

  • Ensure interactive inputs (text prompts, select, radio, multi-select) render inside TART’s themed framed canvas using the active theme’s colors and stable visual-length padding.
  • Replace full-screen clears with cursor-scoped redraws limited to the input’s framed region to avoid wiping the whole terminal and preserve surrounding output.
  • Unify framing behavior so highlighted rows use theme-driven highlight/text colors and long/ANSI/emoji labels remain visually aligned.
  • Provide a short interactive demo tweak to showcase framed text input in action.

Description

  • Add a new FrameRenderer helper (src/Support/FrameRenderer.php) that composes framed lines and provides format(), writeln(), writeStart(), and writeFinish() helpers using the active ThemeInterface and LineFormatter for visual-length aware padding.
  • Update HasEnhancedInput (src/Concerns/HasEnhancedInput.php) to frame prompt() and password() using FrameRenderer::writeStart()/writeFinish() so typed input appears inside the framed canvas.
  • Update InteractiveMenu, Select, and MultiSelect (src/Support/InteractiveMenu.php, src/Support/Select.php, src/Support/MultiSelect.php) to accept an optional ThemeInterface, construct a FrameRenderer, render options through it, apply theme highlight/text colors, and replace full-screen clears with TerminalControl::moveUp() plus scoped clears.
  • Propagate theme through helpers by updating HasInteractiveMenus and HasSelect (src/Concerns/HasInteractiveMenus.php, src/Concerns/HasSelect.php) to pass $this->getTheme() when instantiating interactive classes.
  • Add the TUI frame design spec documentation at docs/guides/TUI-FRAME-SPEC.md describing layout, rendering rules, and the plan for framing interactive inputs.
  • Update the interactive demo command (src/Laravel/Commands/TartInteractiveDemoCommand.php) to mention framed inputs, add a framed prompt() for a run name, and include the run name in the summary.

Testing

  • No automated tests were run for these changes.

@joejollands joejollands merged commit 612a86c into main Jan 15, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant