module
Lapis::Docs::J_MODERN_CLI_AND_TUI::A_INTERACTIVE_COMMAND_CENTER
Overview
Interactive Terminal Command Center & Differential TUI
Comprehensive architectural and operational guide to Lapis's modern, double-buffered terminal user interface built with the Opal shard.
Executive Summary & Key Topics
| Topic | Method / Anchor | Description |
|---|---|---|
| Command Center Overview | .topic_00_command_center_overview |
High-density telemetry dashboard, split-pane viewport, and real-time execution metrics. |
| Differential Cell Rendering | .topic_01_double_buffered_differential_rendering |
Zero-flicker double-buffered ANSI rendering powered by Opal::UI::DiffRenderer. |
| Multi-View Viewport Tabs | .topic_02_multi_view_tabs |
Tabbed navigation between Dashboard, Failures, Breakdown, and Live Telemetry. |
| Log Scrolling, Search & Clipboard Export | .topic_03_viewport_scrolling_and_search |
Real-time follow mode, substring pattern filtering, and OSC 52 system clipboard export. |
| Interactive Navigation & Keybindings | .topic_04_command_palette_and_keybindings |
Complete keyboard shortcuts reference for test inspection and modal navigation. |
Related Guides & Source References
- CLI Runner:
tools/lapis/src/commands/test.cr - TUI Engine:
tools/lapis/src/test_runner/tui.cr - Diff Renderer:
tools/lapis/lib/opal/src/ui/diff_renderer.cr
Defined in:
libgodot/docs/j_modern_cli_and_tui/a_interactive_command_center.crClass Method Summary
-
.topic_00_command_center_overview : Nil
Command Center Overview: High-density telemetry dashboard, split-pane viewport, and real-time execution metrics.
-
.topic_01_double_buffered_differential_rendering : Nil
Differential Cell Rendering: Zero-flicker double-buffered ANSI rendering powered by Opal::UI::DiffRenderer.
-
.topic_02_multi_view_tabs : Nil
Multi-View Viewport Tabs: Tabbed navigation between Dashboard, Failures, Breakdown, and Live Telemetry.
-
.topic_03_viewport_scrolling_and_search : Nil
Log Scrolling, Search & Clipboard Export: Real-time follow mode, substring pattern filtering, and OSC 52 system clipboard export.
-
.topic_04_command_palette_and_keybindings : Nil
Interactive Navigation & Keybindings: Complete keyboard shortcuts reference for test inspection and modal navigation.
Class Method Detail
Command Center Overview: High-density telemetry dashboard, split-pane viewport, and real-time execution metrics.
Features
- Hero header displaying host OS, engine version, compiler version, active elapsed time, and heartbeat indicator.
- Split-pane layout: Left pane displays phased execution checklist; right pane displays rolling live logs.
- Real-time smooth progress bar with phase completion percentage and pass/fail counts.
- Automatic non-TTY fallback for CI/CD pipelines, background daemons, or when invoked with
--no-tui.
Differential Cell Rendering: Zero-flicker double-buffered ANSI rendering powered by Opal::UI::DiffRenderer.
Mechanics
- The TUI allocates a virtual screen buffer representing terminal grid cells
(char, style). - Each update frame writes desired characters into the front buffer.
Opal::UI::DiffRenderercompares front buffer cells against back buffer cells.- Only modified cells emit ANSI cursor movement and color escape sequences to standard output.
- Completely eliminates screen tearing, flicker, and terminal lag during high-frequency log emission.
Multi-View Viewport Tabs: Tabbed navigation between Dashboard, Failures, Breakdown, and Live Telemetry.
| Tab Key | View Name | Purpose |
|---|---|---|
1 |
Dashboard | Primary split-pane view displaying checklist phases and rolling stdout. |
2 |
Failures | Dedicated drill-down log view isolated strictly to failed test assertions. |
3 |
Breakdown | Tabular summary of test categories, durations, and quantitative metrics. |
4 |
Telemetry | Peak memory allocation, GC pause latency, and process thread counters. |
Log Scrolling, Search & Clipboard Export: Real-time follow mode, substring pattern filtering, and OSC 52 system clipboard export.
Log Navigation Features
- Follow Mode (
f): Automatically pins the viewport to the newest log entries. Pauses on manual scroll (PageUp/PageDown/↑/↓). - In-Log Search (
/): Opens live prompt to highlight and cycle through matching log lines. - OSC 52 Clipboard Export (
c): Copies selected log traces directly into the native OS system clipboard without external dependencies.
Interactive Navigation & Keybindings: Complete keyboard shortcuts reference for test inspection and modal navigation.
| Key | Action |
|---|---|
1 - 4 |
Switch active viewport tab (Dashboard, Failures, Breakdown, Telemetry). |
↑ / ↓ or j / k |
Navigate between test phases in checklist pane. |
PageUp / PageDown |
Scroll active logs viewport. |
f |
Toggle live autoscroll follow mode on or off. |
/ |
Open substring search input. |
c |
Copy visible logs to clipboard via OSC 52. |
Enter / Space |
Open focused phase detail modal for comprehensive log inspection. |
? |
Toggle interactive help overlay. |
q / Ctrl+C |
Exit test runner cleanly. |