# llimphi-widget-terminal **Infinite, virtualized** terminal surface. Full design: `02_ruway/shuma/SDD-TERMINAL.md`. The control replaces the shell's `output_pane` in phases: unlimited scrollback at **constant** render cost (only the visible window is painted), three modes over the same cloth (IDE line / TUI grid / hybrid) and direct GPU where it pays off. **Phase 0:** **Layer 0** — `store::Scrollback`, an append-only scrollback store with a line index, a memory cap and O(1) access. Pure, with no UI dependencies: the agnostic core lives apart from whoever paints it (Rule 2). **Phase 1:** line mode — `view::line_surface` materializes only the visible rows under the widget's own `scroll_y` (**constant** render cost at unlimited scrollback), global numbering and colour by runs. **Phase 2:** **Layer 1** — the **blocks** model (`blocks`): the stream is a sequence of `blocks::Item`s (fixed-height chrome painted by the caller + ranges of store lines), virtualized over mixed heights with binary search; collapsing a block means not emitting its body. It maps the shell's `output_pane` (header/badge/stages/collapse) without the widget knowing about commands (Rule 2). Phase 1's line mode is the single-`Item::Lines` case. --- Part of **llimphi** — see [llimphi](../../README.md).